.sdw-editor, .sdw-admin {
  --sdw-ink: #202724; --sdw-muted: #52635a; --sdw-paper: #f7f5f0;
  --sdw-white: #fffefa; --sdw-line: #d9dbd1; --sdw-green: #075142;
  --sdw-soft: #e6ecdc; --sdw-radius: 12px;
  color: var(--sdw-ink); background: var(--sdw-paper);
  font-family: "Avenir Next", "Inter", system-ui, sans-serif;
  font-size: 15px; line-height: 1.45; color-scheme: light;
}
.sdw-editor *, .sdw-admin * {box-sizing: border-box}
.sdw-editor [hidden], .sdw-admin [hidden] {display: none !important}
.sdw-editor {max-width: 1540px; margin-inline: auto; overflow: clip}
.sdw-public.sdw-editor :is(h1,h2), .sdw-admin :is(h1,h2) {margin: 0; color: var(--sdw-ink); font-family: inherit; letter-spacing: -.025em; font-weight: 720; line-height: 1.12; text-wrap: wrap}
.sdw-public.sdw-editor :is(.sdw-workbench,.sdw-dialog) h2, .sdw-admin h2 {margin: 0; font-size: 21px}
.sdw-public.sdw-editor p, .sdw-admin p {margin: 8px 0; font-size: 14px; color: var(--sdw-muted)}
.sdw-editor button, .sdw-admin button {
  appearance: none; font: inherit; line-height: 1.22; text-transform: none; letter-spacing: 0;
  color: var(--sdw-ink); background: #f3f1e9; border: 1px solid var(--sdw-line);
  border-radius: 8px; padding: 9px 13px; cursor: pointer; min-height: 38px; box-shadow: none;
}
.sdw-editor button:hover, .sdw-admin button:hover {background: #e9eee4; border-color: #9aaea3}
.sdw-editor button:disabled, .sdw-admin button:disabled {opacity: .48; cursor: default}
.sdw-editor :focus-visible, .sdw-admin :focus-visible {outline: 2px solid #197c66; outline-offset: 3px}
.sdw-editor button.sdw-primary, .sdw-admin button.sdw-primary, .sdw-editor button[aria-pressed="true"], .sdw-admin button[aria-pressed="true"] {background: var(--sdw-green); color: #fff; border-color: var(--sdw-green)}
.sdw-editor button.sdw-primary:hover, .sdw-admin button.sdw-primary:hover {background: #0c6551}
.sdw-editor button.sdw-subtle, .sdw-admin button.sdw-subtle {background: var(--sdw-white); color: var(--sdw-green)}
.sdw-editor button.sdw-link, .sdw-admin button.sdw-link {border: none; background: transparent; padding: 4px; color: var(--sdw-green); text-decoration: underline; min-height: 30px}
.sdw-editor label, .sdw-admin label {font-weight: 620; font-size: 13px; display: block; min-width: 0}
.sdw-editor input:not([type="checkbox"]), .sdw-editor select, .sdw-admin input:not([type="checkbox"]), .sdw-admin select {
  display: block; min-width: 0; min-height: 37px; width: 100%; margin-top: 3px;
  border: 1px solid #bac5ba; background: var(--sdw-white); color: var(--sdw-ink);
  padding: 6px 8px; border-radius: 7px; font: inherit; font-weight: 500;
}
.sdw-editor input[type="range"] {padding: 0; accent-color: var(--sdw-green)}
:is(.sdw-public,.sdw-admin) .sdw-brand {padding: 13px 24px; background: #25352e; color: #f9f4e9; text-transform: uppercase; letter-spacing: .16em; font-weight: 680; font-size: 13px}
.sdw-lede {padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px}
:is(.sdw-public,.sdw-admin) .sdw-lede h1 {font-size: clamp(29px, 4vw, 53px)}
.sdw-lede button {font-weight: 700; padding: 12px 19px; font-size: 17px}
.sdw-workbench {
  display: grid; grid-template-columns: minmax(225px, 278px) minmax(0, 1fr);
  grid-template-areas: "size stage" "toolbox stage" "price stage";
  grid-template-rows: auto auto minmax(0, 1fr); align-items: start; gap: 12px; padding: 0 16px 16px;
}
.sdw-card, .sdw-stage {border: 1px solid var(--sdw-line); border-radius: var(--sdw-radius); background: var(--sdw-white); padding: 17px; min-width: 0}
.sdw-size {grid-area: size}
.sdw-public.sdw-editor .sdw-size h2, .sdw-admin .sdw-size h2 {margin-bottom: 12px}
.sdw-dim-fields {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px}
.sdw-dim-fields > label {font-size: 12px}
.sdw-unit {position: relative; display: block}
.sdw-unit input:not([type="checkbox"]) {padding-right: 22px; appearance: textfield}
.sdw-unit input::-webkit-inner-spin-button {appearance: none}
.sdw-unit > span {position: absolute; right: 6px; top: 10px; font-size: 10px; color: var(--sdw-muted); pointer-events: none}
.sdw-interior-finish {margin-top: 12px}
.sdw-frame-finish {margin-top: 12px}
.sdw-frame-finish summary {cursor: pointer; font-size: 13px; font-weight: 650}
.sdw-active-finish {display: flex; align-items: center; gap: 7px; margin: 4px 0 0 12px; font-weight: 520}
.sdw-frame-finish .sdw-swatches {max-height: 270px; overflow-y: auto}
.sdw-frame-finish .sdw-swatches button {width: 100%}
.sdw-toolbox {grid-area: toolbox}
.sdw-public.sdw-editor .sdw-toolbox h2, .sdw-admin .sdw-toolbox h2 {margin: 0 0 10px}
.sdw-toolbox [data-slot="selection"] {margin-top: 13px; display: grid; gap: 7px}
.sdw-toolbox label + label {margin-top: 7px}
.sdw-parts {display: grid; gap: 6px; margin: 8px 0}
.sdw-parts button {display: flex; align-items: center; text-align: left; gap: 9px; font-size: 14px}
.sdw-part-grid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px}
.sdw-editor .sdw-part-grid button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  min-width: 0; min-height: 73px; padding: 8px 9px; text-align: left;
  background: #f8f6f0; border-color: #dbdcd1; cursor: grab; user-select: none;
}
.sdw-editor .sdw-part-grid button:active {cursor: grabbing}
.sdw-accessory-group {margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--sdw-line)}
.sdw-accessory-group h3 {
  margin: 0 0 8px; color: var(--sdw-muted); font: inherit; font-size: 13px; font-weight: 720; letter-spacing: 0;
}
.sdw-editor .sdw-accessory-group .sdw-part-grid button {background: #f2f5ee}
.sdw-editor .sdw-part-grid button:hover {background: #edf2e8; border-color: #9aaea3}
.sdw-editor .sdw-part-grid button[aria-pressed="true"] {
  color: #104c3f; background: #e2efe5; border-color: #327363; box-shadow: inset 0 0 0 1px #327363;
}
.sdw-part-name {font-size: 13px; font-weight: 670; line-height: 1.23; overflow-wrap: anywhere}
.sdw-icon {position: relative; display: block; flex: none; width: 37px; height: 28px; color: #355347}
.sdw-icon::before, .sdw-icon::after {content: ""; position: absolute; box-sizing: border-box}
.sdw-icon-shelf::before {
  left: 7px; top: 7px; width: 25px; height: 13px; transform: skewX(-33deg); border: 1.5px solid;
  border-radius: 2px; background: #e8d9b8;
}
.sdw-icon-shelf::after {left: 3px; top: 19px; width: 25px; height: 5px; border: 1.5px solid; background: #c4ab80}
.sdw-icon-divider::before {
  left: 10px; top: 2px; width: 15px; height: 24px; border: 1.5px solid; border-radius: 2px;
  transform: skewY(-12deg); background: #e8d9b8;
}
.sdw-icon-divider::after {left: 23px; top: 1px; width: 5px; height: 24px; border: 1.5px solid; background: #c4ab80}
.sdw-icon-rail::before {left: 5px; right: 5px; top: 12px; height: 5px; border: 1.5px solid; border-radius: 4px; background: #a9bbb0}
.sdw-icon-rail::after {left: 3px; right: 3px; top: 8px; height: 13px; border-inline: 3px solid; border-radius: 3px}
.sdw-icon-drawers::before {
  inset: 2px 4px 3px; border: 1.5px solid; border-radius: 3px;
  background: linear-gradient(#e9dcbd 0 47%, currentColor 47% 54%, #e9dcbd 54%);
}
.sdw-icon-drawers::after {left: 14px; top: 7px; width: 9px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 10px}
.sdw-icon-pullDown::before {left: 4px; right: 4px; top: 3px; height: 22px; border: 2px solid; border-bottom: 0; border-radius: 4px 4px 0 0}
.sdw-icon-pullDown::after {
  left: 16px; top: 7px; width: 5px; height: 20px; border: 1.5px solid; border-radius: 3px;
  background: #a9bbb0; box-shadow: -12px 8px 0 -1px currentColor, 12px 8px 0 -1px currentColor;
}
.sdw-icon-trouserRail::before {
  left: 5px; right: 4px; top: 8px; bottom: 4px; border-block: 1.5px solid; transform: skewX(-24deg);
  background: repeating-linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 5px);
}
.sdw-icon-trouserRail::after {left: 5px; right: 3px; top: 14px; height: 4px; border: 1px solid; border-radius: 3px; background: #a9bbb0}
.sdw-icon-tieRack::before {
  left: 3px; right: 8px; top: 8px; height: 11px; border-top: 2px solid; border-left: 3px solid; border-radius: 2px;
  transform: skewY(-12deg);
  background: repeating-linear-gradient(90deg, transparent 0 3px, currentColor 3px 4.5px, transparent 4.5px 6px);
}
.sdw-icon-tieRack::after {right: 2px; top: 4px; width: 8px; height: 13px; border: 1.5px solid; border-radius: 5px; background: #ecf1e8}
.sdw-icon-basket::before {
  left: 4px; right: 4px; top: 6px; bottom: 3px; border: 1.5px solid; border-radius: 3px 3px 5px 5px;
  background: repeating-linear-gradient(90deg, transparent 0 4px, #6d8b7f 4px 5px),
    repeating-linear-gradient(0deg, #f8fbf6 0 3px, #6d8b7f 3px 4px);
}
.sdw-icon-basket::after {left: 13px; right: 13px; top: 6px; height: 6px; border: 1.5px solid; border-top: none; border-radius: 0 0 4px 4px; background: #f2f5ee}
.sdw-stage {grid-area: stage; padding: 15px; background: #fcfbf7}
.sdw-stage-head, .sdw-stage-foot, .sdw-viewbar {display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap}
.sdw-stage-head {margin: 0 0 10px}
.sdw-public.sdw-editor .sdw-stage-head h2, .sdw-admin .sdw-stage-head h2 {font-size: clamp(18px, 3vw, 26px)}
.sdw-toggle {display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--sdw-line); border-radius: 9px; background: #efede4}
.sdw-toggle button {border-color: transparent; min-height: 32px; padding-block: 6px}
.sdw-viewbar {justify-content: flex-start; margin: 0 0 10px}
.sdw-viewbar .sdw-toggle button {min-width: 57px}
.sdw-view-note {margin-inline-start: auto; font-size: 12px; color: var(--sdw-muted)}
.sdw-view-note[data-placing="true"] {color: var(--sdw-green); font-weight: 700}
.sdw-orbit {display: inline-flex; align-items: center; gap: 5px}
.sdw-orbit button {min-height: 34px; min-width: 34px; padding: 5px 8px; line-height: 1; font-size: 18px}
.sdw-orbit output {min-width: 33px; text-align: center; font-weight: 650; color: var(--sdw-muted); font-variant-numeric: tabular-nums}
.sdw-canvas {position: relative; width: 100%; aspect-ratio: 1.6; min-height: 458px; border-radius: 10px; overflow: hidden;
  background-color: #f7f3eb;
  background-image: linear-gradient(#d2c9b64d 1px, transparent 1px), linear-gradient(90deg, #d2c9b64d 1px, transparent 1px);
  background-size: 24px 24px;
}
.sdw-canvas[data-view="model"] {background: radial-gradient(ellipse at 42% 34%, #f7f2e7 1%, #ece3d5 100%)}
.sdw-canvas[data-view="front"] {background-color: #f5f2eb;
  background-image: linear-gradient(#cec5b22b 1px, transparent 1px), linear-gradient(90deg, #cec5b22b 1px, transparent 1px)}
.sdw-canvas[data-view="front"] canvas[data-grab-board],
.sdw-canvas[data-view="front"][data-contents="doors"] canvas, .sdw-swatches button[data-finish] {cursor: grab}
.sdw-swatches button[data-finish] {user-select: none}
.sdw-canvas[data-view="front"][data-contents="doors"] canvas:active, .sdw-swatches button[data-finish]:active {cursor: grabbing}
.sdw-editor .sdw-canvas[data-dragging="move"] canvas,
.sdw-editor .sdw-canvas[data-dragging="remove"] canvas {cursor: grabbing}
.sdw-drop-note {position: absolute; z-index: 2; inset-inline-end: 10px; bottom: 10px; max-width: calc(100% - 20px);
  border: 1px solid #d5a394; border-radius: 7px; background: #fff5ee; color: #842d20; padding: 6px 10px;
  font-size: 13px; font-weight: 650; pointer-events: none}
.sdw-parts button[data-action^="divide-"] {cursor: grab; user-select: none}
.sdw-parts button[data-action^="divide-"]:active {cursor: grabbing}
.sdw-divider-tools {grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 11px}
.sdw-canvas[data-view="side"] {background-color: #faf6ef}
.sdw-canvas canvas {position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; user-select: none; cursor: crosshair}
.sdw-canvas[data-view="model"] [data-drawing] {z-index: 1; pointer-events: none}
.sdw-canvas[data-view="side"] canvas {touch-action: pan-y; cursor: default}
.sdw-canvas [data-model] {cursor: grab; touch-action: pan-y}
.sdw-canvas [data-model]:active {cursor: grabbing}
.sdw-depth-metrics {display: grid; margin: 10px 0 3px; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px;
  background: var(--sdw-line); border: 1px solid var(--sdw-line); border-radius: 8px; overflow: hidden}
.sdw-depth-metrics > div {background: #f5f2ea; padding: 8px 12px}
.sdw-depth-metrics dt {font-size: 12px; color: var(--sdw-muted)}
.sdw-depth-metrics dd {margin: 0; font-size: clamp(16px,2vw,23px); color: var(--sdw-green); font-weight: 740; font-variant-numeric: tabular-nums}
.sdw-stage-foot {min-height: 38px; font-size: 13px; color: var(--sdw-muted)}
.sdw-stage-foot [data-measured="true"] {color: var(--sdw-green); font-weight: 680; font-variant-numeric: tabular-nums}
.sdw-stage-foot > div {display: flex; gap: 10px}
.sdw-editor .sdw-error, .sdw-admin .sdw-error, .sdw-editor .sdw-dialog-error {color: #a23325}
.sdw-price {grid-area: price; background: var(--sdw-soft); padding: 15px 17px; border-radius: var(--sdw-radius); border: 1px solid #d6e0cb}
.sdw-price strong {display: block; margin-top: 4px; font-size: clamp(21px, 2.4vw, 31px); font-weight: 780; letter-spacing: -.04em; line-height: 1.1; color: var(--sdw-green); white-space: nowrap}
.sdw-price button {margin-top: 7px}
.sdw-accessory-prices {margin: 7px 0 0; padding-inline-start: 18px; font-size: 13px}
.sdw-finish-tabs, .sdw-actions, .sdw-swatches {display: flex; flex-wrap: wrap; gap: 6px}
.sdw-finish-tabs button, .sdw-actions button, .sdw-swatches button {font-size: 13px}
.sdw-swatches {margin-top: 9px}
.sdw-swatches button {display: flex; align-items: center; gap: 6px; text-align: left}
.sdw-door-swatches {max-height: 165px; overflow-y: auto; margin-bottom: 12px; padding: 2px 2px 4px; scrollbar-width: thin}
.sdw-swatch {display: inline-block; width: 24px; height: 24px; border-radius: 4px; border: 1px solid #8a9286;
  background: var(--swatch); flex: 0 0 24px; object-fit: cover}
.sdw-dialog {width: min(94vw, 470px); padding: 25px; border: 1px solid var(--sdw-line); border-radius: var(--sdw-radius); color: var(--sdw-ink); background: var(--sdw-white)}
.sdw-dialog::backdrop {background: #16241f80}
.sdw-dialog .sdw-actions {justify-content: flex-end; margin-top: 14px}
.sdw-editor .sdw-enquiry {
  box-sizing: border-box; width: min(calc(100vw - 24px), 510px);
  max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain;
  padding: clamp(16px, 4vw, 26px); box-shadow: 0 18px 56px #14281e38;
}
.sdw-enquiry p {margin: 8px 0 14px}
.sdw-enquiry-grid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 15px 0}
.sdw-editor .sdw-enquiry-grid label {display: grid; align-content: start; gap: 5px; font-size: 13px; font-weight: 650}
.sdw-editor .sdw-enquiry-grid input {width: 100%; min-width: 0; min-height: 44px}
.sdw-enquiry-estimate {display: grid; gap: 4px; background: var(--sdw-soft); padding: 12px 14px; border-radius: 9px}
.sdw-enquiry-estimate span {font-size: 13px; font-weight: 680}
.sdw-enquiry-estimate strong {font-size: 25px; line-height: 1.05; color: var(--sdw-green)}
.sdw-enquiry-estimate small, .sdw-enquiry-privacy {font-size: 12px; color: var(--sdw-muted)}
.sdw-enquiry-estimate ul {list-style: none; padding: 0; margin: 0; font-size: 13px}
.sdw-enquiry-estimate li {display: flex; justify-content: space-between; gap: 8px}
.sdw-enquiry-reference {font-size: 13px; font-weight: 700}
.sdw-editor .sdw-enquiry-book {
  display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 15px;
  padding: 8px 16px; border-radius: 9px; color: white; background: var(--sdw-green);
  font-weight: 720; text-align: center; text-decoration: none;
}
.sdw-editor .sdw-enquiry-book:hover {color: white; background: #0c6551}
.sdw-editor .sdw-enquiry-book:focus-visible {outline: 2px solid var(--sdw-green); outline-offset: 3px}
.sdw-editor .sdw-enquiry [data-close-enquiry], .sdw-editor .sdw-enquiry button[type="submit"] {min-height: 44px}
.sdw-editor .sdw-enquiry button[disabled] {cursor: wait; opacity: .66}
@media (max-width: 434px) {
  .sdw-enquiry-grid {grid-template-columns: 1fr; gap: 9px}
}
.sdw-embedded {border: 1px solid var(--sdw-line); border-radius: var(--sdw-radius)}
.sdw-admin {margin: 20px 20px 20px 0; padding: clamp(12px, 2.5vw, 28px); border-radius: var(--sdw-radius)}
.sdw-owner-head {display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px}
.sdw-owner-head h1 {font-size: clamp(27px, 4vw, 45px); padding: 0}
.sdw-owner-tabs {display: flex; flex-wrap: wrap; gap: 5px; margin: 16px 0}
.sdw-owner-grid {display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 12px; align-items: start}
.sdw-owner-grid .sdw-card {margin-bottom: 12px}
.sdw-owner-table {overflow-x: auto; margin: 13px 0}
.sdw-owner-table table {border-collapse: collapse; width: 100%; min-width: 620px}
.sdw-owner-table th, .sdw-owner-table td {padding: 7px; border: 1px solid var(--sdw-line); text-align: left; vertical-align: middle; font-size: 13px}
.sdw-owner-table th {background: #efede4}
.sdw-owner-table input:not([type="checkbox"]) {margin: 0}
.sdw-owner-table input[type="color"] {padding: 2px}
.sdw-owner-grid .sdw-money {font-size: 38px; color: var(--sdw-green); font-weight: 780}
.sdw-owner-grid .sdw-price-result {border-top: 1px solid var(--sdw-line); margin-top: 13px; padding-top: 11px}
.sdw-owner-grid label + label {margin-top: 9px}
.sdw-owner-grid canvas {width: 100%; height: 180px; display: block}
.sdw-owner-status {min-height: 24px}
.sdw-owner-preview {margin-top: 16px}
.sdw-owner-preview > button {margin-bottom: 9px}
.sdw-owner-controls {display: grid; gap: 10px}
.sdw-owner-accessories {margin-top: 18px}
.sdw-admin .sdw-owner-accessories h2 {margin-bottom: 10px}
.sdw-inline-fields {display: flex; align-items: end; gap: 8px; flex-wrap: wrap}

@media (max-width: 760px) {
  :is(.sdw-public,.sdw-admin) .sdw-brand {padding: 11px 15px}
  .sdw-lede {padding: 16px 14px; gap: 11px; align-items: stretch; flex-direction: column}
  .sdw-lede button {width: 100%; min-height: 44px}
  .sdw-workbench {grid-template-columns: minmax(0, 1fr); grid-template-rows: auto;
    grid-template-areas: "size" "stage" "toolbox" "price"; padding: 0 10px 12px}
  .sdw-card, .sdw-stage {padding: 12px}
  .sdw-canvas {aspect-ratio: 1.23; min-height: 260px}
  .sdw-depth-metrics > div {padding: 7px 5px 6px 8px}
  .sdw-view-note {width: 100%; margin-inline-start: 0}
  .sdw-view-note:empty {display: none}
  .sdw-parts {grid-template-columns: repeat(2, minmax(0, 1fr))}
  .sdw-parts button {min-height: 45px}
  .sdw-editor .sdw-part-grid button {min-height: 53px; flex-direction: row; align-items: center; gap: 6px}
  .sdw-owner-grid {grid-template-columns: minmax(0, 1fr)}
  .sdw-admin {margin-right: 8px}
}

