/* Light glass for Studio. Blur belongs to shared surfaces, not nested fields. */
.generation-progress {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, calc(100vw - 32px));
  padding: 14px 18px;
  box-sizing: border-box;
  border: 1px solid #cedcea;
  border-radius: 14px;
  background: #fafcfef5;
  color: #30475b;
  box-shadow: 0 8px 30px #233d6326;
  pointer-events: none;
}
.generation-progress[hidden] {
  display: none;
}
.generation-progress-content {
  flex: 1;
  min-width: 0;
}
.generation-progress strong {
  display: block;
  font-size: 12px;
}
.generation-progress-content > span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #60768a;
  font-variant-numeric: tabular-nums;
}
.generation-progress-spinner {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid #d6e2f1;
  border-top-color: #3574c7;
  border-radius: 50%;
  animation: generation-spin 0.9s linear infinite;
}
.generation-progress-track {
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 3px;
  background: #dfe8f2;
}
.generation-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3574c7;
  transition: width 0.15s linear;
}
.generation-progress[data-mode="indeterminate"]
  .generation-progress-track
  > span {
  width: 35%;
  animation: generation-sweep 1.4s ease-in-out infinite;
}
@keyframes generation-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes generation-sweep {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(390%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .generation-progress-spinner,
  .generation-progress[data-mode="indeterminate"]
    .generation-progress-track
    > span {
    animation: none;
  }
  .generation-progress-track > span {
    transition: none;
  }
}
.pane-color-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(340px, calc(100vw - 20px));
  max-height: min(560px, calc(100dvh - 20px));
  padding: 14px;
  border: 1px solid #cedcea;
  border-radius: 18px;
  background: #fafcfe;
  color: #30475b;
  box-shadow: 0 16px 50px #233d6333;
  overflow: hidden;
  box-sizing: border-box;
}
.pane-color-popover:popover-open {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pane-color-popover:not(:popover-open) {
  display: none;
}
.pane-color-popover header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.pane-color-popover header button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 8px;
}
.pane-color-popover input {
  flex-shrink: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d3dfeb;
  border-radius: 9px;
  background: #fff;
  color: #30475b;
  font: inherit;
  font-size: 13px;
}
.pane-color-sections {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 2px 4px 4px;
}
.pane-color-sections h3 {
  margin: 12px 0 9px;
  color: #60768a;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.pane-color-sections h3:first-child {
  margin-top: 0;
}
.pane-color-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
}
.pane-color-swatch {
  min-width: 0;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #31485c33;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.pane-color-swatch[aria-pressed="true"] {
  outline: 2px solid #1768cb;
  outline-offset: 2px;
}
.pane-color-swatch:hover,
.pane-color-swatch:focus-visible {
  outline: 2px solid #30475b;
  outline-offset: 2px;
  transform: scale(1.07);
}
.pane-color-swatch.clear {
  background-image: linear-gradient(
    135deg,
    #bed3e155 25%,
    transparent 25%,
    transparent 75%,
    #bed3e155 75%
  );
  background-size: 10px 10px;
}
.pane-color-swatch.translucent {
  box-shadow:
    inset 0 1px 2px #ffffffb3,
    inset 0 -2px 3px #18374c33,
    0 1px 2px #18374c14;
}
.pane-color-swatch.translucent::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, #ffffff70, transparent 45%, #ffffff20),
    linear-gradient(165deg, #ffffff8c 0%, #ffffff26 38%, transparent 40%);
  pointer-events: none;
}
.pane-color-name {
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid #e2e9f0;
  min-height: 32px;
  overflow-wrap: anywhere;
  flex-shrink: 0;
}
.selected-dot {
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.selected-dot:focus-visible {
  outline: 2px solid #1768cb;
  outline-offset: 3px;
}
.material-color-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.material-color-row .select {
  flex: 1;
  min-width: 0;
}
.material-color-swatch {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid #8b9bac55;
  border-radius: 7px;
}
@media (pointer: coarse) {
  .pane-color-popover input {
    font-size: 16px;
  }
  .pane-color-popover {
    width: min(380px, calc(100vw - 20px));
  }
  .pane-color-grid {
    gap: 8px;
  }
}
.motif-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
}
.motif-library-hint {
  flex-basis: 100%;
  margin: 0 0 8px;
}
.placed-motifs {
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d6e1ec;
}
.placed-motifs summary {
  font-size: 11px;
  color: #526a80;
  cursor: pointer;
  margin-bottom: 8px;
}
.placed-motifs button {
  margin: 3px;
}
.motif-tile {
  min-width: 0;
  border: 1px solid #d6e1ec;
  background: #f6f9fc;
  border-radius: 13px;
  overflow: hidden;
}
.motif-tile.active {
  border-color: #2b79ca;
  box-shadow: 0 0 0 2px #2b79ca22;
}
.motif-tile-select {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
  padding: 8px 6px;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #30475b;
  cursor: pointer;
  font: inherit;
}
.motif-tile-select svg {
  width: 68px;
  height: 68px;
}
.motif-tile-select strong {
  font-size: 11px;
  font-weight: 600;
}
.motif-tile-select:hover {
  background: #e7f0f9;
}
.motif-tile-size {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  border-top: 1px solid #e0e8f0;
  background: #fff9;
}
.motif-tile-size button {
  border: 0;
  background: transparent;
  color: #48677f;
  font-size: 17px;
  min-width: 32px;
  min-height: 34px;
  cursor: pointer;
}
.motif-tile-size button:disabled {
  opacity: 0.35;
  cursor: default;
}
.motif-tile-size output {
  text-align: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #526a80;
}
.motif-tile-select:focus-visible,
.motif-tile-size button:focus-visible {
  outline: 2px solid #1768cb;
  outline-offset: -3px;
}
@media (pointer: coarse) {
  .motif-tile-size button {
    min-height: 44px;
  }
}
.rib-width-feedback {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #f0f5fa;
}
.rib-width-feedback .field-hint {
  margin: 0 0 8px;
}
#ribWidthStatus {
  display: block;
  font-size: 12px;
  color: #30475b;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.rib-width-feedback button {
  margin-top: 10px;
}
body[data-build-status="error"] #viewport {
  visibility: hidden;
}
body[data-build-status="error"] #ribWidthStatus {
  color: #a13d28;
}
.studio-light {
  color-scheme: light;
  --bg: #eef1f6;
  --surface: #fafbfe;
  --surface2: #edf1f7;
  --border: #263d5c1a;
  --muted: #627086;
  --text: #233047;
  --gold: #1768cb;
  --gold2: #1559aa;
  --glass: linear-gradient(145deg, #ffffffe0, #f8faffb3);
  --glass-edge: #ffffffd9;
  --glass-shadow:
    0 16px 48px #26374f12, 0 3px 10px #26374f05, inset 0 1px 0 #fff,
    inset 0 -1px 0 #ffffff80;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}
.studio-light .topbar {
  background: #ffffffa6;
  border-bottom: 1px solid #fff;
  box-shadow: 0 1px 0 #53677d0a;
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}
.studio-light .brand {
  letter-spacing: -0.6px;
  font-weight: 500;
}
.studio-light .brand-logo {
  background: linear-gradient(145deg, #34485e, #192c42);
  border: 1px solid #fff9;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 1px #ffffff38,
    0 3px 8px #1d314c14;
}
.studio-light .brand strong {
  color: #293e56;
  font-weight: 750;
}
.studio-light .brand small,
.studio-light .header-nav {
  color: #637187;
}
.studio-light .concept-project {
  color: #42536a;
  font-size: 11px;
  font-weight: 550;
}
.studio-light .concept-project i {
  background: #62a38e;
  box-shadow: 0 0 0 3px #62a38e0c;
}
.studio-light .viewer-panel {
  background: #eef1f6;
}
.studio-light .scene {
  background:
    radial-gradient(ellipse at 28% 35%, #c9def74d, transparent 56%),
    radial-gradient(ellipse at 80% 70%, #e9dcd23b, transparent 52%),
    radial-gradient(ellipse at 50% 35%, #fff 0%, #f5f7fa 46%, #e8edf4 100%);
}
.studio-light .scene-gradient {
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, #c2cfdf1a);
}
.studio-light .scene.realistic .scene-gradient {
  background: radial-gradient(ellipse at 50% 45%, transparent 50%, #26190d15);
}
.studio-light .settings-panel,
.studio-light .right-panel,
.studio-light .tool-rail,
.studio-light .metrics,
.studio-light .view-tabs,
.studio-light .plate-readout,
.studio-light .printer-settings {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}
.studio-light .settings-panel,
.studio-light .right-panel {
  border-radius: 24px;
}
.studio-light .settings-panel {
  left: 112px;
  width: 294px;
}
.studio-light .right-panel {
  width: 280px;
  bottom: 168px;
}
.studio-light .settings-head {
  border-color: #314d7310;
  background: linear-gradient(#ffffff47, transparent);
}
.studio-light .settings-head h1,
.studio-light .right-panel h2 {
  color: #233047;
  font-weight: 650;
  letter-spacing: -0.7px;
  line-height: 1.2;
}
.studio-light .settings-head p:last-child,
.studio-light .field-hint,
.studio-light .colors-note,
.studio-light .selected-preview,
.studio-light .custom-color,
.studio-light .custom-color code,
.studio-light .small-note,
.studio-light .empty-select {
  color: #627086;
}
.studio-light .eyebrow {
  color: #64768c;
  letter-spacing: 1.6px;
  font-weight: 600;
}
.studio-light .param label,
.studio-light .field-label,
.studio-light .fill-toggle {
  color: #45546b;
  font-weight: 550;
}
.studio-light .param-input,
.studio-light .select,
.studio-light .panel-filter input,
.studio-light .printer-dimensions input {
  background: #f0f3f8;
  border: 1px solid #536d8c1c;
  border-radius: 10px;
  color: #293b53;
  box-shadow:
    inset 0 1px 2px #24375104,
    0 1px 0 #ffffff9c;
}
.studio-light .param-input input {
  color: #293b53;
  font-variant-numeric: tabular-nums;
}
.studio-light .param-unit {
  color: #637187;
}
.studio-light .param input[type="range"] {
  accent-color: #3c83d8;
  cursor: pointer;
}
.studio-light .param-input:focus-within,
.studio-light .select:focus {
  border-color: #4a90e1;
  outline: none;
  box-shadow: 0 0 0 3px #4089df1a;
}
.studio-light button,
.studio-light .button {
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 140ms ease,
    box-shadow 180ms ease,
    transform 140ms ease;
}
.studio-light .button.subtle,
.studio-light .button.minimal,
.studio-light .button.outline,
.studio-light .focus-button,
.studio-light .inspector-toggle,
.studio-light .icon-btn,
.studio-light .printer-button {
  background: #ffffffad;
  border: 1px solid #ffffffeb;
  color: #41536a;
  border-radius: 12px;
  box-shadow:
    0 1px 4px #253c5910,
    inset 0 1px 0 #fff;
}
.studio-light .header-right #downloadZip,
.studio-light .button.primary {
  background: linear-gradient(160deg, #3186e4, #1261bf);
  border: 1px solid #1465bf;
  color: #fff;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 #ffffff40,
    0 3px 9px #1262bd24;
}
.studio-light button:hover,
.studio-light .button:hover {
  filter: none;
}
.studio-light .button.primary:hover {
  box-shadow:
    inset 0 1px 0 #ffffff60,
    0 4px 14px #1262bd38;
}
.studio-light button:active,
.studio-light .button:active {
  transform: scale(0.97);
  transition-duration: 70ms;
}
.studio-light button:focus-visible,
.studio-light a:focus-visible,
.studio-light input:focus-visible,
.studio-light select:focus-visible,
.studio-light summary:focus-visible {
  outline: 3px solid #3485e0;
  outline-offset: 3px;
}
.studio-light .settings-footer {
  border-color: #314d7310;
  background: #ffffff33;
}
/* One shared glass material for all five custom navigation tools. */
.studio-light .tool-rail {
  top: 50%;
  bottom: auto;
  left: 18px;
  width: 78px;
  transform: translateY(-50%);
  padding: 10px 7px;
  gap: 6px;
  border-radius: 26px;
  color: #617087;
}
.studio-light .tool-rail button {
  position: relative;
  min-height: 67px;
  gap: 6px;
  padding: 9px 1px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: inherit;
}
.studio-light .tool-rail button:hover {
  background: #ffffff8c;
  color: #32465e;
}
.studio-light .tool-rail button.active {
  background: linear-gradient(145deg, #fff, #f8fbffcf);
  border-color: #fff;
  color: #1768c2;
  box-shadow:
    0 3px 10px #2b537e12,
    inset 0 1px 0 #fff;
}
.studio-light .tool-rail button.active::after {
  content: "";
  position: absolute;
  left: -5px;
  top: calc(50% - 8px);
  width: 3px;
  height: 16px;
  border-radius: 3px;
  background: #2d7bd2;
}
.studio-light .tool-rail small {
  font-size: 10px;
  font-weight: 550;
  letter-spacing: -0.15px;
  line-height: 1.2;
}
.studio-light .nav-icon {
  width: 25px;
  height: 25px;
  flex: none;
  overflow: visible;
}
.studio-light .nav-icon-wash {
  fill: currentColor;
  fill-opacity: 0.08;
  stroke: none;
}
.studio-light .context-tabs,
.studio-light .mount-toggle,
.studio-light .language-switch {
  background: #e5eaf1b8;
  border: 1px solid #fff8;
  border-radius: 12px;
  color: #5c6c82;
  box-shadow: inset 0 1px 2px #31476205;
}
.studio-light .context-tabs button,
.studio-light .mount-option,
.studio-light .language-option {
  color: #53647b;
  border-radius: 9px;
}
.studio-light .context-tabs button[aria-pressed="true"],
.studio-light .mount-option.active,
.studio-light .language-option.active {
  background: #fff;
  border-color: #fff;
  color: #245e9c;
  box-shadow:
    0 2px 5px #1b385114,
    0 0 0 0.5px #3c587310;
}
.studio-light .language-option:hover,
.studio-light .mount-option:hover {
  background: #ffffff9c;
  color: #235a96;
}
.studio-light .material-block h3 {
  color: #455770;
  font-weight: 600;
}
.studio-light .selected-dot,
.studio-light .custom-color input {
  border-color: #fff;
  box-shadow: 0 0 0 1px #3d527624;
  border-radius: 10px;
}
.studio-light .custom-color input {
  background: #f4f7fb;
}
.studio-light .panel-id,
.studio-light .mini-count {
  background: #e8f1fd;
  border-color: #cedff4;
  color: #3569a0;
  border-radius: 9px;
}
.studio-light .panel-row {
  color: #455b74;
  border-radius: 12px;
}
.studio-light .panel-row.selected {
  background: #e4effd;
  border-color: #b9d3f0;
}
.studio-light .panel-row small {
  color: #63748b;
}
.studio-light .fill-toggle input {
  background: #d8dfe9;
  border-color: #cad3df;
}
.studio-light .fill-toggle input:checked {
  background: #3883db;
  border-color: #3883db;
}
.studio-light .view-tabs {
  padding: 5px;
  gap: 4px;
  border-radius: 18px;
}
.studio-light .view-tabs .tab {
  color: #576b83;
  border-radius: 12px;
  min-height: 36px;
}
.studio-light .view-tabs .tab.active {
  background: #fff;
  color: #2469ae;
  box-shadow:
    0 2px 6px #253e6021,
    0 0 0 0.5px #415e7812;
}
.studio-light .view-tabs .tab:hover {
  background: #ffffffb3;
  color: #285e93;
}
.studio-light .canvas-toolbar > .icon-btn {
  color: #526b87;
  border-radius: 50%;
}
.studio-light .metrics {
  top: 25px;
  bottom: auto;
  width: 352px;
  border-radius: 17px;
  box-shadow:
    0 4px 18px #334d6908,
    inset 0 1px 0 #fff;
}
.studio-light .metrics .metric {
  border-color: #617d9d14;
  padding: 12px 4px;
}
.studio-light .metric > span {
  color: #5f7188;
  font-weight: 600;
}
.studio-light .metric strong {
  color: #354c67;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.studio-light .scene-hint {
  bottom: 147px;
  color: #5d728c;
  text-shadow: 0 1px 1px #fff;
}
.palette-card {
  position: relative;
  min-width: 0;
}
.palette-card .palette-preset {
  width: 100%;
  height: 100%;
}
.palette-remove {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 24px;
  height: 24px;
  border: 1px solid #d2dce8;
  border-radius: 50%;
  background: #fff;
  color: #53647b;
  cursor: pointer;
}
.save-palette {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}
.pane-measurements {
  margin: 12px 0 20px;
  border-top: 1px solid #34557a18;
  border-bottom: 1px solid #34557a18;
  padding: 12px 0;
}
.pane-measurements summary {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #41536a;
}
.pane-dimension-diagram {
  width: 100%;
  max-height: 180px;
  margin-top: 8px;
}
.pane-dimension-diagram polygon {
  fill: var(--pane-color, #e0edfa);
  fill-opacity: 0.62;
  stroke: var(--pane-color, #5485b8);
  stroke-width: 1.4;
}
.pane-dimension-diagram text {
  fill: #344f6d;
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}
.pane-edge-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.pane-edge-table th,
.pane-edge-table td {
  padding: 6px 4px;
  border-bottom: 1px solid #34557a12;
  text-align: right;
}
.pane-edge-table th:first-child {
  text-align: left;
}
.pane-edge-table thead {
  color: #64778c;
}
.printer-dimensions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.studio-light .scene.realistic .scene-hint {
  color: #f6efd9;
  text-shadow: 0 1px 5px #27190e;
}
.studio-light .advanced-fields summary {
  color: #536d8a;
}
.studio-light .mount-profile {
  background: #edf2f8;
  border-color: #dce4ee;
  border-radius: 14px;
}
.studio-light .mount-profile-frame {
  stroke: #8b9eb5;
}
.studio-light .mount-profile-labels {
  color: #63758d;
}
.studio-light .mount-profile-direction {
  color: #3e6490;
}
.studio-light .mount-scene-status {
  background: #ffffffb8;
  border-color: #fff;
  border-radius: 20px;
  color: #4b6686;
  box-shadow: 0 2px 10px #334d6908;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.plate-readout {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  color: #4d6888;
  pointer-events: none;
}
.plate-icon {
  font-size: 24px;
  font-weight: 400;
  color: #869bb4;
}
.plate-readout strong {
  font-size: 12px;
  letter-spacing: 0.1px;
  font-weight: 600;
  display: block;
}
.plate-readout small {
  display: block;
  font-size: 10px;
  color: #64788f;
  margin-top: 2px;
}
.scene.realistic .plate-readout {
  display: none;
}
.printer-menu {
  position: relative;
  order: 10;
}
.printer-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-align: left;
}
.printer-button > span:first-child {
  font-size: 20px;
  line-height: 1;
}
.printer-button-size {
  display: block;
  font-size: 8px;
  letter-spacing: 0.4px;
  color: #60758f;
  margin-top: 1px;
}
.studio-light .printer-button[aria-expanded="true"] {
  background: #e4effd;
  border-color: #c6dcf7;
}
.printer-settings {
  position: absolute;
  right: 0;
  top: calc(100% + 15px);
  width: 310px;
  padding: 22px;
  border-radius: 22px;
  color: #374e6a;
  z-index: 20;
  transform-origin: top right;
  animation: glass-arrive 180ms ease-out;
}
@keyframes glass-arrive {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.printer-settings-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 23px;
  gap: 15px;
}
.printer-settings-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.6px;
  line-height: 1.1;
}
.printer-settings-heading .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
  letter-spacing: 1.5px;
}
.printer-settings-heading .icon-btn {
  width: 28px;
  height: 28px;
  min-height: 28px;
}
.printer-dimensions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.printer-dimensions label {
  font-size: 11px;
  color: #61758d;
}
.printer-dimensions input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
}
.printer-size {
  display: block;
  text-align: center;
  padding: 13px;
  background: #eaf1fb;
  border-radius: 12px;
  font-size: 18px;
  color: #3b6caa;
  font-variant-numeric: tabular-nums;
}
.printer-settings .field-hint {
  margin: 13px 0 0;
  font-size: 11px;
  line-height: 1.6;
}
.studio-light #loading {
  background: #f5f8f0e6;
  color: #526e91;
}
.studio-light #errorBanner {
  background: #fff7ec;
  border-color: #e8ca9d;
  color: #86612c;
}
.studio-light .toast {
  background: #f8fbffed;
  border-color: #fff;
  box-shadow: var(--glass-shadow);
  color: #36587f;
  border-radius: 16px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.studio-light .filament-source {
  color: #366eac;
}
.studio-light.focus-mode .metrics {
  top: 25px;
  bottom: auto;
}
/* The guide shares the light palette; technical SVG figures retain a dark stage. */
.studio-light.help-page .help-step,
.studio-light.help-page .help-mode,
.studio-light.help-page .help-note,
.studio-light.help-page .fit-choice {
  background: #ffffffc4;
  border-color: #dbe3ee;
  border-radius: 20px;
  box-shadow: 0 4px 16px #304d6c05;
}
.studio-light.help-page .help-lead p,
.studio-light.help-page .help-section > p,
.studio-light.help-page .help-step p,
.studio-light.help-page .help-mode p,
.studio-light.help-page .help-note p,
.studio-light.help-page .help-columns p,
.studio-light.help-page .help-columns li,
.studio-light.help-page .fit-choice p,
.studio-light.help-page .footer {
  color: #5d6f86;
}
.studio-light.help-page .help-step h3,
.studio-light.help-page .help-mode h3,
.studio-light.help-page .help-note strong,
.studio-light.help-page .fit-choice h3 {
  color: #355981;
}
.studio-light.help-page .help-step .step-n {
  background: #e4effb;
  color: #3675b7;
}
.studio-light.help-page .fit-choice svg {
  background: #172131;
  border-radius: 12px;
}
@media (max-width: 1280px) {
  .studio-light .header-nav,
  .studio-light .inspector-toggle {
    display: none;
  }
  .studio-light .header-right {
    margin-left: auto;
  }
  .studio-light .focus-button {
    font-size: 10px;
  }
  .studio-light .inspector-toggle {
    display: block;
  }
  .studio-light .tool-rail {
    left: 14px;
    width: 72px;
  }
  .studio-light .settings-panel {
    left: 100px;
    width: 270px;
  }
  .studio-light .right-panel {
    width: 250px;
  }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .studio-light .metrics {
    left: calc(50% + 110px);
    width: 310px;
  }
  .studio-light .plate-readout {
    left: calc(50% + 110px);
    bottom: 130px;
  }
}
@media (max-width: 760px) {
  .studio-light .topbar {
    padding: 0 12px;
  }
  .studio-light .viewer-panel {
    background: #edf1f7;
    height: 540px;
  }
  .studio-light .settings-panel,
  .studio-light .right-panel {
    width: 100%;
    left: auto;
    background: #f8faff;
    border-color: #e0e7f0;
    border-radius: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .studio-light .tool-rail {
    position: sticky;
    top: 0;
    bottom: auto;
    left: auto;
    width: 100%;
    transform: none;
    padding: 8px 10px;
    gap: 5px;
    border-radius: 0;
    background: #f5f8fce6;
    box-shadow:
      0 1px 0 #fff,
      0 4px 16px #2a415c08;
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
  }
  .studio-light .tool-rail button {
    min-height: 58px;
    border-radius: 15px;
    gap: 5px;
  }
  .studio-light .tool-rail button.active::after {
    display: none;
  }
  .studio-light .tool-rail small {
    font-size: 10px;
  }
  .studio-light .nav-icon {
    width: 23px;
    height: 23px;
  }
  .studio-light .metrics {
    position: relative;
    inset: auto;
    width: 100%;
    background: #f5f8fc;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .studio-light .view-tabs {
    background: #ffffffd1;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .studio-light .canvas-toolbar {
    background: #eef2f8;
  }
  .studio-light .scene-hint {
    bottom: 72px;
    color: #60768f;
  }
  .studio-light .plate-readout {
    bottom: 15px;
    left: 50%;
    padding: 7px 13px;
  }
  .studio-light .printer-button {
    padding: 6px 9px;
    min-height: 36px;
  }
  .studio-light .printer-button > span:first-child {
    font-size: 18px;
  }
  .studio-light .printer-button > span:last-child {
    font-size: 0;
  }
  .studio-light .printer-button-size {
    font-size: 7px;
  }
  .studio-light .inspector-toggle {
    display: none;
  }
  .studio-light .header-right {
    gap: 6px;
  }
  .studio-light .header-right #downloadZip {
    width: 90px;
    max-width: 90px;
  }
  .studio-light .brand {
    font-size: 14px;
    gap: 6px;
  }
  .studio-light .brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .studio-light .printer-settings {
    position: fixed;
    right: 12px;
    top: 74px;
    width: min(310px, calc(100vw - 24px));
  }
  .studio-light .printer-settings select,
  .studio-light .printer-settings input {
    font-size: 16px;
  }
  .studio-light .scene.realistic .scene-hint {
    bottom: 14px;
  }
}
/* Useful fallbacks when the material cannot or should not be rendered. */
@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .studio-light {
    --glass: #f8faff;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .studio-light {
    --glass: #f8faff;
  }
  .studio-light .topbar,
  .studio-light .settings-panel,
  .studio-light .right-panel,
  .studio-light .tool-rail,
  .studio-light .metrics,
  .studio-light .view-tabs,
  .studio-light .plate-readout,
  .studio-light .printer-settings,
  .studio-light .mount-scene-status,
  .studio-light .toast {
    background: #f8faff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  .studio-light {
    --glass: #fff;
    --glass-edge: #6e829b;
    --muted: #354b65;
  }
  .studio-light .field-hint,
  .studio-light .param label,
  .studio-light .settings-head p:last-child,
  .studio-light .metric > span,
  .studio-light .scene-hint {
    color: #354b65;
  }
  .studio-light .tool-rail,
  .studio-light .settings-panel,
  .studio-light .right-panel {
    border-color: #6e829b;
  }
}
@media (prefers-reduced-motion: reduce) {
  .studio-light button,
  .studio-light .button,
  .studio-light .printer-settings {
    animation: none;
    transition: none;
  }
  .studio-light button:active,
  .studio-light .button:active {
    transform: none;
  }
}
/* Project-wide preferences use a single modal and a persistent category rail. */
body.settings-open {
  overflow: hidden;
}
.project-settings {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 860px;
  max-width: calc(100vw - 40px);
  height: 620px;
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  color: #293c55;
  background: #f8fafff5;
  border: 1px solid #fff;
  border-radius: 27px;
  box-shadow:
    0 32px 120px #142d4d40,
    0 4px 20px #23395414,
    inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
}
.project-settings[open] {
  animation: settings-arrive 160ms ease-out;
}
.project-settings::backdrop {
  background: #18314c35;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
@keyframes settings-arrive {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.project-settings-heading {
  height: 84px;
  padding: 20px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #34557a10;
}
.project-settings-heading .eyebrow {
  font-size: 8px;
  margin: 0 0 5px;
  letter-spacing: 1.5px;
}
.project-settings-heading h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.6px;
}
.project-settings-heading .icon-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 23px;
}
.project-settings-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  height: calc(100% - 84px);
  min-height: 0;
}
.settings-navigation {
  padding: 20px 12px;
  background: #eaf0f6b3;
  border-right: 1px solid #34557a0d;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.settings-navigation button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #5b6e86;
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  text-align: left;
}
.settings-navigation button[aria-selected="true"] {
  background: #fff;
  border-color: #fff;
  color: #2467ab;
  box-shadow: 0 2px 6px #1c38540a;
}
.settings-navigation button:hover {
  background: #ffffff80;
}
.settings-navigation svg {
  width: 21px;
  height: 21px;
  flex: none;
}
.settings-content {
  padding: 29px 32px;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.settings-content h3 {
  margin: 0 0 10px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: #2d455e;
}
.settings-description {
  margin: 0 0 25px;
  max-width: 450px;
  font-size: 12px;
  line-height: 1.75;
  color: #667b91;
}
.project-file-actions {
  display: grid;
  gap: 12px;
}
.studio-light .project-file-action {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 80px;
  padding: 16px 18px;
  background: #fff;
  color: #3e6085;
  border: 1px solid #e1e8f1;
  border-radius: 15px;
  text-align: left;
  box-shadow: 0 2px 4px #34516c03;
}
.project-file-action svg {
  width: 25px;
  height: 25px;
  flex: none;
  color: #6b8fb5;
}
.project-file-action strong,
.language-choice strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.project-file-action small,
.language-choice small {
  display: block;
  font-size: 11px;
  color: #6e8198;
  margin-top: 4px;
}
.project-file-action > span:last-child {
  margin-left: auto;
  color: #7391b3;
  font-size: 20px;
}
.settings-note {
  font-size: 11px;
  line-height: 1.6;
  color: #6b8098;
  margin: 18px 0 28px;
}
.settings-reset {
  border-top: 1px solid #dfe6f0;
  padding-top: 22px;
}
.settings-reset h4,
.print-layout-settings h4 {
  font-size: 13px;
  margin: 0 0 8px;
  font-weight: 600;
}
.settings-reset .settings-description {
  margin-bottom: 14px;
}
.studio-light #printerSettings #resetAll {
  display: inline-flex;
  font-size: 11px;
  padding: 10px 13px;
  color: #646c7e;
}
.settings-content .printer-dimensions {
  margin: 18px 0;
}
.settings-content .field-hint {
  font-size: 11px;
}
.print-layout-settings {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid #dce5ef;
}
.print-layout-settings h4 {
  margin-bottom: 23px;
}
.studio-light .language-choice {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 82px;
  width: 100%;
  background: #fff;
  border: 1px solid #dfe7f0;
  color: #3a5775;
  border-radius: 15px;
  margin-bottom: 12px;
  padding: 15px 18px;
  text-align: left;
}
.language-monogram {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #edf3fb;
  color: #527ba4;
  font-size: 11px;
  font-weight: 600;
}
.language-check {
  width: 17px;
  height: 17px;
  border: 1.5px solid #bdcede;
  border-radius: 50%;
  margin-left: auto;
}
.studio-light .language-choice.active {
  border-color: #92b9e6;
  box-shadow: 0 0 0 2px #dbeafd;
}
.language-choice.active .language-check {
  border: 5px solid #3481d6;
}
/* Fine adjustments keep the same value and increment as each slider. */
.param-slider {
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-light .param-slider input[type="range"] {
  min-width: 0;
  flex: 1;
  width: 0;
  margin: 0;
}
.studio-light .stepper-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  color: #5178a2;
  background: #ffffffb3;
  border: 1px solid #dfe7f1;
  border-radius: 9px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}
.studio-light .stepper-button:hover {
  background: #e7f0fc;
  color: #2268ae;
}
.studio-light .stepper-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.palette-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0 27px;
}
.studio-light .palette-preset {
  min-width: 0;
  padding: 9px;
  background: #ffffff9c;
  border: 1px solid #dfe7f1;
  border-radius: 13px;
  color: #3e5c7a;
  text-align: left;
}
.studio-light .palette-preset[aria-pressed="true"] {
  background: #edf5ff;
  border-color: #84b0e1;
  box-shadow: 0 0 0 2px #dbeafb;
}
.preset-swatches {
  display: flex;
  height: 25px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #0001;
  margin-bottom: 10px;
}
.preset-swatches i {
  flex: 1;
}
.palette-preset strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}
.palette-preset small {
  display: block;
  font-size: 8px;
  line-height: 1.6;
  color: #647a91;
  margin-top: 3px;
}
.palette-custom-title {
  font-size: 11px;
  font-weight: 600;
  color: #536e88;
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .project-settings {
    width: calc(100vw - 20px);
    max-width: none;
    height: min(720px, calc(100dvh - 28px));
    max-height: calc(100dvh - 28px);
    border-radius: 22px;
  }
  .project-settings-heading {
    height: 77px;
    padding: 17px 19px;
  }
  .project-settings-body {
    grid-template-columns: 75px minmax(0, 1fr);
    height: calc(100% - 77px);
  }
  .settings-navigation {
    padding: 17px 7px;
  }
  .settings-navigation button {
    padding: 10px 3px;
    min-height: 67px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    font-size: 10px;
  }
  .settings-content {
    padding: 23px 17px;
  }
  .settings-content h3 {
    font-size: 20px;
  }
  .settings-description {
    font-size: 11px;
    line-height: 1.7;
  }
  .studio-light .project-file-action {
    gap: 9px;
    padding: 14px 11px;
  }
  .project-file-action svg {
    width: 21px;
    height: 21px;
  }
  .project-file-action strong,
  .language-choice strong {
    font-size: 12px;
  }
  .project-file-action small,
  .language-choice small {
    font-size: 10px;
  }
  .settings-content .printer-dimensions {
    gap: 8px;
  }
  .settings-content .printer-dimensions input {
    padding: 10px 8px;
  }
  .studio-light .language-choice {
    padding: 13px 11px;
    gap: 10px;
  }
  .language-monogram {
    width: 29px;
    height: 32px;
    font-size: 10px;
  }
  .studio-light .stepper-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
}
@media (max-width: 360px) {
  .studio-light .header-right #downloadZip {
    width: 42px;
    max-width: 42px;
    font-size: 0;
  }
  .studio-light .header-right #downloadZip::before {
    content: "↓";
    font-size: 18px;
  }
  .landing-topbar .brand {
    font-size: 14px;
  }
  .landing-topbar {
    padding: 0 12px;
  }
  .landing-topbar .brand-logo {
    width: 28px;
    height: 28px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .project-settings {
    background: #f8faff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .project-settings::backdrop {
    background: #18314c50;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-settings[open] {
    animation: none;
  }
}
/* Design categories live above the tools heading, in one horizontal tab group. */
.studio-light .settings-panel {
  left: 24px;
  width: 310px;
}
.studio-light .tool-rail {
  position: relative;
  inset: auto;
  width: auto;
  transform: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex-shrink: 0;
  padding: 7px;
  margin: 9px 9px 0;
  gap: 3px;
  border: 1px solid #ffffffa6;
  border-radius: 17px;
  box-shadow: inset 0 1px 0 #fff;
  background: #e9eff69c;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.studio-light .tool-rail button {
  min-width: 0;
  min-height: 60px;
  padding: 8px 0;
  gap: 5px;
  border-radius: 12px;
}
.studio-light .tool-rail button.active::after {
  display: none;
}
.studio-light .tool-rail .nav-icon {
  width: 23px;
  height: 23px;
}
.studio-light .tool-rail small {
  font-size: 10px;
}
.studio-light .settings-head {
  padding-top: 20px;
}
@media (max-width: 1280px) {
  .studio-light .settings-panel {
    left: 18px;
    width: 286px;
  }
}
@media (max-width: 760px) {
  .studio-light .settings-panel {
    left: auto;
    width: 100%;
  }
  .studio-light .tool-rail {
    position: sticky;
    top: 0;
    margin: 10px 12px 0;
    background: #edf2f9ed;
    z-index: 6;
  }
}
.studio-light .tool-rail {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  padding: 5px;
  margin: 9px 7px 0;
}
.studio-light .tool-rail small {
  font-size: 9px;
}
.studio-light .tool-rail .nav-icon {
  width: 22px;
  height: 22px;
}
.scene-description {
  margin-top: 0;
  margin-bottom: 24px;
}
/* The inspector keeps its own corner control and a reversible drag edge. */
.studio-light .right-panel {
  display: flex;
  overflow: hidden;
  min-width: 48px;
}
.inspector-content {
  width: 100%;
  min-width: 218px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inspector-content > .context-tabs {
  margin-right: 30px;
  flex-shrink: 0;
}
.inspector-content > section {
  min-height: 0;
  overflow: auto;
}
.studio-light .inspector-collapse {
  position: absolute;
  top: 17px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 4px;
  background: #ffffffe0;
  color: #567595;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  z-index: 4;
}
.inspector-collapse svg {
  width: 18px;
  height: 18px;
}
.inspector-collapsed .inspector-collapse svg {
  transform: rotate(180deg);
}
.inspector-collapsed .inspector-content {
  visibility: hidden;
}
.inspector-drag-handle {
  position: absolute;
  left: 0;
  top: 70px;
  bottom: 22px;
  width: 12px;
  cursor: ew-resize;
  touch-action: none;
  z-index: 4;
}
.inspector-drag-handle::before {
  content: "";
  position: absolute;
  top: calc(50% - 23px);
  left: 4px;
  width: 3px;
  height: 46px;
  border-radius: 4px;
  background: #a2b4c966;
}
.inspector-drag-handle:hover::before,
.inspector-dragging .inspector-drag-handle::before {
  background: #4b8dce;
}
.inspector-dragging {
  user-select: none;
}
@media (max-width: 760px) {
  .studio-light .right-panel {
    width: 100%;
    min-height: 0;
  }
  .studio-light .right-panel.inspector-collapsed {
    height: 66px;
    padding: 15px;
  }
  .inspector-collapsed .inspector-content {
    display: none;
  }
  .inspector-drag-handle {
    display: none;
  }
  .studio-light .inspector-collapse {
    right: 20px;
  }
}
/* Light cards inside either collapsible panel never inherit the old dark card fill. */
.studio-light .inspector-content > section {
  border: 0;
  box-shadow: none;
  padding: 13px 8px;
  background: transparent;
}
.tools-content {
  width: 100%;
  min-width: 284px;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tools-content > .settings-head {
  flex-shrink: 0;
}
.tools-content > .settings-scroll {
  flex: 1;
  min-height: 0;
}
.studio-light .settings-panel {
  min-width: 48px;
  overflow: hidden;
}
.inspector-collapsed .panel-content {
  visibility: hidden;
}
.studio-light .tools-collapse {
  top: 89px;
  right: 12px;
}
.tools-collapse svg {
  transform: rotate(180deg);
}
.inspector-collapsed .tools-collapse {
  top: 17px;
  right: 8px;
}
.inspector-collapsed .tools-collapse svg {
  transform: none;
}
.tools-drag-handle {
  left: auto;
  right: 0;
}
.studio-light .plate-readout {
  left: auto;
  right: 24px;
  bottom: 20px;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(352px, calc(100% - 48px));
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.plate-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.studio-light .scene.realistic .plate-readout {
  display: flex;
}
.color-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: #e5eaf1b8;
  border-radius: 12px;
}
.color-tabs button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #53647b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.color-tabs button[aria-selected="true"] {
  background: #fff;
  color: #245e9c;
  box-shadow: 0 2px 5px #1b385114;
}
#settingsRender {
  margin-top: 22px;
}
.preview-annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.preview-annotations span {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ruler-number {
  font-size: 10px;
  color: #506780;
  text-shadow: 0 1px 2px #fff;
}
.plate-degree {
  font-size: 11px;
  font-weight: 650;
  color: #284f7b;
  padding: 3px 7px;
  border: 1px solid #ffffffde;
  border-radius: 8px;
  background: #f4f8ffdc;
  box-shadow: 0 2px 6px #25466a18;
  backdrop-filter: blur(8px);
}
.pane-number {
  font-size: 10px;
  font-weight: 650;
  color: #243951;
  padding: 2px 5px;
  border: 1px solid #ffffffc9;
  border-radius: 5px;
  background: #ffffffe6;
  box-shadow: 0 1px 4px #0002;
}
.pane-number.selected {
  color: #075fbd;
  border-color: #2586ef;
}
.pane-numbers-toggle {
  margin: 0 0 12px;
}
.studio-light .header-right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}
.studio-light .header-right > button {
  height: 42px;
  margin: 0;
  white-space: nowrap;
}
.studio-light #downloadBambu {
  background: linear-gradient(#159c57, #087d43);
  border: 1px solid #087d43;
  color: #fff;
  box-shadow: 0 3px 9px #087d4326;
}
.studio-light #downloadBambu:hover {
  background: #087d43;
}
.studio-light .printer-menu {
  display: flex;
  align-items: center;
}
.studio-light .canvas-toolbar {
  left: auto;
  right: 392px;
  bottom: 24px;
  transform: none;
  width: 36px;
  height: 36px;
  max-width: none;
  padding: 0;
  background: transparent;
}
.studio-light .canvas-toolbar > .icon-btn {
  top: 0;
  right: 0;
}
.studio-light .printer-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
}
@media (max-width: 760px) {
  .studio-light .header-right {
    gap: 5px;
  }
  .studio-light .canvas-toolbar {
    position: absolute;
    bottom: 160px;
    right: 16px;
    z-index: 3;
  }
  .studio-light .header-right > button {
    height: 36px;
    min-height: 36px;
    padding: 6px 9px;
    font-size: 10px;
  }
  .studio-light .printer-button {
    width: 36px;
    height: 36px;
    min-height: 36px;
  }
}
.plate-details {
  flex: 1;
  min-width: 0;
}
.plate-summary .mount-scene-direction {
  font-size: 10px;
  font-weight: 600;
  color: #4b6686;
}
.studio-light .plate-readout .metrics {
  position: static;
  inset: auto;
  transform: none;
  width: 100%;
  border: 0;
  border-top: 1px solid #617d9d20;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.studio-light .plate-readout .metric {
  padding: 9px 4px;
}
.plate-readout .metric strong small {
  display: inline;
  font-size: 10px;
  margin: 0;
}
@media (max-width: 1280px) {
  .tools-content {
    min-width: 260px;
  }
}
@media (max-width: 760px) {
  .tools-content {
    min-width: 0;
  }
  .studio-light .settings-panel.inspector-collapsed {
    height: 66px;
  }
  .inspector-collapsed .panel-content {
    display: none;
  }
  .studio-light .plate-readout {
    left: auto;
    right: 16px;
    bottom: 14px;
    width: min(352px, calc(100% - 32px));
  }
  .studio-light .scene-hint {
    display: none;
  }
}
.studio-light .canvas-toolbar > .icon-btn {
  background: linear-gradient(145deg, #fffffff2, #f1f6fcd9);
  border: 1px solid #fff;
  color: #577699;
  box-shadow:
    0 3px 12px #2b45661a,
    inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.studio-light .brand-logo {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.studio-light .scene-hint {
  left: 24px;
  bottom: 24px;
  transform: none;
  max-width: calc(100% - 600px);
  justify-content: flex-start;
  flex-wrap: wrap;
  white-space: normal;
  gap: 5px 12px;
}
.studio-light .canvas-toolbar {
  width: 142px;
}
.studio-light .canvas-toolbar > .icon-btn {
  width: 142px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 12px;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
}
.studio-light .canvas-toolbar > .icon-btn span {
  font-size: 20px;
}
@media (max-width: 760px) {
  .studio-light .scene-hint {
    display: flex;
    left: 16px;
    bottom: 156px;
    max-width: calc(100% - 188px);
    font-size: 8px;
  }
}
.scene-mode .context-tabs,
.scene-mode .details-card,
.scene-mode .panel-list-card,
.scene-mode .export-card,
.scene-mode .partial-export-card {
  display: none !important;
}
.context-tabs .partial-tab[hidden] {
  display: none;
}
.partial-export-card > p {
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}
.partial-list {
  list-style: none;
  margin: 12px -8px;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}
.partial-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: #455b74;
}
.partial-list li:first-child {
  background: #eef3fa;
}
.partial-list .color-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: none;
  box-shadow: 0 0 0 1px #3d527624;
}
.partial-list small {
  margin-left: auto;
  color: #63748b;
  font-size: 10px;
  text-align: right;
}
#partialStatus {
  margin: 0 0 6px;
  color: #6b4508;
}
#partialStatus:empty {
  display: none;
}
#partialStatus.error {
  color: #a3261b;
  font-weight: 600;
}
.partial-export-card .button {
  margin-top: 8px;
}
.partial-export-card .small-note {
  font-size: 10px;
  margin: 12px 0 0;
}
.scene-components {
  padding: 24px;
}
.lamp-component-options {
  display: grid;
  gap: 10px;
}
.lamp-component-option {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 100px;
  padding: 12px 18px;
  border: 1px solid #d8e2ed;
  border-radius: 16px;
  background: #f7faff;
  text-align: left;
  color: #3c536e;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lamp-component-option svg {
  width: 54px;
  height: 74px;
  fill: #b99158;
  stroke: #8c6c41;
  stroke-width: 1;
}
.lamp-component-option[aria-pressed="true"] {
  border-color: #4088d4;
  background: #eaf3fd;
  box-shadow: 0 0 0 1px #4088d433;
}
.palette-presets {
  grid-template-columns: minmax(0, 1fr);
}
.studio-light .palette-preset {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 1fr;
  gap: 4px 12px;
  align-items: center;
  text-align: left;
  padding: 12px;
}
.palette-preset .preset-swatches {
  grid-row: 1 / 3;
  margin: 0;
}
.palette-row {
  flex-wrap: wrap;
}
.palette-row .palette-swatch {
  border: 1px solid #8b9bac55;
  cursor: pointer;
}
.palette-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}
.palette-actions button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 10px;
}
.palette-actions output {
  font-size: 10px;
  color: #62768f;
  margin-left: auto;
}
.preset-swatches {
  overflow: visible;
  gap: 2px;
  min-width: 0;
}
.palette-chip {
  display: block;
  flex: 1;
  min-width: 0;
  height: 28px;
  position: relative;
  border-radius: 3px;
}
.palette-chip:hover {
  outline: 2px solid #2a76c2;
  outline-offset: 2px;
  z-index: 4;
}
.palette-tooltip {
  display: none;
  pointer-events: none;
  position: absolute;
  z-index: 12;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 240px;
  padding: 9px 12px;
  border: 1px solid #d2deec;
  border-radius: 9px;
  color: #2f4765;
  background: #fff;
  box-shadow: 0 8px 24px #193d6429;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-line;
  text-align: left;
}
.palette-chip:hover .palette-tooltip {
  display: block;
}
.palette-card:has(.palette-remove) .palette-preset {
  padding-right: 34px;
}

/* Connected glass workspace for the profile and conformal pattern map. */
.workspace-panel {
  position: absolute;
  inset: 52px auto 100px 350px;
  width: calc((100% - 660px) * 0.7);
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  color: var(--text);
  min-width: 0;
}
.workspace-panel[hidden] {
  display: none;
}
.workspace-panel > header {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-bottom: 1px solid #617d9d15;
  background: #ffffff28;
}
.workspace-panel > header strong {
  margin-right: auto;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.2px;
  color: #3d5676;
}
.design-canvas svg {
  display: block;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  touch-action: none;
  user-select: none;
}
.design-canvas circle[data-vertex],
.design-canvas circle[data-handle],
.design-canvas circle[data-profile] {
  cursor: grab;
}
.design-canvas [data-pane],
.design-canvas [data-motif] {
  cursor: pointer;
}
.design-map-hint {
  padding: 12px 16px;
  margin: 0;
  border-top: 1px solid #617d9d15;
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
  color: #6f839d;
  letter-spacing: 0.1px;
}
.design-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.design-button,
.pattern-settings button,
#settingsShape .design-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #ffffffd9;
  border-radius: 11px;
  background: linear-gradient(145deg, #fffffff0, #eaf1fac9);
  color: #526e91;
  box-shadow:
    0 2px 6px #2b456608,
    inset 0 1px 0 #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.design-button:hover:not(:disabled) {
  background: #fff;
  box-shadow: 0 3px 10px #2b456615;
  color: #1768cb;
}
.design-button:disabled {
  opacity: 0.45;
  cursor: default;
}
.design-button:focus-visible {
  outline: 3px solid #1768cb;
  outline-offset: 2px;
}
.pattern-settings label,
#settingsShape label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 11px;
  color: #526e91;
}
.pattern-settings input,
.pattern-settings select,
#settingsShape label input {
  width: 108px;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #cbd9eb99;
  border-radius: 9px;
  background: #ffffffa6;
  box-shadow: inset 0 1px 2px #334e6c05;
  color: #3d5676;
  font: inherit;
}
.pattern-settings > p:last-child {
  font-size: 11px;
  color: #7d8da2;
  line-height: 1.7;
}
.studio-light .tool-rail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 1001px) {
  .studio-light .settings-panel,
  .studio-light .right-panel {
    z-index: 3;
  }
  .scene.design-open > #viewport {
    left: calc(350px + (100% - 660px) * 0.7);
    width: calc((100% - 660px) * 0.3);
  }
}
/* Building meshes must never intercept an edit on the map. */
.scene.design-open > .scene-loading {
  inset: auto 16px 20px auto;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffffed;
  color: #526178;
  box-shadow: 0 2px 12px #0001;
  pointer-events: none;
  font-size: 12px;
}
.scene.design-open > .scene-loading .spinner {
  width: 18px;
  height: 18px;
}
@media (max-width: 1000px) {
  .setting-group .design-canvas {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 0.85;
    margin: 16px 0;
    z-index: auto;
    box-sizing: border-box;
    border-radius: 18px;
    box-shadow: 0 6px 20px #26374f08;
  }
  .setting-group .design-canvas svg {
    min-height: 240px;
    aspect-ratio: 1;
  }
  .setting-group .design-canvas header {
    gap: 4px;
    padding: 10px;
  }
  .setting-group .design-canvas header strong {
    flex-basis: 100%;
    padding: 2px 0 5px;
  }
  .setting-group .design-canvas .design-button,
  .design-actions .design-button {
    min-height: 44px;
  }
  .design-map-hint {
    padding: 8px;
    font-size: 9px;
  }
}
/* Phone tools and inspector stay in document flow rather than covering each other. */
@media (max-width: 760px) {
  .studio-light .workbench {
    display: flex;
    flex-direction: column;
    position: relative;
    inset: auto;
    height: auto;
    overflow: visible;
  }
  .studio-light .settings-panel,
  .studio-light .right-panel {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    max-height: none;
    height: auto;
    flex: none;
  }
  .studio-light .settings-panel {
    order: 1;
  }
  .studio-light .viewer-panel {
    order: 2;
    position: relative;
    flex: none;
    height: 480px;
    min-height: 480px;
    width: 100%;
  }
  .studio-light .right-panel {
    order: 3;
  }
  .tools-content,
  .inspector-content {
    height: auto;
    min-width: 0;
  }
  .tools-content > .settings-scroll {
    overflow: visible;
    max-height: none;
  }
  .studio-light .tool-rail {
    width: auto;
    position: relative;
    inset: auto;
  }
  .studio-light .canvas-toolbar {
    position: absolute;
    bottom: 130px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .workspace-panel {
    background: #f8faff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .design-button {
    transition: none;
  }
}

.design-button[aria-pressed="true"] {
  background: linear-gradient(145deg, #fff, #dcecffd9);
  border-color: #b9d6fa;
  color: #1768cb;
  box-shadow:
    0 2px 8px #1768cb12,
    inset 0 1px 0 #fff;
}

/* Keep the longer product name readable beside the phone's primary actions. */
@media (max-width: 760px) {
  .studio-light .brand {
    font-size: 11px;
    gap: 7px;
    letter-spacing: -0.3px;
  }
  .studio-light .brand strong {
    display: block;
    line-height: 1.2;
  }
  .studio-light .brand small {
    display: none;
  }
  .studio-light .brand-logo {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
  }
}
.design-template-select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd9eb99;
  border-radius: 11px;
  background: #ffffffa6;
  color: #526e91;
  font: inherit;
  font-size: 11px;
}
.design-import-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  padding: 24px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}
.design-import-dialog::backdrop {
  background: #23304744;
  backdrop-filter: blur(4px);
}
.design-import-dialog svg {
  display: block;
  width: 100%;
  max-height: 320px;
  background: #ffffff44;
  border-radius: 14px;
  margin: 16px 0;
}
.design-import-dialog label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
}
.design-import-dialog input {
  max-width: 110px;
  padding: 8px;
  border: 1px solid #cbd9eb99;
  border-radius: 9px;
  background: #ffffffa6;
  color: #3d5676;
}
.design-import-dialog button {
  margin: 4px;
}
.design-categories {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #e9eff69c;
  border: 1px solid #ffffffa6;
  border-radius: 12px;
  margin: 0 0 12px;
}
.design-categories .design-button {
  flex: 1;
  min-width: 0;
  padding: 7px 3px;
  font-size: 9px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.design-categories [aria-selected="true"] {
  background: #ffffffed;
  border-color: white;
  color: #1768cb;
  box-shadow: 0 2px 6px #2b456608;
}
.design-category[hidden] {
  display: none;
}
.design-category {
  margin-bottom: 14px;
}
.pattern-generation {
  width: 100%;
  margin: 8px 0;
}
.design-map-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  flex-wrap: wrap;
  background: #ffffff28;
  border-top: 1px solid #617d9d12;
}
.design-map-navigation .design-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10px;
}
.design-map-navigation .design-button:first-child,
.design-map-navigation .design-button:nth-child(2) {
  font-size: 16px;
  min-width: 32px;
  padding: 4px;
}
.design-map-navigation [data-map-rotation] {
  font-size: 17px;
  min-width: 36px;
  padding: 4px 8px;
}
.design-map-navigation .rotation-value {
  font-size: 11px;
  min-width: 43px;
  font-variant-numeric: tabular-nums;
}
.profile-map [data-map-rotation] {
  display: none;
}
@media (pointer: coarse) {
  .design-map-navigation .design-button {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Inspector widths determine both the map and the center of the free 3D space. */
@media (min-width: 761px) {
  .studio-light .scene > #viewport,
  .studio-light .scene.design-open > #viewport {
    left: var(--preview-left, 0px);
    top: var(--preview-top, 0px);
    right: auto;
    bottom: auto;
    width: var(--preview-width, 100%);
    height: var(--preview-height, 100%);
  }
  .studio-light .scene > .preview-annotations {
    left: var(--preview-left, 0px);
    top: var(--preview-top, 0px);
    right: auto;
    bottom: auto;
    width: var(--preview-width, 100%);
    height: var(--preview-height, 100%);
  }
  .studio-light .canvas-toolbar {
    left: var(--preview-toolbar-left, calc(50% - 71px));
    right: auto;
  }
}
@media (min-width: 1001px) {
  .scene > .workspace-panel {
    inset: auto;
    left: var(--design-left, 350px);
    top: var(--design-top, 24px);
    width: var(--design-width, 45%);
    height: var(--design-height, calc(100% - 48px));
  }
}
.profile-map svg {
  min-height: 280px;
}

/* Current geometry validation notices and accessible map focus. */
.experimental-notice {
  display: grid;
  gap: 4px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e3a33b66;
  border-left: 4px solid #d98a12;
  border-radius: 10px;
  background: #fff6e6;
  color: #6b4508;
  font-size: 11px;
  line-height: 1.5;
}
.experimental-notice strong {
  font-weight: 700;
  color: #5a3906;
}
.experimental-notice[hidden],
.design-experimental-banner[hidden] {
  display: none;
}
.export-card p.experimental-notice {
  margin: 0 0 14px;
  color: #6b4508;
}
.design-experimental-banner {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  z-index: 4;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 7px 14px;
  border: 1px solid #e3a33b80;
  border-radius: 999px;
  background: #fff6e6f2;
  color: #5a3906;
  box-shadow: 0 2px 10px #5a39061a;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}
@media (min-width: 1001px) {
  .design-experimental-banner {
    left: 350px;
    right: 310px;
    max-width: calc(100% - 676px);
  }
}
.design-canvas [role="button"]:focus-visible {
  outline: 2px solid #2379d9;
  outline-offset: 3px;
}
.design-canvas circle[data-profile]:focus-visible,
.design-canvas circle[data-vertex]:focus-visible,
.design-canvas circle[data-handle]:focus-visible {
  stroke: #2379d9;
  stroke-width: 3;
}

/* Compact model information stays below the tools, outside their scroll area. */
body[data-active-tool="pattern"] .settings-head {
  display: none;
}
body[data-active-tool="pattern"] .pattern-settings {
  padding-top: 8px;
}
body[data-active-tool="pattern"] .design-categories {
  margin-top: 0;
}
.studio-light .tools-content > .plate-readout {
  pointer-events: auto;
  position: static;
  inset: auto;
  transform: none;
  flex: none;
  align-self: stretch;
  width: auto;
  max-width: none;
  min-height: 0;
  margin: 0 10px 10px;
  padding: 8px 10px;
  gap: 6px;
  border-radius: 12px;
  box-shadow: none;
  background: #eef3f9;
  border: 1px solid #d9e3ee;
  backdrop-filter: none;
}
.studio-light .tools-content .plate-summary {
  padding: 0;
  gap: 6px;
}
.studio-light .tools-content .plate-readout .plate-details,
.studio-light .tools-content .plate-readout .mount-scene-direction {
  font-size: 9px;
  line-height: 1.3;
}
.studio-light .tools-content .plate-readout .metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 5px;
}
.studio-light .tools-content .plate-readout .metric {
  min-width: 0;
  padding: 0 4px;
}
.studio-light .tools-content .plate-readout .metric > span {
  font-size: 6.5px;
  line-height: 1.3;
  min-height: 17px;
  margin: 0 0 3px;
  letter-spacing: 0.2px;
  white-space: normal;
}
.studio-light .tools-content .plate-readout .metric strong {
  font-size: 13px;
  line-height: 1.1;
}
.studio-light .tools-content .plate-readout .metric strong small {
  font-size: 8px;
}

/* Every notice shares the same footprint; keyed progress updates reuse a card. */
#notificationCenter {
  position: fixed;
  inset: auto 18px max(18px, env(safe-area-inset-bottom)) auto;
  margin: 0;
  padding: 0;
  width: min(340px, calc(100vw - 28px));
  max-height: calc(100dvh - 36px);
  border: 0;
  background: transparent;
  color: #30475b;
  overflow: visible;
  pointer-events: none;
}
#notificationCenter:popover-open {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
#notificationCenter:not(:popover-open) {
  display: none;
}
.studio-light #notificationCenter .notification-card {
  position: relative;
  inset: auto;
  transform: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: none;
  box-sizing: border-box;
  width: 100%;
  height: 104px;
  padding: 13px 10px 13px 13px;
  border: 1px solid #d2dfec;
  border-radius: 14px;
  background: #fbfdff;
  color: #30475b;
  box-shadow: 0 5px 24px #263e5926;
  opacity: 1;
  font-size: 12px;
  font-weight: 400;
  pointer-events: auto;
}
#notificationCenter .notification-card[hidden] {
  display: none !important;
}
.notification-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5effa;
  color: #2872b8;
  font-size: 15px;
  font-weight: 650;
}
.notification-content {
  min-width: 0;
  flex: 1;
}
.notification-content strong {
  display: block;
  font-size: 10px;
  font-weight: 650;
  margin: 0 0 4px;
  color: #60778c;
}
.notification-content p {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.notification-close {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6d8194;
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}
.notification-close:hover {
  background: #e8eff6;
}
.notification-close:focus-visible {
  outline: 2px solid #1768cb;
  outline-offset: 2px;
}
/* Validation failures remain readable and actionable until a current check
   clears them. Shared causes list all affected parts without flooding the view. */
.studio-light #notificationCenter .notification-expanded {
  height: auto;
  max-height: min(560px, 60dvh);
}
#notificationCenter {
  overflow-y: auto;
  scrollbar-width: thin;
}
.notification-expanded .notification-content {
  max-height: calc(min(560px, 60dvh) - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.notification-expanded .notification-content > p {
  display: block;
  margin-bottom: 10px;
}
.export-issue-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.export-issue-list > li + li {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d2dfec;
}
.export-issue-list h3 {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 18px;
  color: #963a28;
}
.export-issues p {
  display: block;
  overflow: visible;
  margin: 0 0 8px;
}
.export-issues [hidden] {
  display: none;
}
.export-issues summary {
  margin: 8px 0;
  cursor: pointer;
}
.export-issue-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 140px;
  overflow-y: auto;
  margin: 8px 0;
}
.export-issues button {
  min-height: 32px;
  border: 1px solid #bdcfe2;
  border-radius: 7px;
  padding: 6px 10px;
  background: #eef4fc;
  color: #225c9e;
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.export-issues button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.export-issues button:focus-visible,
.export-issues summary:focus-visible {
  outline: 2px solid #1768cb;
  outline-offset: 2px;
}
.export-issues .export-issue-action {
  min-height: 44px;
  margin-top: 8px;
  background: #225c9e;
  color: #fff;
}
.export-issues-status {
  color: #60778c;
}
.notification-card[data-kind="success"] .notification-icon {
  background: #e3f2eb;
  color: #327553;
}
.notification-card[data-kind="error"] .notification-icon {
  background: #fbe9e5;
  color: #b24a33;
}
.notification-card[data-kind="progress"] .notification-icon {
  animation: spin 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .notification-card[data-kind="progress"] .notification-icon {
    animation: none;
  }
}
@media (max-width: 760px) {
  #notificationCenter {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

.ornament-workspace {
  width: 100%;
  min-width: 0;
  margin: 4px 0 16px;
}
.ornament-workspace > summary {
  padding: 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: #3f5971;
  cursor: pointer;
  border-top: 1px solid #d6e2ef;
}
.ornament-draft-settings {
  width: 100%;
}
.ornament-draft-settings:empty,
.ornament-draft-settings:has(> [hidden]) {
  display: none;
}
.placed-ornament-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.placed-ornament-item {
  min-width: 0;
}
.placed-ornament-item > .ornament-inspector {
  margin-top: 6px;
}
.placed-ornament-list:empty {
  display: none;
}
.pattern-settings .placed-ornament-item > button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 5px 7px;
  min-height: 38px;
  width: 100%;
  font-size: 10px;
}
.placed-ornament-item > button::after {
  content: "⌄";
  margin-left: auto;
}
.placed-ornament-item > button[aria-expanded="true"]::after {
  content: "⌃";
}
.placed-ornament-list svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.ornament-inspector {
  padding: 13px;
  border: 1px solid #d6e2ef;
  background: #f4f8fc;
  border-radius: 14px;
}
.ornament-inspector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ornament-inspector-heading strong {
  font-size: 14px;
  color: #304b65;
}
.ornament-inspector-heading small {
  font-size: 8px;
  color: #657d92;
  text-align: right;
}
.ornament-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pattern-settings .ornament-primary label {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 10px;
}
.pattern-settings .ornament-primary input {
  width: 100%;
  box-sizing: border-box;
}
.ornament-inspector h4,
.ornament-colors h4 {
  color: #60768c;
  font-size: 10px;
  font-weight: 650;
  margin: 14px 0 10px;
}
.ornament-colors {
  padding-bottom: 3px;
}
.ornament-color-role {
  margin-bottom: 10px;
}
.ornament-role-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.ornament-role-header span,
.ornament-color-role > span {
  display: block;
  font-size: 10px;
  color: #526b81;
}
.ornament-role-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 5px;
  border: 1px solid #31485c33;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}
.ornament-role-dot:hover,
.ornament-role-dot:focus-visible {
  outline: 2px solid #1768cb;
  outline-offset: 1px;
}
.pattern-settings .ornament-role-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #ffffff;
  color: #4b647c;
  border: 1px dashed #7a94ad;
}
.pattern-settings .ornament-role-picker:hover,
.pattern-settings .ornament-role-picker:focus-visible {
  border-color: #1768cb;
  color: #1768cb;
  background: #f0f6fc;
}
.ornament-role-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pattern-settings .ornament-role-swatch,
.pattern-settings .ornament-role-inherit {
  width: 27px;
  height: 27px;
  min-height: 27px;
  min-width: 27px;
  padding: 0;
  border: 1px solid #45627d33;
  border-radius: 7px;
  box-shadow: none;
}
.pattern-settings .ornament-role-swatch {
  background-image: none;
}
.pattern-settings .ornament-role-swatch[aria-pressed="true"] {
  outline: 2px solid #1768cb;
  outline-offset: 2px;
}
.pattern-settings .ornament-role-swatch:hover {
  background: revert;
  filter: brightness(1.05);
}
.pattern-settings .ornament-role-inherit {
  font-size: 16px;
  color: #637b91;
}
.ornament-advanced {
  border-top: 1px solid #d9e4ef;
  margin-top: 14px;
  padding-top: 12px;
}
.ornament-advanced > summary {
  cursor: pointer;
  color: #60778b;
  font-size: 10px;
  line-height: 1.5;
}
.ornament-delete {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e1e8ef;
}
.pattern-settings .ornament-delete button {
  color: #9c594c;
  background: transparent;
  padding: 5px 8px;
  min-height: 30px;
  box-shadow: none;
  font-size: 10px;
}
@media (pointer: coarse) {
  .pattern-settings .ornament-role-swatch,
  .pattern-settings .ornament-role-inherit {
    width: 36px;
    height: 36px;
    min-height: 36px;
  }
}

/* The editor chrome lives on the left; landing-page navigation stays horizontal. */
.editor-page .topbar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 92px;
  height: 100dvh;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 20px;
  box-sizing: border-box;
  border-bottom: 0;
  border-right: 1px solid #dce6f0;
  z-index: 10;
}
.editor-page .topbar .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-align: center;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.editor-page .topbar .brand strong {
  display: block;
}
.editor-page .topbar .brand small {
  display: none;
}
.editor-page .topbar .brand-logo {
  width: 38px;
  height: 38px;
  flex: none;
}
.editor-page .topbar .header-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-size: 10px;
  gap: 12px;
  text-align: center;
}
.editor-page .topbar .header-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  width: 100%;
  margin: auto 0 0;
  gap: 9px;
}
.editor-page .topbar .header-right > button {
  width: 100%;
  max-width: none;
  min-height: 52px;
  height: auto;
  padding: 8px 5px;
  font-size: 9px;
  line-height: 1.4;
  white-space: normal;
  border-radius: 12px;
  box-sizing: border-box;
}
.editor-page .topbar .printer-menu {
  width: 100%;
  display: grid;
  place-items: center;
  margin-top: 7px;
}
.editor-page .topbar .printer-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
}
@media (min-width: 761px) {
  .editor-page .workbench {
    position: fixed;
    inset: 0 0 0 92px;
    width: auto;
    height: auto;
    min-height: 0;
  }
  .editor-page .settings-panel {
    top: 12px;
    bottom: 12px;
    left: 12px;
  }
  .editor-page .right-panel {
    top: 12px;
    bottom: 12px;
    right: 12px;
  }
}
@media (max-width: 760px) {
  .editor-page .topbar {
    width: 68px;
    padding: 12px 6px;
    gap: 18px;
  }
  .editor-page .topbar .brand {
    font-size: 9px;
  }
  .editor-page .topbar .brand-logo {
    width: 32px;
    height: 32px;
  }
  .editor-page .topbar .header-nav {
    font-size: 8px;
  }
  .editor-page .topbar .header-right > button {
    min-height: 48px;
    font-size: 8px;
    padding: 7px 3px;
  }
  .editor-page .workbench {
    position: relative;
    inset: auto;
    width: calc(100% - 68px);
    margin-left: 68px;
    padding: 10px;
    box-sizing: border-box;
  }
  .editor-page .settings-panel,
  .editor-page .right-panel {
    border-radius: 16px;
  }
}
.editor-page .topbar #downloadZip,
.editor-page .topbar #downloadBambu {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
  min-height: 52px;
  padding: 8px 5px;
  font-size: 9px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.editor-page .topbar #downloadZip::before {
  content: none;
}
@media (max-width: 760px) {
  .editor-page .topbar #downloadZip,
  .editor-page .topbar #downloadBambu {
    font-size: 8px;
    min-height: 48px;
    padding: 7px 3px;
  }
}
.model-info-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.model-info-heading > strong {
  font-size: 9px;
  font-weight: 600;
  color: #526e89;
}
.model-info-button {
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid #bccfe1;
  border-radius: 50%;
  background: #f9fcff;
  color: #5b7e9e;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.model-info-button:focus-visible {
  outline: 2px solid #1768cb;
  outline-offset: 2px;
}
.model-info-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(270px, calc(100vw - 20px));
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid #cdddeb;
  border-radius: 13px;
  background: #fbfdff;
  color: #425d77;
  box-shadow: 0 8px 28px #2b49662b;
}
.model-info-popover:not(:popover-open) {
  display: none;
}
.model-info-popover .plate-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0;
}
.model-info-popover .plate-summary strong {
  font-size: 11px;
}
.model-info-popover .mount-scene-direction {
  font-size: 10px;
}
.model-info-popover p {
  font-size: 11px;
  line-height: 1.6;
  margin: 10px 0 0;
}
.editor-page .topbar .header-right > .model-info-button {
  order: 10;
  width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  color: #425d77;
  background: #f9fcff;
}
.model-info-popover .plate-readout {
  position: static;
  inset: auto;
  transform: none;
  width: auto;
  max-width: none;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  pointer-events: auto;
}
.model-info-popover .plate-readout .metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.model-info-popover .plate-readout .metric {
  border: 0;
  padding: 0;
}
.model-info-popover .metric > span {
  font-size: 8px;
}
.model-info-popover .metric > strong {
  font-size: 14px;
}
/* The logo/action rail peeks over the canvas; tools remain visible and click-collapsible. */
.editor-page .topbar {
  transition:
    transform 170ms ease,
    visibility 170ms;
}
.editor-page .topbar.appbar-hidden {
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
}
.editor-page .topbar .brand > span:last-child {
  display: none;
}
.editor-page .topbar .header-right {
  align-items: center;
}
.editor-page .topbar #downloadZip,
.editor-page .topbar #downloadBambu {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 9px;
  font-size: 0;
}
.editor-page .topbar #downloadZip svg {
  width: 23px;
  height: 23px;
}
.editor-page .topbar #downloadBambu {
  background: #f1faf4;
  border: 1px solid #b9ddc4;
  box-shadow: 0 2px 8px #254a3010;
}
.editor-page .topbar #downloadBambu img {
  width: 22px;
  height: 28px;
}
.appbar-reveal {
  position: fixed;
  left: 0;
  top: 18px;
  z-index: 12;
  width: 18px;
  height: 42px;
  padding: 0;
  border: 1px solid #d1dfec;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f8fbff;
  color: #6685a1;
  font-size: 20px;
  cursor: pointer;
}
.appbar-edge-trigger {
  position: fixed;
  inset: 0 auto 0 0;
  width: 5px;
  z-index: 11;
}
@media (min-width: 761px) {
  .editor-page .workbench {
    left: 0;
  }
}
@media (max-width: 760px) {
  .editor-page .workbench {
    width: 100%;
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .editor-page .topbar {
    transition: none;
  }
}

/* Skeleton & fit cards and segmented skeleton panels */
.skeleton-card {
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid #3d52761f;
  background: #ffffff96;
  box-shadow:
    0 2px 8px #253c5908,
    inset 0 1px 0 #fff;
  min-width: 0;
}
.skeleton-card.mount-setting {
  margin: 0 0 14px;
}
.skeleton-card.material-block {
  margin-top: 0;
  margin-bottom: 14px;
  padding-top: 14px;
  border-top: 1px solid #3d52761f;
}
.skeleton-card-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.2px;
  color: #2c4159;
}
.skeleton-socket-card .param {
  margin-top: 14px;
  margin-bottom: 0;
}
.skeleton-structure-card .rib-width-feedback {
  margin: 8px 0 16px;
}
.skeleton-structure-card .advanced-fields {
  margin-top: 16px;
  padding-top: 12px;
}

.segmentation-panel {
  margin-top: 6px;
  display: grid;
  gap: 12px;
  font-size: 12px;
}
.segment-launcher {
  width: 100%;
  margin-top: 14px;
  min-height: 44px;
}
.segment-launcher[aria-expanded="true"] {
  color: #147344;
  border-color: #91c9aa;
  background: #e9f7ee;
}
.segment-workspace > header {
  flex: none;
}
.segment-workspace > header button {
  min-width: 36px;
  min-height: 36px;
  font-size: 22px;
}
.segment-workspace .segmentation-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  margin: 0;
}
.segment-workspace .segmentation-panel > * {
  flex-shrink: 0;
}
.segment-picker {
  display: grid;
  gap: 12px;
}
.segment-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.segment-picker-toolbar .button {
  margin: 0;
  min-height: 36px;
  font-size: 12px;
}
.segment-picker-toolbar [role="status"] {
  color: #4d6358;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.segment-sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 8px;
}
.segment-sector-button {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 12px 28px 12px 12px;
  text-align: left;
  color: #566777;
  background: #fff;
  border: 1px solid #cdd7df;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}
.segment-sector-button strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.segment-sector-button small {
  font-size: 10px;
}
.segment-sector-check {
  position: absolute;
  top: 12px;
  right: 10px;
  font-size: 16px;
}
.segment-sector-button[aria-pressed="true"] {
  background: #e9f8ef;
  border-color: #279b61;
  color: #126d40;
  box-shadow: inset 0 0 0 1px #279b6120;
}
.segment-sector-button:hover:not(:disabled) {
  border-color: #16894f;
}
.segment-sector-button:focus-visible,
.segment-launcher:focus-visible {
  outline: 3px solid #409c74;
  outline-offset: 3px;
}
.segment-sector-button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.option-caption {
  display: flex;
  align-items: center;
  gap: 6px;
}
.option-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  margin: 0;
  border: 1px solid #b7c7d3;
  border-radius: 50%;
  background: #f8fbfd;
  color: #516a7c;
  font:
    650 11px/1 system-ui,
    sans-serif;
  cursor: help;
}
.option-info:hover,
.option-info:focus-visible {
  border-color: #247f59;
  color: #126d40;
  outline: 2px solid #b5ddc7;
  outline-offset: 2px;
}
.option-info-tooltip {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(280px, calc(100vw - 20px));
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #bdcfdb;
  border-radius: 12px;
  background: #fff;
  color: #2b4558;
  box-shadow: 0 8px 28px #233e5c26;
  font:
    12px/1.55 system-ui,
    sans-serif;
  text-align: left;
}
.segment-sector-choice,
.segment-format-action,
.segment-unsegmented-action {
  position: relative;
  min-width: 0;
}
.segment-sector-choice > .segment-sector-button {
  width: 100%;
  height: 100%;
  padding-bottom: 24px;
}
.segment-sector-choice > .option-info {
  position: absolute;
  right: 8px;
  bottom: 8px;
}
.segment-picker-toolbar > [role="status"] {
  margin-left: auto;
}
.segment-check > label {
  cursor: pointer;
}
.segment-check > .option-info {
  margin-left: auto;
}
.segment-suggest-action {
  display: flex;
  align-items: center;
  gap: 5px;
}
.segment-download-help {
  position: absolute;
  top: -10px;
  right: -5px;
  z-index: 3;
}
.segment-unsegmented-action > .option-info {
  position: absolute;
  right: 8px;
  top: 19px;
}
.segment-unsegmented-action .segment-unsegmented-download {
  padding-right: 34px;
}
.segment-format-action {
  display: flex;
}
.segment-format-action > .button {
  width: 100%;
}
.segment-bambu-menu-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
#segmentBambuMenu .segment-bambu-menu-row > .option-info {
  display: inline-flex;
  width: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid #b7c7d3;
  border-radius: 50%;
  font-size: 11px;
  text-align: center;
}
.segment-export-bar {
  flex: none;
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid #b8c8d6;
  background: #f9fcfd;
  box-shadow: 0 -8px 20px #274c3a08;
}
.segment-export-bar p {
  margin: 0;
  color: #516579;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.segment-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.segment-export-actions .button {
  margin: 0;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 12px;
}
.segment-bambu-action {
  position: relative;
  display: flex;
  min-width: 0;
}
.segment-export-actions .segment-bambu-action > .button {
  border-radius: 10px 0 0 10px;
  white-space: normal;
}
#segmentBambuOptions {
  min-width: 30px;
  border: 1px solid #1768cb;
  border-radius: 0 10px 10px 0;
  background: #1768cb;
  color: white;
  cursor: pointer;
}
#segmentBambuOptions:disabled {
  opacity: 0.5;
  cursor: wait;
}
#segmentBambuMenu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 12;
  min-width: 245px;
  padding: 5px;
  border: 1px solid #ccd8e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 35px #233e5c30;
}
#segmentBambuMenu[hidden] {
  display: none;
}
#segmentBambuMenu button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: transparent;
  color: #344b60;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
#segmentBambuMenu button[aria-checked="true"] {
  background: #e9f8ef;
  color: #126d40;
  font-weight: 650;
}
#segmentBambuMenu button:hover,
#segmentBambuMenu button:focus-visible {
  outline: 2px solid #279b61;
  outline-offset: -2px;
}
.segment-export-bar {
  position: relative;
  z-index: 2;
}
.setting-group .segment-unsegmented-download {
  width: 100%;
  margin-top: 8px;
  min-height: 42px;
  background: #198653;
  border: 1px solid #137545;
  color: #fff;
}
.setting-group .segment-unsegmented-download:hover {
  background: #137545;
}
.segment-workspace .advanced-fields > summary {
  min-height: 36px;
}
.segment-workspace .segment-plate-map svg {
  max-width: 120px;
}
@media (max-width: 1000px) {
  .segment-workspace {
    position: relative;
    inset: auto;
    width: 100%;
    height: min(80dvh, 900px);
    margin-top: 12px;
    border-radius: 16px;
  }
}
@media (max-width: 760px) {
  #segmentBambuMenu {
    left: 0;
    right: auto;
    min-width: min(245px, calc(100vw - 90px));
  }
  .segment-workspace .segmentation-panel {
    padding: 10px;
  }
  .segment-workspace .segment-panel-card,
  .segment-workspace .segment-header-card {
    padding: 10px;
  }
  .segment-export-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .segment-export-actions .button {
    min-height: 44px;
    padding: 8px 3px;
    font-size: 11px;
  }
  .segment-export-bar {
    padding: 10px;
  }
  .segment-picker-toolbar {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .segment-sector-button {
    transition: none;
  }
}
.segment-header-card,
.segment-panel-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #3d527624;
  background: #ffffffb3;
  box-shadow:
    0 2px 10px #253c590a,
    inset 0 1px 0 #fff;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.segment-division-panel {
  background: linear-gradient(160deg, #ffffffcf, #f3f7fcbf);
  border-color: #2f68ab29;
}
.segment-panel-head {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid #3d52761a;
}
.segmentation-panel .eyebrow {
  margin: 0;
}
.segmentation-panel h3,
.segment-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.2px;
  color: #24354a;
}
.segment-panel-subtitle {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #5c6f86;
}
.segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.segment-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 6px;
  min-width: 0;
}
.segment-field > span {
  grid-column: 1 / -1;
  color: #455b74;
  font-size: 11px;
  font-weight: 550;
}
.segment-field input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid #3d52763d;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.segment-field.wide {
  grid-template-columns: 1fr;
}
.segment-field select,
.segment-parts select {
  width: 100%;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid #3d52763d;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.segment-field small {
  color: #63748b;
  font-size: 10px;
}
.segment-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-weight: 550;
  color: #2f435a;
  cursor: pointer;
}
.segment-check input[type="checkbox"] {
  margin: 0;
  accent-color: #2573cb;
}
.segment-suggest {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef4fb;
  border: 1px solid #ceddf0;
}
.segment-suggestion-note {
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #edf5ff;
  color: #255489;
}
.segment-preview {
  display: grid;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid #3d527617;
}
.segment-preview input[type="range"] {
  width: 100%;
}
.segment-plate-map {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.segment-plate-map svg {
  width: min(100%, 180px);
  height: auto;
}
.segment-plate-ground {
  fill: #eef3f9;
  stroke: #9fb0c5;
  stroke-width: 1.5;
}
.segment-plate-label {
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #24354a;
}
.segment-summary {
  margin: 0;
  padding: 6px 9px;
  border-radius: 8px;
  background: #eef3f9;
  font-weight: 600;
  font-size: 11px;
  color: #24354a;
}
.segment-status {
  margin: 0;
  padding: 7px 10px;
  border-radius: 9px;
  background: #e9f5ec;
  border: 1px solid #c5e3cc;
  color: #235c2e;
  line-height: 1.4;
}
.segment-status.error {
  background: #fbe7e4;
  border-color: #f1c0b9;
  color: #a3261b;
  font-weight: 600;
}
.segment-issues {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.segment-issues li {
  padding: 6px 8px;
  border-radius: 8px;
  line-height: 1.4;
  background: #fbf3e1;
  color: #6b4508;
}
.segment-issues li.error {
  background: #fbe7e4;
  color: #a3261b;
}
.segment-parts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.segment-parts li {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 11px;
  border: 1px solid #3d52761c;
  background: #f4f7fb;
  min-width: 0;
}
.segment-part-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.segment-part-head input[type="checkbox"] {
  margin: 0;
  accent-color: #2573cb;
}
.segment-part-head .color-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: none;
}
.segment-part-head small,
.segment-facts {
  color: #63748b;
  font-size: 10px;
  line-height: 1.4;
}
.segment-plate {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e3ecf7;
  color: #365273;
  font-weight: 600;
}
.segment-part-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.segment-bambu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.segment-bambu-icon {
  width: 12px;
  height: 15px;
  flex: none;
  display: block;
}
.segment-pane-export,
.segment-skeleton-export,
.segment-template-export {
  flex: 1 1 auto;
  justify-content: center;
  margin: 0;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
}
.segment-stale {
  color: #a3261b;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}
.segment-joints,
.segment-steps {
  margin: 6px 0 0;
  padding-left: 16px;
  display: grid;
  gap: 3px;
  font-size: 11px;
  line-height: 1.4;
}
.segment-joints {
  list-style: none;
  padding-left: 0;
}
.segment-exports {
  display: grid;
  gap: 10px;
}
.segment-export-group {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #3d527617;
}
.segment-export-group.segment-export-bulk {
  padding-top: 0;
  border-top: 0;
}
.segment-export-label {
  font-size: 11px;
  font-weight: 600;
  color: #425873;
}
.segment-export-pair {
  display: grid;
  gap: 6px;
}
.segment-exports .small-note {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.4;
}
.segment-blocked {
  color: #6b4508;
}

/* ADR-0001: swatch wizard, My swatches, and what a pane will print */

/* Shared small controls ------------------------------------------------------------------ */
.swatch-link-button {
  padding: 2px 0;
  border: 0;
  background: none;
  color: #1768cb;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.swatch-link-button:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.swatch-link-button.is-danger {
  color: #a93a30;
}
.swatch-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e7edf5;
  color: #45546b;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.swatch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.swatch-wizard-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.45;
}
.swatch-wizard-alert > span {
  flex: 1 1 200px;
  min-width: 0;
}
.swatch-wizard-alert.info {
  background: #eaf2fb;
  border-color: #1768cb1f;
  color: #24466f;
}
.swatch-wizard-alert.warning {
  background: #fdf5e4;
  border-color: #b4811a2e;
  color: #6b4508;
}
.swatch-wizard-alert.error {
  background: #fdeeec;
  border-color: #a93a302e;
  color: #7f2a22;
}
.swatch-wizard-alert ul {
  flex: 1 1 100%;
  display: grid;
  gap: 5px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.swatch-wizard-alert li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
}
.swatch-wizard-alert .swatch-link-button {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.swatch-fix-row {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.swatch-fix-row .button {
  margin: 0;
  padding: 7px 11px;
  font-size: 11px;
}

/* Dialog shell --------------------------------------------------------------------------- */
.swatch-wizard-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 900px;
  max-width: calc(100vw - 40px);
  height: 660px;
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  color: #293c55;
  background: #f8fafff5;
  border: 1px solid #fff;
  border-radius: 27px;
  box-shadow:
    0 32px 120px #142d4d40,
    0 4px 20px #23395414,
    inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
}
.swatch-wizard-dialog[open] {
  animation: settings-arrive 160ms ease-out;
}
.swatch-wizard-dialog::backdrop {
  background: #18314c35;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.swatch-wizard-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}
.swatch-wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 12px;
}
.swatch-wizard-title {
  min-width: 0;
}
.swatch-wizard-title .eyebrow {
  margin: 0 0 4px;
}
.swatch-wizard-title h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.swatch-wizard-subtitle {
  margin: 3px 0 0;
  color: #627086;
  font-size: 12px;
  line-height: 1.4;
}
.swatch-wizard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.swatch-draft-status {
  color: #627086;
  font-size: 11px;
  white-space: nowrap;
}
.swatch-draft-status.is-unsaved {
  color: #8a5a06;
  font-weight: 600;
}
.swatch-draft-status.is-quiet {
  visibility: hidden;
}
.swatch-wizard-steps {
  padding: 0 24px 12px;
  border-bottom: 1px solid #34557a1a;
}
.swatch-wizard-steps[hidden],
.swatch-wizard-rail[hidden] {
  display: none;
}
.swatch-wizard-steps ol {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.swatch-wizard-steps li {
  flex: 1 1 0;
  min-width: 0;
}
.swatch-wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  padding: 4px 8px 4px 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5b6b81;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.swatch-wizard-step-tab:hover {
  background: #e9eff6;
}
.swatch-wizard-step-num {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  height: 24px;
  border-radius: 50%;
  background: #e4eaf2;
  color: #45546b;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.swatch-wizard-step-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swatch-wizard-step-tab.active {
  background: #e3eefb;
  color: #124f9b;
  font-weight: 650;
}
.swatch-wizard-step-tab.active .swatch-wizard-step-num {
  background: #1768cb;
  color: #fff;
}
.swatch-wizard-step-tab.has-error .swatch-wizard-step-num {
  background: #c2453a;
  color: #fff;
}
.swatch-wizard-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  min-height: 0;
}
.swatch-wizard-main:has(> .swatch-wizard-rail[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
.swatch-wizard-body {
  min-width: 0;
  min-height: 0;
  padding: 18px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.swatch-wizard-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 18px 18px 20px;
  overflow-y: auto;
  border-left: 1px solid #34557a1a;
  background: #eef3f980;
}
.swatch-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid #34557a1a;
  background: #ffffff66;
}
.swatch-wizard-footer-left,
.swatch-wizard-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.swatch-wizard-footer-right {
  margin-left: auto;
}
.swatch-wizard-footer .button {
  margin: 0;
  padding: 9px 16px;
  font-size: 13px;
  white-space: nowrap;
}
.swatch-wizard-footer .button:disabled {
  opacity: 0.45;
}
.swatch-wizard-footer .swatch-link-button {
  margin-right: 6px;
}

/* Step content --------------------------------------------------------------------------- */
.swatch-wizard-step-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.swatch-step-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.005em;
  line-height: 1.25;
  outline: none;
}
.swatch-step-lead {
  margin: -8px 0 2px;
  color: #627086;
  font-size: 12px;
  line-height: 1.5;
}
.swatch-replace-prompt {
  display: grid;
  gap: 8px;
  max-width: 480px;
}
.swatch-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  align-content: start;
}
.swatch-field-label {
  display: block;
  color: #45546b;
  font-size: 12px;
  font-weight: 600;
}
.swatch-field-hint {
  margin: 0;
  color: #627086;
  font-size: 11px;
  line-height: 1.4;
}
.swatch-field-error {
  margin: 0;
  color: #a93a30;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.swatch-field-error[hidden] {
  display: none;
}
.swatch-wizard-dialog .select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 7px 10px;
  box-sizing: border-box;
  font-size: 13px;
}
.swatch-wizard-dialog .select.invalid {
  border-color: #c2453a;
  box-shadow: 0 0 0 3px #c2453a1a;
}
.swatch-input {
  position: relative;
  min-width: 0;
}
.swatch-input.has-unit .select {
  padding-right: 44px;
  font-variant-numeric: tabular-nums;
}
.swatch-input-unit {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: #637187;
  font-size: 11px;
  pointer-events: none;
}
.swatch-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.swatch-field-grid.is-thirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.swatch-color-input {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px;
}
.swatch-color-input input[type="color"] {
  width: 38px;
  height: 36px;
  padding: 2px;
  border: 1px solid #536d8c1c;
  border-radius: 10px;
  background: #f0f3f8;
  cursor: pointer;
}
.swatch-stepper {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 4px;
}
.swatch-stepper button {
  min-height: 36px;
  border: 1px solid #536d8c1c;
  border-radius: 10px;
  background: #ffffffad;
  color: #41536a;
  font-size: 16px;
  cursor: pointer;
}
.swatch-stepper .select {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.swatch-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.swatch-preset {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 9px 4px;
  border: 1px solid #536d8c1c;
  border-radius: 12px;
  background: #ffffffad;
  color: #41536a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.swatch-preset small {
  color: #627086;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.swatch-preset:hover,
.swatch-stepper button:hover {
  background: #fff;
}
.swatch-preset[aria-pressed="true"] {
  border-color: #1768cb;
  background: #e3eefb;
  color: #124f9b;
  box-shadow: inset 0 0 0 1px #1768cb;
}
.swatch-preset[aria-pressed="true"] small {
  color: #2a619f;
}
.swatch-disclosure {
  border-top: 1px solid #34557a1a;
  padding-top: 10px;
  min-width: 0;
}
.swatch-disclosure summary {
  color: #45546b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.swatch-disclosure[open] > summary {
  margin-bottom: 10px;
}
.swatch-disclosure > * + * {
  margin-top: 10px;
}
.swatch-facts,
.swatch-rail-facts,
.swatch-review-list {
  margin: 0;
}
.swatch-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #eef3f9;
}
.swatch-facts dt,
.swatch-rail-facts dt,
.swatch-review-list dt {
  color: #627086;
  font-size: 11px;
}
.swatch-facts dd {
  margin: 1px 0 0;
  font-size: 13px;
  font-weight: 600;
}
.swatch-fieldset {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.swatch-fieldset legend {
  margin-bottom: 6px;
  padding: 0;
}

/* Choosing ------------------------------------------------------------------------------- */
.swatch-segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: #e7edf5;
}
.swatch-segment {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
.swatch-segment input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.swatch-segment span {
  display: block;
  padding: 7px 8px;
  border-radius: 9px;
  color: #45546b;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.swatch-segment input:checked + span {
  background: #fff;
  color: #124f9b;
  box-shadow: 0 1px 3px #253c5920;
}
.swatch-segment input:focus-visible + span {
  outline: 3px solid #3485e0;
  outline-offset: 1px;
}
.swatch-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #eef3f9;
}
.swatch-identity .swatch-identity-tile {
  flex: 0 0 38px;
  width: 38px;
  border-radius: 9px;
  cursor: default;
}
.swatch-identity .swatch-identity-tile:hover {
  outline: none;
  transform: none;
}
.swatch-identity-text {
  flex: 1 1 auto;
  display: grid;
  gap: 1px;
  min-width: 0;
}
.swatch-identity-text strong {
  font-size: 13px;
}
.swatch-identity-text small {
  color: #627086;
  font-size: 11px;
}
.swatch-filament-sections {
  display: grid;
  gap: 12px;
}
.swatch-filament-sections h4 {
  margin: 0 0 7px;
  color: #536e88;
  font-size: 11px;
  font-weight: 600;
}
.swatch-filament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 7px;
}
.swatch-choice-list {
  display: grid;
  gap: 8px;
}
.swatch-choice-card,
.swatch-switch-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #536d8c1c;
  border-radius: 13px;
  background: #ffffffad;
  cursor: pointer;
}
.swatch-choice-card:hover,
.swatch-switch-card:hover {
  background: #fff;
}
.swatch-choice-card input,
.swatch-switch-card input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1768cb;
}
.swatch-choice-card:has(input:checked) {
  border-color: #1768cb;
  background: #f0f6fe;
  box-shadow: inset 0 0 0 1px #1768cb;
}
.swatch-switch-card:has(input:checked) {
  border-color: #1768cb66;
  background: #f0f6fe;
}
.swatch-choice-card.is-unavailable {
  background: transparent;
  color: #627086;
  cursor: default;
}
.swatch-choice-card.is-current {
  border-color: #b4811a66;
}
.swatch-choice-text {
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.swatch-choice-text strong {
  font-size: 13px;
  font-weight: 600;
}
.swatch-choice-text small {
  color: #627086;
  font-size: 11px;
  line-height: 1.4;
}
.swatch-type-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 32px;
  color: #627086;
}

/* Review --------------------------------------------------------------------------------- */
.swatch-photo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.swatch-photo img {
  width: 72px;
  height: 72px;
  border-radius: 11px;
  object-fit: cover;
}
.swatch-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.swatch-photo-actions .button {
  margin: 0;
  padding: 8px 13px;
  font-size: 12px;
}
.swatch-review-list {
  display: grid;
  border-radius: 13px;
  background: #eef3f9;
}
.swatch-review-list > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 8px 13px;
}
.swatch-review-list > div + div {
  border-top: 1px solid #34557a14;
}
.swatch-review-list dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.swatch-apply-target {
  padding: 0 2px 2px;
}

/* Preview rail --------------------------------------------------------------------------- */
.swatch-rail-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.swatch-rail-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.swatch-rail-title strong {
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.swatch-rail-title small {
  color: #627086;
  font-size: 11px;
  line-height: 1.35;
}
.swatch-rail-section {
  padding: 6px 2px;
  border-radius: 12px;
  background: #fff;
}
.swatch-rail-facts {
  display: grid;
  gap: 7px;
}
.swatch-rail-facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
}
.swatch-rail-facts dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.swatch-rail-note {
  margin: 0;
  color: #8a5a06;
  font-size: 11px;
  line-height: 1.4;
}
.swatch-rail-warnings {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #6b4508;
  font-size: 11px;
  line-height: 1.4;
}

/* Swatch previews, also used by the library ---------------------------------------------- */
.swatch-split-tile {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid #31485c33;
  border-radius: 10px;
}
.swatch-split-tile.is-large {
  width: 56px;
  height: 56px;
  border-radius: 13px;
}
.swatch-split-tile > span {
  display: block;
  min-width: 0;
}
.swatch-split-tile > .is-lit {
  background-color: #14171d;
}
.swatch-split-tile.is-clear > span:first-child,
.swatch-light-sample.is-clear {
  background-image: linear-gradient(
    135deg,
    #bed3e155 25%,
    transparent 25%,
    transparent 75%,
    #bed3e155 75%
  );
  background-size: 10px 10px;
}
.swatch-evidence-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fbf0d9;
  color: #6b4508;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}
.swatch-evidence-badge.status-validated_optics {
  background: #e2f3e6;
  color: #1c5a2c;
}
.swatch-evidence-badge.status-photo_reference {
  background: #e7edf5;
  color: #36485f;
}
.swatch-evidence-badge.status-approximate_override {
  background: #fde6dc;
  color: #7a3413;
}
.swatch-section {
  display: block;
  width: 100%;
  height: auto;
}
.swatch-section-frame {
  fill: #d4dce6;
}
.swatch-section-solid {
  stroke: #1f304226;
  stroke-width: 0.5;
}
.swatch-section-ray {
  fill: none;
  stroke: #d59a1f;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.swatch-section-note {
  fill: #45546b;
  font-size: 13px;
  font-weight: 600;
}
.swatch-section-layer {
  stroke: #ffffffb3;
  stroke-width: 0.8;
}
.swatch-section-dim {
  fill: none;
  stroke: #627086;
  stroke-width: 0.8;
}
.swatch-section-bed {
  stroke: #627086;
  stroke-width: 1;
}
.swatch-section-bed-label {
  fill: #627086;
  font-size: 12px;
}
.swatch-wizard-light-preview {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.swatch-light-heading {
  display: flex;
}
.swatch-light-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.swatch-light-tile,
.swatch-light-mini {
  margin: 0;
  min-width: 0;
}
.swatch-light-sample {
  display: block;
  height: 86px;
  border: 1px solid #31485c33;
  border-radius: 12px;
}
.swatch-light-sample.is-lit {
  border-color: #0b0f15;
  background-color: #14171d;
}
.swatch-light-tile figcaption,
.swatch-light-mini figcaption {
  display: grid;
  gap: 1px;
  margin-top: 5px;
  color: #45546b;
  font-size: 11px;
  font-weight: 600;
}
.swatch-light-tile small,
.swatch-light-mini small {
  color: #627086;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.swatch-light-hint {
  margin: 0;
}
.swatch-light-compare {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.swatch-light-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 7px;
}
.swatch-light-mini .swatch-light-sample {
  height: 40px;
  border-radius: 9px;
}
.swatch-light-mini.is-current .swatch-light-sample {
  outline: 2px solid #1768cb;
  outline-offset: 2px;
}
.swatch-light-mini.is-current figcaption {
  color: #124f9b;
}

/* Color picker --------------------------------------------------------------------------- */
.pane-color-swatch-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.pane-color-swatch-section-header h3 {
  margin-top: 0;
}
.picker-open-wizard-btn {
  flex-shrink: 0;
  font-size: 11px;
}
.pane-swatch-rows {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}
.pane-swatch-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pane-swatch-row:hover,
.pane-swatch-row:focus-visible {
  background: #eaf0f7;
}
.pane-swatch-row[aria-pressed="true"] {
  border-color: #1768cb;
  background: #e3eefb;
}
.pane-swatch-row .swatch-split-tile {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.pane-swatch-row-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.pane-swatch-row-text strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pane-swatch-row-text small {
  overflow: hidden;
  color: #627086;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pane-color-swatch .pane-swatch-mini-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  z-index: 1;
  padding: 0 3px;
  border-radius: 5px;
  background: #1f3042;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 12px;
  pointer-events: none;
}
.has-swatch-preview {
  position: relative;
  padding: 0;
}
.has-swatch-preview > .swatch-split-tile {
  display: grid;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
}
.pane-color-swatch.has-swatch-preview::after {
  display: none;
}
.pane-color-swatch.has-swatch-preview .pane-swatch-mini-badge {
  top: 1px;
  left: 1px;
  right: auto;
  bottom: auto;
  font-size: 7px;
  line-height: 10px;
}
.pane-swatch-id {
  position: absolute;
  right: 1px;
  bottom: 1px;
  padding: 0 2px;
  border-radius: 3px;
  background: #172d43e8;
  color: #fff;
  font-size: 7px;
  font-weight: 650;
  line-height: 10px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Palette tab: batch thickness and My swatches ------------------------------------------- */
#paletteDimensionConfirm {
  margin-top: 12px;
}
#paletteDimensionConfirm .swatch-wizard-alert {
  margin: 0;
}
.palette-recipe-batch {
  margin-top: 16px;
  border-top: 1px solid #34557a18;
  padding-top: 12px;
}
.palette-recipe-batch summary {
  color: #45546b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.palette-recipe-batch .field-hint {
  margin: 8px 0 10px;
}
.palette-recipe-batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.swatch-checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: #45546b;
  font-size: 12px;
  cursor: pointer;
}
.swatch-checkbox-inline input {
  margin: 0;
  accent-color: #1768cb;
}
.my-swatches-section {
  margin-top: 18px;
  border-top: 1px solid #34557a18;
  padding-top: 14px;
  min-width: 0;
}
.my-swatches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.my-swatches-header .palette-custom-title {
  margin: 0;
}
#mySwatchesNotice {
  margin-bottom: 8px;
}
.my-swatches-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.my-swatch-empty {
  margin: 0;
}
.my-swatch-undo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  padding: 8px 11px;
  border-radius: 11px;
  background: #24364c;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
}
.my-swatch-undo > span {
  flex: 1 1 140px;
  min-width: 0;
}
.my-swatch-undo .swatch-link-button {
  color: #a9cfff;
}
.my-swatch-draft,
.my-swatch-card {
  min-width: 0;
  border: 1px solid #34557a1a;
  border-radius: 13px;
  background: #ffffff8c;
}
.my-swatch-draft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-style: dashed;
  border-color: #1768cb59;
}
.my-swatch-draft .my-swatch-text {
  flex: 1 1 110px;
}
.my-swatch-draft .button {
  margin: 0;
  padding: 7px 12px;
  font-size: 11px;
}
.my-swatch-card {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.my-swatch-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.my-swatch-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.my-swatch-text strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.my-swatch-text small {
  color: #627086;
  font-size: 10px;
  line-height: 1.35;
}
.my-swatch-version {
  color: #627086;
  font-size: 10px;
  font-weight: 500;
}
.my-swatch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.my-swatch-use {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #ffffffeb;
  border-radius: 10px;
  background: #ffffffc7;
  color: #2c507d;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow:
    0 1px 4px #253c5910,
    inset 0 1px 0 #fff;
  cursor: pointer;
}
.my-swatch-use:hover {
  background: #fff;
}
.my-swatch-use[aria-expanded="true"] {
  background: #e3eefb;
  color: #124f9b;
}
.my-swatch-tools {
  display: flex;
  gap: 1px;
  margin-left: auto;
}
.my-swatch-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5b6b81;
  cursor: pointer;
}
.my-swatch-icon:hover {
  background: #e7edf5;
  color: #293c55;
}
.my-swatch-assign {
  display: grid;
  gap: 6px;
  border-top: 1px solid #34557a14;
  padding-top: 8px;
}
.my-swatch-assign[hidden] {
  display: none;
}
.my-swatch-assign .swatch-wizard-alert,
.my-swatch-assign .field-hint {
  margin: 0;
}
.my-swatch-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.my-swatch-group-tile {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #31485c33;
  border-radius: 8px;
  color: #45546b;
  font-size: 15px;
  cursor: pointer;
}
.my-swatch-group-tile:hover {
  outline: 2px solid #30475b;
  outline-offset: 2px;
}
.my-swatch-group-tile.is-new {
  border-style: dashed;
  background: transparent;
}
.my-swatches-io {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
}
.my-swatches-io .swatch-link-button {
  font-size: 11px;
}

/* Inspector: what this pane will print --------------------------------------------------- */
.selected-recipe {
  display: grid;
  justify-items: start;
  gap: 5px;
  margin: 10px 0 2px;
}
.selected-recipe strong {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.selected-recipe-issues {
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  color: #6b4508;
  font-size: 11px;
  line-height: 1.4;
}
.selected-recipe-issues[hidden] {
  display: none;
}

/* Narrow screens: a full sheet whose stepper names only the current step ------------------ */
@media (max-width: 760px) {
  .swatch-wizard-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .swatch-wizard-header {
    padding: 14px 16px 8px;
  }
  .swatch-wizard-title h2 {
    font-size: 17px;
  }
  .swatch-wizard-steps {
    padding: 0 16px 8px;
  }
  .swatch-wizard-steps li {
    flex: 0 0 auto;
  }
  .swatch-wizard-steps li:has(.active) {
    flex: 1 1 auto;
  }
  .swatch-wizard-step-tab {
    padding-right: 5px;
  }
  .swatch-wizard-step-tab:not(.active) .swatch-wizard-step-label {
    display: none;
  }
  .swatch-wizard-main {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .swatch-wizard-body {
    padding: 14px 16px 20px;
    overflow: visible;
  }
  .swatch-wizard-rail {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 9px 16px;
    overflow: visible;
    border-left: 0;
    border-bottom: 1px solid #34557a1a;
  }
  .swatch-wizard-rail .swatch-rail-head {
    flex: 1 1 100%;
  }
  .swatch-wizard-rail .swatch-split-tile.is-large {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .swatch-wizard-rail .swatch-rail-section,
  .swatch-wizard-rail .swatch-rail-facts {
    display: none;
  }
  .swatch-wizard-rail .swatch-rail-note,
  .swatch-wizard-rail .swatch-rail-warnings {
    flex: 1 1 100%;
  }
  .swatch-wizard-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  .swatch-wizard-footer-left:empty {
    display: none;
  }
  .swatch-wizard-footer-right {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .swatch-wizard-footer-right .swatch-link-button {
    margin-right: auto;
  }
  .swatch-wizard-footer .button {
    padding: 9px 14px;
  }
}
@media (max-width: 460px) {
  .swatch-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .swatch-field-grid.is-thirds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .swatch-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .swatch-identity {
    flex-wrap: wrap;
  }
  .swatch-review-list > div {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .swatch-review-list dt {
    grid-column: 1;
  }
  .swatch-review-list dd {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .swatch-review-list .swatch-link-button {
    grid-column: 2;
    grid-row: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .swatch-wizard-dialog[open] {
    animation: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .swatch-wizard-dialog {
    background: #f8faff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .swatch-wizard-dialog::backdrop {
    background: #18314c66;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Browser-local filament collection and a nonmodal review beside the lamp. */
.owned-filaments {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #ddd8ce;
  border-radius: 12px;
}
.owned-filaments summary {
  cursor: pointer;
  font-weight: 650;
}
#ownedFilamentCount {
  font-size: 12px;
  font-weight: 400;
  margin-left: 8px;
}
.collection-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.collection-filters label {
  display: grid;
  gap: 4px;
  flex: 1 1 100px;
  font-size: 12px;
}
.collection-filters label:first-child {
  flex-basis: 100%;
}
.collection-filters input,
.collection-filters select,
.review-group select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #bdb8ad;
  border-radius: 7px;
  background: #fff;
  color: #252923;
  padding: 8px;
  font: inherit;
}
.owned-filament-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
  max-height: 330px;
  overflow-y: auto;
}
.owned-filament-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dedbd4;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.owned-filament-tile:has(input:checked) {
  border-color: #687958;
  background: #eaf0e3;
}
.owned-filament-tile input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: #52633f;
}
.owned-filament-tile small {
  display: block;
  margin-top: 3px;
  color: #61665c;
}
.collection-chip {
  display: block;
  flex: 0 0 24px;
  height: 28px;
  border: 1px solid #0002;
  border-radius: 4px;
}
.collection-error {
  color: #8c3921;
  font-size: 12px;
  margin: 8px 0;
}
.collection-error button {
  margin: 8px;
}
.palette-card {
  display: flex;
  flex-direction: column;
}
.palette-adapt {
  align-self: stretch;
  padding: 8px 6px;
  font-size: 11px;
  line-height: 1.4;
}
#adaptCurrentPalette {
  margin: 8px 0;
  max-width: 100%;
  white-space: normal;
}
.filament-review {
  position: fixed;
  z-index: 160;
  right: 16px;
  top: 80px;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid #c5c8bc;
  border-radius: 16px;
  background: #f8f8f3;
  color: #252923;
  box-shadow: 0 12px 48px #0003;
  font:
    14px/1.5 system-ui,
    sans-serif;
}
.filament-review[hidden] {
  display: none;
}
.filament-review header {
  display: flex;
  align-items: start;
  gap: 12px;
  justify-content: space-between;
}
.filament-review h2 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0;
}
.filament-review h3 {
  font-size: 14px;
  margin: 0 0 10px;
}
.filament-review button {
  min-height: 40px;
  cursor: pointer;
  border: 1px solid #a8af9c;
  background: #fff;
  color: #293321;
  border-radius: 7px;
  padding: 7px 12px;
  font: inherit;
}
.filament-review button:disabled {
  cursor: default;
  opacity: 0.45;
}
.filament-review button[aria-pressed="true"] {
  background: #e0ead7;
  border-color: #5b7045;
}
.review-toggle {
  display: flex;
  gap: 6px;
}
.review-group {
  border-top: 1px solid #d4d8cb;
  padding: 14px 0;
}
.review-group label {
  display: block;
  font-size: 12px;
  margin: 10px 0 4px;
}
.review-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.review-comparison i {
  display: block;
  height: 28px;
  border-radius: 5px;
  border: 1px solid #0002;
  margin-bottom: 5px;
}
.filament-review footer {
  position: sticky;
  bottom: -20px;
  display: flex;
  justify-content: end;
  gap: 8px;
  background: #f8f8f3;
  border-top: 1px solid #d4d8cb;
  padding: 12px 0;
}
.filament-review :focus-visible,
.owned-filaments :focus-visible {
  outline: 3px solid #627c48;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .filament-review-open .settings-panel,
  .filament-review-open .right-panel {
    visibility: hidden;
    pointer-events: none;
  }
  .filament-review {
    top: auto;
    bottom: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: 48dvh;
    padding: 16px;
  }
  .filament-review footer {
    bottom: -16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .filament-review,
  .owned-filaments {
    scroll-behavior: auto;
    transition: none;
    animation: none;
  }
}

.assembly-pdf-controls {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #dbe0e5);
}
.assembly-pdf-controls label {
  font-size: 12px;
  font-weight: 600;
}
.assembly-pdf-controls select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #d3d9df;
  border-radius: 7px;
  background: #fff;
  color: #253447;
}
.assembly-pdf-controls [hidden] {
  display: none;
}
.assembly-pdf-controls .small-note:empty {
  display: none;
}
.package-pdf-controls input[type="text"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #d3d9df;
  border-radius: 7px;
  background: #fff;
  color: #253447;
}
.filament-review-open #notificationCenter,
.filament-review-open #generationProgress {
  inset: 12px auto auto 50%;
  transform: translateX(-50%);
  max-height: 112px;
  overflow-y: auto;
}

/* Editor switch: two link tiles in the hidden logo rail, one for each editor. */
.editor-page .topbar .editor-switch {
  display: grid;
  gap: 6px;
  width: 100%;
}
.editor-page .topbar .editor-tile {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 2px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #516b83;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}
.editor-page .topbar .editor-tile svg {
  width: 24px;
  height: 24px;
}
.editor-page .topbar .editor-tile:hover {
  background: #eef4fa;
  color: #23405c;
}
.editor-page .topbar .editor-tile:focus-visible {
  outline: 2px solid #3f7ab8;
  outline-offset: 2px;
}
.editor-page .topbar .editor-tile[aria-current="page"] {
  background: #e4eef8;
  border-color: #bcd2e6;
  color: #1c3a57;
  cursor: default;
}
@media (max-width: 760px) {
  .editor-page .topbar .editor-tile {
    min-height: 48px;
    font-size: 10px;
  }
  .editor-page .topbar .editor-tile svg {
    width: 20px;
    height: 20px;
  }
}
/* The rail now holds more than short screens can show. */
@media (max-height: 520px) {
  .editor-page .topbar {
    overflow-y: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .editor-page .topbar .editor-tile {
    transition: none;
  }
}

/* Algorithm choices stay visible while switching between Pattern tools. */
.pattern-algorithms {
  margin-bottom: 18px;
}
.pattern-algorithms > strong {
  font-size: 12px;
}
.pattern-algorithms > .field-hint {
  margin: 5px 0 10px;
}
.pattern-algorithm-choices {
  display: flex;
  gap: 12px;
}
.pattern-algorithm {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 2px solid #c8d2db;
  border-radius: 12px;
  background: #fffdf7;
  color: #203246;
  cursor: pointer;
  box-shadow: 0 2px 6px #22364d0d;
}
.pattern-algorithm > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #28343e;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pattern-algorithm-label {
  position: absolute;
  inset: auto 0 0;
  padding: 25px 5px 10px;
  background: linear-gradient(transparent, #fffdf7f5 42%);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.pattern-algorithm-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #1768cb;
  color: white;
  font-size: 14px;
  line-height: 23px;
  text-align: center;
}
.pattern-algorithm[aria-pressed="true"] {
  border-color: #1768cb;
  box-shadow: 0 0 0 2px #1768cb24;
}
.pattern-algorithm[aria-pressed="true"] .pattern-algorithm-check {
  display: block;
}
.pattern-algorithm:hover {
  border-color: #1768cb;
}
.pattern-algorithm:focus-visible {
  outline: 3px solid #1768cb;
  outline-offset: 3px;
}
.pattern-algorithms .pattern-tile-count {
  margin: 16px 0 6px;
}
.pattern-tile-count-status {
  font-weight: 600;
  color: #375d83;
}

/* Glass recipe illustration and printable coupon sizes. */
.swatch-texture-preview {
  margin: 0;
  width: 100%;
}
.swatch-texture-preview svg {
  display: block;
  border-radius: 12px;
  border: 1px solid #34557a26;
}
.swatch-texture-preview figcaption {
  margin-top: 6px;
  font-size: 11px;
  color: #53667e;
}
.swatch-sample-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}
.swatch-sample-buttons button {
  min-height: 44px;
}
@media (max-width: 760px) {
  .swatch-texture-preview {
    max-width: 240px;
    flex: 1 1 100%;
  }
  .swatch-sample-buttons {
    flex: 1 1 100%;
  }
}

/* Calibration uses the same compact fields as the export sidebar. */
#clickFitControls {
  min-width: 0;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}
#clickFitControls legend {
  padding: 0 4px;
  font-size: 11px;
  font-weight: 600;
}
#clickFitControls label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 11px;
}
#clickFitControls input,
#clickFitControls select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px;
  color: inherit;
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}
#clickFitControls p {
  color: inherit;
}
#clickFitControls button {
  width: 100%;
  white-space: normal;
}
#clickFitControls #clickFitPresetStatus {
  margin: 10px 0 8px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
