.compact-workbench.cutout-mode .facade-settings{display:none!important}
.compact-workbench.cutout-mode .figure-mode-tabs,.compact-workbench.cutout-mode .roof-models{display:none!important}
.cutout-editor{position:absolute;right:126px;top:var(--workspace-toolbar-height,68px);z-index:28;width:280px;max-height:calc(100% - var(--workspace-toolbar-height,68px));overflow:auto;padding:10px 12px;background:#fff;border:1px solid #b9c9d4;box-shadow:0 5px 20px #182f4118;display:grid;gap:9px;font:12px Arial,sans-serif;color:#3d5c70}
.cutout-editor[hidden],.cutout-editor [hidden]{display:none!important}.cutout-editor header,.cutout-dialog header{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #d8e1e7;padding-bottom:8px}.cutout-editor header button,.cutout-dialog header button{padding:0 6px;font-size:21px}
/* A19 option 1: same anchor as the native panel, only the next step is visible. */
.cutout-empty{position:absolute;right:126px;top:var(--workspace-toolbar-height,68px);z-index:27;box-sizing:border-box;width:248px;padding:10px 12px;border:1px solid #8396a5;border-radius:3px;background:#f0f3f7;color:#344b5e;box-shadow:0 3px 12px #25465a14;font:12px/1.45 Arial,sans-serif}
.cutout-empty[hidden],.cutout-empty [hidden]{display:none!important}.cutout-empty strong{display:block;font-size:12px;margin-bottom:3px}.cutout-empty p{margin:0}.cutout-empty .cutout-empty-error{margin-top:6px;color:#a4524b}
.cutout-editor button,.cutout-dialog button{border:1px solid #c1d0db;background:#fff;color:#47677d;border-radius:3px;padding:6px 8px;font:12px Arial,sans-serif;cursor:pointer}.cutout-editor button:disabled{opacity:.4;cursor:default}.cutout-editor button[aria-pressed=true]{background:#e7eff4;border-color:#8ba8bc;color:#295775}
.cutout-editor label,.cutout-dialog label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#597588}.cutout-editor input,.cutout-editor select,.cutout-dialog input,.cutout-dialog select{width:100%;min-height:29px;padding:5px 7px;border:1px solid #bfcfdc;border-radius:3px;color:#304d61;background:#fff;font:12px Arial,sans-serif}
.cut-modes,.cut-secondary{display:flex;gap:5px}.cut-modes button{flex:1}.cut-joystick{display:grid;grid-template-columns:35px 70px 35px;grid-template-rows:27px 30px 27px;justify-content:center;gap:3px}.cut-joystick [data-cut-direction=up]{grid-area:1/2}.cut-joystick [data-cut-direction=left]{grid-area:2/1}.cut-joystick #cut-step{grid-area:2/2;font-size:11px}.cut-joystick [data-cut-direction=right]{grid-area:2/3}.cut-joystick [data-cut-direction=down]{grid-area:3/2}
.cutout-editor #cut-apply{background:#4e7086;color:#fff;border-color:#4e7086}.cutout-editor #cut-delete{color:#a85048;border-color:#e2c8c4}.cut-edges{display:grid;grid-template-columns:1fr 1fr;gap:6px}.cut-edges label{display:flex;flex-direction:row;align-items:center;gap:7px}.cutout-editor small{font-size:10px;line-height:1.6;color:#8495a0}.cut-error,.cut-form-error{font-size:12px;color:#a4524b;line-height:1.5;margin:0}
.cutout-shapes{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:40px;gap:4px;padding:6px;flex:1;min-height:0;align-content:start;overflow:auto}.cutout-shapes[hidden]{display:none}.cutout-shapes button{min-height:40px;padding:4px;background:white;color:#697f8e;border:1px solid #c8d5de;cursor:pointer}.cutout-shapes button:hover{background:#f7f0e5;border-color:#b68b51}.cutout-shapes svg{width:36px;height:30px}
.cutout-mode #drawing [data-opening].cut-selected{fill:#f3d7aa44;stroke:#b98648;stroke-width:2;stroke-dasharray:5 3}
.cutout-dialog::backdrop { background: #203e5355; }

.native-cutout-dialog {
  box-sizing: border-box;
  width: min(600px, calc(100vw - 16px));
  height: 386px;
  max-width: none;
  max-height: calc(100dvh - 16px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #91a9b9;
  border-radius: 6px;
  background: #fff;
  color: #243e51;
  box-shadow: 0 14px 46px #182d4260;
}
.native-cutout-dialog form {
  height: 100%;
  display: grid;
  grid-template-rows: 39px minmax(0, 1fr) 47px;
}
.native-cutout-dialog form > :is(header, footer) {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
}
.native-cutout-dialog h2 { margin: 0; font: 700 14px/1.2 Arial, sans-serif; }
.native-cutout-dialog header button { flex: none; line-height: 24px; }
.native-cutout-dialog footer { margin: 0; border-top: 1px solid #d6e0e7; }
.native-cutout-dialog footer button { flex: none; }
.native-cutout-dialog [type="submit"] { min-width: 64px; background: #2e6479; border-color: #2e6479; color: #fff; }
.native-cutout-dialog [type="submit"]:disabled { opacity: .45; cursor: default; }
.native-cut-feedback { flex: 1; min-width: 0; max-height: 34px; overflow: auto; }
.native-cut-feedback .cut-form-error { font-size: 11px; line-height: 1.3; }

.native-cut-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(155px, 38%);
  grid-template-rows: minmax(130px, 1fr) 100px;
  gap: 8px 14px;
  padding: 10px 12px;
  min-height: 0;
  overflow: auto;
}
.native-cut-preview {
  grid-row: 1 / -1;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  background: #f6f9fb;
  border: 1px solid #d6e0e7;
  border-radius: 4px;
  color: #386075;
}
.native-cut-preview svg { display: block; width: 100%; height: 100%; max-width: 280px; max-height: 230px; min-height: 0; }
.native-cut-preview text.active { fill: #146caa; font-weight: 700; }
.native-cut-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 24px; margin-bottom: 3px; }
.native-cut-body h3 { margin: 0; font: 700 12px/1.45 Arial, sans-serif; }
.native-cut-heading button { padding: 2px 5px; font-size: 10px; }
.native-cut-heading button[aria-pressed="true"] { background: #e6f0f5; border-color: #2e6479; }
.native-cut-side[hidden] { display: none; }
.native-cut-dimensions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 28px; gap: 4px 7px; }
.native-cut-dimensions label {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  font: 12px Consolas, monospace;
}
.native-cutout-dialog input {
  height: 28px;
  min-height: 0;
  padding: 2px 5px;
  font: 12px Consolas, monospace;
  text-align: center;
}
.native-cutout-dialog input.native-computed { font-style: italic; }
.native-cutout-dialog input::placeholder { color: #526b7c; }
.native-cutout-dialog input[readonly] { background: #edf3f7; }
.native-cut-placement { grid-column: 2; grid-row: 2; border-top: 1px solid #d6e0e7; padding-top: 4px; }
.native-cut-position { display: grid; grid-template-columns: 14px repeat(2, minmax(0, 1fr)); gap: 4px 6px; align-items: center; margin-top: 5px; font: 12px Consolas, monospace; }
.native-cut-position > span:nth-child(2), .native-cut-position > span:nth-child(3) { text-align: center; font: 10px Arial, sans-serif; color: #526979; }
.native-cut-position input:disabled { opacity: .5; }
.cut-depth{padding-top:6px;border-top:1px solid #d8e1e7}.cut-depth label{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.cut-depth input{width:75px}.cut-modes svg{width:16px;height:16px;vertical-align:middle;margin-right:5px}
.cut-joystick svg{display:block;width:17px;height:17px;margin:auto}
@media (max-width: 540px) {
  .native-cut-body { gap: 8px; padding-inline: 8px; }
}
