/* Step 1 actions use CSS pixels, independently of the drawing camera. */
body[data-step="1"] .toolbar-row .icon-btn {
  min-width: 44px; min-height: 44px; flex-shrink: 0;
}
body[data-step="1"] .toolbar-row [data-drawing-name] {
  width: 44px; height: 44px; padding: 0;
  position: relative; background-size: 24px 24px; background-position: center;
}
body[data-step="1"] .toolbar-row .drawing-tool-name {
  display: none;
}
body[data-step="1"] .toolbar-row .icon-btn img,
body[data-step="1"] .toolbar-row .icon-btn svg { width: 24px; height: 24px; }
body[data-step="1"] .toolbar-row .icon-btn:disabled { opacity: .35; cursor: default; }
#drawing-status {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%); z-index: 40;
  max-width: calc(100% - 24px); width: max-content; padding: 8px 12px;
  color: var(--ak-vertex-fill, #3c3c3c); background: #f8fbfb; border: 1px solid #c5d7d6; border-radius: 8px;
  font: 13px/1.4 system-ui; pointer-events: none;
}
#drawing-status[data-kind="error"] { color: #752323; background: #fff4f2; border-color: #e8b5b0; }
body:not([data-step="1"]) #drawing-status { display: none; }
#btn-draw-walls { --icon-src: url("/_releases/dxf-e779d6d76fe89da3/icons/drawwalls.svg"); }
/* Retain the Divider implementation and existing dividers; hide new placement. */
#btn-adddivider[hidden] { display: none !important; }
#opening-placement-row[hidden] { display: none; }
#shape-editor[data-wall-openings="true"] .shape-outline { stroke: none !important; }
#shape-editor .opening-split { stroke: none; fill: transparent; }
#shape-editor .opening-split.opening-selected { fill: #008580; fill-opacity: .12; }
#wall-wrap {
  position: absolute; inset: 16px auto auto 16px; transform: none; z-index: 45;
  display: flex; flex-direction: column; gap: 0; padding: 0;
  width: 300px; max-width: calc(100% - 32px); max-height: calc(100% - 110px);
  overflow: visible; font: inherit; font-size: 13px; color: var(--ak-vertex-fill, #3c3c3c);
}
#wall-wrap[hidden], #wall-wrap [hidden], body:not([data-step="1"]) #wall-wrap { display: none !important; }
#wall-wrap button { min-height: 32px; border: 0; border-radius: 5px; padding: 4px 8px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
#wall-wrap button:hover, #wall-wrap button:focus-visible { background-color: #09566818; }
#wall-wrap button[aria-pressed="true"] { background-color: #095668; color: white; }
#wall-wrap button:disabled { opacity: .4; cursor: default; }
.wall-panel-heading, .wall-alignment, .wall-panel-actions, .wall-thickness-row { display: flex; align-items: center; gap: 8px; }
.wall-panel-heading { justify-content: space-between; }
#wall-wrap .floating-panel__header { cursor: grab; touch-action: none; flex-shrink: 0; }
#wall-wrap .floating-panel__body { gap: 12px; overflow-y: auto; }
#wall-wrap .floating-panel__btn { padding: 0; min-height: 32px; width: 32px; }
.wall-done-label { display: none; }
#wall-wrap.move-mode .floating-panel__header { cursor: grabbing; }
.wall-panel-title { font-size: 15px; font-weight: 500; }
#wall-wrap .wall-alignment button { padding: 2px; width: 32px; height: 32px; border: 1px solid #3c3c3c18; }
#editor-wrap .wall-alignment svg { position: static; inset: auto; display: block; width: 26px; height: 26px; overflow: hidden; pointer-events: none; }
#wall-wrap .wall-thickness { display: grid; grid-template-columns: 26px minmax(0,1fr) 26px 26px; flex: 1; min-width: 0; align-items: center; }
#wall-wrap .in-input { width: 100%; min-width: 0; text-align: center; }
.wall-delete::before { content: ''; display: block; width: 22px; height: 22px; background: currentColor; mask: url("/_releases/dxf-e779d6d76fe89da3/icons/clear.svg") center / contain no-repeat; }
#wall-wrap .wall-delete { color: #991d30; }
#wall-wrap .wall-delete:hover { background: #991d3033; }
.wall-panel-actions { flex-wrap: wrap; gap: 4px; font-size: 11px; }
#wall-wrap .wall-panel-actions button { min-height: 26px; padding: 3px 6px; }
#wall-wrap .wall-help { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#wall-wrap[data-mode="edit"] .wall-panel-actions,
#wall-wrap .wall-panel-actions:not(:has(button:not([hidden]))) { display: none; }
.interior-wall-solid { fill: none; stroke: var(--ak-vertex-fill, #3c3c3c); stroke-width: 1; vector-effect: non-scaling-stroke; }
body[data-step="1"] .interior-wall-fill { fill: var(--ak-accent2, #03747f); fill-opacity: .14; }
.wall-hit { cursor: pointer; }
.wall-handle { fill: #2aa49f; fill-opacity: .85; stroke: none; cursor: move; }
.wall-axis { fill: none; stroke: #008580; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wall-boundary-corner { fill: var(--ak-vertex-fill, #3c3c3c); fill-opacity: .22; stroke: none; cursor: move; }
.wall-boundary-edge { cursor: move; pointer-events: stroke; }
.wall-preview { fill: #008580; fill-opacity: .12; stroke: none; }
.wall-draft-axis { fill: none; stroke: #2ac6c1; stroke-width: 2; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.wall-snap-guide { fill: #2ac6c1; stroke: white; stroke-width: 1; vector-effect: non-scaling-stroke; }
#shape-editor:is([data-wall-drawing="true"], [data-corner-adding="true"]):not([data-navigation-tool="pan"], [data-navigation-tool="zoom-area"]),
#shape-editor:is([data-wall-drawing="true"], [data-corner-adding="true"]):not([data-navigation-tool="pan"], [data-navigation-tool="zoom-area"]) * { cursor: crosshair !important; }
#shape-editor[data-wall-drawing="true"] :is(#labels-layer, #vertices-layer, #hiwi-layer),
#shape-editor[data-wall-drawing="true"] :is(#labels-layer, #vertices-layer, #hiwi-layer) * { pointer-events: none; }
@media (max-width: 820px), (pointer: coarse) {
  #wall-wrap { top: auto; bottom: 72px; left: 12px; width: 300px; }
  #wall-wrap .wall-alignment button { width: 40px; height: 40px; }
  #wall-wrap .wall-panel-actions button { min-height: 36px; }
}
body[data-step="1"] #edge-wrap button,
body[data-step="1"] #angle-wrap button,
body[data-step="1"] #hole-wrap button,
body[data-step="1"] #points-wrap button { min-width: 44px; min-height: 44px; }
@media (max-width: 820px) {
  .toolbar-row #btn-adddivider { display: none !important; }
  #wall-wrap .floating-panel__btn--hide {
    width: auto; min-width: 64px; min-height: 44px; padding: 0 12px;
    background: #095668; color: white;
  }
  #wall-wrap .floating-panel__btn--hide img { display: none; }
  #wall-wrap .wall-done-label { display: inline; }
  body[data-step="1"] .toolbar-row [data-drawing-name] {
    width: 44px; padding: 0; background-position: center;
  }
  body[data-step="1"] .toolbar-row .drawing-tool-name {
    display: none;
  }
  body[data-step="1"] .toolbar-row,
  body[data-step="1"] .toolbar-row .toolbar { height: 52px; }
  body[data-step="1"] .toolbar-row .toolbar-content { justify-content: flex-start !important; gap: 2px; }
  body[data-step="1"] .toolbar-row .toolbar-content { overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
  body[data-step="1"] .toolbar-row .toolbar-group { flex-wrap: nowrap; flex-shrink: 0; }
  body[data-step="1"] .mobile-step-hint { display: none; }
}

.wall-boundary-corner.wall-boundary-selected { fill: var(--ak-accent2, #03747f); fill-opacity: .8; }
.wall-boundary-edge.wall-boundary-selected { stroke: var(--ak-accent2, #03747f); stroke-opacity: .5; }

.wall-body-hit.wall-selected { fill: var(--ak-accent2, #03747f); fill-opacity: .14; }
.wall-axis.wall-selected { stroke-width: 2; }

/* Step 1 canvas actions share dimensions; each control retains its own colors. */
body[data-step="1"] .canvas-action { cursor: pointer; }
#editor-wrap[data-geometry-dragging="1"] :is(#edge-wrap, #points-wrap, #wall-wrap) { display: none !important; }

/* Step 1 inspectors: compact measurements and a consistent remove action. */
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #points-wrap, #hole-wrap, #floating-panel, #wall-wrap) {
  --inspector-rule: #00000014;
  --inspector-remove: #991d30;
  padding: 0; border: 1px solid var(--inspector-rule); border-radius: 14px;
  background: #edededf5; box-shadow: 0 1px 7px #00000020;
}
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #points-wrap) .floating-row_shape { gap: 0; }
body[data-step="1"] :is(#angle-wrap, #edge-wrap) .inputfield--grid {
  height: 44px; column-gap: 0; padding: 0 4px; width: auto;
}
body[data-step="1"] #angle-wrap .inputfield--grid { grid-template-columns: 28px max-content 28px; }
body[data-step="1"] #edge-wrap .inputfield--grid { grid-template-columns: 28px minmax(0, 1fr) 28px; }
body[data-step="1"] #edge-wrap .edge-mm-group { width: 152px; }
html:not([data-units="imperial"]) body[data-step="1"] #edge-wrap .edge-mm-group { display: grid; }
body[data-step="1"] #edge-wrap .edge-ftin-group { gap: 0; }
body[data-step="1"] #edge-wrap .in-input { min-inline-size: 0; padding: 0; }
body[data-step="1"] #edge-wrap .edge-ft-group { grid-template-columns: 24px 48px 24px; }
body[data-step="1"] #edge-wrap .edge-in-group { grid-template-columns: 24px 90px 24px; }
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel) :is(.in-input, .ii-input) {
  width: 100%; min-width: 0; height: 38px; padding: 0; border-radius: 4px;
  background: transparent; font-size: 16px; font-weight: 400; color: #222;
}
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel) :is(.in-input, .ii-input):focus-visible {
  outline: 1px solid #2abdb9; outline-offset: -1px; background: #ffffff80;
}
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel) :is(.in-unit, .ii-unit) {
  font-size: 11px; font-weight: 500; text-align: center;
}
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel, #wall-wrap) .measurement-value {
  display: flex; align-items: center; justify-content: center; min-width: 0; gap: 2px;
}
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel, #wall-wrap) .measurement-value input {
  flex: 0 1 auto; width: 6ch; min-width: 0; text-align: center; padding: 0;
}
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel, #wall-wrap) .measurement-value :is(.in-unit, .ii-unit, .wall-unit) {
  flex: 0 0 auto; width: auto; height: auto; margin: 0; text-align: left;
  font: 500 9px/1 system-ui; transform: translateY(-4px); white-space: nowrap;
}
body[data-step="1"] #angle-wrap .measurement-value input { flex: none; }
body[data-step="1"] #angle-wrap .measurement-value .in-unit,
body[data-step="1"] #edge-wrap .edge-ftin-group .in-unit { font-size: 12px; transform: none; }
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel) :is(.in-minus, .in-plus, .ii-minus, .ii-plus) {
  display: grid; place-items: center; width: 28px; height: 40px; flex: 0 0 28px;
  mask: none; -webkit-mask: none; background: transparent; color: #333; font: 18px/1 system-ui;
}
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel) :is(.in-minus, .ii-minus)::before { content: '−'; }
body[data-step="1"] :is(#angle-wrap, #edge-wrap, #hole-wrap, #openings-panel) :is(.in-plus, .ii-plus)::before { content: '+'; }
body[data-step="1"] :is(#hole-wrap, #floating-panel) { width: 204px; inline-size: 204px; max-width: calc(100vw - 24px); }
body[data-step="1"] #floating-panel-body { padding: 0; }
body[data-step="1"] #floating-panel-header { height: 28px; padding: 2px 6px; }
body[data-step="1"] #floating-panel-header .floating-panel__btn { width: 28px; height: 24px; }
body[data-step="1"] #floating-panel-header img { width: 14px; height: 14px; }
body[data-step="1"] :is(#hole-wrap, #openings-panel) .floating-row {
  width: 100%; height: auto; min-height: 0; margin: 0; gap: 0; box-sizing: border-box;
}
body[data-step="1"] :is(#hole-wrap, #openings-panel) .icon_inputfield {
  width: 100%; height: 48px; padding: 0 12px; gap: 0;
  display: grid; grid-template-columns: 28px 28px minmax(0, 1fr) 28px;
  box-sizing: border-box;
}
body[data-step="1"] :is(#hole-wrap, #openings-panel) .ii-icon { width: 24px; height: 24px; }
body[data-step="1"] #openings-panel input::-webkit-inner-spin-button,
body[data-step="1"] #openings-panel input::-webkit-outer-spin-button { appearance: none; margin: 0; }
html[data-units="imperial"] body[data-step="1"] :is(#hole-wrap, #floating-panel) { width: 252px; inline-size: 252px; }
body[data-step="1"] #hole-wrap > .floating-row { padding-top: 4px; }
body[data-step="1"] #hole-wrap .hole-remove-row { width: 100%; margin-top: 4px; }
body[data-step="1"] .drawing-remove {
  color: var(--inspector-remove); background: transparent; border: 0; border-radius: 0;
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 5px; padding: 0; font: 12px/1.2 var(--default-font-family, sans-serif); cursor: pointer;
}
body[data-step="1"] .drawing-remove--footer {
  width: 100%; min-height: 32px; border-top: 1px solid var(--inspector-rule);
  border-radius: 0 0 13px 13px; text-transform: lowercase;
}
body[data-step="1"] #hole-wrap #hole-remove-btn { min-height: 32px; }
body[data-step="1"] .drawing-remove--inline { align-self: stretch; border-left: 1px solid var(--inspector-rule); border-radius: 0 13px 13px 0; }
body[data-step="1"] .drawing-remove-icon {
  display: block; flex: 0 0 22px; width: 22px; height: 22px;
  background: currentColor; mask: url("/_releases/dxf-e779d6d76fe89da3/icons/clear.svg") center / contain no-repeat;
  -webkit-mask: url("/_releases/dxf-e779d6d76fe89da3/icons/clear.svg") center / contain no-repeat;
}
body[data-step="1"] .icon-btn:is([data-icon="remove-corner"], [data-icon="remove-hole"], [data-icon="remove-opening"], [data-icon="remove-divider"]) { --icon-src: url("/_releases/dxf-e779d6d76fe89da3/icons/clear.svg"); }
body[data-step="1"] :is(#clearhole-confirm, #cleardivider-confirm, #delete-reference-confirm) .ak-modal__pill[data-confirm] {
  --pill-leading-src: url("/_releases/dxf-e779d6d76fe89da3/icons/clear.svg"); color: #991d30;
}
body[data-step="1"] .drawing-remove:is(:hover, :active, :focus-visible) { background: #991d3040; }
body[data-step="1"] #wall-wrap .wall-delete {
  min-height: 32px; padding: 0; border-top: 1px solid var(--inspector-rule); border-radius: 0 0 13px 13px;
}
body[data-step="1"] #wall-wrap { width: 268px; }
body[data-step="1"] #wall-wrap .wall-thickness { grid-template-columns: 28px minmax(0, 1fr) 28px; }
body[data-step="1"] #wall-wrap .in-input { background: transparent; font-size: 16px; }
body[data-step="1"] #openings-panel .openings-actions { padding: 0 12px 8px; justify-content: space-between; }
body[data-step="1"] #openings-panel :is(.openings-actions, #door-variant-row) .icon-btn {
  width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 9px;
  background: transparent; box-sizing: border-box;
}
body[data-step="1"] #openings-panel :is(.openings-actions, #door-variant-row) .icon-btn::before {
  width: 34px; height: 34px; background: #888;
}
body[data-step="1"] #openings-panel :is(.openings-actions, #door-variant-row) .icon-btn[aria-pressed="true"] { border-color: #4dceca; }
body[data-step="1"] #openings-panel :is(.openings-actions, #door-variant-row) .icon-btn[aria-pressed="true"]::before { background: #333; }
body[data-step="1"] #openings-panel button:focus-visible { outline: 2px solid #008580; outline-offset: 1px; }
body[data-step="1"] #door-variant-row {
  display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center;
  padding: 8px 0; border-top: 1px solid var(--inspector-rule);
}
body[data-step="1"] #door-direction-wrap { grid-column: 1; grid-row: 2; margin: 0; padding-top: 3px; }
body[data-step="1"] #door-variant-row:has([data-variant="double"][aria-pressed="true"]) #door-direction-wrap { display: none !important; }
body[data-step="1"] #door-variant-row:has([data-variant="sliding"][aria-pressed="true"]) #door-direction-wrap { grid-column: 3; }
body[data-step="1"] #door-direction-toggle { width: 36px; height: 14px; background: #fff; }
body[data-step="1"] #door-direction-toggle .switch-thumb {
  width: 36px; height: 14px; top: 0; left: 0; border: 0; background: transparent; transform: none;
}
body[data-step="1"] #door-size-row { padding: 4px 0; border-top: 1px solid var(--inspector-rule); }
body[data-step="1"] #openings-panel :is(#door-width-row, #opening-placement-row) {
  padding: 8px 20px; min-height: 42px; justify-content: flex-start; gap: 14px;
}
body[data-step="1"] #openings-panel .floating-label { font-size: 12px; line-height: 1.4; }
body[data-step="1"] #openings-panel :is(#door-width-toggle, #opening-placement-toggle) { flex: 0 0 32px; background: #999; }
body[data-step="1"] #openings-panel :is(#door-width-toggle, #opening-placement-toggle)[aria-pressed="true"] { background: #60c9c5; }
@media (max-width: 820px), (pointer: coarse) {
  body[data-step="1"] :is(#hole-wrap, #floating-panel) { width: 232px; inline-size: 232px; }
  body[data-step="1"] :is(#hole-wrap, #openings-panel) .icon_inputfield { grid-template-columns: 28px 44px minmax(0, 1fr) 44px; padding-inline: 8px; }
  body[data-step="1"] :is(#hole-wrap, #openings-panel) :is(.ii-minus, .ii-plus) { width: 44px; height: 44px; }
  body[data-step="1"] .drawing-remove--footer, body[data-step="1"] #hole-wrap #hole-remove-btn, body[data-step="1"] #wall-wrap .wall-delete { min-height: 44px; }
  body[data-step="1"] #openings-panel :is(.openings-actions, #door-variant-row) .icon-btn { width: 44px; height: 44px; }
  body[data-step="1"] #door-direction-wrap { padding: 0; }
  body[data-step="1"] #door-direction-toggle { width: 44px; height: 32px; background: transparent; }
  body[data-step="1"] #door-direction-toggle .switch-thumb { top: 9px; left: 4px; background: #fff; }
}
