#library .tree-row > .row-lock {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#catalogPanel { position: relative; }
#catalogPanel #catalogList { flex: 1; padding-bottom: 12px; }
.catalog-search-bar { position: absolute; z-index: 1; inset: auto 0 12px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; pointer-events: none; }
.catalog-search-bar > * { pointer-events: auto; box-shadow: 0 2px 8px #20382b24; }
#catalogSearchField > .icon { flex: none; width: 15px; height: 15px; color: #989b9f; }
#catalogPanel #catalogSearchField {
  flex: 1; min-width: 0; height: 44px; padding-inline: 16px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--paper);
  box-shadow: 0 4px 14px #20382b24;
}

#catalogSearchField input { width: 100%; min-width: 0; background: transparent; }
@media (prefers-reduced-motion: no-preference) {
  #catalogSearchField:not([hidden]) { animation: catalog-search-open 220ms cubic-bezier(.22, 1, .36, 1); }
  @keyframes catalog-search-open {
    from { opacity: 0; clip-path: inset(0 0 0 90% round 22px); transform: translateX(6px); }
    to { opacity: 1; clip-path: inset(-16px round 22px); transform: translateX(0); }
  }
}
#catalogSearchToggle { flex: none; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 22px; background: var(--green); color: white; }
#catalogSearchToggle[aria-expanded="true"] {
  background: var(--line); color: var(--ink);
}
header .brand { width: 46px; height: 46px; min-height: 46px; padding: 0; overflow: hidden; border: 0; border-radius: 50%; background: #6eaa68; box-shadow: none; }
header .brand img { display: block; width: 36px; height: 36px; object-fit: contain; border-radius: inherit; }
#libraryToggle[aria-expanded] { background: transparent; }
.finish-popup { position: fixed; inset: auto; margin: 0; box-sizing: border-box; overflow: auto;
  padding: 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink);
  background: var(--paper, white); box-shadow: 0 6px 20px #20382b24; }

input,textarea,select,button {font-family:inherit}
select:not([multiple]) {
  appearance:none;cursor:pointer;padding-right:30px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12'%3E%3Cpath d='m2 4 5 5 5-5' fill='none' stroke='%23375245' stroke-width='1.6'/%3E%3C/svg%3E");
  background-position:right 9px center;background-repeat:no-repeat;
}
.filter select {background-image:none}
input[type=number] {appearance:textfield}
input::-webkit-inner-spin-button,input::-webkit-outer-spin-button,input::-webkit-search-cancel-button {appearance:none}
input[type=checkbox]:not([hidden]) {
  appearance:none;box-sizing:border-box;display:inline-grid;place-content:center;vertical-align:middle;
  width:20px!important;height:20px;min-width:20px;margin:2px 4px;padding:0;
  background:#fff;border:1.5px solid #78877e;border-radius:5px;cursor:pointer;
}
input[type=checkbox]:checked {background:#3c6d3c;border-color:#3c6d3c}
input[type=checkbox]:checked::after {content:'';width:9px;height:5px;border:solid white;border-width:0 0 2px 2px;transform:translateY(-1px) rotate(-45deg)}
.editor-choices {position:fixed;inset:auto;box-sizing:border-box;margin:0;padding:4px;overflow:auto;
  border:1px solid #cad3cb;border-radius:12px;background:#fafbf8;color:#20251f;box-shadow:0 8px 30px #172e222b}
.editor-choices button {display:flex;width:100%;padding:9px 12px;align-items:center;justify-content:space-between;gap:10px;
  text-align:left;min-height:40px;font:inherit;color:inherit;background:transparent;border:0;border-radius:8px;cursor:pointer}
.editor-choices button[aria-selected=true] {background:#e1ebe3;color:#214e3a}
.editor-choices button[aria-selected=true]::after {content:'✓'}
.editor-choices button:focus-visible,input[type=checkbox]:focus-visible {outline:2px solid #3c6d3c;outline-offset:-2px}
.editor-validation {color:#892f28;font-size:13px}
.island,#cameraTools,#moduleTools,#shaderControl,.island button,#cameraTools button,#moduleTools button {border-radius:999px}
summary {list-style:none;cursor:pointer}
summary::-webkit-details-marker {display:none}
details:not(.finish-picker) > summary:not(:has(svg))::before {content:'';display:inline-block;width:7px;height:7px;margin:0 10px 2px 3px;
  border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(-45deg)}
details[open]:not(.finish-picker) > summary:not(:has(svg))::before {transform:rotate(45deg)}
.editor-tip {position:fixed;inset:auto;margin:0;max-width:min(260px,90vw);padding:6px 9px;border:0;border-radius:8px;
  background:#293c32;color:white;font:500 12px/1.4 Inter,system-ui,sans-serif;pointer-events:none}

.wall-toggle {display:flex;align-items:center;justify-content:space-between;min-height:44px;cursor:pointer}
.wall-toggle input[type=checkbox]:not([hidden]) {order:1;display:flex;align-items:center;justify-content:flex-start;
  width:42px!important;min-width:42px;height:24px;border:0;border-radius:99px;padding:3px;background:#748078}
.wall-toggle input[type=checkbox]:not([hidden])::after {content:'';width:18px;height:18px;border:0;border-radius:50%;background:white;transform:none}
.wall-toggle input[type=checkbox]:checked:not([hidden]) {background:#3c6d3c;justify-content:flex-end}

/* Shared measurements for both kitchen editor views. */
:root {
  --ui-control: 40px;
  --ui-tool: 36px;
  --ui-icon: 18px;
  --ui-radius: 10px;
  --ui-caption: 12px;
  --ui-label: 13px;
  --ui-body: 14px;
  --ui-title: 18px;
  --ui-gap: 8px;
  --ui-inset: 12px;
}
@media (pointer: coarse) {
  :root { --ui-control: 44px; --ui-tool: 44px; }
}

.search, .field :is(input:not([type="checkbox"]), select, textarea),
#category, .finish-picker input[type="search"], .material-trigger {
  box-sizing: border-box;
  min-height: var(--ui-control);
  padding: 8px var(--ui-inset);
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background-color: white;
  color: var(--ink);
  font: 400 var(--ui-body)/20px Inter, system-ui, sans-serif;
}
.search, #category { flex-shrink: 0; }
.search { height: var(--ui-control); gap: var(--ui-gap); }
.search input[type="search"] {
  height: 100%; min-width: 0; margin: 0; padding: 0; border: 0;
  color: inherit; font: inherit; background: transparent;
}
.search:focus-within { outline: none; }
body :is(input:not([type="checkbox"], [type="radio"]), textarea, select, .finish-picker summary, .finish-option, .editor-choices button):focus-visible,
.search input[type="search"]:focus-visible { outline: none; }
.search svg.icon { width: var(--ui-icon); height: var(--ui-icon); color: var(--muted); }
.field select:not([multiple]), select#category { padding-right: 32px; }
.field, .search label { font-size: var(--ui-label); line-height: 18px; }
.field-row > .field select { height: var(--ui-control); }
.field input[type="number"], .dimensions dd { font-variant-numeric: tabular-nums; }

.material-popover, .editor-choices {
  padding: 4px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--paper); box-shadow: 0 8px 28px #172e2229;
}
.material-popover button, .editor-choices button, .menu button {
  min-height: var(--ui-control); padding: 8px var(--ui-inset);
  border-radius: var(--ui-radius); font-size: var(--ui-body); line-height: 20px;
}
.material-popover [aria-selected="true"], .editor-choices [aria-selected="true"] {
  background: #e3f0e0; color: var(--green);
}
