/* Scoped to the Constructor. The portal navigation and other workspaces keep their own styles. */
#section-constructor,.ctor-dialog{
  --ctor-border:#2d3d53;
  --ctor-base:#101721;
  --ctor-surface:#151f2c;
  --ctor-text:#eef3f9;
  --ctor-muted:#a4b3c6;
  --ctor-accent:#a9c6ff;
  --ctor-primary:#315fc4;
  color:var(--ctor-text);
}
#section-constructor{min-width:0;container:constructor / inline-size}
#section-constructor *, .ctor-dialog *{box-sizing:border-box}
#section-constructor button,.ctor-dialog button{font:inherit;cursor:pointer}
#section-constructor button:disabled,.ctor-dialog button:disabled{opacity:.48;cursor:default}
#section-constructor :focus-visible,.ctor-dialog :focus-visible{outline:2px solid #9bc3ff;outline-offset:2px}
#section-constructor input:disabled,#section-constructor select:disabled,#section-constructor textarea:disabled{opacity:.75}
#section-constructor [hidden],.ctor-dialog [hidden]{display:none!important}
.ctor-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.ctor-workspace{display:grid;grid-template-columns:clamp(212px,20cqi,260px) minmax(0,1fr);gap:18px;align-items:start;min-width:0}
.ctor-main,.ctor-tab-panel{min-width:0}
.ctor-sidebar{
  background:var(--ctor-base);border:1px solid var(--ctor-border);
  border-radius:14px;padding:14px;min-width:0;position:sticky;top:14px;
}
.ctor-sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px}
.ctor-sidebar-heading h3{margin:0;font-size:17px;line-height:1.25}
.ctor-library-filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.ctor-library-filters .ctor-search{grid-column:1/-1}
#section-constructor .ctor-field,.ctor-dialog .ctor-field{display:grid;gap:6px;color:#c2ccda;font-size:12px;min-width:0}
#section-constructor input,#section-constructor select,#section-constructor textarea,.ctor-dialog input,.ctor-dialog select,.ctor-dialog textarea{
  font:inherit;background:#0e1722;color:var(--ctor-text);border:1px solid #34465e;
  border-radius:8px;padding:9px 10px;min-width:0;max-width:100%;box-shadow:none;
}
#section-constructor input::placeholder,.ctor-dialog input::placeholder{color:#96a8bf}
#section-constructor input:focus,#section-constructor select:focus,#section-constructor textarea:focus,.ctor-dialog input:focus,.ctor-dialog select:focus,.ctor-dialog textarea:focus{border-color:#83acf0}
#section-constructor .ctor-check{display:flex;align-items:center;gap:5px;font-size:12px;color:#c3cddd;margin:0;min-height:34px}
#section-constructor .ctor-check input{width:15px;height:15px;accent-color:#6795eb;margin:0}
.ctor-product-list{
  display:grid;gap:5px;max-height:clamp(130px,calc(100dvh - 310px),840px);
  overflow:auto;scrollbar-color:#41536e transparent;padding:3px;margin:10px -3px 0;
}
#section-constructor .ctor-product{
  display:block;text-align:left;position:relative;padding:11px 10px 11px 13px;
  background:transparent;border:1px solid transparent;border-radius:9px;
  color:var(--ctor-text);width:100%;min-width:0;line-height:1.35;
}
#section-constructor .ctor-product:hover{border-color:#384e6b;background:#192737}
#section-constructor .ctor-product.is-active{border-color:#3e5f8e;background:#1a2d47}
.ctor-product.is-active::before{content:"";position:absolute;inset:10px auto 10px 0;width:3px;border-radius:0 3px 3px 0;background:var(--ctor-accent)}
.ctor-product strong,.ctor-product small{display:block;overflow-wrap:anywhere}
.ctor-product strong{font-size:13px;font-weight:650}
.ctor-product small{font-size:11px;margin-top:4px;color:#b6c4d8}
.ctor-product small:empty{display:none}
.ctor-list-count{font-size:11px;color:var(--ctor-muted);margin:9px 0 0;border-top:1px solid #273445;padding-top:11px}
.ctor-sidebar .ctor-empty-note{padding-inline:3px}

#section-constructor .ctor-button,.ctor-dialog .ctor-button{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;
  padding:7px 11px;border:1px solid #3b4e68;border-radius:8px;color:var(--ctor-text);
  background:#1a293b;font-size:12px;font-weight:650;line-height:1.4;text-decoration:none;
  white-space:normal;transition:background .15s,border-color .15s;
}
#section-constructor .ctor-button:hover:not(:disabled),.ctor-dialog .ctor-button:hover:not(:disabled){background:#253952;border-color:#668fc7}
#section-constructor .ctor-button.ctor-primary,.ctor-dialog .ctor-button.ctor-primary{background:var(--ctor-primary);border-color:#5c85d7;color:#fff}
#section-constructor .ctor-button.ctor-primary:hover:not(:disabled),.ctor-dialog .ctor-button.ctor-primary:hover:not(:disabled){background:#386cd6}
.ctor-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ctor-overview{border:1px solid var(--ctor-border);border-radius:14px;background:var(--ctor-base);padding:18px;margin-bottom:14px}
.ctor-editor-header{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:13px;margin:0 0 18px}
.ctor-editor-identity{min-width:0;flex:1 1 220px}
.ctor-editor-header h3{color:var(--ctor-text);font-size:clamp(22px,3cqi,29px);letter-spacing:-.025em;margin:0 0 6px;overflow-wrap:anywhere;line-height:1.18}
.ctor-editor-tools{gap:7px;max-width:100%}
.ctor-edit-tools{display:flex;gap:3px;align-items:center;padding-right:7px;margin-right:1px;border-right:1px solid var(--ctor-border)}
#section-constructor .ctor-edit-tools .ctor-button{background:transparent;border-color:transparent}
#section-constructor .ctor-edit-tools .ctor-button:hover:not(:disabled){border-color:#3b4e68;background:#1a293b}
#section-constructor .ctor-edit-tools [data-action="undo"],#section-constructor .ctor-edit-tools [data-action="redo"]{min-width:32px;padding-inline:6px;font-size:16px}
#section-constructor .ctor-editor-tools [data-action="more"]{min-width:36px;font-size:12px;letter-spacing:.08em}
.ctor-save-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--ctor-muted)}
.ctor-save-status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.ctor-save-status[data-state="saved"]{color:#a6d8bf}
.ctor-save-status[data-state="pending"]{color:#e8c997}
.ctor-status-error,.ctor-danger{color:#ffb5a9!important}
.ctor-notice{padding:11px 14px;border:1px solid #536b88;background:#182331;border-radius:9px;color:#d3e2f4;margin-bottom:12px;white-space:pre-wrap}
.ctor-notice.ctor-danger{background:#321f23;border-color:#854d4e}
.ctor-metadata{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.6fr) minmax(0,1fr);gap:12px}
.ctor-metadata input,.ctor-dimensions input{width:100%;min-height:37px}
.ctor-dimensions{margin:11px 0 0;font-size:12px;color:var(--ctor-muted)}
.ctor-dimensions summary{cursor:pointer;display:list-item;width:fit-content;padding:6px 2px}
.ctor-dimensions>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:550px;margin-top:8px}
.ctor-tabs{display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--ctor-border);border-radius:12px;background:var(--ctor-base);padding:5px;margin:0 0 14px}
#section-constructor .ctor-tabs button{
  flex:0 1 auto;min-width:0;background:transparent;border:1px solid transparent;border-radius:8px;color:#becbde;padding:8px 13px;
  font-size:13px;font-weight:650;line-height:1.4;text-align:left;min-height:37px;
}
#section-constructor .ctor-tabs button.is-active{color:#eaf2ff;background:#263d5e;border-color:#446b9d}
#section-constructor .ctor-tabs button:hover:not(.is-active){background:#1c2a3b;color:#eff4ff}

.ctor-start{
  display:grid;align-items:center;gap:24px;padding:clamp(22px,4cqi,48px);
  border:1px solid var(--ctor-border);border-radius:18px;
  background:linear-gradient(126deg,#152338,#101721 72%);
}
.ctor-start-with-cover{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)}
.ctor-start h3{color:var(--ctor-text);font-size:clamp(23px,3.6cqi,39px);line-height:1.14;letter-spacing:-.04em;margin:0 0 12px}
.ctor-start p{color:#b9c7da;font-size:14px;max-width:420px;line-height:1.6;margin:0 0 20px}
.ctor-start-cover{min-width:0;margin:0;width:min(100%,270px);justify-self:end;padding:12px;background:#eef4f9;color:#304460;border-radius:12px;box-shadow:0 6px 26px #050b1466}
.ctor-start-cover img{display:block;width:100%;height:clamp(120px,18cqi,215px);object-fit:contain;background:white;border-radius:6px}
.ctor-start-cover figcaption{font-size:11px;font-weight:650;padding:7px 1px 0}

.ctor-block{margin:0 0 16px;border:1px solid var(--ctor-border);border-radius:14px;background:var(--ctor-surface);overflow:hidden}
.ctor-block-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;flex-wrap:wrap}
.ctor-block-caption{display:flex;align-items:center;gap:9px}
.ctor-count{font-size:11px;color:#c3d6f0;border:1px solid #334963;border-radius:6px;padding:2px 6px;line-height:1.35;background:#1a2a3c;font-variant-numeric:tabular-nums}
.ctor-block h4{font-size:16px;margin:0}
.ctor-table-scroll{overflow:auto;scrollbar-color:#52617a #121923}
.ctor-table-scroll:has(tbody:empty){display:none}
#section-constructor .ctor-table{min-width:770px;width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}
#section-constructor .ctor-table th,#section-constructor .ctor-table td{text-align:left;white-space:normal;padding:6px;border-top:1px solid #293443;color:#d7e2f1;vertical-align:middle}
#section-constructor .ctor-table th{font-size:11px;color:#b5c3d5;background:#172232;text-transform:none;font-weight:650;padding-block:10px}
#section-constructor .ctor-table input{width:100%;padding:8px 7px;font-size:13px;border-color:transparent;background:#18222f;border-radius:6px;min-height:36px}
#section-constructor .ctor-table input:hover{border-color:#4a607d}
#section-constructor .ctor-table input:focus{border-color:#679ce8;background:#18283e}
#section-constructor .ctor-table .ctor-position{color:#90b5ea;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.ctor-panels th:nth-child(1){width:40px}.ctor-panels th:nth-child(2){width:170px}.ctor-panels th:nth-child(3){width:62px}.ctor-panels th:nth-child(4),.ctor-panels th:nth-child(5){width:80px}.ctor-panels th:nth-child(6){width:64px}.ctor-panels th:nth-child(7){width:120px}.ctor-panels th:nth-child(8){width:84px}.ctor-panels th:nth-child(9){width:64px}
.ctor-hardware th:nth-child(1){width:40px}.ctor-hardware th:nth-child(2){width:84px}.ctor-hardware th:nth-child(3){width:220px}.ctor-hardware th:nth-child(4){width:66px}.ctor-hardware th:nth-child(5){width:64px}.ctor-hardware th:nth-child(6){width:120px}.ctor-hardware th:nth-child(7){width:68px}
.ctor-row-actions{display:grid;grid-template-columns:1fr 1fr;gap:3px}
#section-constructor .ctor-row-actions .ctor-button{min-height:26px;padding:2px 5px;font-size:15px;background:transparent;border-color:#334155}
#section-constructor .ctor-row-actions [data-action="row-delete"]:hover{color:#ffc1b7;border-color:#7b4f53;background:#3b2a32}
.ctor-row-hint{display:block;font-size:10px;color:#84bfa6;padding:3px 6px}
#section-constructor .ctor-photo-button{height:57px;width:76px;padding:3px;background:white;border:1px solid #60758b;border-radius:5px;display:grid;place-items:center;font-size:11px;color:#4a5b70}
.ctor-photo-button img{display:block;width:100%;height:100%;object-fit:contain}
#section-constructor .ctor-table select{padding:5px;font-size:11px;min-height:32px}
#section-constructor .ctor-table select+.ctor-button{padding:3px 6px;min-height:25px;font-size:10px;margin-top:3px;background:transparent}
.ctor-auto-quantity{display:block;padding:8px 4px;text-align:center;color:#9fd3c0;font-weight:700}
.ctor-empty-note{font-size:13px;color:var(--ctor-muted);padding:14px 18px;margin:0;line-height:1.6}
.ctor-issues{font-size:12px;margin-bottom:13px;color:#d7bf89}
.ctor-issues:empty{display:none}
.ctor-issues details{border:1px solid #675a3b;border-radius:10px;padding:10px 14px;background:#252116}
.ctor-issues summary{cursor:pointer;padding:3px 0}
.ctor-issues ul{padding-left:20px;line-height:1.7;margin-bottom:4px}
.ctor-issues .ctor-help{margin:8px 0 0;color:#c0b59a}
.ctor-issues li{margin:5px 0}
.ctor-issues li small{display:block;color:#adac9e;font-size:10px;margin-top:2px}
#section-constructor .ctor-issue-link{display:block;min-height:30px;text-align:left;color:inherit;background:transparent;border:0;border-bottom:1px dotted currentColor;padding:3px 0;font-size:12px;line-height:1.6}
#section-constructor .ctor-issue-link:hover{color:#fff0cb}
.ctor-loading{padding:30px;color:#bbcee4}
.ctor-drawing-tabs{display:flex;gap:6px;padding:0 14px 14px;overflow:auto}
#section-constructor .ctor-drawing-tabs [aria-current=true]{background:#234673;border-color:#77a5e4}
.ctor-drawing-meta{padding:13px 14px;border-block:1px solid #2c394b;display:grid;grid-template-columns:1.4fr .8fr auto;gap:10px;align-items:end}
.ctor-drawing-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,25%);align-items:start;gap:16px;padding:18px}
.ctor-canvas-shell{background:white;line-height:0;overflow:hidden;border-radius:5px;border:1px solid #8e9fb3;position:relative}
.ctor-diagram{display:block;background:white;width:100%;height:auto;max-height:none}
.ctor-diagram [data-callout]{cursor:grab;touch-action:none}
.ctor-diagram [data-callout]:active{cursor:grabbing}
.ctor-canvas-shell.is-placing{cursor:crosshair}
.ctor-callout-tools{display:grid;gap:12px;padding:14px;border:1px solid #28394e;border-radius:10px;background:#101823;font-size:12px}
.ctor-help{font-size:12px;line-height:1.7;color:#aabacf;margin:0 0 12px}
.ctor-callout-edit{display:grid;gap:11px;border-top:1px solid #39485e;padding-top:12px}
.ctor-coordinates{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ctor-drawing-check{border:1px solid #806334;background:#302719;border-radius:8px;padding:10px;color:#e5cd9d;line-height:1.6;font-size:11px;display:grid;gap:9px}
.ctor-drawing-check.is-checked{border-color:#3b6b59;background:#182e27;color:#a9d3bf}
.ctor-steps{padding:0 16px 16px;display:grid;gap:12px}
.ctor-output-chooser,.ctor-output-workspace{display:grid;gap:14px;scroll-margin-top:20px}
.ctor-output-intro{padding-block:4px}
.ctor-output-intro h3,.ctor-output-heading h3{margin:0;color:#eef5ff;font-size:clamp(20px,3cqw,28px);line-height:1.2;letter-spacing:-.022em}
.ctor-output-intro p,.ctor-output-heading p{margin:7px 0 0;color:var(--ctor-muted);font-size:13px;line-height:1.65}
.ctor-output-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#section-constructor .ctor-output-card{
  display:grid;grid-template-columns:42px minmax(0,1fr) 12px;gap:13px;align-items:center;
  padding:16px;width:100%;min-width:0;min-height:104px;text-align:left;
  color:#e3edfa;border:1px solid var(--ctor-border);border-radius:13px;
  background:var(--ctor-surface);transition:background .15s,border-color .15s;
}
#section-constructor .ctor-output-card:hover{background:#1e2c43;border-color:#5c7da9}
.ctor-output-icon{display:grid;place-items:center;width:42px;height:42px;color:#a7c7ff;background:#253957;border-radius:10px}
.ctor-output-icon svg{width:24px;height:24px}
.ctor-output-card strong{display:block;margin-bottom:4px;color:inherit;font-size:15px;line-height:1.35}
.ctor-output-card small{display:block;color:#b3c1d3;font-size:12px;line-height:1.55}
.ctor-output-arrow{color:#a3badc;font-size:24px;line-height:1}
#section-constructor .ctor-output-kitchen{min-height:87px;background:#172c30;border-color:#365c5c}
#section-constructor .ctor-output-kitchen:hover{background:#1e353a;border-color:#70a39d}
.ctor-output-kitchen .ctor-output-icon{background:#275056;color:#b0e5db}
.ctor-document-sources{margin-top:18px;padding:15px 16px;display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;border-top:1px solid var(--ctor-border)}
.ctor-document-sources h4{margin:0;color:#c2cfe1;font-size:13px}
.ctor-output-workspace-head{display:grid;justify-items:start;gap:15px;padding:17px;border:1px solid var(--ctor-border);border-radius:13px;background:var(--ctor-surface)}
.ctor-output-heading{display:flex;gap:12px;align-items:flex-start;min-width:0}
.ctor-output-heading .ctor-output-icon{flex:none}
.ctor-output-status{display:inline-flex;align-items:center;gap:8px;flex-flow:row-reverse wrap}
.ctor-output-problems{color:#e8d2a7;font-size:12px;padding:11px 14px;border:1px solid #5a4d36;border-radius:9px;background:#28231a}
.ctor-output-problems ul{padding-left:16px;margin:3px 0 0}
.ctor-output-workspace-head>[data-output-problems]:empty{display:none}
.ctor-output-edit{margin:0}
.ctor-instruction-title{max-width:640px;padding:0 16px 16px}
.ctor-output-step{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:start;padding:12px;border:1px solid var(--ctor-border);border-radius:10px;background:#111a27}
.ctor-output-step-number{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#27395a;color:#d0e1ff;font-size:12px;font-weight:700}
.ctor-output-step-fields{display:grid;gap:9px;min-width:0}
.ctor-output-step-actions{display:flex;gap:4px;flex-wrap:wrap}
#section-constructor .ctor-output-step-actions .ctor-button{min-width:31px;min-height:32px;padding:4px}
.ctor-output-step-fields textarea{resize:vertical;min-height:76px;font-size:13px;line-height:1.5}
.ctor-output-legend{list-style:none;margin:0;padding:0;display:grid;gap:5px;font-size:12px}
.ctor-output-legend li strong{display:inline-block;min-width:23px}
.ctor-document-state{color:#f2d5a5;background:#352b23;border-radius:6px;font-size:11px;padding:4px 7px;line-height:1.3}
.ctor-document-state.is-ready{color:#9ee6bf;background:#18342d}
.ctor-document-preview{border:1px solid var(--ctor-border);border-radius:14px;background:#101722;padding:16px clamp(12px,3vw,28px) 24px}
.ctor-preview-title{font-size:13px!important;color:var(--ctor-muted);margin:0;font-weight:650;cursor:pointer}
.ctor-document-preview[open] .ctor-preview-title{margin-bottom:14px}
.ctor-paper{background:#fff;color:#172e2a;padding:clamp(12px,4vw,38px);max-width:860px;margin:0 auto;border:1px solid #b1c0b8;border-radius:4px;box-shadow:0 8px 24px #0004;overflow-wrap:anywhere}
.ctor-paper>header{border-bottom:2px solid #315e4e;margin-bottom:20px;padding-bottom:15px}
.ctor-paper>header>span{font-size:13px;font-weight:700;color:#315e4e;letter-spacing:.025em}
#section-constructor .ctor-paper h3{font-size:27px;color:#1b3a30;margin:7px 0 2px}
.ctor-paper header p{margin:3px 0;font-size:13px;color:#526b61}
.ctor-paper h4{color:#254b3d;font-size:14px;padding:8px 10px;background:#e6eee8;border-radius:3px;margin:20px 0 8px}
.ctor-paper-table-scroll{max-width:100%;overflow:auto}
#section-constructor .ctor-preview-table{table-layout:fixed;min-width:0;width:100%;color:#1a3229;border-collapse:collapse;font-size:11px}
#section-constructor .ctor-preview-table th,#section-constructor .ctor-preview-table td{border-top:0;border-bottom:1px solid #d4ded5;padding:7px 5px;text-align:left;white-space:normal;color:#253f33;overflow-wrap:anywhere}
#section-constructor .ctor-preview-table th{background:#eef3ee;text-transform:none;font-size:10px;font-weight:600}
.ctor-preview-table th:first-child,.ctor-preview-table td:first-child{width:35px}
.ctor-preview-table img{display:block;width:60px;max-width:100%;height:40px;object-fit:contain}
.ctor-preview-table.is-panels th:nth-child(2),.ctor-preview-table.is-hardware th:nth-child(3){width:28%}
.ctor-preview-table.is-hardware th:nth-child(2){width:75px}
.ctor-preview-drawing .ctor-diagram{max-height:540px;object-fit:contain}
.ctor-paper ol{padding-left:22px;font-size:12px;line-height:1.6}.ctor-paper li p{margin:3px 0 12px;white-space:pre-wrap}
.ctor-archive-banner{padding:10px 12px;background:#252c36;border:1px solid #586477;border-radius:9px;color:#becbde;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.ctor-dialog{padding:0;border:1px solid #455574;background:#101923;color:#e9f1fb;border-radius:14px;box-shadow:0 25px 80px #0009}
.ctor-dialog-wide{--ctor-dialog-width:900px}
/* Keep short actions compact despite the portal's general dialog sizing. */
dialog.ctor-dialog[open] {
  inset: 0 !important;
  margin: auto !important;
  width: min(var(--ctor-dialog-width, 640px), calc(100% - 24px)) !important;
  height: fit-content !important;
  max-width: none !important;
  max-height: calc(100dvh - 24px) !important;
}
.ctor-dialog::backdrop{background:#03070dc9;backdrop-filter:blur(3px)}
.ctor-dialog-inner>header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 20px;border-bottom:1px solid #35475f;position:sticky;top:0;background:#142132;z-index:2}
.ctor-dialog-inner>header h3{font-size:19px;margin:0}.ctor-dialog-inner>header .ctor-button{font-size:22px;padding:0;width:30px;min-height:30px;background:transparent}
.ctor-dialog-body{padding:19px;display:grid;gap:14px;font-size:13px}.ctor-dialog-body>p{line-height:1.7;margin:0;color:#c3d1e3}
.ctor-create-options,.ctor-menu{display:grid;gap:10px}.ctor-menu .ctor-button{justify-content:flex-start;min-height:43px}
.ctor-dialog .ctor-create-options .ctor-button{display:grid;justify-content:stretch;text-align:left;gap:5px;padding:13px 15px;min-height:72px}
.ctor-create-options strong{font-size:14px;color:#e5efff}
.ctor-create-options span{font-size:12px;font-weight:400;color:#aabed9;line-height:1.55}
.ctor-create-extra{border-top:1px solid #354259;padding-top:12px;color:#b0c3dc;font-size:12px}
.ctor-create-extra summary{cursor:pointer;min-height:32px}
.ctor-create-extra .ctor-help{margin:9px 0}
.ctor-template-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-height:60dvh;overflow:auto}
.ctor-dialog .ctor-template{display:block;text-align:left;padding:12px;background:#182637;border:1px solid #3d5572;border-radius:8px;color:#d6e6f9}
.ctor-template strong,.ctor-template span,.ctor-template small{display:block}.ctor-template strong{font-size:16px}.ctor-template span{margin-top:5px;font-size:12px}.ctor-template small{margin-top:8px;color:#a7bdd9;font-size:10px}
.ctor-library-tools{display:flex;align-items:end;gap:10px}.ctor-library-tools>.ctor-field{flex:1}
.ctor-library-list{display:grid;gap:9px;max-height:58dvh;overflow:auto}
.ctor-library-item{display:grid;grid-template-columns:76px minmax(0,1fr) 62px auto;gap:12px;align-items:center;border:1px solid #32455e;border-radius:9px;padding:10px}
.ctor-library-item img,.ctor-library-no-image{width:76px;height:60px;object-fit:contain;background:white;border-radius:5px}.ctor-library-no-image{display:grid;place-items:center;color:#586c80;font-size:11px;background:#192736;border:1px dashed #4a617e}
.ctor-library-item strong{display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere}.ctor-library-item small{display:block;color:#9eb4d1;font-size:11px;margin-top:4px}.ctor-library-item>div:last-child{display:grid;gap:5px}
.ctor-dialog-error{color:#ffc0b5;white-space:pre-wrap;font-size:12px}.ctor-dialog-error:empty{display:none}
.ctor-catalog-photo{display:flex;align-items:center;gap:15px}.ctor-catalog-photo img{width:100px;height:85px;object-fit:contain;background:white;border-radius:7px}
.ctor-history{display:grid;gap:8px}.ctor-history article{display:flex;gap:8px;align-items:center;padding:12px;border:1px solid #344861;border-radius:8px}.ctor-history article>div{flex:1}.ctor-history strong,.ctor-history span{display:block}.ctor-history span{font-size:11px;color:#a6bbd5;margin-top:4px}
.ctor-revision-tables{max-height:50dvh;overflow:auto}.ctor-revision-tables table{min-width:0;width:100%;font-size:12px}.ctor-revision-tables td,.ctor-revision-tables th{text-align:left;padding:7px;white-space:normal}

/* Breakpoints follow the actual workspace width after the portal sidebar. */
@container constructor (max-width:1120px){
  .ctor-drawing-meta{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .ctor-drawing-meta>.ctor-actions{grid-column:1/-1}
  .ctor-drawing-layout{grid-template-columns:minmax(0,1fr)}
  .ctor-callout-tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .ctor-callout-tools>.ctor-help{margin:0}
  .ctor-callout-edit,.ctor-drawing-check{grid-column:1/-1}
}
@container constructor (max-width:850px){
  .ctor-workspace{grid-template-columns:minmax(0,1fr);gap:12px}
  .ctor-sidebar{position:static}
  .ctor-library-filters{grid-template-columns:minmax(0,1fr) minmax(0,.65fr) auto}
  .ctor-library-filters .ctor-search{grid-column:auto}
  .ctor-product-list{grid-template-columns:repeat(3,minmax(0,1fr));max-height:158px}
  .ctor-list-count{padding-top:8px;margin-top:6px}
}
@container constructor (max-width:560px){
  .ctor-library-filters{grid-template-columns:minmax(0,1fr) auto}
  .ctor-library-filters .ctor-search{grid-column:1/-1}
  .ctor-product-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ctor-overview{padding:13px}
  .ctor-editor-header{gap:11px;margin-bottom:14px}
  .ctor-editor-tools{width:100%}
  .ctor-metadata{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
  .ctor-metadata>.ctor-field:nth-child(2){grid-column:1/-1;grid-row:1}
  .ctor-tabs{gap:4px}
  #section-constructor .ctor-tabs button{flex:1 1 85px;padding:8px;font-size:12px;text-align:center}
  .ctor-start-with-cover{grid-template-columns:minmax(0,1fr)}
  .ctor-start-cover{justify-self:start;width:min(100%,215px)}
  .ctor-block-title{padding:11px}
  .ctor-drawing-layout{padding:10px}
  .ctor-callout-tools,.ctor-drawing-meta{grid-template-columns:minmax(0,1fr)}
  .ctor-output-grid{grid-template-columns:minmax(0,1fr)}
  #section-constructor .ctor-output-card{min-height:86px;padding:12px;grid-template-columns:38px minmax(0,1fr) 12px;gap:10px}
  .ctor-output-icon{width:38px;height:38px}
  .ctor-output-step{grid-template-columns:28px minmax(0,1fr)}
  .ctor-output-step-actions{grid-column:2/-1}
  .ctor-output-workspace-head{padding:13px}
  #section-constructor .ctor-preview-table{min-width:395px}
}
@media(max-width:620px){
  .ctor-dialog-body{padding:14px}
  .ctor-template-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ctor-library-item{grid-template-columns:60px minmax(0,1fr) 55px;gap:9px}
  .ctor-library-item>div:last-child{grid-column:2/-1;display:flex}
  .ctor-library-item img,.ctor-library-no-image{width:60px;height:55px}
  .ctor-library-tools{align-items:stretch;flex-direction:column}
  .ctor-history article{flex-wrap:wrap}
  .ctor-history article>div{flex-basis:100%}
}
@media(prefers-reduced-motion:reduce){
  #section-constructor .ctor-button,.ctor-dialog .ctor-button,#section-constructor .ctor-output-card{transition:none}
}
