﻿:root {
  --chrome-top: #d8dce2;
  --chrome-bottom: #b7bec8;
  --chrome-line: #98a1ac;
  --panel-bg: #eff2f6;
  --panel-border: #a1abb9;
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --ink: #222933;
  --muted: #5d6672;
  --accent: #f3b24c;
  --accent-border: #9e6a1c;
  --blue: #5f8fe8;
  --toolbar-gap: 12px;
  --toolbar-square: 31px;
  --grid-dark: rgba(255, 255, 255, 0.085);
  --grid-dark-strong: rgba(255, 255, 255, 0.12);
  --grid-light: rgba(32, 49, 79, 0.07);
  --grid-light-strong: rgba(32, 49, 79, 0.12);
  --workbench-sidebar-width: 320px;
  --workbench-properties-width: 320px;
  --workbench-resizer-width: 6px;
  --projection-snap-crosshair-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='65' height='65' viewBox='0 0 65 65'%3E%3Cpath d='M32.5 1v23M32.5 41v23M1 32.5h23M41 32.5h23' stroke='%23000000' stroke-width='3' stroke-linecap='square'/%3E%3Cpath d='M32.5 1v23M32.5 41v23M1 32.5h23M41 32.5h23' stroke='%23ffffff' stroke-width='1' stroke-linecap='square'/%3E%3Cpath d='M28.5 28.5l8 8M28.5 36.5l8 -8' fill='none' stroke='%23000000' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M28.5 28.5l8 8M28.5 36.5l8 -8' fill='none' stroke='%2300e5ff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 32 32, crosshair;
  --projection-crosshair-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='65' height='65' viewBox='0 0 65 65'%3E%3Cpath d='M32.5 1v23M32.5 41v23M1 32.5h23M41 32.5h23' stroke='%23000000' stroke-width='3' stroke-linecap='square'/%3E%3Cpath d='M32.5 1v23M32.5 41v23M1 32.5h23M41 32.5h23' stroke='%23ffffff' stroke-width='1' stroke-linecap='square'/%3E%3Ccircle cx='32.5' cy='32.5' r='4' fill='none' stroke='%23000000' stroke-width='3'/%3E%3Ccircle cx='32.5' cy='32.5' r='4' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E") 32 32, crosshair;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #c8ced7, #b2b9c3);
}

button,
input,
select {
  font: inherit;
}

.desktop-shell {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.app-chrome {
  border-bottom: 1px solid var(--chrome-line);
  background: linear-gradient(180deg, var(--chrome-top), var(--chrome-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.menu-strip,
.toolbar-strip {
  display: flex;
  align-items: center;
  gap: var(--toolbar-gap);
  padding: 4px 10px;
}

.menu-strip {
  min-height: 28px;
  border-bottom: 1px solid rgba(152, 161, 172, 0.55);
  font-size: 13px;
  position: relative;
  overflow: visible;
}

.app-logo {
  display: block;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  /* Fill the menu row with the artwork, accounting for the SVG's transparent margin. */
  margin: -6px -4px -6px 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.menu-strip span {
  cursor: default;
}

.menu-status-group {
  margin-left: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.menu-root {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.menu-root-button {
  min-width: 0;
  height: 22px;
  padding: 0 8px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: default;
}

.menu-root-button:hover,
.menu-root-button:focus-visible,
.menu-root--open .menu-root-button {
  border-color: #8d98a5;
  border-bottom-color: #f7f8fa;
  background: linear-gradient(180deg, #fbfcfe, #edf1f6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  outline: none;
}

.menu-popup {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  min-width: 212px;
  padding: 2px;
  border: 1px solid #7f8a96;
  background: #f7f8fa;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(166, 174, 183, 0.85);
  z-index: 30;
}

.menu-popup-separator {
  height: 1px;
  margin: 4px 3px;
  background: #b8c1cd;
}

.menu-popup-item {
  position: relative;
  display: block;
  width: 100%;
  min-height: 24px;
  padding: 3px 28px 3px 24px;
  border: 1px solid transparent;
  background: transparent;
  color: #1f2730;
  text-align: left;
  cursor: default;
}

#fileMenuPopup {
  width: max-content;
  min-width: min(318px, calc(100vw - 60px));
  max-width: calc(100vw - 60px);
  overflow-x: auto;
}

#fileMenuPopup .menu-popup-item {
  min-width: max-content;
  padding-left: 30px;
  white-space: nowrap;
}

#selectionMenuPopup {
  width: max-content;
  max-width: calc(100vw - 100px);
}

#selectionMenuPopup .menu-popup-item:disabled {
  color: #89909a;
  background: transparent;
  border-color: transparent;
}

.menu-popup-item__icon {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  pointer-events: none;
}

.bazis-transfer-arrow {
  fill: none;
  stroke: #16823b;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff);
}

.menu-popup-item[aria-pressed="true"]::before {
  position: absolute;
  left: 7px;
  content: "✓";
  color: #1f5f2f;
  font-weight: 700;
}

.menu-popup-item:hover,
.menu-popup-item:focus-visible {
  border-color: #2d5f9b;
  background: linear-gradient(180deg, #d9eaff, #b8d4f7);
  outline: none;
}

.toolbar-strip {
  min-height: 44px;
}

.tool-button {
  min-width: 88px;
  height: 30px;
  border: 1px solid #8d98a5;
  border-radius: 3px;
  background: linear-gradient(180deg, #fefefe, #d8dde6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #1f2730;
  cursor: pointer;
}

.tool-button:hover {
  background: linear-gradient(180deg, #fff7d9, #edd18a);
}

.tool-button:disabled {
  cursor: default;
  color: #7e8792;
  background: linear-gradient(180deg, #eceff4, #d1d7e0);
  box-shadow: none;
}

.tool-button.active-tool {
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
  border-color: var(--accent-border);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.primary-tool {
  font-weight: 700;
}

.toolbar-icon-button {
  min-width: var(--toolbar-square);
  width: var(--toolbar-square);
  height: var(--toolbar-square);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border-color: #9aa8b7;
  background: linear-gradient(180deg, #ffffff, #f0f4f8);
  color: #344b62;
}

.toolbar-icon-button:hover,
.toolbar-icon-button:focus-visible {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
  outline: none;
}

.toolbar-icon-button:active {
  background: linear-gradient(180deg, #f4d27c, #dea33a);
}

.toolbar-icon-button:disabled {
  border-color: #b4bcc7;
  background: linear-gradient(180deg, #f0f2f6, #d5dbe4);
  color: #93a0af;
}

.toolbar-icon-button__icon {
  width: 26px;
  height: 26px;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Shared 24-unit SVG palette: geometry stays crisp at toolbar size. */
.scene-mode-icon,
.scene-view-icon {
  width: 26px;
  height: 26px;
}

.ui-icon__surface {
  fill: #eef3f8;
}

.ui-icon__shade {
  fill: #d6e1ed;
}

.ui-icon__accent-surface {
  fill: #8ebfe5;
  stroke: #3478aa;
}

.ui-icon__accent {
  fill: none;
  stroke: #2879b3;
}

.ui-icon__muted {
  fill: none;
  stroke: #889bae;
}

.ui-icon__construction {
  fill: none;
  stroke: #889bae;
  stroke-width: 1.25;
  stroke-dasharray: 2 2.5;
}

.ui-icon__detail {
  fill: none;
  stroke: #72889e;
  stroke-width: 1.25;
}

.ui-icon__node {
  fill: #f8fcff;
  stroke: #2879b3;
  stroke-width: 1.5;
}

.ui-icon__success {
  fill: none;
  stroke: #20805b;
  stroke-width: 1.9;
}

.ui-icon__danger,
.ui-icon__danger-dashed {
  fill: none;
  stroke: #c45151;
  stroke-width: 1.8;
}

.ui-icon__danger-dashed {
  stroke-dasharray: 2 2;
}

.ui-icon__wood-light {
  fill: #f0d8b3;
  stroke: none;
}

.ui-icon__wood {
  fill: #dfb77e;
}

.ui-icon__wood-shade {
  fill: #c89559;
  stroke: none;
}

/* Texture-only mode intentionally omits the dark edge outline. */
#icon-display-textured .ui-icon__wood,
#icon-display-textured-edges .ui-icon__wood {
  stroke: none;
}

.ui-icon__grain {
  fill: none;
  stroke: #986a3e;
  stroke-width: 1;
}

.toolbar-icon-button:disabled .toolbar-icon-button__icon {
  opacity: 0.7;
}

.toolbar-icon-button[hidden] {
  display: none !important;
}

.toolbar-square-gap {
  flex: 0 0 calc(var(--toolbar-square) - (var(--toolbar-gap) * 2));
  width: calc(var(--toolbar-square) - (var(--toolbar-gap) * 2));
  height: var(--toolbar-square);
  pointer-events: none;
}

.toolbar-scene-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.toolbar-scene-controls[hidden] {
  display: none !important;
}

.line-tool {
  position: relative;
  padding-left: 34px;
}

.line-tool::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #0b46c9;
  transform: translateY(-50%) rotate(-35deg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.status-pill {
  min-height: 30px;
  min-width: 220px;
  padding: 6px 12px;
  border: 1px solid #8d98a5;
  border-radius: 3px;
  background: linear-gradient(180deg, #fefefe, #d7dce5);
  color: var(--muted);
}

.menu-strip .status-pill {
  min-width: min(420px, 34vw);
  max-width: min(540px, 42vw);
  min-height: 22px;
  padding: 2px 12px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill--flash {
  animation: status-pill-flash 2s ease-in-out infinite;
}

.snap-owner-highlight {
  animation: snap-owner-highlight-blink var(--snap-blink-duration, 1s) ease-in-out infinite;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contour-open-line {
  stroke-dasharray: 6 4;
}

@keyframes status-pill-flash {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(0.9);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes snap-owner-highlight-blink {
  0% {
    opacity: 0.18;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.18;
  }
}

.workbench {
  min-height: 0;
  display: grid;
  grid-template-columns:
    42px
    var(--workbench-sidebar-width)
    var(--workbench-resizer-width)
    minmax(0, 1fr)
    var(--workbench-resizer-width)
    var(--workbench-properties-width);
  overflow: hidden;
}

.left-rail,
.sidebar,
.properties-panel {
  background: linear-gradient(180deg, #eef1f5, #dae0e8);
}

.left-rail {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 7px;
  border-right: 1px solid var(--panel-border);
}

.rail-group {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 5px;
}

.rail-separator {
  width: 31px;
  height: 1px;
  margin: 2px 0;
  border-top: 1px solid rgba(132, 144, 160, 0.7);
}

.rail-icon {
  width: 31px;
  height: 31px;
  border-radius: 4px;
  border: 1px solid #8f99a6;
  background: linear-gradient(180deg, #fafbfd, #d5dce5);
}

.rail-icon.active {
  background: linear-gradient(180deg, #d9ebff, #8fc2ff);
}

.rail-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  cursor: pointer;
  border-color: #8f99a6;
  background: linear-gradient(180deg, #ffffff, #e7ebf1);
  color: #2d3f57;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.rail-action-button.active {
  background: linear-gradient(180deg, #ffffff, #e7ebf1);
}

.rail-action-button:hover {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
}

.rail-action-button:focus-visible {
  outline: 1px solid #234f94;
  outline-offset: 1px;
}

.rail-action-button--open {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
}

.rail-action-button.edge-command-button.is-active {
  border-color: #7b5822;
  background: linear-gradient(180deg, #ffe6a7, #efb84b);
}

.action-icon {
  display: block;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.action-icon__surface {
  fill: #eef3f8;
  stroke: #455c73;
  stroke-width: 1.65;
}

.action-icon__outline {
  stroke: #455c73;
  stroke-width: 1.65;
}

.action-icon__accent,
.action-icon__edge {
  stroke: #2879b3;
  stroke-width: 1.65;
}

.action-icon__accent-surface {
  fill: #8ebfe5;
  stroke: #3478aa;
  stroke-width: 1.65;
}

.rail-action-button__icon {
  width: 26px;
  height: 26px;
}

.rail-action-button__badge {
  position: absolute;
  right: 1px;
  bottom: 1px;
  min-width: 15px;
  padding: 0 2px;
  border: 0;
  border-radius: 2px;
  background: rgba(248, 251, 255, 0.94);
  color: #2d3f57;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.parts-create-inline-button {
  margin-top: 1px;
  margin-bottom: 1px;
  position: relative;
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  min-height: 31px;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.parts-create-inline-button:hover .parts-create-inline-icon {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
}

.parts-create-inline-button:focus-visible {
  outline: 1px solid #234f94;
  outline-offset: 2px;
}

.parts-create-inline-icon {
  width: 31px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 1px solid #8f99a6;
  background: linear-gradient(180deg, #ffffff, #e7ebf1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  position: relative;
  color: #2d3f57;
}

.parts-create-inline-icon__svg {
  width: 34px;
  height: 34px;
}

.parts-create-inline-label {
  position: absolute;
  left: calc(50% + 25px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

.sidebar,
.properties-panel {
  min-height: 0;
  min-width: 0;
  padding: 10px;
}

.sidebar {
  display: flex;
  overflow: hidden;
  padding: 0;
}

.properties-panel {
  overflow: auto;
}

.workbench-resizer {
  position: relative;
  min-height: 0;
  cursor: col-resize;
  background: linear-gradient(180deg, #eef2f6, #d2d8e1);
  border-left: 1px solid rgba(255, 255, 255, 0.7);
  border-right: 1px solid rgba(127, 138, 150, 0.9);
}

.workbench-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-left: 1px solid rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(123, 132, 144, 0.9);
}

.workbench-resizer:hover,
.workbench-resizer.is-dragging {
  background: linear-gradient(180deg, #fff2c6, #efbe56);
}

body.is-workbench-resizing,
body.is-workbench-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: linear-gradient(180deg, #cdd4de, #bcc3ce);
}

.editor-toolbar,
.panel,
.canvas-card {
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 10px 0;
  padding: 8px 12px;
}

.scene-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  padding: 2px 10px;
  border: 0;
  border-bottom: 1px solid #a6b2c2;
  background: linear-gradient(180deg, #f3f6fb, #e2e8f1);
  box-shadow: none;
}

.scene-model-tabs {
  display: flex;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.scene-model-tab {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 260px;
  min-width: 110px;
  border: 1px solid #b5c0ce;
  border-radius: 5px;
  background: #dbe3ee;
  color: #536278;
}

.scene-model-tab.is-active {
  background: #ffffff;
  border-color: #6c92bb;
  box-shadow: inset 0 -3px 0 #3478aa;
  color: #233f5b;
}

.scene-model-tab__select {
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.scene-model-tab__close {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-right: 3px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #65768b;
  font-size: 18px;
  cursor: pointer;
}

.scene-model-tab__close:hover { background: #f5d8d8; color: #9d3030; }

.scene-model-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #20805b;
  cursor: pointer;
}

.scene-model-add svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.scene-model-add:hover { background: #ffffff; border-color: #9aafc4; }
.scene-model-tab__select:focus-visible,
.scene-model-tab__close:focus-visible,
.scene-model-add:focus-visible { outline: 2px solid #3478aa; outline-offset: -2px; }
.scene-model-tabs button:disabled,
.scene-model-add:disabled { opacity: .5; cursor: wait; }

.scene-viewbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.scene-displaybar,
.toolbar-button-group {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
}

.toolbar-button-group[hidden] { display: none !important; }

.scene-displaybar,
.toolbar-button-group--separated {
  margin-right: 2px;
  padding-right: 10px;
  border-right: 1px solid rgba(141, 152, 165, 0.65);
}

.scene-dimension-controls,
.scene-transform-controls {
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid rgba(141, 152, 165, 0.65);
}

#sceneDrawingBar:not(:has(> .toolbar-button-group:not([hidden]))),
.scene-transform-controls:not(:has(> button:not([hidden]))) { display: none; }

.scene-view-button .scene-view-icon {
  stroke: #26313a;
  stroke-width: 0.95;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.view-cube__body { fill: #dce3e8; stroke: none; }
.view-cube__face { fill: #4dc2ff; stroke: none; }
.view-cube__section-shadow { fill: #909795; stroke: none; }

.scene-view-button {
  min-width: var(--toolbar-square);
  width: var(--toolbar-square);
  height: var(--toolbar-square);
  padding: 0;
}

.scene-toolbar-button {
  position: relative;
  color: #2f3b4a;
}

.scene-toolbar-button:hover,
.scene-toolbar-button:focus-visible {
  color: #2b3541;
}

.scene-toolbar-button.is-active {
  border-color: #7b5822;
  background: linear-gradient(180deg, #ffe6a7, #efb84b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.scene-toolbar-button:disabled {
  color: #7e8792;
}

.scene-toolbar-button__surface {
  fill: currentColor;
  fill-opacity: 0.14;
  stroke: currentColor;
}

.scene-toolbar-button__view-face {
  fill: #4b62aa;
  fill-opacity: 0.78;
}

.scene-toolbar-button__secondary {
  opacity: 0.72;
}

.scene-toolbar-button__ghost {
  opacity: 0.42;
}

.scene-toolbar-button__accent {
  stroke: #c97812;
}


.editor-actions {
  display: flex;
  gap: 8px;
}
.toolbar-hint {
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.panel {
  margin-bottom: 10px;
  padding: 10px;
}

.panel.compact {
  padding: 10px;
}

.sidebar .panel.compact {
  padding-bottom: 0;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 16px;
}

.lead,
.selection-editor.empty,
.part-meta,
.meta-key {
  color: var(--muted);
}

.badge {
  min-width: 28px;
  padding: 2px 8px;
  border: 1px solid #9f8f66;
  background: linear-gradient(180deg, #fff6dc, #efd38b);
  text-align: center;
}

.parts-list,
.selection-editor {
  display: grid;
  gap: 10px;
}

.parts-list {
  margin-top: 10px;
  gap: 0;
  align-content: start;
}

.parts-list.structure-list { margin-top: 0; }

.structure-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  margin-bottom: 0;
  border: 0;
  box-shadow: none;
  padding: 0 !important;
}

.structure-panel > .properties-header {
  height: 23px;
  margin: 0;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 16px;
}

.structure-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid #c1c9d4;
  border-bottom: 0;
  background: #edf1f6;
}

.structure-collapse-button {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #aab5c4;
  border-radius: 2px;
  background: #fff;
  color: #172333;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.structure-collapse-button:hover { background: #edf5fc; }
.structure-collapse-button:focus-visible { outline: 2px solid #2687c8; outline-offset: 1px; }

.structure-filter-menu {
  position: relative;
  flex: 0 1 260px;
  width: 260px;
  min-width: 0;
  max-width: 100%;
  color: #172333;
  font-size: 12px;
}

.structure-filter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 25px;
  padding: 2px 6px;
  border: 1px solid #aab5c4;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.structure-filter-button::-webkit-details-marker { display: none; }
.structure-filter-button::after { content: "▾"; flex: 0 0 auto; }
.structure-filter-button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.structure-filter-menu.has-filters .structure-filter-button { border-color: #2687c8; background: #eaf5ff; }
.structure-filter-button:focus-visible { outline: 2px solid #2687c8; outline-offset: 1px; }

.structure-filter-popup {
  position: absolute;
  z-index: 35;
  top: calc(100% + 2px);
  left: 0;
  width: 100%;
  padding: 4px;
  border: 1px solid #7f8a96;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 3px 8px #0003;
}

.structure-filter-reset {
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid #d9e0e8;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.structure-filter-pair + .structure-filter-pair { border-top: 1px solid #e2e7ed; }

.structure-filter-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
}

.structure-filter-icon--without::after {
  content: "";
  position: absolute;
  width: 17px;
  border-top: 1.5px solid #b54d4d;
  transform: rotate(-45deg);
}

.structure-filter-option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  cursor: pointer;
}

.structure-filter-option input { flex: 0 0 auto; width: 14px; height: 14px; margin: 0; accent-color: #2687c8; }
.structure-filter-option:hover, .structure-filter-reset:hover { background: #edf5fc; }
.structure-filter-hint { padding: 5px 8px 3px; border-top: 1px solid #d9e0e8; color: #66717d; font-size: 11px; }

.structure-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 90px;
  gap: 0;
  margin-top: 0;
  padding: 3px 4px;
  border: 1px solid #c1c9d4;
  border-bottom: 0;
  background: #fff;
  color: #172333;
  font-size: 11px;
  font-weight: 400;
}

.structure-columns__position,
.structure-columns__designation {
  text-align: center;
}

.structure-list {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #8a98ab #e4e9f0;
  border: 1px solid #c1c9d4;
  border-top: 0;
  background: #fff;
}

.structure-list::-webkit-scrollbar {
  width: 12px;
}

.structure-list::-webkit-scrollbar-track {
  border-left: 1px solid #c9d1db;
  background: linear-gradient(180deg, #f2f5f9, #e2e8f0);
}

.structure-list::-webkit-scrollbar-thumb {
  border: 1px solid #7d8ca0;
  border-radius: 999px;
  background: linear-gradient(180deg, #c5d0dd, #9aa9bc);
}

.structure-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #b7c4d4, #8898ad);
}

.structure-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 52px 90px;
  align-items: center;
  min-height: 18px;
  border: 0;
  background: #fff;
  padding: 0;
  color: #000;
  text-align: left;
  position: relative;
  font-weight: 400;
}

.structure-row[aria-selected] { cursor: pointer; }
.structure-row[aria-selected]:not(.is-selected):not(.is-primary):hover { background: #edf5fc; }
.structure-row[aria-selected]:focus-visible,
.structure-expander:focus-visible {
  outline: 1px dotted #234f94;
  outline-offset: -1px;
}
.structure-row.is-selected,
.structure-row.is-primary { background: #3399d6; }
.structure-row.is-multi-primary::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px dotted #fff;
  pointer-events: none;
}

.structure-expander {
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  margin: 0 2px;
  border: 1px solid #9099a3;
  border-radius: 0;
  background: #fff;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
  font: 10px/8px Arial, sans-serif;
}
.structure-expander--static { cursor: default; }
.structure-expander-spacer {
  display: block;
  position: relative;
  width: 14px;
  height: 18px;
}
.structure-expander-spacer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #a0a0a0;
}
.structure-tree-cell {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 14px;
  padding-left: 4px;
}
.structure-tree-branches { display: flex; align-self: stretch; }
.structure-tree-branch {
  position: relative;
  display: block;
  flex: 0 0 18px;
  width: 18px;
  min-height: 18px;
}
.structure-tree-branch.is-continuing::before,
.structure-tree-branch.is-current:not(.is-continuing)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  border-left: 1px solid #a0a0a0;
}
.structure-tree-branch.is-current:not(.is-continuing)::before { bottom: 50%; }
.structure-tree-branch.is-current::after {
  content: "";
  position: absolute;
  left: 7px;
  right: -7px;
  top: 50%;
  border-top: 1px solid #a0a0a0;
}
.structure-cell { min-width: 0; padding: 0 4px 0 0; }
.structure-cell--name { display: flex; align-items: center; gap: 3px; }
.structure-cell--position,
.structure-cell--designation {
  padding-right: 6px;
  font-size: 11px;
  text-align: center;
  color: inherit;
}
.structure-text { min-width: 0; display: block; overflow: hidden; }
.structure-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 16px;
}
.structure-label--part { display: flex; align-items: center; }
.structure-label__text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.structure-name { color: inherit; }
.structure-meta {
  min-width: 0;
  margin-left: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #666;
}
.structure-row.is-selected .structure-meta,
.structure-row.is-primary .structure-meta { color: #253e4d; }
.structure-icon { display: block; flex: 0 0 16px; width: 16px; height: 16px; }
.structure-icon svg { display: block; }

.structure-markers {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  white-space: nowrap;
  vertical-align: middle;
}

.structure-marker {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  vertical-align: middle;
}

.structure-marker--contour {
  border-radius: 999px;
  background: linear-gradient(180deg, #7db2ff, #2d73da);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 1px rgba(27, 73, 153, 0.75);
}

.structure-marker--groove {
  width: 10px;
  border: 1px solid #9a6207;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffd77c, #e79a18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.structure-marker--groove::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 3px;
  height: 1px;
  background: #714500;
}

.structure-marker--front-face {
  width: 12px;
  height: 12px;
}

.structure-marker--front-face svg { display: block; }

.structure-marker--edge-band { width: 14px; height: 14px; }
.structure-marker--edge-band svg { display: block; }

.structure-marker--hole {
  width: 14px;
  height: 14px;
}

.structure-marker--hole .structure-icon,
.structure-marker--hole svg {
  width: 14px;
  height: 14px;
}

.structure-empty {
  padding: 10px 12px;
  border-top: 1px solid #d9e0e8;
  color: #66717d;
  font-size: 12px;
  background: linear-gradient(180deg, #ffffff, #f3f6fa);
}

.material-card {
  border: 1px solid #c4ccd6;
  background: linear-gradient(180deg, #f8fafc, #e7ecf3);
  margin-bottom: 8px;
}

.material-card.active {
  border-color: #a67925;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 166, 0.65);
}

.material-card-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px 7px;
  display: grid;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.material-card-button:hover {
  background: linear-gradient(180deg, #fff8e5, #efdfb1);
}

.material-card-title {
  font-size: 13px;
  font-weight: 700;
}

.material-card-meta {
  font-size: 11px;
  color: var(--muted);
}

.material-parts-list {
  display: grid;
  gap: 0;
  padding: 0 6px 6px;
}

.material-create-part-button {
  margin-top: 4px;
}

.part-list-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-bottom-color: #c4ccd6;
  background: linear-gradient(180deg, #fefefe, #edf1f6);
  padding: 2px 4px;
}

.part-list-row:hover {
  background: linear-gradient(180deg, #fff7df, #f0dfae);
}

.part-list-row.active {
  border-color: #a67925;
  background: linear-gradient(180deg, #fff0c8, #e7ca83);
}

.part-list-select-button {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.part-list-edit-button {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid #b27116;
  background: linear-gradient(180deg, #fffdf7, #f0d48f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.part-list-edit-button:hover {
  background: linear-gradient(180deg, #fff4c9, #e5b64d);
}

.part-list-edit-button__icon {
  width: 12px;
  height: 12px;
}

.part-list-edit-button:focus-visible,
.part-list-select-button:focus-visible {
  outline: 1px solid #234f94;
  outline-offset: 1px;
}




.part-list-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.part-list-name {
  font-weight: 700;
}

.part-list-meta {
  font-size: 12px;
  color: var(--muted);
}

.part-list-row--non-rectangular {
  position: relative;
  padding-right: 20px;
}

.part-list-row--non-rectangular::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7db2ff, #2d73da);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 0 1px rgba(27, 73, 153, 0.75);
  transform: translateY(-50%);
}
.edit-tool-button[hidden] {
  display: none;
}
.field {
  display: grid;
  gap: 5px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
}

.field input,
.field select {
  height: 30px;
  border: 1px solid #98a2af;
  background: #ffffff;
  padding: 4px 8px;
}

.field input:disabled,
.field select:disabled {
  background: #eef1f5;
  color: #66717d;
  cursor: not-allowed;
}

.material-field-control {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
}

.material-picker-button {
  height: 30px;
  border: 1px solid #98a2af;
  background: linear-gradient(180deg, #ffffff, #dfe5ee);
  color: #1f2730;
  font-weight: 700;
  cursor: pointer;
}

.material-picker-button:hover,
.material-picker-button:focus-visible {
  border-color: #5f7fae;
  background: linear-gradient(180deg, #ffffff, #cfe1f9);
  outline: none;
}

.part-material-picker {
  margin-top: 6px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #98a2af;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(39, 48, 62, 0.18);
}

.part-material-picker__option {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #e0e5ec;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.part-material-picker__option:hover,
.part-material-picker__option:focus-visible,
.part-material-picker__option.is-active {
  background: #dbeafe;
  outline: none;
}

.part-material-picker__database {
  color: #125a91;
  font-weight: 600;
}

.part-material-picker__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f2730;
  font-weight: 700;
}

.part-material-picker__meta {
  color: #66717d;
  font-size: 11px;
}

.part-edge-section {
  display: grid;
  gap: 8px;
}

.part-edge-section__title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.part-edge-section__rows {
  display: grid;
  gap: 8px;
}

.part-edge-options .part-edge-exclude {
  grid-column: 1 / -1;
}

.part-edge-material-search {
  grid-column: 1 / -1;
  margin: 4px 8px;
  min-width: 0;
  white-space: normal;
}

.part-edge-exclude {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  cursor: pointer;
}

.part-edge-exclude input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
}

.part-edge-row {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #c9d1dc;
  background: #f8fafc;
}

.part-edge-row__header {
  display: grid;
  grid-template-columns: minmax(72px, 0.72fr) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.part-edge-row__label {
  color: #4d5865;
  font-size: 11px;
  font-weight: 700;
}

.part-edge-row__value {
  min-width: 0;
}

.part-edge-row__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.part-edge-row__actions .tool-button {
  min-width: 0;
  padding-left: 6px;
  padding-right: 6px;
}

.properties-panel {
  padding: 0;
  background: #ffffff;
}

.properties-panel > .properties-header {
  height: 23px;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 16px;
}

.properties-body {
  margin-top: 0;
  gap: 0;
  align-content: stretch;
  overflow: auto;
  background: #ffffff;
}

#partMeta {
  color: #111111;
  font: 11px/1.2 Tahoma, "Segoe UI", sans-serif;
}

.bazis-property-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #ffffff;
  color: #111111;
  font: 11px/1.2 Tahoma, "Segoe UI", sans-serif;
}

.bazis-property-object-select {
  width: calc(100% - 6px);
  height: 21px;
  margin: 3px;
  padding: 0 18px 0 4px;
  border: 1px solid #aeb4bc;
  background: #ffffff;
  color: #111111;
  font: 11px Tahoma, "Segoe UI", sans-serif;
}

.bazis-property-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(82px, var(--bazis-property-name-width, 44%)) minmax(0, 1fr);
  align-content: start;
  position: relative;
  border-top: 1px solid #d5d8dd;
  border-left: 1px solid #e2e4e8;
  background: #ffffff;
}

.bazis-property-grid__header {
  min-height: 20px;
  padding: 4px 6px 3px;
  border-right: 1px solid #d7dbe1;
  border-bottom: 1px solid #cfd4db;
  background: #ffffff;
  color: #111111;
  font: 11px/1.2 Tahoma, "Segoe UI", sans-serif;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bazis-property-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(82px, var(--bazis-property-name-width, 44%)) minmax(0, 1fr);
  min-height: 20px;
}

.bazis-property-column-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--bazis-property-name-width, 44%);
  width: 7px;
  transform: translateX(-3px);
  z-index: 2;
  cursor: col-resize;
  background: transparent;
}

.bazis-property-column-resizer:hover,
.bazis-property-column-resizer:focus-visible {
  background: rgba(67, 102, 150, 0.18);
  outline: none;
}

.bazis-property-name,
.bazis-property-value {
  min-width: 0;
  min-height: 20px;
  display: flex;
  align-items: center;
  border-right: 1px solid #e1e4e9;
  border-bottom: 1px dotted #d3d7de;
  background: #ffffff;
  font: 11px/1.2 Tahoma, "Segoe UI", sans-serif;
  overflow: hidden;
}

.bazis-property-name {
  gap: 3px;
  padding: 2px 5px 2px calc(5px + (var(--property-level, 0) * 13px));
  color: #111111;
  overflow: hidden;
}

.bazis-property-name > span {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bazis-property-value {
  padding: 1px 6px;
  color: #111111;
}

.bazis-property-row--group .bazis-property-name,
.bazis-property-row--group .bazis-property-value {
  font-weight: 400;
}

.bazis-property-row--child .bazis-property-name {
  color: #1f2730;
}

.bazis-property-row--muted .bazis-property-value,
.bazis-property-row--muted .bazis-property-text {
  color: #9aa0a9;
}

.bazis-property-expander {
  width: 9px;
  height: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 9px;
  border: 1px solid #9ea8b5;
  color: #394657;
  font-size: 9px;
  line-height: 8px;
  background: #f7f9fc;
  padding: 0;
  cursor: pointer;
}

.bazis-property-expander:hover,
.bazis-property-expander:focus-visible {
  border-color: #5f7fae;
  background: #e6f0ff;
  outline: none;
}

.bazis-property-expander--blank {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.bazis-property-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bazis-property-value input,
.bazis-property-value select {
  width: 100%;
  min-width: 0;
  height: 18px;
  padding: 1px 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #111111;
  font: 11px Tahoma, "Segoe UI", sans-serif;
}

.bazis-property-value input:focus,
.bazis-property-value select:focus {
  border-color: #6b93c8;
  background: #ffffff;
  outline: none;
}

.bazis-property-value input[readonly] {
  color: #111111;
}

.bazis-property-value input:disabled,
.bazis-property-value select:disabled {
  color: #9aa0a9;
  background: transparent;
}

.bazis-property-swatch-value,
.bazis-property-swatch-value span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.bazis-property-swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  flex: 0 0 12px;
  border: 1px solid #262626;
}

.edge-band-type-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: start;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.edge-band-type-description { min-width: 0; }
.edge-band-type-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edge-band-type-summary { display: block; font-size: 10px; color: #526476; white-space: normal; line-height: 1.3; }
.bazis-property-value .edge-band-type-replace {
  width: 20px;
  height: 20px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  font: inherit;
  line-height: 18px;
}
.edge-band-type-replace:focus-visible { outline: 2px solid #3275b5; outline-offset: -2px; }
.edge-band-variant-choices { border-bottom: 1px solid #9eacbc; padding: 8px; }
.edge-band-variant-choice {
  display: block;
  width: 100%;
  padding: 7px;
  margin-top: 5px;
  border: 1px solid #a6b3c3;
  background: #f5f8fc;
  color: #192e42;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.edge-band-variant-choice small { display: block; margin-top: 3px; line-height: 1.4; }
.edge-band-variant-choice:hover, .edge-band-variant-choice:focus-visible { background: #e3f0ff; border-color: #3275b5; }

.bazis-material-value {
  width: 100%;
  min-width: 0;
}

.bazis-property-value .material-field-control {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 3px;
}

.bazis-property-value .material-picker-button {
  height: 18px;
  padding: 0;
  font-size: 11px;
  line-height: 16px;
}

.bazis-property-value .part-material-picker {
  margin-top: 2px;
  max-height: 180px;
  font-size: 11px;
}

.bazis-property-value .part-material-picker__option {
  padding: 4px 6px;
}

.bazis-property-row.part-edge-row {
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.bazis-property-edge-value {
  display: grid;
  grid-template-columns: minmax(40px, 0.7fr) minmax(74px, 1fr) 58px;
  gap: 2px;
  align-items: stretch;
}

.bazis-property-edge-value .part-edge-row__value,
.bazis-property-edge-value .part-edge-row__select {
  height: 18px;
}

.bazis-property-edge-value .part-edge-row__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}

.bazis-property-edge-value .part-edge-row__actions .tool-button {
  min-width: 0;
  height: 18px;
  padding: 0;
  border-radius: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}

.bazis-property-grid > .property-actions {
  grid-column: 1 / -1;
  padding: 4px;
  border-top: 1px solid #d9dde4;
}

.bazis-property-grid > .property-actions .tool-button {
  height: 22px;
  min-height: 0;
  font-size: 11px;
}

body.is-resizing-property-column,
body.is-resizing-property-column * {
  cursor: col-resize !important;
  user-select: none !important;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.properties-note {
  line-height: 1.35;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ghost {
  background: linear-gradient(180deg, #f7f8fa, #d9dfe8);
}

.secondary {
  background: linear-gradient(180deg, #f6f9ff, #cbd9f2);
}

.canvas-card {
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.canvas-stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  transition: background 0.18s ease;
}

#editor2d.is-snap-captured {
  --projection-crosshair-cursor: var(--projection-snap-crosshair-cursor);
}

#editor2d.is-snap-captured [data-contour-editor-overlay],
#editor2d.is-snap-captured [data-contour-editor-overlay] * {
  cursor: var(--projection-crosshair-cursor) !important;
}

#scene3dCanvas,
#editor2d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
}

#scene3dCanvas {
  z-index: 1;
  pointer-events: none;
}

body[data-canvas-theme="dark"] .canvas-stage {
  background-color: #616375;
}

body[data-canvas-theme="dark"][data-grid="on"] .canvas-stage {
  background-image: none;
}

body[data-canvas-theme="dark"][data-grid="off"] .canvas-stage {
  background-image: none;
}

body[data-canvas-theme="light"] .canvas-stage {
  background-color: #ffffff;
}

body[data-canvas-theme="light"][data-grid="on"] .canvas-stage {
  background-image: none;
}

body[data-canvas-theme="light"][data-grid="off"] .canvas-stage {
  background-image: none;
}

#editor2d {
  z-index: 3;
  cursor: var(--projection-crosshair-cursor);
}

.properties-panel {
  display: grid;
  grid-template-rows: auto 1fr;
}

.properties-header {
  height: 28px;
  padding: 5px 8px;
  border: 1px solid #69717e;
  background: linear-gradient(180deg, #505762, #2f343c);
  color: #ffffff;
  font-weight: 700;
}

.properties-body {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
}

.properties-field {
  width: 100%;
}

.property-submit {
  width: 100%;
}

.property-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.meta-value strong {
  color: var(--ink);
}

.point-handle {
  cursor: grab;
  pointer-events: all;
}
@media (max-width: 1500px) {
  :root {
    --workbench-sidebar-width: 280px;
    --workbench-properties-width: 280px;
  }

  .workbench {
    grid-template-columns:
      42px
      var(--workbench-sidebar-width)
      var(--workbench-resizer-width)
      minmax(0, 1fr)
      var(--workbench-resizer-width)
      var(--workbench-properties-width);
  }
}

@media (max-width: 1200px) {
  :root {
    --workbench-sidebar-width: 260px;
  }

  .workbench {
    grid-template-columns:
      42px
      var(--workbench-sidebar-width)
      var(--workbench-resizer-width)
      minmax(0, 1fr);
  }

  .properties-panel,
  .workbench-resizer--right {
    display: none;
  }
}

.language-button {
  min-width: 52px;
  margin-left: 0;
}

.menu-strip .language-button {
  height: 22px;
  min-width: 52px;
  padding: 0 10px;
}

.editor-toolbar[hidden] {
  display: none !important;
}
.tool-stack {
  display: grid;
  gap: 6px;
}

.edge-band-library-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(34, 41, 51, 0.22);
}

.edge-band-library-overlay[hidden] {
  display: none !important;
}

.edge-band-library-window {
  width: min(1146px, calc(100vw - 48px));
  height: min(930px, calc(100vh - 48px));
  max-height: min(930px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #7b858f;
  background: linear-gradient(180deg, #eef2f6, #d9e0e8);
  box-shadow: 0 14px 30px rgba(27, 34, 46, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.material-library-window {
  width: min(1605px, calc(100vw - 48px));
}

.edge-band-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #8f99a6;
  background: linear-gradient(180deg, #d8dce2, #b7bec8);
}

.edge-band-library-close {
  min-width: 120px;
}

.edge-band-library-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  padding: 12px;
}

.edge-band-library-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.edge-band-library-panel--list {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.edge-band-library-panel--form {
  grid-template-rows: auto auto auto;
  align-content: start;
}

.edge-band-library-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.edge-band-list {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #c4ccd6;
  background: linear-gradient(180deg, #fbfcfe, #e7ecf3);
}

.edge-band-list-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.edge-band-table,
.material-library-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.edge-band-table thead th,
.material-library-table thead th {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  border-bottom: 1px solid #aeb7c2;
  background: linear-gradient(180deg, #eef2f6, #d3dbe5);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.edge-band-table thead th:nth-child(1) {
  width: calc(100% - 44.6ch - 5px);
}

.edge-band-table thead th:nth-child(2) {
  width: 19.6ch;
}

.edge-band-table thead th:nth-child(3) {
  width: 8ch;
}

.edge-band-table thead th:nth-child(4) {
  width: 7ch;
}

.edge-band-table thead th:nth-child(5) {
  width: 10ch;
}

.material-library-table thead th:nth-child(1) {
  width: calc(100% - 59ch - 6px);
}

.material-library-table thead th:nth-child(2) {
  width: 21ch;
}

.material-library-table thead th:nth-child(3) {
  width: 9ch;
}

.material-library-table thead th:nth-child(4) {
  width: 9ch;
}

.material-library-table thead th:nth-child(5) {
  width: 10ch;
}

.material-library-table thead th:nth-child(6) {
  width: 10ch;
}

.edge-band-table-row,
.material-library-table-row {
  cursor: pointer;
}

.edge-band-table-row td,
.material-library-table-row td {
  box-sizing: border-box;
  padding: 8px 10px;
  border-bottom: 1px solid #d0d7e0;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edge-band-table-row:hover,
.material-library-table-row:hover {
  background: linear-gradient(180deg, #fff8e4, #efdca9);
}

.edge-band-table-row.active,
.material-library-table-row.active {
  background: linear-gradient(180deg, #fff0c8, #e7ca83);
}

.edge-band-table-row.active td,
.material-library-table-row.active td {
  border-bottom-color: #c9a45b;
}

.edge-band-library-empty {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  padding: 10px;
}

.edge-band-library-form {
  display: grid;
  gap: 10px;
}

.edge-band-library-form input[readonly] {
  background: #eef1f5;
  color: #66717d;
  cursor: default;
}

.material-color-input {
  width: 100%;
  padding: 2px;
}

.material-color-cell {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.material-color-swatch {
  flex: 0 0 auto;
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #6f7885;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  vertical-align: middle;
}

.edge-band-library-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-window {
  width: min(1180px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
}

.settings-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.settings-tabs {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #eef2f6, #dce3eb);
  box-shadow: var(--panel-shadow);
}

.settings-tab {
  width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #9da7b4;
  background: linear-gradient(180deg, #ffffff, #dfe6ef);
  color: #1f2730;
  text-align: left;
  cursor: pointer;
}

.settings-tab:hover,
.settings-tab:focus-visible {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #fff3c7, #efd186);
  outline: none;
}

.settings-tab.is-active {
  border-color: #7b5822;
  background: linear-gradient(180deg, #ffe6a7, #efb84b);
  font-weight: 700;
}

.settings-panel {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
}

.settings-panel-content {
  display: grid;
  gap: 14px;
}

.settings-live-hint {
  padding: 8px 10px;
  border: 1px solid #c6d3e4;
  background: linear-gradient(180deg, #f5f9ff, #e2ecfb);
  color: #435065;
  font-size: 12px;
  line-height: 1.4;
}

.settings-section {
  display: grid;
  gap: 10px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.settings-form-grid--camera {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: center;
}

.settings-slider-row input[type="range"] {
  width: 100%;
}

.settings-color-input {
  width: 100%;
  min-height: 40px;
  padding: 4px;
  border: 1px solid #8f99a6;
  background: linear-gradient(180deg, #ffffff, #e7ebf1);
  cursor: pointer;
}

.settings-field-note {
  margin-top: 4px;
  color: #5b6672;
  font-size: 11px;
  line-height: 1.35;
}

.settings-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

@media (max-width: 900px) {
  .edge-band-library-body {
    grid-template-columns: 1fr;
  }

  .edge-band-library-actions {
    grid-template-columns: 1fr;
  }

  .settings-body,
  .settings-form-grid,
  .settings-form-grid--camera,
  .settings-actions {
    grid-template-columns: 1fr;
  }
}

.ui-icon__2d-text {
  fill: currentColor;
  stroke: none;
  font: 700 7px/1 "Segoe UI", sans-serif;
}

.part2d-viewer-button {
  margin-left: 8px;
  border-color: #d89538;
  background: linear-gradient(180deg, #fffdf5, #f5e3bd);
  color: #9b5f08;
}

.part2d-viewer-button:hover,
.part2d-viewer-button:focus-visible {
  border-color: #f39225;
  background: linear-gradient(180deg, #fff7dd, #f7c96c);
  outline: none;
}

body.part2d-viewer-open {
  overflow: hidden;
}

.part2d-viewer[hidden] {
  display: none;
}

.part2d-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #ffffff;
  color: var(--ink);
  font-family: Tahoma, "Segoe UI", sans-serif;
}

.part2d-viewer__dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

.part2d-viewer__header {
  display: flex;
  align-items: center;
  min-height: 41px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--chrome-line);
  background: linear-gradient(180deg, var(--chrome-top), var(--chrome-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.part2d-viewer__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #1f2730;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.part2d-viewer__close {
  display: grid;
  place-items: center;
  width: var(--toolbar-square);
  height: var(--toolbar-square);
  margin-left: 10px;
  padding: 0;
  border: 1px solid #8f99a6;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff, #d8dde6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #2f3b4a;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.part2d-viewer__close:hover,
.part2d-viewer__close:focus-visible {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
  color: #222933;
  outline: none;
}

.part2d-viewer__tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 39px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #eef2f6, #dce3eb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow-x: auto;
}

.part2d-viewer__tabs button {
  align-self: center;
  min-width: max-content;
  min-height: 29px;
  padding: 0 12px;
  border: 1px solid #9da7b4;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff, #dfe6ef);
  color: #2f3b4a;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.part2d-viewer__tabs button:hover,
.part2d-viewer__tabs button:focus-visible,
.part2d-viewer__tabs button.is-active {
  border-color: var(--accent-border);
  color: #222933;
  outline: none;
}

.part2d-viewer__tabs button.is-active {
  border-color: #7b5822;
  background: linear-gradient(180deg, #ffe6a7, #efb84b);
  font-weight: 700;
}

.part2d-viewer__tabs button:hover,
.part2d-viewer__tabs button:focus-visible {
  background: linear-gradient(180deg, #fff3c7, #efd186);
}

.part2d-viewer__body {
  display: grid;
  grid-template-rows: minmax(260px, 1fr) minmax(250px, 34vh);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.part2d-viewer__drawing {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
  background: #ffffff;
}

.part2d-viewer__canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.part2d-viewer__dimension-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.part2d-viewer__canvas:active {
  cursor: grabbing;
}

.part2d-viewer__mirror {
  position: absolute;
  top: 9px;
  left: 50%;
  z-index: 4;
  max-width: min(520px, 72vw);
  transform: translateX(-50%);
  padding: 5px 10px;
  border: 1px solid #9da7b4;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff, #dfe6ef);
  box-shadow: var(--panel-shadow);
  color: #354153;
  font-size: 11px;
  pointer-events: none;
}

.part2d-viewer__zoom {
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 4;
  display: grid;
  gap: 4px;
  transform: translateY(-50%);
}

.part2d-viewer__zoom button {
  display: grid;
  place-items: center;
  width: var(--toolbar-square);
  height: var(--toolbar-square);
  padding: 0;
  border: 1px solid #8f99a6;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #ffffff, #d8dde6);
  color: #2f3b4a;
  font-size: 19px;
  cursor: pointer;
}

.part2d-viewer__zoom button:hover,
.part2d-viewer__zoom button:focus-visible {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
  color: #222933;
  outline: none;
}

.part2d-viewer__zoom svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.part2d-viewer__filters {
  position: absolute;
  left: 12px;
  right: 62px;
  bottom: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0;
}

.part2d-viewer__chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 27px;
  padding: 3px 8px;
  border: 1px solid #9da7b4;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff, #dfe6ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #2f3b4a;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.part2d-viewer__chip:hover,
.part2d-viewer__chip:focus-visible {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #fff3c7, #efd186);
  outline: none;
}

.part2d-viewer__chip > span,
.part2d-viewer__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.part2d-viewer__chip.is-off {
  border-color: #b4bcc7;
  background: linear-gradient(180deg, #f0f2f6, #d5dbe4);
  opacity: 0.58;
  text-decoration: line-through;
}

.part2d-viewer__details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.part2d-viewer__holes,
.part2d-viewer__grooves {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.part2d-viewer__grooves {
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid var(--panel-border);
}

.part2d-viewer__grooves.has-selection {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.part2d-viewer__grooves.has-selection > .part2d-viewer__list-title {
  grid-column: 1 / -1;
}

.part2d-viewer__grooves.has-selection > .part2d-viewer__groove-list {
  grid-column: 1;
  grid-row: 2;
}

.part2d-viewer__grooves.has-selection > .part2d-viewer__groove-section {
  grid-column: 2;
  grid-row: 2;
  border-left: 1px solid var(--panel-border);
}

.part2d-viewer__grooves.has-selection .part2d-viewer__groove-row {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.part2d-viewer__grooves.has-selection .part2d-viewer__groove-row .part2d-viewer__coords {
  grid-column: 2 / -1;
  grid-row: 2;
  white-space: normal;
}

.part2d-viewer__list-title {
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #f5f7fa, #dce3eb);
  color: #2f3b4a;
  font-size: 12px;
}

.part2d-viewer__holes .part2d-viewer__hole-list {
  grid-row: 3;
}

.part2d-viewer__filters[hidden] {
  display: none;
}

.part2d-viewer__filters {
  pointer-events: none;
}

.part2d-viewer__chip {
  pointer-events: auto;
}

.part2d-viewer__hint {
  padding: 6px 10px;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #f5f7fa, #dce3eb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 11px;
}

.part2d-viewer__hole-list,
.part2d-viewer__groove-list {
  min-height: 0;
  overflow: auto;
}

.part2d-viewer__groove-section[hidden] {
  display: none;
}

.part2d-viewer__groove-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.part2d-viewer__section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  min-height: 33px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #f5f7fa, #dce3eb);
  color: #4b5664;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.part2d-viewer__section-header strong {
  color: #293544;
  font-size: 12px;
}

.part2d-viewer__section-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #ffffff;
}

.part2d-viewer__section-profile {
  fill: rgba(118, 82, 214, 0.08);
  stroke: #7652d6;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.part2d-viewer__section-dimension {
  fill: none;
  stroke: #df8a0d;
  stroke-width: 1.15;
}

.part2d-viewer__section-dimension text {
  fill: #bd6900;
  stroke: #ffffff;
  stroke-width: 4px;
  paint-order: stroke fill;
  font: 700 12px "Segoe UI", sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
}

.part2d-viewer__section-dimension--radius circle {
  fill: #df8a0d;
  stroke: none;
}

.part2d-viewer__section-svg marker path {
  fill: #df8a0d;
  stroke: none;
}

.part2d-viewer__section-hint {
  padding: 4px 10px 5px;
  border-top: 1px solid #e2e6eb;
  color: #7b8692;
  font-size: 10px;
  text-align: center;
}

.part2d-viewer__groove-row {
  display: grid;
  grid-template-columns: 28px minmax(80px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 4px 10px;
  border: 0;
  border-bottom: 1px solid #d5dbe4;
  background: #ffffff;
  color: #2f3b4a;
  text-align: left;
  cursor: pointer;
}

.part2d-viewer__groove-row:hover,
.part2d-viewer__groove-row:focus-visible,
.part2d-viewer__groove-row.is-selected {
  background: linear-gradient(180deg, #fff8e3, #f3e2af);
  outline: none;
}

.part2d-viewer__groove-row.is-selected {
  box-shadow: inset 3px 0 var(--accent-border);
}

.part2d-viewer__hole-row {
  display: grid;
  grid-template-columns: 28px 10px minmax(170px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 4px 10px;
  border: 0;
  border-bottom: 1px solid #d5dbe4;
  background: #ffffff;
  color: #2f3b4a;
  text-align: left;
  cursor: pointer;
}

.part2d-viewer__hole-row:hover,
.part2d-viewer__hole-row:focus-visible,
.part2d-viewer__hole-row.is-selected {
  background: linear-gradient(180deg, #fff8e3, #f3e2af);
  outline: none;
}

.part2d-viewer__hole-row.is-selected {
  box-shadow: inset 3px 0 var(--accent-border);
}

.part2d-viewer__hole-number {
  color: #89939e;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.part2d-viewer__hole-name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.part2d-viewer__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid #b6a9d4;
  border-radius: 0;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.part2d-viewer__badge--face {
  background: linear-gradient(180deg, #f5f1ff, #ded4f6);
  color: #6044a8;
}

.part2d-viewer__badge--dark {
  margin-left: 5px;
  border-color: #25303a;
  background: linear-gradient(180deg, #505762, #2f343c);
  color: #fff;
}

.part2d-viewer__coords {
  color: #7a858f;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.part2d-viewer__axis-icon {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-top: 1px solid #1fb36d;
  border-left: 1px solid #e75454;
}

.part2d-viewer__empty {
  padding: 28px 16px;
  color: #87919c;
  font-size: 12px;
  text-align: center;
}

.part2d-viewer__footer {
  display: flex;
  justify-content: center;
  padding: 6px 10px;
  border-top: 1px solid var(--chrome-line);
  background: linear-gradient(180deg, var(--chrome-top), var(--chrome-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.part2d-viewer__footer button {
  width: min(360px, 100%);
  min-height: 31px;
  border: 1px solid #8f99a6;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff, #d8dde6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #2f3b4a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.part2d-viewer__footer button:hover,
.part2d-viewer__footer button:focus-visible {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #ffe9ae, #efbb52);
  outline: none;
}

@media (max-width: 1200px) {
  .part2d-viewer__hole-row {
    grid-template-columns: 24px 9px minmax(80px, 1fr) auto;
  }

  .part2d-viewer__hole-row .part2d-viewer__coords {
    grid-column: 3 / -1;
  }

  .part2d-viewer__groove-row {
    grid-template-columns: 24px minmax(80px, 1fr) auto;
  }

  .part2d-viewer__groove-row .part2d-viewer__coords {
    grid-row: 2;
    grid-column: 2 / -1;
  }

  .part2d-viewer__section-header {
    gap: 4px 10px;
  }
}

@media (max-width: 760px) {
  .part2d-viewer__body {
    grid-template-rows: minmax(250px, 54vh) minmax(150px, 1fr);
  }

  .part2d-viewer__hole-row {
    grid-template-columns: 24px 9px minmax(120px, 1fr) auto;
  }

  .part2d-viewer__coords {
    display: none;
  }
}

#editContourButton {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

#editContourButton:not([hidden]) + .toolbar-designation-search-group {
  margin-left: 0;
}

/* Designation input and Find button above the properties panel. */
.toolbar-designation-search-group {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 0;
  flex: 0 1 var(--workbench-properties-width);
  min-width: 200px;
  margin-left: auto;
}
.toolbar-designation-search {
  width: 0;
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 3px 8px;
  border: 1px solid #8d98a5;
  border-radius: 2px;
  background: #fff;
  color: #1f2730;
  font: inherit;
  font-size: 12px;
}
.toolbar-designation-search-button {
  flex: 0 0 auto;
  height: 28px;
  min-width: 72px;
  padding: 3px 12px;
}
.toolbar-designation-search:focus {
  outline: 2px solid #507ab6;
  outline-offset: -1px;
}
.toolbar-designation-search:disabled {
  background: #e6eaf0;
}
.scanner-suffixes-input {
  width: 100%;
  min-height: 150px;
  padding: 8px;
  resize: vertical;
  border: 1px solid #8d98a5;
  background: #fff;
  color: #1f2730;
  font: 14px/1.5 Consolas, monospace;
}

.scanner-project-path {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #a2adba;
  font: 14px/1.5 Consolas, monospace;
}
.scanner-folder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scanner-project-settings {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #c6ced9;
}
.scanner-project-notice {
  position: fixed;
  top: 64px;
  right: 12px;
  z-index: 95;
  display: grid;
  gap: 9px;
  width: min(440px, calc(100vw - 24px));
  max-height: min(460px, calc(100vh - 90px));
  overflow-y: auto;
  padding: 14px;
  border: 1px solid #98a9bd;
  border-radius: 4px;
  background: #f6f9fe;
  box-shadow: 0 4px 16px #28354833;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.scanner-project-notice[hidden],
.scanner-folder-actions [hidden] {
  display: none;
}
.scanner-project-notice .tool-button {
  height: auto;
  min-height: 30px;
  padding: 5px 9px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.scanner-exclusions-input {
  width: 100%;
  min-height: 154px;
  padding: 8px;
  resize: vertical;
  border: 1px solid #8d98a5;
  background: #fff;
  color: #1f2730;
  font: 13px/1.5 Consolas, monospace;
}
.scanner-exclusions-input:disabled {
  background: #e6eaf0;
}
.scanner-project-settings ~ .settings-section .scanner-suffixes-input {
  height: 95px;
  min-height: 95px;
}

.corpus-cnc-dialog {
  max-width: 560px;
  padding: 24px;
  border: 1px solid #8a9aaa;
  border-radius: 8px;
  background: #f3f6fa;
  color: #202833;
  font: 14px/1.5 Arial, sans-serif;
}
.corpus-cnc-dialog::backdrop { background: rgb(20 30 40 / 45%); }
.corpus-cnc-dialog h2 { margin: 0 0 12px; font-size: 20px; }
.corpus-cnc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.corpus-cnc-actions button { padding: 8px 12px; cursor: pointer; }
.corpus-cnc-actions button:first-child { background: #234d74; color: white; border: 1px solid #234d74; }

.corpus-import-report { position: fixed; right: 18px; bottom: 38px; z-index: 200; width: min(460px, calc(100vw - 36px)); max-height: 45vh; overflow: auto; padding: 14px 18px; border: 1px solid #b79c62; border-radius: 8px; background: #fff9ec; color: #283342; box-shadow: 0 5px 24px #0003; font: 13px/1.45 system-ui, sans-serif; }
.corpus-import-report p { margin: 8px 0; }
.corpus-import-report details { margin: 8px 0; }
.corpus-import-report summary { cursor: pointer; color: #874800; font-weight: 600; }
.corpus-import-report li { margin-bottom: 8px; overflow-wrap: anywhere; }
.corpus-import-report button { cursor: pointer; padding: 5px 9px; }
.corpus-import-report .corpus-report-close { float: right; border: 0; background: transparent; font-size: 20px; line-height: 1; margin: -4px -10px 0 4px; }

.model-import-progress {
  width: min(440px, calc(100vw - 48px));
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #8495ab;
  border-radius: 10px;
  color: #162538;
  background: #f5f8fc;
  box-shadow: 0 12px 48px #10203055;
  font: 14px/1.45 system-ui, sans-serif;
}
.model-import-progress::backdrop { background: #18263788; }
.model-import-progress h2 { margin: 0 0 8px; font-size: 20px; }
.model-import-progress p { margin: 10px 0; }
.model-import-progress__file { font-weight: 600; overflow-wrap: anywhere; }
.model-import-progress progress { width: 100%; height: 16px; accent-color: #21875c; }
.model-import-progress__detail, .model-import-progress__elapsed { color: #4e6075; font-size: 12px; }
.scene-machining-progress { position: fixed; z-index: 2000; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #f4f8ff; color: #203047; border: 1px solid #8da3be; border-radius: 8px; box-shadow: 0 4px 16px #0003; max-width: 90vw; }
.scene-machining-progress[hidden] { display: none; }
.scene-machining-progress progress { width: 110px; accent-color: #21875c; }
.model-import-progress button, .scene-machining-progress button { font: inherit; padding: 6px 14px; border: 1px solid #8da3be; border-radius: 5px; background: #fff; color: #203047; cursor: pointer; }
.model-import-progress button:disabled { opacity: .6; cursor: default; }
#stepImportReport { width: min(680px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow: auto; }
#stepImportReport summary { cursor: pointer; margin: 12px 0; }
#stepImportReport li { margin-bottom: 8px; overflow-wrap: anywhere; }

.scene-quarter-turn-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  gap: 5px;
}
.scene-quarter-turn-controls[hidden] { display: none; }
.scene-quarter-turn-controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
  color: #27425f;
  background: #eef2f7;
  border: 1px solid #9aa7b7;
  border-radius: 5px;
  cursor: pointer;
}
.scene-quarter-turn-controls button:hover { background: #d6e5f5; }
/* Model rubber band: compact controls above the projection, responsive on narrow canvases. */
.scene-rubber-band-controls {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 8;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  width: fit-content; max-width: calc(100% - 24px); padding: 10px 12px;
  border: 1px solid #368c9d; border-radius: 8px;
  background: var(--panel-bg); color: var(--ink);
  box-shadow: 0 3px 12px #0003; font-size: 12px;
}
.scene-rubber-band-controls[hidden], .scene-rubber-band-controls [hidden] { display: none; }
.scene-rubber-band-controls label { display: flex; align-items: center; gap: 4px; }
.scene-rubber-band-controls input { width: 76px; padding: 4px 6px; }
.scene-rubber-band-controls button { padding: 5px 8px; cursor: pointer; }

.scene-rubber-band-controls [data-rubber-error] { flex-basis: 100%; color: #a32924; overflow-wrap: anywhere; }

.block-properties-group { grid-column: 1 / -1; min-width: 0; border-top: 1px solid var(--line, #d7dde4); }
.block-properties-group > summary { padding: 6px 8px; cursor: pointer; font-weight: 600; }
.block-properties-group > summary span { float: right; opacity: .7; }
.block-properties-group > button { margin: 4px; padding: 4px 7px; }
.block-properties-group > .block-properties-group { margin-left: 9px; }
.block-properties-error { grid-column: 1 / -1; color: #be2932; padding: 5px 8px; white-space: normal; }
.block-properties-error:empty { display: none; }

.block-resize-notice { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 40; max-width: 80%; padding: 9px 14px; border: 1px solid #72bdca; border-radius: 6px; background: #eef5f7; color: #20313b; font-size: 13px; pointer-events: none; }

/* BAZIS property grid: compact rows, in-cell editing and native-style groups. */
[data-object-properties] .bazis-property-row,
[data-object-properties] .bazis-property-name,
[data-object-properties] .bazis-property-value { min-height: 21px; }
[data-object-properties] .bazis-property-name,
[data-object-properties] .bazis-property-value { border-bottom: 1px solid #f0f1f3; }
[data-object-properties] .bazis-property-name { padding-left: calc(17px + var(--property-level, 0) * 13px); }
[data-object-properties] .bazis-property-row--group > .bazis-property-name { padding-left: calc(4px + var(--property-level, 0) * 13px); }
[data-object-properties] .bazis-property-row:focus-within > div { background: #c1cedc; }
[data-object-properties] .bazis-property-value { padding: 0 3px; }
[data-object-properties] .bazis-property-value input,
[data-object-properties] .bazis-property-value select { height: 20px; padding: 1px 3px; }
[data-object-properties] .bazis-property-value input[type=number] { appearance: textfield; }
[data-object-properties] input::-webkit-inner-spin-button,
[data-object-properties] input::-webkit-outer-spin-button { appearance: none; margin: 0; }
[data-object-properties] select[data-object-property] { appearance: none; }
[data-object-properties] select[data-object-property]:focus { appearance: auto; }
[data-object-properties] .bazis-property-text { padding: 0 3px; }
.object-property-color { display: flex; align-items: center; gap: 5px; position: relative; min-width: 0; width: 100%; padding: 0 3px; height: 20px; cursor: pointer; }
.object-property-color input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.object-properties-error { grid-column: 1 / -1; color: #a52222; padding: 5px; white-space: normal; }
.object-properties-error:empty { display: none; }
.object-property-advanced { grid-column: 1 / -1; min-width: 0; }
.object-property-advanced .bazis-property-object-select { display: none; }
.structure-row.is-invisible-object:not(.is-selected) .structure-name { color: #a3a7ad; }

/* Keep the joint offset and pitch labels readable in the narrow property pane. */
.bazis-property-row--wrapped-label .bazis-property-name > span {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* The inspected property stays selected while navigating the viewport. */
[data-object-properties] .bazis-property-row--inspected > div { background: #c1cedc; color: #16334d; }
[data-object-properties] [data-scene-property] { cursor: pointer; }
[data-object-properties] [data-scene-property]:focus-visible { outline: 1px solid #2d7fb7; outline-offset: -1px; }
[data-object-properties] .bazis-property-row--edge-type .bazis-property-text { color: inherit; }

[data-object-properties] .bazis-property-row--inspected .bazis-property-text { color: inherit; }

/* Elasticity property actions and BAZIS-style plane editing. */
.elastic-property-value, .elastic-plane-count { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 21px; gap: 4px; }
.elastic-property-buttons { display: flex; visibility: hidden; flex: 0 0 auto; }
.elastic-property-row { cursor: pointer; }
.elastic-property-row--active > div { background: #c1cedc; }
.elastic-property-row--active .elastic-property-buttons, .elastic-property-row:focus-within .elastic-property-buttons { visibility: visible; }
.elastic-property-value button, .elastic-plane-count button { padding: 0 5px; height: 20px; min-width: 20px; line-height: 16px; border: 1px solid #a6afba; border-radius: 0; background: #f0ead3; color: #17293b; }
.elastic-property-value button:disabled { opacity: .5; }
.elastic-editor-menu { position: fixed; z-index: 1200; display: flex; flex-direction: column; min-width: 195px; max-width: calc(100vw - 8px); padding: 3px; background: #fff; border: 1px solid #9faab6; box-shadow: 2px 3px 7px #0004; }
.elastic-editor-menu button { text-align: left; padding: 6px 9px; background: #fff; border: 0; border-radius: 0; font: inherit; font-size: 12px; color: #17293b; }
.elastic-editor-menu button:hover, .elastic-editor-menu button:focus-visible { background: #dce8f5; outline: none; }
.elastic-editor-toolbar { position: absolute; z-index: 12; top: 8px; left: 8px; right: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 1px solid #acb9c8; background: #eef2f7; color: #24354b; box-shadow: 0 2px 4px #0002; font-size: 12px; }
.elastic-editor-toolbar[hidden] { display: none; }
.elastic-editor-toolbar button { flex-shrink: 0; white-space: nowrap; padding: 4px 8px; border: 1px solid #98a99e; background: #f6fff7; color: #24582d; }
.elastic-plane-weight { box-sizing: border-box; width: 46px; height: 21px; min-width: 0; padding: 1px 2px; border: 1px solid #9eb292; border-radius: 0; background: #eff8dce6; color: #1b3817; text-align: center; font: 12px Arial, sans-serif; }
.elastic-plane-weight:focus { background: #fff; outline: 1px solid #3d86bf; }
.elastic-editor-error, .elastic-initial { grid-column: 1 / -1; padding: 8px; font-size: 12px; white-space: normal; }
.elastic-editor-error { color: #b02c25; }
.elastic-editor-error:empty { display: none; }
.elastic-initial { background: #f0f5e9; }
.elastic-initial > div { display: flex; gap: 6px; margin-top: 8px; }
.elastic-note .bazis-property-value { white-space: normal; }
.elastic-plane-selected > div { background: #e8efde; }
.elastic-note .bazis-property-name { display: none; }
.elastic-note .bazis-property-value { grid-column: 1 / -1; padding: 5px 8px !important; }
.elastic-note .bazis-property-text { white-space: normal; text-overflow: clip; }
.elastic-editor-toolbar { right: 118px; }
@media (max-width: 1150px) {
  .elastic-editor-toolbar { top: auto; bottom: 8px; right: 8px; }
}
.property-expression-error {
  display: block;
  color: #b42318;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  margin-top: 3px;
}
input[data-property-number][aria-invalid="true"],
input[data-elastic-weight][aria-invalid="true"] { outline: 1px solid #b42318; }
.has-property-expression-error { flex-wrap: wrap; }
.has-property-expression-error > .property-expression-error,
.has-property-expression-error > input[data-property-number] { flex-basis: 100%; }

.edge-band-colors-button,
.selection-focus-button {
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 2px;
}
.edge-band-colors-button svg,
.selection-focus-button svg { width: 22px; height: 22px; }
.scene-edge-band-legend[hidden] { display: none; }
.scene-edge-band-legend {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 8;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 28px);
  max-height: min(25%, 180px);
  overflow: auto;
  padding: 10px 14px;
  border: 1px solid #8d9bab;
  border-radius: 6px;
  background: rgba(249, 251, 253, 0.97);
  color: #172c40;
  box-shadow: 0 3px 12px #0005;
  font-size: 14px;
  line-height: 1.35;
  user-select: text;
}
.canvas-stage.dimension-command-active #sceneEdgeBandLegend { display: none; }
.dimension-mode-panel { width: max-content; max-height: none; user-select: none; }
.drawing-mode-panel { max-width: calc(100% - 28px); }
.drawing-mode-options { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drawing-mode-options label { display: flex; align-items: center; gap: 6px; }
.drawing-mode-options [hidden] { display: none; }
.drawing-mode-options input { width: 64px; }
.measured-wall-panel { left: 14px; top: 14px; bottom: auto; transform: none; width: 320px; max-width: calc(100% - 24px); max-height: calc(100% - 32px); overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.measured-wall-panel[hidden] { display: none; }
.measured-wall-panel label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.measured-wall-panel input { width: 145px; min-width: 0; }
.measured-wall-panel .measured-wall-opening { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.measured-wall-panel input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #1687d3; }
.measured-wall-panel select { width: 180px; min-width: 0; }
.measured-wall-panel p { margin: 0; line-height: 1.45; font-size: 12px; }
.measured-wall-panel input, .measured-wall-panel select, .measured-wall-panel button { font: inherit; }
.measured-wall-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.measured-wall-actions button { padding: 5px 8px; }
.measured-wall-notice { min-height: 35px; }
.measured-wall-regions { display: flex; flex-direction: column; gap: 8px; border-block: 1px solid #8b99a6; padding: 10px 0; }
.measured-wall-regions[hidden] { display: none; }
.measured-wall-regions label { font-size: 12px; }
.measured-wall-regions select { width: 155px; }
.drawing-mode-options select, .drawing-mode-options input, .drawing-mode-options button { font: inherit; }
.drawing-text-options { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.drawing-text-options[hidden] { display: none; }
.drawing-text-options [hidden] { display: none; }
.drawing-text-options label { display: flex; flex-direction: column; gap: 4px; }
.drawing-text-options input { width: 75px; }
.drawing-text-options input[type="checkbox"] { width: 18px; height: 24px; margin: 0; }
.drawing-text-options textarea { width: 245px; min-height: 42px; resize: vertical; }
.drawing-text-options input, .drawing-text-options select, .drawing-text-options textarea { font: inherit; }
.dimension-mode-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.dimension-mode-choices button { padding: 7px 13px; border: 1px solid #9aaaba; border-radius: 4px; background: #fff; color: #172c40; font: inherit; cursor: pointer; }
.dimension-mode-choices button[aria-checked="true"] { border-color: #2979a5; background: #dceefa; box-shadow: inset 0 0 0 1px #2979a5; }
.dimension-mode-choices button:focus-visible { outline: 2px solid #2979a5; outline-offset: 2px; }
.dimension-mode-hint { margin-top: 8px; font-size: 12px; text-align: center; }
.scene-edge-band-legend-title { margin-bottom: 7px; font-weight: bold; }
.scene-edge-band-legend-items { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.scene-edge-band-legend-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.scene-edge-band-legend-item > span:last-child { overflow-wrap: anywhere; }
.scene-edge-band-swatch {
  flex: 0 0 24px;
  width: 24px;
  height: 18px;
  border: 1px solid #172c4080;
  border-radius: 3px;
}

.scanner-profile-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.scanner-profile-tab[aria-selected="true"] { background: linear-gradient(#ffe8a5, #efc566); border-color: #a48b50; font-weight: 700; }
.scanner-profile-tabs .tool-button { min-width: 32px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.scanner-profile-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.scanner-profile-fields > label:first-child { flex: 1 1 200px; }
.scanner-profile-fields label, .scanner-rule-grid label { display: grid; gap: 5px; }
.scanner-profile-fields .scanner-profile-enabled { display: flex; align-items: center; min-height: 32px; }
.scanner-profile-fields input[type="text"], .scanner-rule-grid input { min-height: 32px; padding: 5px 8px; border: 1px solid #a2adba; width: 100%; }
.scanner-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scanner-rule-preview { padding: 9px; background: #e3ecf8; border: 1px solid #c1d2e8; font: 13px/1.5 Consolas, monospace; overflow-wrap: anywhere; }
.scanner-rule-preview.is-invalid { color: #9a2920; background: #fff0ed; border-color: #d99e96; }
.scanner-project-settings [aria-invalid="true"] { outline: 1px solid #b42318; }

/* Settings: local material library */
.library-settings .settings-section { display: grid; gap: 8px; }
.library-path-row { display: flex; align-items: center; gap: 8px; }
.library-path-row input { flex: 1; min-width: 0; padding: 9px 10px; }
.library-path-row .tool-button { flex: none; }
.library-download { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.library-helper-versions { padding: 10px 12px; border: 1px solid #b9c8d8; border-radius: 5px; background: #f2f6fa; color: #263b51; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.library-helper-versions p { margin: 0; }
.library-helper-versions [data-helper-update]:not([hidden]) { margin-top: 5px; }
.library-helper-versions[data-update="true"] { border-color: #b97919; background: #fff4d9; color: #624000; }
.library-helper-versions[data-update="true"] [data-helper-versions] { font-weight: 600; }
.helper-intro { box-sizing: border-box; width: min(650px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #9ba8b8; border-radius: 10px; background: #f5f7fa; color: #172b43; box-shadow: 0 16px 60px #10223c55; font: 14px/1.55 system-ui, sans-serif; overflow: hidden; }
.helper-intro[open] { display: flex; flex-direction: column; }
.helper-intro::backdrop { background: #15243b99; }
.helper-intro header { display: flex; align-items: center; flex: none; gap: 14px; padding: 20px 24px 12px; }
.helper-intro h2 { margin: 0; font-size: 21px; line-height: 1.3; }
.helper-intro h2:focus { outline: none; }
.helper-intro header img { flex: none; }
.helper-intro-body { overflow: auto; min-height: 0; padding: 0 24px 12px; }
.helper-intro p { margin: 10px 0; }
.helper-intro ul, .helper-intro ol { margin: 14px 0; padding-left: 22px; }
.helper-update-versions { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 16px 0; padding: 12px 16px; border: 1px solid #b97919; border-radius: 5px; background: #fff4d9; color: #624000; }
.helper-update-versions dd { margin: 0; font-weight: 700; }
.helper-intro[data-helper-notice="update"] { border-color: #b97919; }
.helper-intro[data-helper-notice="update"] header { padding-bottom: 18px; border-bottom: 1px solid #e1bf80; background: #fff4d9; color: #624000; }
.helper-notice-warning { flex: none; width: 44px; height: 44px; }
.helper-intro li { margin: 12px 0; padding-left: 3px; }
.helper-intro-note { font-size: 12px; color: #506179; }
.helper-intro footer { display: flex; flex: none; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid #cbd5e0; background: #eef2f7; }
.helper-intro footer a, .helper-intro footer button { box-sizing: border-box; padding: 9px 16px; border: 1px solid #9baec3; border-radius: 5px; background: #fff; color: #172b43; font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.helper-intro footer .helper-intro-download { background: #24669b; border-color: #24669b; color: #fff; }
.helper-intro footer :is(a, button):hover { filter: brightness(.94); }
.helper-intro footer :is(a, button):focus-visible { outline: 3px solid #e5a32a; outline-offset: 2px; }
@media (max-width: 480px) { .helper-intro { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); } .helper-intro header { padding: 16px 16px 8px; gap: 10px; } .helper-intro h2 { font-size: 18px; } .helper-intro-body { padding: 0 16px 8px; } .helper-intro footer { padding: 12px 16px; } .helper-intro footer a, .helper-intro footer button { flex: 1 1 100%; } }
.library-status { white-space: pre-wrap; overflow-wrap: anywhere; }
.library-status[data-error="true"] { color: #a62c24; }
.library-settings .settings-actions { flex-wrap: wrap; }

.library-issues { max-height: 240px; overflow: auto; }
.library-issues summary { cursor: pointer; }
.library-issues ul { padding-left: 20px; overflow-wrap: anywhere; }

/* Lamination stack: fixed square actions and an explicit base marker. */
.surface-layer-control { display:flex; align-items:center; gap:4px; width:100%; min-width:0; }
.surface-layer-description { min-width:0; flex:1; }
.surface-layer-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.surface-layer-description small { display:block; color:#526476; font-size:10px; }
.surface-layer-actions { display:flex; gap:2px; flex:none; }
.bazis-property-value .surface-layer-button { width:20px; height:20px; min-width:20px; min-height:20px; padding:0; border:1px solid #9aa9b9; border-radius:0; line-height:18px; font-size:14px; background:#f5f8fc; color:#213d57; }
.surface-layer-button:disabled { opacity:.3; cursor:default; }
.surface-layer-button:not(:disabled):hover { background:#d7eaff; }
.surface-layer-button:focus-visible { outline:2px solid #3275b5; outline-offset:-2px; }
[data-object-properties] .surface-layer-row--base > div { background:#e7eff8; font-weight:600; }
[data-object-properties] .surface-layer-row--base .bazis-property-name { box-shadow:inset 3px 0 #5083b5; }
[data-object-properties] .surface-layer-row--base.bazis-property-row--inspected > div { background:#c1cedc; }
.surface-layer-row .bazis-property-value { display:block; }

/* Construction toolbar uses the same bottom placement as the dimension command. */
.canvas-stage.auxiliary-command-active #sceneEdgeBandLegend { display: none; }
.auxiliary-mode-panel { max-width: calc(100% - 28px); }
.auxiliary-mode-choices button { display: inline-flex; align-items: center; gap: 7px; }
.auxiliary-mode-choices svg { width: 24px; height: 24px; fill: none; stroke: #20865f; stroke-width: 1.6; }
.auxiliary-parameters { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.auxiliary-parameters label { display: inline-flex; align-items: center; gap: 7px; }
.auxiliary-parameters [hidden] { display: none; }
.auxiliary-parameters input { width: 110px; padding: 5px 7px; border: 1px solid #9aaaba; border-radius: 4px; font: inherit; }
.auxiliary-parameters input[aria-invalid="true"] { border-color: #ba3030; outline: 1px solid #ba3030; }
.auxiliary-parameters button { padding: 5px 9px; }
/* Thumbnails occupy the existing line box, so material rows keep their height. */
.material-appearance {
  display: inline-block;
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 16px;
  vertical-align: middle;
}
.material-appearance__image {
  position: absolute;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  border: 1px solid #6f7885;
  overflow: hidden;
}
.material-appearance__image[data-texture-preview] { cursor: zoom-in; }
.material-appearance__image:focus-visible { outline: 2px solid #2874b8; outline-offset: 1px; }
.material-appearance__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.material-library-table-row td:last-child { overflow: visible; }
.part-material-picker__row { display: flex; align-items: stretch; }
.part-material-picker__row .part-material-picker__option {
  flex: 1;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 6px;
}
.part-material-picker__option > .material-appearance { grid-row: 1 / 3; align-self: center; }
.part-material-picker__option > .part-material-picker__name { min-height: 18px; }
.part-material-picker__option > .part-material-picker__meta { grid-column: 2; }
.part-material-picker__name, .part-material-picker__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-catalog-action { display: flex; align-items: center; padding: 0 4px; border-bottom: 1px solid #e0e5ec; }
.material-catalog-action:empty { display: none; }
.material-catalog-button { width: 25px; height: 25px; padding: 0; font-size: 18px; cursor: pointer; }
.material-missing-mark { display: inline-block; margin-right: 5px; color: #db1414; font-size: 16px; font-weight: 900; line-height: 12px; }
.material-missing-mark[hidden] { display: none; }
.material-texture-preview {
  position: fixed;
  z-index: 10000;
  display: block;
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: 0 0 0 2px #fff, 0 6px 28px #0008;
  cursor: zoom-out;
}
.material-texture-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Explorer-style structure selection and drop feedback. */
.structure-list { user-select: none; touch-action: none; }
.structure-gesture, .structure-gesture * { user-select: none !important; }
body[data-structure-cursor="marquee"], body[data-structure-cursor="marquee"] * { cursor: crosshair !important; }
body[data-structure-cursor="move"], body[data-structure-cursor="move"] * { cursor: move !important; }
body[data-structure-cursor="inside"], body[data-structure-cursor="inside"] * { cursor: alias !important; }
body[data-structure-cursor="invalid"], body[data-structure-cursor="invalid"] * { cursor: not-allowed !important; }
.structure-marquee, .structure-drop-line, .structure-drag-badge {
  position: fixed; z-index: 10000; pointer-events: none; box-sizing: border-box;
}
.structure-marquee { border: 1px solid #1684d8; background: #1684d82b; }
.structure-row.structure-drop-inside { outline: 2px solid #1684d8; outline-offset: -2px; background: #cce9ff !important; }
.structure-drop-line { height: 2px; background: #0878ce; }
.structure-drop-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; background: #0878ce; border-radius: 50%; }
.structure-drag-badge { max-width: 360px; padding: 6px 10px; border: 1px solid #86b9df; border-radius: 5px;
  background: #f6fbff; box-shadow: 0 2px 8px #20355030; color: #143a57; font: 12px/1.3 Arial, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-structure-cursor="invalid"] .structure-drag-badge { border-color: #cf8b8b; background: #fff4f4; color: #8a2020; }
.line-volume-panel { left: 14px; top: 14px; bottom: auto; transform: none; width: 330px; max-width: calc(100% - 28px); max-height: calc(100% - 28px); }
.line-volume-panel p { margin: 6px 0; line-height: 1.4; }
.line-volume-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.line-volume-fields[hidden] { display: none; }
.line-volume-fields label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.line-volume-fields input { width: 100%; min-width: 0; box-sizing: border-box; }
.line-volume-fields input[aria-invalid="true"] { outline: 2px solid #e55656; }
.line-volume-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.furniture-in-walls-active [data-scene-part-resize-handle],
.furniture-in-walls-active [data-block-resize-overlay],
.furniture-in-walls-active [data-block-origin-overlay] { display: none; }
.measured-wall-panel.furniture-in-walls-panel { width: 370px; max-height: calc(100% - 28px); overflow-y: auto; }
.furniture-in-walls-panel .furniture-filler-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: center; margin: 6px 0; }
.furniture-in-walls-panel .furniture-filler-row label { display: flex; justify-content: flex-start; gap: 8px; margin: 0; }
.furniture-in-walls-panel .furniture-filler-row input[type="checkbox"] { width: auto; margin: 0; }
.furniture-in-walls-panel .furniture-filler-row > input { min-width: 0; width: 100%; }
