:root {
  --bg-outer: #0f0f0f;
  --bg: #0f0f0f;
  --canvas-top: #1c1c1c;
  --canvas-bottom: #1c1c1c;
  --loading-top: #1c1c1c;
  --loading-bottom: #1c1c1c;
  --modal-bg: #1c1c1c;
  --modal-bg-alpha: 100%;
  --modal-focus: #292929;
  --modal-focus-alpha: 35%;
  --modal-border: #1c1c1c;
  --modal-element: #262626;
  --modal-element-outline: #262626;
  --modal-radius: 14px;
  --panel: #1c1c1c;
  --panel-2: #292929;
  --accent: #ffea00;
  --accent-2: #ffea00;
  --text: #e6edf3;
  --muted: #9aa4b5;
  --border: #233044;
  --error: #ff6b6b;
  --success: #6fffa1;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --panel-alpha: 1;
  --panel-radius: 14px;
  --toolbar-bg: #292929;
  --toolbar-bg-active: #c4ff67;
  --toolbar-bg-active-contrast: #15170f;
  --toolbar-border: #292929;
  --toolbar-outline: #292929;
  --template-fill: #292929;
  --template-outline: #292929;
  --template-outline-hover: #1c1c1c;
  --project-btn-fill: #292929;
  --project-btn-border: #292929;
  --project-btn-hover: #1c1c1c;
  --modal-btn-primary: #c4ff67;
  --modal-btn-primary-contrast: #15170f;
  --modal-btn-secondary: #292929;
  --loader-color: #c4ff67;
  --template-glow-strength: 80%;
  --highlight-color: #c4ff67;
  --cube-text: #242424;
  --cube-edges: #e0e7ff;
  --cube-base: #ffffff;
  --cube-hover: #ffffff;
  --cube-edge-color: #e0e7ff;
  --cube-edge-alpha: 0.6;
  --plus-color: #c4ff67;
  --measure-line: #c4ff67;
  --measure-label: #c4ff67;
  --measure-label-text: #292929;
  --measure-dot: #c4ff67;
  --section-axis-x: #ff2b2b;
  --section-axis-y: #35ff4f;
  --section-axis-z: #285bff;
  --section-gizmo-diameter: 1;
  --section-gizmo-thickness: 1;
  --section-plane-fill: #606060;
  --section-plane-alpha: 0.32;
  --section-plane-edge: #0d0d0d;
  --section-plane-edge-alpha: 0.8;
  --comment-target-active: #c4ff67;
  --comment-target-active-alpha: 1;
  --comment-target-active-size: 30px;
  --comment-target-passive: #f5f5fa;
  --comment-target-passive-alpha: 0.58;
  --comment-target-passive-size: 22px;
  --nodedc-header-dropdown-bg: var(--nodedc-glass-panel-bg-strong);
  --nodedc-header-dropdown-item-bg: var(--nodedc-glass-control-bg);
  --nodedc-header-dropdown-item-hover-bg: var(--nodedc-glass-control-hover);
  --nodedc-header-dropdown-item-active-bg: var(--toolbar-bg-active);
  --nodedc-header-dropdown-item-active-color: var(--toolbar-bg-active-contrast);
  --nodedc-glass-panel-bg: rgba(28, 28, 30, 0.72);
  --nodedc-glass-panel-bg-strong: rgba(28, 28, 30, 0.82);
  --nodedc-glass-panel-bg-soft: rgba(28, 28, 30, 0.56);
  --nodedc-glass-panel-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.052) 0%, rgba(255, 255, 255, 0.014) 100%), var(--nodedc-glass-panel-bg);
  --nodedc-glass-panel-surface-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.016) 100%), var(--nodedc-glass-panel-bg-strong);
  --nodedc-glass-section-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.038) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(255, 255, 255, 0.032);
  --nodedc-glass-outline: rgba(255, 255, 255, 0.075);
  --nodedc-glass-outline-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.105) 0%, rgba(255, 255, 255, 0.058) 56%, rgba(255, 255, 255, 0.034) 100%);
  --nodedc-glass-panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 22px 72px rgba(0, 0, 0, 0.42);
  --nodedc-glass-filter: blur(30px) saturate(1.26) brightness(1.05);
  --nodedc-glass-control-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.052) 0%, rgba(255, 255, 255, 0.018) 100%), rgba(255, 255, 255, 0.048);
  --nodedc-glass-control-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.026) 100%), rgba(255, 255, 255, 0.066);
  --nodedc-glass-control-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --text-primary: rgba(255, 255, 255, 0.96);
  --section-toolbar-left: calc(12px + var(--tb-size, 25px) + var(--tb-gap, 10px));
  --section-toolbar-bottom: 123px;
  --tb-size: 25px;
  --tb-min-size: 25px;
  --tb-max-size: 56px;
  --tb-lens-count: 7;
  --tb-autohide: 0;
  --tb-gap: 10px;
  --tb-radius: 7px;
  --tb-pad-y: 6px;
  --tb-icon-pad: 5px;
  --tb-icon-size: 13px;
  --settings-width: 350px;
  --templates-width: 350px;
  --templates-left: 72px;
  --templates-bottom: 12px;
  --settings-left: 72px;
  --settings-bottom: 12px;
  --measure-left: 72px;
  --measure-bottom: 12px;
  --z-workspace-backdrop: 30045;
  --z-workspace-modal: 30050;
  --z-workspace-window: 30080;
  --z-dropdown: 50000;
  --z-dropdown-select: 50010;
  --z-dropdown-workspace: 50020;
  --z-toolbar-priority: 59000;
  --z-critical-backdrop: 60000;
  --z-critical-modal: 60010;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(76, 224, 210, 0.08), transparent 28%),
              radial-gradient(circle at 82% 22%, rgba(116, 240, 229, 0.08), transparent 25%),
              var(--bg-outer);
  color: var(--text);
  overflow: hidden;
}

html,
body,
.viewer-wrapper,
#viewerCanvas {
  outline: none;
}

#viewerCanvas:focus,
#viewerCanvas:focus-visible,
.viewer-wrapper:focus,
.viewer-wrapper:focus-visible {
  outline: none;
  box-shadow: none;
}

header {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
  pointer-events: none;
}

.ue-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-btn {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 32px;
}


.main {
  position: relative;
  padding: 0;
  margin: 0;
  height: 100vh;
  width: 100vw;
}

.viewer-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--panel);
  height: 100vh;
  width: 100vw;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

#viewerCanvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--canvas-top), var(--canvas-bottom));
}

#navCube {
  position: absolute;
  top: 64px;
  right: 12px;
  width: 100px;
  height: 100px;
  z-index: 5;
  display: none;
}

/* убираем штатный спиннер xeokit (sk-circle) */
.sk-circle,
[class*="sk-circle"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.drop-hint {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 14px;
  margin: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--loading-top), var(--loading-bottom));
  color: var(--muted);
  text-align: center;
  pointer-events: none;
  z-index: 4;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.drop-hint.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(76, 224, 210, 0.06);
}

.drop-hint.hidden {
  display: none;
}

.drop-center {
  position: relative;
  width: 110px;
  height: 110px;
}

.drop-plus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 12px;
  font-size: 44px;
  font-weight: 700;
  color: var(--plus-color);
  background: transparent;
  border: none;
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  display: grid;
  place-items: center;
  line-height: 1;
}

.drop-formats {
  font-size: 9.6px;
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 90px; /* ширина плюсика ~90px */
  pointer-events: none;
}

.drop-formats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: nowrap;
  width: 140px;
}

.drop-formats > div:first-child {
  text-align: right;
}

.drop-formats > div:last-child {
  text-align: left;
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  --loader-size: 32px;
  --loader-duration: 1.15s;
  width: var(--loader-size);
  height: 0;
  padding-top: var(--loader-size);
  overflow: visible;
  pointer-events: none;
  z-index: 7;
}

.loader.hidden {
  display: none;
}

.loader__figure,
.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.loader__figure {
  width: 0;
  height: 0;
  box-sizing: border-box;
  border: 0 solid var(--loader-color, var(--accent));
  border-radius: 50%;
  animation: loader-figure var(--loader-duration) infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.loader__label {
  display: none;
}

@keyframes loader-figure {
  0% {
    width: 0;
    height: 0;
    background-color: var(--loader-color, var(--accent));
  }
  29% {
    background-color: var(--loader-color, var(--accent));
  }
  30% {
    width: var(--loader-size);
    height: var(--loader-size);
    background-color: transparent;
    border-width: calc(var(--loader-size) / 2);
    opacity: 1;
  }
  100% {
    width: var(--loader-size);
    height: var(--loader-size);
    border-width: 0;
    opacity: 0;
    background-color: transparent;
  }
}

@keyframes loader-label {
  0% { opacity: 0.25; }
  30% { opacity: 1; }
  100% { opacity: 0.25; }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status-bar {
  display: none;
}

.status-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(76, 224, 210, 0.18);
}

.side-panel {
  position: fixed;
  --env-control-h: 46px;
  --env-button-radius: 17px;
  --env-pill-radius: 999px;
  --env-glass-control-bg: var(--nodedc-glass-control-bg);
  --env-glass-control-hover: var(--nodedc-glass-control-hover);
  --env-glass-control-shadow: var(--nodedc-glass-control-shadow);
  top: 170px;
  right: 12px;
  bottom: 12px;
  width: 320px;
  max-height: calc(100vh - 90px);
  overflow: hidden;
  background: var(--nodedc-glass-panel-surface);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 16px);
  padding: 0;
  box-shadow: var(--nodedc-glass-panel-shadow);
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: var(--z-workspace-window);
  display: none;
}

.side-panel.is-collapsed {
  display: none !important;
}

.inspector-panel-header {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--env-control-h);
  align-items: center;
  gap: 10px;
  height: calc(var(--env-control-h) + 20px);
  min-height: var(--env-control-h);
  margin: 0;
  padding: 12px 12px 8px 16px;
  background: transparent;
  border-radius: var(--modal-radius, 16px) var(--modal-radius, 16px) 0 0;
  color: var(--text);
  font-weight: 700;
}

.inspector-panel-header h3 {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
}

.inspector-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector-collapse-btn {
  display: grid;
  place-items: center;
  width: var(--env-control-h);
  height: var(--env-control-h);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--env-button-radius);
  background: var(--env-glass-control-bg);
  color: rgba(245, 245, 250, 0.78);
  box-shadow: var(--env-glass-control-shadow);
  cursor: pointer;
  line-height: 1;
  outline: none;
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

.inspector-collapse-btn svg {
  display: block;
  width: 16px;
  height: 16px;
}

.inspector-collapse-btn:hover {
  background: var(--env-glass-control-hover);
  color: #fff;
}

.inspector-collapse-btn:active {
  transform: translateY(1px);
}

.inspector-collapse-btn:focus,
.inspector-collapse-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.inspector-restore-tray {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 320px;
  padding: 0 14px;
  z-index: 12;
  box-sizing: border-box;
  pointer-events: none;
}

.inspector-restore-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--modal-btn-primary, var(--accent));
  color: var(--modal-btn-primary-contrast, #15170f);
  box-shadow: var(--nodedc-glass-control-shadow);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: auto;
  transition: filter 140ms ease, transform 100ms ease;
}

.inspector-restore-button:hover {
  filter: brightness(1.05);
}

.inspector-restore-button:active {
  transform: translateY(1px);
}

.inspector-restore-button:focus,
.inspector-restore-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.comments-panel {
  position: fixed;
  --env-control-h: 46px;
  --env-button-radius: 17px;
  --env-pill-radius: 999px;
  --env-glass-control-bg: var(--nodedc-glass-control-bg);
  --env-glass-control-hover: var(--nodedc-glass-control-hover);
  --env-glass-control-shadow: var(--nodedc-glass-control-shadow);
  top: 170px;
  left: 52px;
  bottom: 12px;
  width: 320px;
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--nodedc-glass-panel-surface);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 16px);
  box-shadow: var(--nodedc-glass-panel-shadow);
  z-index: var(--z-workspace-window);
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
}

.comments-panel.hidden {
  display: none;
}

.comments-panel-header {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--env-control-h);
  align-items: center;
  gap: 10px;
  min-height: calc(var(--env-control-h) + 20px);
  padding: 12px 12px 8px 16px;
  background: transparent;
  border-radius: var(--modal-radius, 16px) var(--modal-radius, 16px) 0 0;
  color: var(--text);
  font-weight: 700;
  cursor: grab;
  user-select: none;
}

.comments-panel-header:active {
  cursor: grabbing;
}

.comments-panel-header h3 {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
}

.comments-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 12px;
}

.comments-list {
  display: grid;
  gap: 8px;
}

.comments-empty,
.comments-loading {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: 10px 4px;
}

.comment-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 10px);
  background: var(--nodedc-glass-control-bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.comment-list-item:hover,
.comment-list-item.active {
  border-color: transparent;
  background: var(--toolbar-bg-active, var(--comment-target-active));
  color: var(--toolbar-bg-active-contrast, #15170f);
}

.comment-list-item:active {
  transform: translateY(1px);
}

.comment-list-item:hover .comment-list-title,
.comment-list-item:hover .comment-list-body,
.comment-list-item:hover .comment-list-meta,
.comment-list-item.active .comment-list-title,
.comment-list-item.active .comment-list-body,
.comment-list-item.active .comment-list-meta {
  color: inherit;
}

.comment-list-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(245, 245, 250, 0.94);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.comment-list-body {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: rgba(245, 245, 250, 0.66);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.comment-list-meta {
  color: rgba(245, 245, 250, 0.48);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.comments-restore-tray {
  position: fixed;
  left: 52px;
  bottom: 12px;
  width: 320px;
  padding: 0 14px;
  z-index: 12;
  box-sizing: border-box;
  pointer-events: none;
}

.comments-restore-tray[hidden] {
  display: none;
}

.comments-restore-tray .inspector-restore-button {
  pointer-events: auto;
}

.comment-targets-layer {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
}

.comment-targets-layer.hidden {
  display: none;
}

.comment-target {
  position: fixed;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: var(--comment-target-passive-size);
  height: var(--comment-target-passive-size);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--comment-target-passive);
  opacity: var(--comment-target-passive-alpha);
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: color 160ms ease, height 180ms ease, opacity 160ms ease, width 180ms ease;
}

.comment-target.active {
  width: var(--comment-target-active-size);
  height: var(--comment-target-active-size);
  color: var(--comment-target-active);
  opacity: var(--comment-target-active-alpha);
}

.comment-target svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.48));
  overflow: visible;
}

.comment-target:focus,
.comment-target:focus-visible {
  outline: none;
}

.nodedc-dropdown-surface {
  position: fixed;
  z-index: var(--z-dropdown);
  padding: 0.65rem;
  border: 0;
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012)),
    var(--nodedc-header-dropdown-bg, rgba(11, 11, 14, 0.94));
  box-shadow: none;
  backdrop-filter: blur(44px) saturate(1.12);
  -webkit-backdrop-filter: blur(44px) saturate(1.12);
}

.nodedc-dropdown-surface.hidden {
  display: none;
}

.bim-context-menu {
  display: grid;
  gap: 0.18rem;
  min-width: 13.25rem;
  max-width: min(18rem, calc(100vw - 24px));
}

.nodedc-dropdown-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 2.45rem;
  width: 100%;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 0.92rem;
  background: var(--nodedc-header-dropdown-item-bg, var(--nodedc-glass-control-bg, transparent));
  color: rgba(255, 255, 255, 0.68);
  padding: 0.38rem 0.62rem;
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 760;
  cursor: pointer;
}

.nodedc-dropdown-option svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nodedc-dropdown-option:hover,
.nodedc-dropdown-option:focus-visible {
  background: var(--nodedc-header-dropdown-item-hover-bg, var(--nodedc-glass-control-hover, rgba(255, 255, 255, 0.075)));
  color: var(--text-primary);
  outline: none;
}

.bim-context-menu,
.bim-subitem-menu {
  padding: 0.5rem;
  border-radius: 1.15rem;
  background: rgba(7, 7, 9, 0.96);
  box-shadow: none;
  backdrop-filter: blur(30px) saturate(1.08);
  -webkit-backdrop-filter: blur(30px) saturate(1.08);
}

.bim-context-menu .nodedc-dropdown-option,
.bim-subitem-menu .nodedc-dropdown-option {
  min-height: 2.35rem;
  border-radius: 0.82rem;
  background: transparent;
  color: rgba(245, 245, 250, 0.76);
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 650;
}

.bim-context-menu .nodedc-dropdown-option {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.bim-context-menu .nodedc-dropdown-option:hover,
.bim-context-menu .nodedc-dropdown-option:focus-visible,
.bim-subitem-menu .nodedc-dropdown-option:hover,
.bim-subitem-menu .nodedc-dropdown-option:focus-visible {
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.92);
}

.bim-context-menu .nodedc-dropdown-option svg {
  display: none;
}

.panel-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.panel-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.panel-section .inspector-panel-header h3 {
  margin: 0;
}

.panel-section p,
.panel-section ul {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel-section ul {
  padding-left: 18px;
}

.project-name-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--modal-radius, 10px);
  border: 1px solid var(--nodedc-glass-outline);
  background: var(--nodedc-glass-control-bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.project-name-input:focus {
  border-color: var(--nodedc-glass-outline);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--modal-btn-primary, var(--accent)) 18%, transparent);
}

.inline-error {
  min-height: 16px;
}

.primary-btn,
.secondary-btn {
  border-radius: var(--modal-radius, 12px);
  border: 1px solid var(--nodedc-glass-outline);
  font-weight: 700;
  padding: 12px;
  width: 100%;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
}

.danger-btn {
  background: var(--nodedc-glass-control-bg);
  color: var(--text);
  border-color: var(--nodedc-glass-outline);
}

.danger-btn:not(:disabled):hover {
  background: var(--modal-border);
}

.primary-btn {
  background: color-mix(in srgb, var(--modal-btn-primary, var(--accent)) 100%, transparent);
  color: var(--modal-btn-primary-contrast, #15170f);
  box-shadow: 0 8px 24px rgba(255, 234, 0, 0.25);
}

.primary-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(255, 234, 0, 0.3);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-btn {
  background: var(--nodedc-glass-control-bg);
  color: var(--text);
  border-color: var(--nodedc-glass-outline);
  box-shadow: var(--nodedc-glass-control-shadow);
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
}

.secondary-btn:not(:disabled):hover {
  background: var(--nodedc-glass-control-hover);
}

#saveProjectSection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.log {
  background: var(--nodedc-glass-section-bg);
  border-radius: var(--modal-radius, 12px);
  border: 1px solid var(--nodedc-glass-outline);
  min-height: 100px;
  max-height: 140px;
  overflow: auto;
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-line;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.switch input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* убираем браузерный фокусный пунктир на тулбаре */
.toolbar *:focus,
.toolbar *:focus-visible,
.switch:focus,
.switch:focus-visible {
  outline: none;
  box-shadow: none;
}

.tree {
  background: var(--nodedc-glass-section-bg);
  border-radius: 10px;
  border: 1px solid var(--nodedc-glass-outline);
  height: 260px;
  overflow: auto;
  padding: 8px;
  list-style: none;
}

.tree .highlighted-node {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2px 4px;
}

.tree .highlighted-node > span {
  display: inline-flex;
  align-items: center;
  width: auto;
}

.tree ul {
  list-style: none;
  margin: 0;
  padding-left: 14px;
}

.tree li {
  position: relative;
  padding-left: 0;
  padding-right: 18px;
  cursor: pointer;
}

.tree li > span {
  display: inline-block;
  padding-right: 6px;
}

.tree li::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
}

.tree li > a.plus,
.tree li > a.minus {
  position: absolute;
  right: 4px;
  top: 6px; /* фиксированное позиционирование, чтобы не прыгало при раскрытии */
  width: 9px;
  height: 9px;
  text-indent: -9999px;
  overflow: visible;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-block;
}

.tree li > a.plus::after,
.tree li > a.minus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.tree li > a.plus::after {
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 5px solid var(--text);
}

.tree li > a.minus::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text);
}

.tree li > input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px 0 0;
  vertical-align: -1px;
  border: 0;
  border-radius: 4px;
  background: var(--nodedc-glass-control-bg);
  box-shadow: var(--nodedc-glass-control-shadow);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.tree li > input[type="checkbox"]:checked {
  background: var(--modal-btn-primary, var(--accent));
  box-shadow: none;
}

.tree li > input[type="checkbox"]:hover {
  background: var(--nodedc-glass-control-hover);
}

.tree li > input[type="checkbox"]:checked:hover {
  background: color-mix(in srgb, var(--modal-btn-primary, var(--accent)) 86%, white 14%);
}

.tree li > input[type="checkbox"]:focus,
.tree li > input[type="checkbox"]:focus-visible {
  outline: none;
}

.inspector-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inspector-control-row {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.inspector-control-row--full {
  grid-column: 1 / -1;
}

.inspector-control-row--slider {
  margin-top: 2px;
}

.inspector-control-label {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

.inspector-select-host {
  min-width: 0;
}

.inspector-version-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-version-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.inspector-icon-btn {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--nodedc-glass-control-bg);
  box-shadow: var(--nodedc-glass-control-shadow);
  color: rgba(245, 245, 250, 0.72);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.inspector-icon-btn:hover {
  color: rgba(245, 245, 250, 0.94);
  background: var(--nodedc-glass-control-hover);
}

.inspector-icon-btn:disabled {
  cursor: default;
  opacity: 0.42;
}

.inspector-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inspector-color-host {
  min-width: 0;
}

.inspector-color-host .env-color-field {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 40px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 5px 10px 5px 7px;
  border-radius: 14px;
  background: var(--nodedc-glass-control-bg);
  box-shadow: var(--nodedc-glass-control-shadow);
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
}

.inspector-color-host .env-color-field__swatch {
  position: relative;
  width: 26px;
  height: 26px;
  min-height: 26px;
  flex: 0 0 26px;
  overflow: hidden;
  border-radius: 999px;
  cursor: pointer;
}

.inspector-color-host .env-color-field__preview {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.inspector-color-host .env-color-field__swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.inspector-color-host .env-color-field__value {
  height: 32px;
  min-height: 32px;
  flex: 1 1 auto;
  min-width: 0;
}

.inspector-color-host .env-color-field__value input {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  padding: 0 2px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-align: center;
}

.nodedc-select {
  position: relative;
  min-width: 0;
  width: 100%;
}

.nodedc-select__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.nodedc-select__value,
.nodedc-select__toggle {
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: var(--nodedc-glass-control-bg);
  box-shadow: var(--nodedc-glass-control-shadow);
  color: rgba(245, 245, 250, 0.78);
  outline: none;
  transition: background 140ms ease, color 140ms ease;
}

.nodedc-select__value {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.inspector-control-row--half .nodedc-select__control {
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
}

.inspector-control-row--half .nodedc-select__value,
.inspector-control-row--half .nodedc-select__toggle {
  height: 40px;
}

.inspector-control-row--half .nodedc-select__value {
  padding: 0 10px;
}

.nodedc-select__toggle {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.nodedc-select__value:hover,
.nodedc-select__toggle:hover,
.nodedc-select__toggle[aria-expanded="true"] {
  background: var(--nodedc-glass-control-hover);
  color: rgba(255, 255, 255, 0.96);
}

.nodedc-select__toggle:focus,
.nodedc-select__toggle:focus-visible,
.nodedc-select__value:focus,
.nodedc-select__value:focus-visible,
.nodedc-select__option:focus,
.nodedc-select__option:focus-visible {
  outline: none;
  box-shadow: none;
}

.nodedc-select__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.72;
  transform: translateY(-2px) rotate(45deg);
}

.nodedc-dropdown-surface.nodedc-select__menu {
  z-index: var(--z-dropdown-select);
  display: grid;
  gap: 2px;
  max-height: 232px;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: var(--nodedc-glass-panel-surface-strong);
  padding: 7px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  scrollbar-width: none;
}

.nodedc-dropdown-surface.nodedc-select__menu::-webkit-scrollbar {
  display: none;
}

.nodedc-dropdown-option.nodedc-select__option {
  display: flex;
  align-items: center;
  min-height: 42px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  outline: none;
  padding: 0 12px;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.nodedc-dropdown-option.nodedc-select__option:hover,
.nodedc-dropdown-option.nodedc-select__option:focus-visible {
  background: var(--nodedc-glass-control-hover);
  color: rgba(255, 255, 255, 0.96);
}

.nodedc-dropdown-option.nodedc-select__option[data-selected="true"] {
  background: var(--nodedc-glass-control-bg);
  color: rgba(255, 255, 255, 0.96);
}

.examples-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: rgba(12, 17, 24, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(5px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  z-index: 10;
  pointer-events: auto;
}
.templates-panel {
  position: fixed;
  --env-control-h: 46px;
  --env-button-radius: 17px;
  --env-glass-control-bg: var(--nodedc-glass-control-bg);
  --env-glass-control-hover: var(--nodedc-glass-control-hover);
  --env-glass-control-shadow: var(--nodedc-glass-control-shadow);
  left: var(--templates-left, 72px);
  bottom: var(--templates-bottom, 12px);
  background: var(--nodedc-glass-panel-surface);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 14px);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: var(--templates-width, 280px);
  min-height: 200px;
  max-height: 420px;
  overflow: hidden;
  box-shadow: var(--nodedc-glass-panel-shadow);
  z-index: var(--z-workspace-window);
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
}

.templates-panel.hidden {
  display: none;
}

.templates-panel .templates-header {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: calc(var(--env-control-h) + 20px);
  min-height: var(--env-control-h);
  margin: 0;
  padding: 12px 12px 8px 16px;
  border-radius: var(--modal-radius, 14px) var(--modal-radius, 14px) 0 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.templates-panel .templates-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}

.templates-panel .templates-title {
  font-size: 13px;
  line-height: 1.2;
}

.templates-panel .templates-actions {
  display: flex;
  gap: 6px;
}

.templates-panel .templates-close {
  display: grid;
  place-items: center;
  width: var(--env-control-h);
  height: var(--env-control-h);
  padding: 0;
  border: 0;
  border-radius: var(--env-button-radius);
  background: var(--env-glass-control-bg);
  color: rgba(245, 245, 250, 0.78);
  box-shadow: var(--env-glass-control-shadow);
  cursor: pointer;
  line-height: 1;
  outline: none;
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

.templates-panel .templates-close svg {
  display: block;
  width: 16px;
  height: 16px;
}

.templates-panel .templates-close:hover {
  background: var(--env-glass-control-hover);
  color: #fff;
}

.templates-panel .templates-close:active {
  transform: translateY(1px);
}

.templates-panel .templates-close:focus,
.templates-panel .templates-close:focus-visible {
  outline: none;
  box-shadow: none;
}

.templates-panel .template-list {
  display: contents;
}

.templates-panel .example-card {
  background: var(--nodedc-glass-control-bg);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  position: relative;
}

.templates-panel .example-card span {
  display: none;
}

.templates-panel .templates-section {
  display: grid;
  gap: 6px;
}

.templates-panel .templates-subtitle {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0 6px;
}

.templates-panel .templates-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 6px;
}

.template-card {
  display: grid;
  gap: 4px;
  align-items: flex-start;
}

.template-card .card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

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

.template-card .card-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--nodedc-glass-control-bg);
  border: 1px solid var(--nodedc-glass-outline);
  color: var(--text);
  font-size: 12px;
}

.template-card .card-pill[data-kind="template"] {
  background: rgba(255, 234, 0, 0.12);
  color: var(--accent);
  border-color: rgba(255, 234, 0, 0.3);
}

.template-card .card-pill[data-kind="project"] {
  background: rgba(49, 178, 255, 0.12);
  color: #9ad8ff;
  border-color: rgba(49, 178, 255, 0.35);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 17, 24, 0.6);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  z-index: 35;
}

.modal-backdrop.hidden {
  display: none;
}

#commentModalBackdrop {
  z-index: var(--z-workspace-backdrop);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

#saveProjectBackdrop,
#deleteProjectBackdrop,
#shareModalBackdrop {
  z-index: var(--z-critical-backdrop);
  background: rgba(10, 12, 16, 0.38);
  backdrop-filter: blur(18px) saturate(1.18) brightness(0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.18) brightness(0.82);
}

.templates-panel.measurement-modal {
  left: var(--measure-left, var(--templates-left, 72px));
  bottom: var(--measure-bottom, var(--templates-bottom, 12px));
  top: auto;
  transform: none;
  max-height: min(70vh, 420px);
  width: var(--templates-width, 280px);
  max-width: min(var(--templates-width, 350px), calc(100vw - 32px));
  padding: 12px;
  gap: 10px;
  overflow: auto;
  z-index: var(--z-workspace-window);
}

.measurement-modal .template-list {
  grid-template-columns: 1fr;
}

.measurement-modal .example-card {
  width: 100%;
}

.save-project-modal {
  position: fixed;
  --env-control-h: 46px;
  --env-button-radius: 17px;
  --env-glass-control-bg: var(--nodedc-glass-control-bg);
  --env-glass-control-hover: var(--nodedc-glass-control-hover);
  --env-glass-control-shadow: var(--nodedc-glass-control-shadow);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 40px));
  background: var(--nodedc-glass-panel-surface-strong);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 14px);
  padding: 16px;
  box-shadow: var(--nodedc-glass-panel-shadow), 0 32px 96px rgba(0, 0, 0, 0.58);
  z-index: var(--z-critical-modal);
  display: grid;
  gap: 10px;
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
}

.save-project-modal.hidden {
  display: none;
}

.save-project-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.save-project-modal .modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.save-project-modal .modal-close {
  flex: 0 0 auto;
}

.save-project-modal .modal-close:hover {
  background: var(--env-glass-control-hover);
}

.save-project-modal .input-label {
  font-size: 13px;
  color: var(--text);
}

.save-project-modal input[type="text"] {
  width: 100%;
  padding: 12px;
  border-radius: var(--modal-radius, 10px);
  border: 1px solid var(--nodedc-glass-outline);
  background: var(--nodedc-glass-control-bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.save-project-modal input[type="text"]:focus {
  border-color: var(--nodedc-glass-outline);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--modal-btn-primary, var(--accent)) 18%, transparent);
}

.save-project-modal #shareLinkInput,
.save-project-modal #shareLinkInput:focus,
.save-project-modal #shareLinkInput:focus-visible {
  border-color: transparent;
  outline: 0;
  outline-offset: 0;
  box-shadow: none;
}

.save-project-modal #shareLinkInput {
  cursor: default;
  caret-color: transparent;
  user-select: all;
}

.save-project-modal input[readonly] {
  cursor: text;
  color: var(--text);
}

.save-project-modal .input-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: -6px;
}

.save-project-modal .modal-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.save-project-modal .modal-actions .primary-btn,
.save-project-modal .modal-actions .secondary-btn {
  width: auto;
  min-width: 140px;
  flex: 1;
  text-align: center;
}

.save-project-modal .error-text {
  min-height: 18px;
  color: var(--error);
  font-size: 12px;
}

.comment-card-modal {
  position: fixed;
  --env-control-h: 42px;
  --comment-modal-min-width: 660px;
  --ops-comment-accent: var(--comment-target-active, #c4ff67);
  --ops-detail-bg: var(--nodedc-glass-panel-bg);
  --ops-detail-surface: rgba(255, 255, 255, 0.048);
  --ops-detail-surface-strong: rgba(255, 255, 255, 0.064);
  --ops-detail-border: var(--nodedc-glass-outline);
  --ops-detail-muted: rgba(229, 231, 235, 0.54);
  top: 34px;
  left: calc(50vw - 440px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(880px, calc(100vw - 48px));
  min-width: min(var(--comment-modal-min-width), calc(100vw - 24px));
  max-height: min(820px, calc(100vh - 68px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 30px;
  background: var(--nodedc-glass-panel-surface);
  box-shadow: var(--nodedc-glass-panel-shadow), 0 28px 80px rgba(0, 0, 0, 0.48);
  z-index: var(--z-workspace-modal);
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
}

.comment-card-modal.is-expanded {
  top: 16px !important;
  left: 16px !important;
  width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  height: calc(100vh - 32px);
  border-radius: 26px;
}

.comment-card-modal.hidden {
  display: none;
}

.window-resize-handle {
  position: absolute;
  z-index: 4;
  background: transparent;
  touch-action: none;
}

.window-resize-handle--n,
.window-resize-handle--s {
  left: 22px;
  right: 22px;
  height: 10px;
  cursor: ns-resize;
}

.window-resize-handle--n {
  top: 0;
}

.window-resize-handle--s {
  bottom: 0;
}

.window-resize-handle--e,
.window-resize-handle--w {
  top: 22px;
  bottom: 22px;
  width: 10px;
  cursor: ew-resize;
}

.window-resize-handle--e {
  right: 0;
}

.window-resize-handle--w {
  left: 0;
}

.window-resize-handle--ne,
.window-resize-handle--nw,
.window-resize-handle--se,
.window-resize-handle--sw {
  width: 22px;
  height: 22px;
}

.window-resize-handle--ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.window-resize-handle--nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.window-resize-handle--se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
}

.window-resize-handle--sw {
  left: 0;
  bottom: 0;
  cursor: nesw-resize;
}

.comment-card-modal.is-expanded .window-resize-handle {
  display: none;
}

.comment-card-modal__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 64px;
  padding: 20px 28px 8px;
  cursor: grab;
  user-select: none;
}

.comment-card-modal__header:active {
  cursor: grabbing;
}

.ops-detail-nav,
.ops-detail-actions,
.ops-detail-section-actions,
.ops-activity-composer__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-detail-actions {
  gap: 10px;
}

.ops-detail-icon-btn,
.ops-detail-mini-btn,
.ops-activity-send {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--nodedc-glass-control-bg);
  color: rgba(245, 245, 250, 0.78);
  cursor: pointer;
  outline: none;
  transition: background 130ms ease, color 130ms ease, transform 120ms ease;
}

.ops-detail-mini-btn {
  width: 36px;
  height: 36px;
  border-radius: 13px;
}

.ops-detail-icon-btn:hover,
.ops-detail-mini-btn:hover,
.ops-activity-send:hover {
  background: var(--nodedc-glass-control-hover);
  color: rgba(255, 255, 255, 0.95);
}

.ops-detail-icon-btn:active,
.ops-detail-mini-btn:active,
.ops-activity-send:active {
  transform: translateY(1px);
}

.ops-detail-icon-btn svg,
.ops-detail-mini-btn svg,
.ops-activity-send svg,
.ops-detail-pill svg,
.ops-detail-meta-row svg,
.ops-detail-dropzone__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.comment-card-modal__body {
  display: grid;
  gap: 24px;
  min-height: 0;
  overflow: auto;
  padding: 30px 32px 24px;
}

.ops-detail-hero {
  display: grid;
  gap: 12px;
}

.comment-card-modal__subtitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(229, 231, 235, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.ops-detail-title-input,
.ops-detail-description-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(245, 245, 250, 0.94);
  font: inherit;
  outline: none;
  resize: none;
}

.ops-detail-title-input {
  min-height: 36px;
  font-size: 21px;
  font-weight: 760;
  line-height: 1.25;
}

.ops-detail-title-input::placeholder {
  color: rgba(245, 245, 250, 0.52);
}

.ops-detail-description-input {
  min-height: 30px;
  color: rgba(245, 245, 250, 0.72);
  font-size: 16px;
  line-height: 1.45;
}

.ops-detail-description-input::placeholder {
  color: rgba(245, 245, 250, 0.4);
}

.ops-detail-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  margin-top: 18px;
  color: var(--ops-detail-muted);
  font-size: 12px;
  font-weight: 650;
}

.ops-detail-meta-row svg {
  width: 15px;
  height: 15px;
}

.ops-detail-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.ops-detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--nodedc-glass-control-bg);
  color: rgba(245, 245, 250, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
}

.ops-detail-pill:hover {
  background: var(--nodedc-glass-control-hover);
  color: rgba(255, 255, 255, 0.95);
}

.bim-subitem-menu {
  z-index: var(--z-dropdown-workspace);
  display: grid;
  gap: 0.18rem;
  min-width: 17.25rem;
  max-width: min(22rem, calc(100vw - 24px));
}

.ops-comment-subitems,
.comment-attachments,
.comment-thread {
  display: grid;
  gap: 12px;
}

.ops-comment-subitems.hidden {
  display: none;
}

.ops-detail-section-title,
.comment-thread__title {
  color: rgba(245, 245, 250, 0.92);
  font-size: 19px;
  font-weight: 760;
  line-height: 1.2;
}

.ops-comment-subitems__list {
  display: grid;
  gap: 8px;
}

.ops-comment-subitem {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--ops-detail-border);
  border-radius: 15px;
  background: var(--nodedc-glass-control-bg);
}

.ops-comment-subitem[data-kind="text"] {
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: start;
}

.ops-comment-subitem input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ops-comment-accent);
}

.ops-comment-subitem input[type="text"],
.ops-comment-subitem textarea {
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(245, 245, 250, 0.86);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.ops-comment-subitem textarea {
  min-height: 84px;
  line-height: 1.45;
  resize: vertical;
}

.ops-comment-subitem button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(245, 245, 250, 0.48);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.ops-comment-subitem button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 250, 0.9);
}

.ops-detail-dropzone {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  padding: 16px 18px;
  border: 0;
  border-radius: 21px;
  background: var(--nodedc-glass-control-bg);
  transition: background 140ms ease, box-shadow 140ms ease;
}

.ops-detail-dropzone.drag-over {
  background: color-mix(in srgb, var(--ops-comment-accent) 18%, rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ops-comment-accent) 44%, transparent);
}

.ops-detail-dropzone__icon {
  color: var(--ops-comment-accent);
}

.ops-detail-dropzone__copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ops-detail-dropzone__copy strong {
  color: rgba(245, 245, 250, 0.92);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
}

.ops-detail-dropzone__copy span {
  color: rgba(245, 245, 250, 0.52);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.comment-attach-button {
  min-height: 34px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ops-comment-accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0 14px;
  white-space: nowrap;
}

.comment-attach-button:hover {
  background: rgba(255, 255, 255, 0.055);
}

.comment-attachment-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 9px;
}

.comment-attachment-grid--reply {
  grid-column: auto;
}

.comment-attachment-thumb {
  position: relative;
  min-height: 86px;
  overflow: hidden;
  border: 1px solid var(--ops-detail-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.comment-attachment-thumb img {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
}

.comment-attachment-file {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 86px;
  padding: 12px;
  color: rgba(245, 245, 250, 0.82);
}

.comment-attachment-file svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.comment-attachment-file__meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.comment-attachment-file__meta strong,
.comment-attachment-file__meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-attachment-file__meta strong {
  font-size: 12px;
  font-weight: 760;
}

.comment-attachment-file__meta span {
  color: rgba(245, 245, 250, 0.48);
  font-size: 11px;
}

.comment-attachment-thumb button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 9px;
  background: rgba(12, 12, 14, 0.78);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.ops-detail-activity {
  gap: 14px;
}

.ops-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-activity-composer {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--ops-detail-border);
  border-radius: 24px;
  background: var(--nodedc-glass-section-bg);
}

.ops-activity-composer > span {
  color: rgba(245, 245, 250, 0.9);
  font-size: 15px;
  font-weight: 760;
}

.ops-activity-composer textarea {
  width: 100%;
  min-height: 118px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: transparent;
  color: rgba(245, 245, 250, 0.84);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  resize: vertical;
}

.ops-activity-composer textarea::placeholder {
  color: rgba(245, 245, 250, 0.34);
}

.ops-activity-composer__toolbar {
  justify-content: flex-start;
}

.ops-activity-send {
  margin-left: auto;
  background: var(--nodedc-glass-control-bg);
  color: rgba(245, 245, 250, 0.74);
}

.ops-activity-send:disabled,
.comment-card-modal__footer button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.comment-thread__list {
  display: grid;
  gap: 10px;
}

.comment-thread-empty {
  color: var(--ops-detail-muted);
  font-size: 13px;
  line-height: 1.4;
}

.comment-thread-message {
  display: grid;
  gap: 7px;
  border: 1px solid var(--ops-detail-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.026);
  padding: 11px 12px;
}

.comment-thread-message__head {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: rgba(245, 245, 250, 0.5);
  font-size: 11px;
  font-weight: 700;
}

.comment-thread-message__head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(245, 245, 250, 0.9);
  white-space: nowrap;
}

.comment-thread-message__body {
  color: rgba(245, 245, 250, 0.76);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.comment-card-modal__footer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 32px 18px;
  background: var(--nodedc-glass-panel-surface-strong);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.comment-card-modal__footer-error {
  grid-column: 1 / -1;
  min-height: 0;
  padding: 0 2px 2px;
}

.comment-card-modal__footer .primary-btn,
.comment-card-modal__footer .secondary-btn {
  min-width: 0;
}

.comment-card-modal .primary-btn {
  background: var(--ops-comment-accent);
  color: var(--toolbar-bg-active-contrast, #15170f);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ops-comment-accent) 24%, transparent);
}

.comment-card-modal .primary-btn:not(:disabled):hover {
  box-shadow: 0 10px 30px color-mix(in srgb, var(--ops-comment-accent) 30%, transparent);
}

.comment-card-modal .error-text {
  min-height: 16px;
  color: var(--error);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .comment-card-modal {
    top: 14px;
    left: 12px;
    width: calc(100vw - 24px);
    min-width: 0;
    max-height: calc(100vh - 28px);
    border-radius: 24px;
  }

  .comment-card-modal__header,
  .comment-card-modal__body,
  .comment-card-modal__footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ops-detail-dropzone {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .ops-detail-dropzone__copy strong,
  .ops-detail-dropzone__copy span {
    white-space: normal;
  }

  .ops-detail-dropzone .comment-attach-button {
    grid-column: 2;
    justify-self: start;
  }
}

.settings-panel {
  position: fixed;
  --env-control-h: 46px;
  --env-button-radius: 17px;
  --env-pill-radius: 999px;
  --env-glass-control-bg: var(--nodedc-glass-control-bg);
  --env-glass-control-hover: var(--nodedc-glass-control-hover);
  --env-glass-control-shadow: var(--nodedc-glass-control-shadow);
  left: var(--settings-left, 72px);
  bottom: var(--settings-bottom, 12px);
  background: var(--nodedc-glass-panel-surface);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 14px);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: var(--settings-width, 350px);
  min-height: 420px;
  max-height: min(720px, calc(100vh - 72px));
  overflow: hidden;
  box-shadow: var(--nodedc-glass-panel-shadow);
  z-index: var(--z-workspace-window);
  font-size: 12px;
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
}

.settings-panel .settings-header {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--env-control-h);
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  height: calc(var(--env-control-h) + 20px);
  min-height: var(--env-control-h);
  margin: 0;
  padding: 12px 12px 8px 16px;
  background: transparent;
  border-radius: var(--modal-radius, 14px) var(--modal-radius, 14px) 0 0;
}

.settings-panel .settings-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}

.settings-panel .settings-title {
  font-size: 13px;
  line-height: 1.2;
}

.settings-panel .settings-close {
  display: grid;
  place-items: center;
  width: var(--env-control-h);
  height: var(--env-control-h);
  padding: 0;
  border: 0;
  border-radius: var(--env-button-radius);
  background: var(--env-glass-control-bg);
  color: rgba(245, 245, 250, 0.78);
  box-shadow: var(--env-glass-control-shadow);
  cursor: pointer;
  line-height: 1;
  outline: none;
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

.settings-panel .settings-close svg {
  display: block;
  width: 16px;
  height: 16px;
}

.settings-panel .settings-close:hover {
  background: var(--env-glass-control-hover);
  color: #fff;
}

.settings-panel .settings-close:active {
  transform: translateY(1px);
}

.settings-panel .settings-close:focus,
.settings-panel .settings-close:focus-visible {
  outline: none;
  box-shadow: none;
}

.settings-panel .settings-section {
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 10px);
  padding: 8px;
  background: var(--nodedc-glass-section-bg);
  display: grid;
  gap: 8px;
}

.settings-panel .section-title {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 2px;
}

.settings-panel .checkbox-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  min-height: var(--env-control-h);
  padding: 5px 7px 5px 18px;
  border-radius: var(--env-pill-radius);
  background: var(--env-glass-control-bg);
  box-shadow: var(--env-glass-control-shadow);
  cursor: pointer;
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
}

.settings-panel .checkbox-row__label {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel .checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--modal-bg);
  cursor: pointer;
  transition: background 140ms ease, transform 100ms ease;
}

.settings-panel .checkbox-row input[type="checkbox"]:checked {
  background: var(--modal-btn-primary, var(--accent));
}

.settings-panel .checkbox-row:hover {
  background: var(--env-glass-control-hover);
}

.settings-panel .checkbox-row input[type="checkbox"]:active {
  transform: scale(0.94);
}

.settings-panel .checkbox-row input[type="checkbox"]:focus,
.settings-panel .checkbox-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: none;
}

.settings-panel .color-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(150px, 168px);
  gap: 12px;
  align-items: center;
  min-height: var(--env-control-h);
  padding: 0;
}

.settings-panel .color-row > :first-child {
  min-width: 0;
  color: rgba(235, 235, 245, 0.62);
  font-size: 12px;
  line-height: 1.25;
}

.settings-panel .env-color-field {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: var(--env-control-h);
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 5px 10px 5px 7px;
  border-radius: var(--env-pill-radius);
  background: var(--env-glass-control-bg);
  box-shadow: var(--env-glass-control-shadow);
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
}

.settings-panel .env-color-field__swatch {
  position: relative;
  width: 26px;
  height: 26px;
  min-height: 26px;
  flex: 0 0 26px;
  overflow: hidden;
  border-radius: 999px;
  cursor: pointer;
}

.settings-panel .env-color-field__preview {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.settings-panel .env-color-field__swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.settings-panel .env-color-field__value {
  height: 32px;
  min-height: 32px;
  flex: 1 1 auto;
  min-width: 0;
}

.settings-panel .env-color-field__value input {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
}

.slider-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 6px 4px 6px;
}

.settings-panel .env-range-control.slider-row {
  position: relative;
  display: block;
  width: 100%;
  height: var(--env-control-h);
  overflow: hidden;
  border-radius: var(--env-pill-radius);
  background: var(--env-glass-control-bg);
  box-shadow: var(--env-glass-control-shadow);
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
}

.settings-panel .env-range-control.slider-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: var(--slider-percent, 0%);
  border-radius: inherit;
  background: var(--modal-btn-primary, var(--accent));
}

.settings-panel .env-range-control .slider-label,
.settings-panel .env-range-control .slider-value {
  position: absolute;
  top: 50%;
  z-index: 2;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.settings-panel .env-range-control .slider-label {
  left: 24px;
  max-width: calc(100% - 132px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel .env-range-control .slider-value {
  right: 20px;
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
}

.settings-panel .env-range-control .slider-input {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: inherit;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

.settings-panel .env-range-control .slider-input::-webkit-slider-runnable-track {
  height: var(--env-control-h);
  border: 0;
  background: transparent;
}

.settings-panel .env-range-control .slider-input::-webkit-slider-thumb {
  width: 24px;
  height: var(--env-control-h);
  margin-top: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-panel .env-range-control .slider-input::-moz-range-track {
  height: var(--env-control-h);
  border: 0;
  background: transparent;
}

.settings-panel .env-range-control .slider-input::-moz-range-thumb {
  width: 24px;
  height: var(--env-control-h);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-panel .env-range-control .slider-fill-text {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--slider-percent, 0%)) 0 0);
  pointer-events: none;
}

.settings-panel .env-range-control .slider-fill-text .slider-label,
.settings-panel .env-range-control .slider-fill-text .slider-value {
  color: var(--modal-btn-primary-contrast, #15170f);
}

.slider-label {
  color: var(--text);
  font-size: 13px;
}

.slider-value {
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.slider-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--slider-fill-color, #ffffff) var(--slider-percent, 0%), #2f3544 var(--slider-percent, 0%));
  outline: none;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-thumb-color, #ffffff);
  border: 2px solid var(--modal-border);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}

.slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slider-thumb-color, #ffffff);
  border: 2px solid var(--modal-border);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}

.inspector-slider.slider-row {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--nodedc-glass-control-bg);
  box-shadow: var(--nodedc-glass-control-shadow);
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
}

.inspector-slider.slider-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: var(--slider-percent, 0%);
  border-radius: inherit;
  background: var(--modal-btn-primary, var(--accent));
}

.inspector-slider .slider-label {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 2;
  max-width: calc(100% - 116px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.inspector-slider .slider-value {
  position: absolute;
  top: 50%;
  right: 16px;
  z-index: 2;
  color: rgba(245, 245, 250, 0.9);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  text-align: right;
  transform: translateY(-50%);
  pointer-events: none;
}

.inspector-slider .slider-input {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: inherit;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

.inspector-slider .slider-input::-webkit-slider-thumb {
  width: 24px;
  height: 40px;
  margin-top: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.inspector-slider .slider-input::-moz-range-thumb {
  width: 24px;
  height: 40px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.inspector-slider .slider-fill-text {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--slider-percent, 0%)) 0 0);
  pointer-events: none;
}

.inspector-slider .slider-fill-text .slider-label,
.inspector-slider .slider-fill-text .slider-value {
  color: var(--modal-btn-primary-contrast, #15170f);
}

.settings-panel input[type="color"] {
  width: 100%;
  height: 26px;
  border: none;
  border-radius: 8px;
  background: currentColor;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}

.settings-panel input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.settings-panel input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.settings-panel input[type="text"],
.settings-panel input[type="number"] {
  width: 100%;
  max-width: 86px;
  background: var(--nodedc-glass-control-bg);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: 8px;
  color: var(--text);
  padding: 5px 6px;
}

.settings-panel input.env-number-field[type="number"] {
  width: 100%;
  max-width: none;
  height: var(--env-control-h);
  border: 0;
  border-radius: var(--env-pill-radius);
  padding: 0 18px;
  background: var(--env-glass-control-bg);
  box-shadow: var(--env-glass-control-shadow);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
  backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(128%) brightness(1.05);
}

.settings-panel input.env-number-field[type="number"]::-webkit-outer-spin-button,
.settings-panel input.env-number-field[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.settings-panel input.env-number-field[type="number"]:focus,
.settings-panel input.env-number-field[type="number"]:focus-visible {
  border: 0;
  box-shadow: var(--env-glass-control-shadow);
}

.settings-panel .env-color-field .env-color-field__value input[type="text"] {
  width: 100%;
  max-width: none;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  padding: 0 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
  outline: none;
}

.settings-panel .env-color-field .env-color-field__value input[type="text"]:focus {
  border: 0;
  box-shadow: none;
}

.log {
  background: var(--nodedc-glass-section-bg);
  border: 1px solid var(--nodedc-glass-outline);
}


.bottom-toolbar {
  position: fixed;
  left: 12px;
  top: 50%;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: var(--tb-gap, 8px);
  width: var(--tb-min-size, var(--tb-size, 25px));
  padding: var(--tb-pad-y, 8px) 0;
  transform: translateY(-50%);
  transform-origin: left center;
  z-index: var(--z-toolbar-priority);
  opacity: 1;
  transition: transform 220ms ease, opacity 180ms ease;
  will-change: transform, opacity;
}

.bottom-toolbar.toolbar-dock-active {
  width: var(--tb-max-size, var(--tb-min-size, 56px));
}

.bottom-toolbar.toolbar-autohide {
  pointer-events: none;
  opacity: 0;
  transform: translate(calc(-1 * (var(--tb-max-size, 56px) + 24px)), -50%);
}

.bottom-toolbar.toolbar-autohide.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(-50%);
}

.tb-btn {
  width: var(--tb-min-size, var(--tb-size, 52px));
  height: var(--tb-min-size, var(--tb-size, 52px));
  flex: 0 0 auto;
  border-radius: var(--tb-radius, 12px);
  background: var(--toolbar-bg);
  border: 1px solid var(--toolbar-border);
  color: var(--text);
  font-size: var(--tb-icon-size, 22px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--tb-icon-pad, 10px);
  line-height: 1;
  transform: translateY(var(--tb-shift-y, 0px)) scale(var(--tb-scale, 1));
  transform-origin: left center;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease;
  will-change: transform;
}

.tb-btn svg {
  display: block;
  width: var(--tb-icon-size, 24px);
  height: var(--tb-icon-size, 24px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tb-btn:hover {
  border-color: var(--toolbar-outline, rgba(76, 224, 210, 0.7));
  box-shadow: 0 10px 20px color-mix(in srgb, var(--toolbar-outline, rgba(76, 224, 210, 0.7)) 30%, transparent);
}

.tb-btn.active {
  background: var(--toolbar-bg-active);
  color: var(--toolbar-bg-active-contrast, #15170f);
}

.tb-btn.disabled,
.tb-btn:disabled {
  cursor: default;
  opacity: 0.45;
  box-shadow: none;
}

body[data-viewer-mode="guest"] .tb-btn:not([data-action="measure"]):not([data-action="section"]):not([data-action="projection"]),
html[data-share-startup] body:not([data-viewer-mode="standard"]) .tb-btn:not([data-action="measure"]):not([data-action="section"]):not([data-action="projection"]),
body[data-viewer-mode="guest"] #settingsPanel,
html[data-share-startup] body:not([data-viewer-mode="standard"]) #settingsPanel,
body[data-viewer-mode="guest"] #templatesPanel,
html[data-share-startup] body:not([data-viewer-mode="standard"]) #templatesPanel,
body[data-viewer-mode="guest"] #projectNameSection,
html[data-share-startup] body:not([data-viewer-mode="standard"]) #projectNameSection,
body[data-viewer-mode="guest"] #saveProjectSection,
html[data-share-startup] body:not([data-viewer-mode="standard"]) #saveProjectSection,
body[data-viewer-mode="guest"] #modelVersionUploadButton,
html[data-share-startup] body:not([data-viewer-mode="standard"]) #modelVersionUploadButton {
  display: none !important;
}

html[data-share-startup="pending"] #dropZone {
  display: none !important;
}

html[data-share-startup="pending"] #loader.hidden {
  display: block;
}

.version-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 10000);
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.version-history-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: calc(var(--z-modal, 10000) + 1);
  display: flex;
  width: min(96vw, 1280px);
  max-height: min(76vh, 720px);
  min-height: 220px;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(20, 20, 22, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
}

.version-history-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.version-history-title {
  min-width: 0;
}

.version-history-title strong {
  display: block;
  overflow: hidden;
  color: rgba(245, 245, 250, 0.94);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-history-title span {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: rgba(245, 245, 250, 0.55);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-history-close {
  flex: 0 0 auto;
}

.version-history-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 16px 16px;
}

.version-history-table {
  min-width: 980px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.version-history-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) 80px 96px 140px 140px 150px 120px;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  color: rgba(245, 245, 250, 0.72);
  font-size: 12px;
}

.version-history-row:last-child {
  border-bottom: 0;
}

.version-history-row--head {
  min-height: 34px;
  color: rgba(245, 245, 250, 0.52);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.version-history-file,
.version-history-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-history-file strong {
  display: block;
  overflow: hidden;
  color: rgba(245, 245, 250, 0.82);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-history-file span {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: rgba(245, 245, 250, 0.42);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-history-current {
  display: block;
  margin-top: 4px;
  color: var(--modal-btn-primary, var(--accent));
  font-size: 10px;
  font-weight: 760;
}

.version-history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.version-history-empty {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  padding: 34px 16px;
  color: rgba(245, 245, 250, 0.56);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 720px) {
  .version-history-modal {
    width: min(94vw, 560px);
    max-height: 78vh;
  }

  .version-history-body {
    padding: 0 10px 12px;
  }
}

.section-toolbar {
  position: fixed;
  left: var(--section-toolbar-left);
  bottom: var(--section-toolbar-bottom);
  z-index: var(--z-toolbar-priority);
  display: flex;
  align-items: center;
  gap: var(--tb-gap, 10px);
  height: var(--tb-size, 25px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.section-toolbar.hidden {
  display: none;
}

.section-tool-btn {
  width: var(--tb-size, 25px);
  height: var(--tb-size, 25px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--toolbar-border);
  border-radius: var(--tb-radius, 7px);
  background: var(--toolbar-bg);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.section-tool-btn:hover {
  transform: translateY(-1px);
  border-color: var(--toolbar-outline, rgba(76, 224, 210, 0.7));
  box-shadow: 0 10px 20px color-mix(in srgb, var(--toolbar-outline, rgba(76, 224, 210, 0.7)) 30%, transparent);
}

.section-tool-btn.active {
  background: var(--toolbar-bg-active);
  color: var(--toolbar-bg-active-contrast, #15170f);
}

.section-tool-btn:active {
  transform: translateY(1px);
}

.section-tool-btn svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.section-letter-icon text {
  fill: currentColor;
  stroke: none;
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.section-overview {
  width: var(--tb-size, 25px);
  height: var(--tb-size, 25px);
  flex: 0 0 var(--tb-size, 25px);
  display: block;
  border: 1px solid var(--toolbar-border);
  border-radius: var(--tb-radius, 7px);
  background: var(--toolbar-bg);
  box-shadow: none;
}

.templates-panel {
  position: fixed;
  left: var(--templates-left, 72px);
  bottom: var(--templates-bottom, 12px);
  background: var(--nodedc-glass-panel-surface);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: var(--modal-radius, 14px);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: var(--templates-width, 280px);
  min-height: 200px;
  max-height: 420px;
  overflow: hidden;
  box-shadow: var(--nodedc-glass-panel-shadow);
  z-index: var(--z-workspace-window);
  backdrop-filter: var(--nodedc-glass-filter);
  -webkit-backdrop-filter: var(--nodedc-glass-filter);
}

.example-card {
  background: var(--nodedc-glass-control-bg);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  color: #fff;
}

.example-card:hover {
  transform: translateY(-2px);
  border-color: var(--project-btn-hover, rgba(76, 224, 210, 0.7));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--project-btn-hover, rgba(76, 224, 210, 0.7)) var(--template-glow-strength, 80%), transparent);
}

.example-card strong {
  display: block;
  margin-bottom: 6px;
}

.example-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hidden {
  display: none;
}

.transform-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.btn.tiny {
  padding: 6px 8px;
  font-size: 12px;
}

.transform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.transform-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.transform-grid input {
  flex: 1;
  background: var(--nodedc-glass-control-bg);
  border: 1px solid var(--nodedc-glass-outline);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text);
}

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

.panel-section .transform-grid input {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .main {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .side-panel {
    order: -1;
  }
}

@media (max-width: 720px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .examples-bar {
    grid-template-columns: 1fr;
  }
}
