:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #071114;
  color: #eaf3f4;
  --surface: #0b171a;
  --surface-raised: #0e1d20;
  --line: #20383d;
  --line-strong: #31565e;
  --muted: #91a5aa;
  --accent: #78c7d3;
  --accent-soft: #15363c;
  --warning: #e0b267;
  --danger: #d98478;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #071114;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.catalog-shell {
  width: min(1680px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px clamp(18px, 3vw, 50px) 52px;
}

.catalog-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.catalog-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-cart-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(190, 198, 210, 0.22);
  border-radius: 6px;
  background: #141519;
  color: #f0f2f5;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.catalog-cart-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.catalog-cart-link strong {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #20232a;
  color: #d7dbe2;
  font-size: 11px;
}

.catalog-cart-link:hover,
.catalog-cart-link.has-items {
  border-color: #555c68;
  background: #20232a;
  color: #ffffff;
}

.home-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(190, 198, 210, 0.22);
  border-radius: 6px;
  background: #141519;
  color: #f0f2f5;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.home-link:hover,
.home-link:focus-visible {
  border-color: #555c68;
  background: #20232a;
  color: #ffffff;
}

.eyebrow,
.model-kicker {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 7px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 0;
}

.catalog-header p,
.excluded-section > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.category-browser {
  padding: 24px 0 4px;
}

.category-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.category-heading h2 {
  margin: 5px 0 0;
  font-size: 21px;
  letter-spacing: 0;
}

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

.category-button,
.category-reset {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: #dce9eb;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.category-button span,
.category-reset {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.category-button strong,
.category-reset strong {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
}

.category-button:hover,
.category-button.is-active,
.category-reset:hover,
.category-reset.is-active {
  border-color: #5d9ba5;
  background: #10262a;
  box-shadow: 0 0 16px rgba(102, 195, 210, 0.1);
}

.category-reset {
  min-width: 150px;
}

.catalog-counts {
  display: none;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.catalog-counts div {
  min-width: 132px;
  padding: 14px 18px;
  background: var(--surface);
}

.catalog-counts strong,
.catalog-counts span {
  display: block;
}

.catalog-counts strong {
  font-size: 23px;
}

.catalog-counts span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 210px 160px auto;
  gap: 12px;
  align-items: end;
  padding: 24px 0;
}

.search-field,
.filter-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: var(--surface);
  color: #edf6f7;
  padding: 0 13px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(120, 199, 211, 0.12);
}

.result-summary {
  min-width: 104px;
  height: 43px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

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

.catalog-toolbar {
  grid-template-columns: minmax(260px, 1fr);
}

.catalog-toolbar .filter-field,
.catalog-toolbar .result-summary {
  display: none;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-height: 420px;
}

.model-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 160ms ease, transform 160ms ease;
}

.model-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.box-preview {
  position: relative;
  height: 156px;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid rgba(198, 170, 111, 0.16);
  border-radius: 6px;
  background: transparent;
  isolation: isolate;
}

.box-preview-image,
.box-preview-live,
.box-preview-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.box-preview-video {
  z-index: 2;
  background: transparent;
}

.box-preview-live {
  z-index: 2;
  background: transparent;
}

.box-preview-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.box-preview.is-live-3d .box-preview-image,
.box-preview.is-live-3d .box-preview-status {
  opacity: 0;
}

.family-options {
  margin: 10px 0 4px;
}

.family-options[hidden] {
  display: none;
}

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

.family-card-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd7d8;
  font-size: 11px;
  line-height: 1.25;
  cursor: pointer;
  transition: color 150ms ease, opacity 150ms ease;
}

.family-card-controls input[type="checkbox"] {
  width: 13px;
  min-width: 13px;
  height: 13px;
  min-height: 13px;
  margin: 0;
  padding: 0;
  border: 1px solid #607479;
  border-radius: 3px;
  accent-color: var(--warning);
  box-shadow: none;
  cursor: pointer;
}

.family-card-controls input:checked + span {
  color: #f6e2b5;
}

.family-card-controls label:has(input:disabled) {
  opacity: 0.42;
  cursor: not-allowed;
}

.preview {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #091518;
}

.preview::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(#1d3438 1px, transparent 1px),
    linear-gradient(90deg, #1d3438 1px, transparent 1px);
  background-size: 24px 24px;
}

.preview-canvas {
  position: absolute;
  inset: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.preview.is-visible .preview-canvas {
  opacity: 1;
  transform: translateY(0);
}

.preview-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(1.45);
}

.preview-loading,
.preview-error {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.preview-loading::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border: 1px solid var(--accent);
  border-right-color: transparent;
  border-radius: 50%;
  animation: preview-spin 900ms linear infinite;
}

@keyframes preview-spin {
  to { transform: rotate(360deg); }
}

.preview-contract {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #0b191c;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.card-content {
  padding: 16px;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-heading h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.status-badge {
  height: fit-content;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.status-badge.scene-unavailable {
  border-color: #66583c;
  color: var(--warning);
}

.status-badge.calculation-timeout {
  border-color: #65423d;
  color: var(--danger);
}

.status-badge.assembly-review {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 6px;
  white-space: normal;
}

.assembly-review-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.model-description {
  min-height: 42px;
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.name-pilot {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
}

.assistant-card-details {
  margin: 8px 0;
  font-size: 12px;
}

.assistant-card-details summary {
  padding: 8px 0;
  color: var(--muted);
  cursor: pointer;
}

.assistant-card-details summary:hover {
  color: var(--text);
}

.assistant-card-details summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.name-pilot div[hidden] {
  display: none;
}

.name-pilot[hidden] {
  display: none;
}

.name-pilot div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(218, 176, 91, 0.16);
}

.name-pilot dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.name-pilot dd {
  margin: 0;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.card-category {
  display: block;
  min-height: 17px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.model-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 15px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.model-meta div {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.model-meta dt {
  color: var(--muted);
  font-size: 10px;
}

.model-meta dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.open-model,
.add-to-cart,
.constructor-header button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #3b6870;
  border-radius: 7px;
  background: #10292e;
  color: #e6f4f6;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.card-actions {
  display: grid;
  gap: 8px;
}

.open-model,
.add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-to-cart {
  min-height: 36px;
  border-color: rgba(198, 170, 111, 0.28);
  background: transparent;
  color: #d7c7a7;
}

.open-model:hover,
.add-to-cart:hover,
.constructor-header button:hover {
  border-color: #70b8c4;
  background: #15353b;
  box-shadow: 0 0 16px rgba(102, 195, 210, 0.14);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 36px;
}

.pagination button {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.pagination button:hover:not(:disabled),
.pagination button.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-buttons {
  display: flex;
  gap: 6px;
}

.excluded-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.excluded-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
}

.excluded-section > p {
  padding: 12px 2px;
  font-size: 13px;
}

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

.excluded-item {
  padding: 12px;
  border: 1px solid #443336;
  border-radius: 6px;
  background: #151315;
}

.excluded-item strong,
.excluded-item span {
  display: block;
}

.excluded-item span {
  margin-top: 4px;
  color: var(--danger);
  font-size: 10px;
}

.constructor-shell {
  height: 100vh;
  background: #071114;
}

.constructor-header {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.constructor-cart-link {
  flex: 0 0 auto;
}

.constructor-header button {
  width: auto;
  padding: 0 16px;
}

.constructor-header div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

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

.constructor-header strong {
  font-size: 16px;
}

#constructorFrame {
  width: 100%;
  height: calc(100vh - 58px);
  display: block;
  border: 0;
  background: #071114;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 70px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .category-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .excluded-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

  .catalog-header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Shared graphite language for the full laboratory catalog. */
:root {
  background: #141519;
  color: #f2f3f5;
  --surface: #141519;
  --surface-raised: #191b20;
  --line: #30343c;
  --line-strong: #4a505b;
  --muted: #9da3ad;
  --accent: #c6a15f;
  --accent-soft: #20232a;
  --warning: #dfb96f;
  --danger: #d98277;
}

body,
.constructor-shell,
#constructorFrame {
  background: #141519;
}

.catalog-header {
  border-bottom-color: rgba(190, 198, 210, 0.18);
}

.eyebrow,
.model-kicker,
.card-category,
.category-button strong,
.category-reset strong,
.preview-contract {
  color: #d7b978;
}

.catalog-header p,
.excluded-section > p,
.search-field,
.filter-field,
.model-description,
.model-meta dt,
.constructor-header span {
  color: #9da3ad;
}

.catalog-counts,
.catalog-counts div,
.catalog-toolbar,
.result-summary,
.category-button,
.category-reset,
.model-card,
.excluded-section summary,
.constructor-header,
.empty-state {
  border-color: rgba(190, 198, 210, 0.16);
  background: #141519;
}

.catalog-counts {
  background: #202228;
}

.category-button,
.category-reset,
.model-card,
.excluded-section summary,
.open-model,
.add-to-cart,
.constructor-header button,
.pagination button,
input,
select {
  border-radius: 6px;
}

.category-button:hover,
.category-button.is-active,
.category-reset:hover,
.category-reset.is-active {
  border-color: #c6a15f;
  background: #20232a;
  box-shadow: 0 0 18px rgba(176, 185, 198, 0.08);
}

input,
select {
  border-color: rgba(190, 198, 210, 0.2);
  background: #141519;
  color: #f2f3f5;
}

input:focus,
select:focus {
  border-color: #c6a15f;
  box-shadow: 0 0 0 3px rgba(176, 185, 198, 0.1);
}

.result-summary {
  color: #f2f3f5;
}

.model-card {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.model-card:hover {
  border-color: #665a45;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
}

.preview {
  border-bottom-color: rgba(190, 198, 210, 0.14);
  background: #111216;
}

.preview::before {
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(139, 150, 165, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 150, 165, 0.22) 1px, transparent 1px);
}

.preview-contract,
.status-badge {
  border-color: #665a45;
  background: #17191e;
}

.status-badge {
  color: #d7b978;
}

.model-meta {
  border-color: rgba(190, 198, 210, 0.12);
}

.model-meta div {
  border-color: rgba(190, 198, 210, 0.12);
}

.open-model,
.constructor-header button,
.pagination button {
  border: 1px solid rgba(190, 198, 210, 0.22);
  background: #141519;
  color: #f0f2f5;
  box-shadow: none;
}

.open-model:hover,
.add-to-cart:hover,
.constructor-header button:hover,
.pagination button:hover:not(:disabled),
.pagination button.is-current {
  border-color: #c6a15f;
  background: #20232a;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(198, 161, 95, 0.1);
}

.excluded-item {
  border-color: rgba(217, 130, 119, 0.32);
  background: #181416;
}

@media (max-width: 560px) {
  .catalog-shell {
    padding: 22px 12px 36px;
  }

  .catalog-counts {
    width: 100%;
  }

  .catalog-counts div {
    flex: 1;
    min-width: 0;
  }

  .catalog-toolbar,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .category-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .category-reset {
    width: 100%;
  }

  .excluded-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-buttons button:nth-child(n+6) {
    display: none;
  }
}

.catalog-toolbar {
  border: 0;
  background: transparent;
}

/* Temporary manual-review controls. The saved registry remains when this bar is removed. */
.constructor-header {
  height: 64px;
  display: grid;
  grid-template-columns: max-content max-content minmax(160px, 1fr) max-content;
  gap: 12px;
  padding: 8px 12px;
}

.constructor-identity {
  min-width: 0;
  overflow: hidden;
}

.constructor-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-review-toolbar {
  display: flex;
  gap: 7px;
  align-items: center;
}

.constructor-header .manual-review-toolbar button {
  min-height: 38px;
  padding: 0 15px;
  white-space: nowrap;
}

.constructor-header .manual-review-toolbar .primary {
  border-color: #c6a15f;
  background: #282218;
  color: #fff5df;
}

.constructor-header .manual-review-toolbar .danger,
.delete-model-dialog .danger {
  border-color: rgba(217, 91, 82, 0.72);
  background: #301718;
  color: #ffd9d5;
}

#reviewSavePose,
#reviewDeleteModel {
  display: none;
}

.constructor-header button:disabled {
  opacity: 0.38;
  cursor: default;
  box-shadow: none;
}

.review-progress {
  display: none;
}

#constructorFrame {
  height: calc(100vh - 64px);
}

.family-configurator {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.4fr) minmax(220px, 0.8fr);
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(198, 170, 111, 0.24);
  background: #111214;
  color: #eee9df;
}

.family-configurator[hidden] {
  display: none;
}

.family-configurator__identity,
.family-configurator__state {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.family-configurator__identity span {
  color: #c6a15f;
  font-size: 10px;
  font-weight: 800;
}

.family-configurator__identity strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.family-configurator__controls button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(198, 170, 111, 0.36);
  border-radius: 6px;
  background: #1b1c1f;
  color: #eee9df;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.family-configurator__controls button:hover,
.family-configurator__controls button.is-active {
  border-color: #c6a15f;
  background: #282218;
  color: #fff5df;
  box-shadow: 0 0 16px rgba(198, 161, 95, 0.13);
}

.family-configurator__controls button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.family-configurator__state {
  justify-items: end;
  text-align: right;
}

.family-configurator__state span {
  font-size: 13px;
  font-weight: 750;
}

.family-configurator__state output {
  color: #b5ada1;
  font-size: 11px;
}

.constructor-shell.has-family-configurator #constructorFrame {
  height: calc(100vh - 136px);
}

.delete-model-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(198, 170, 111, 0.34);
  border-radius: 8px;
  background: #121315;
  color: #f2eee6;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.delete-model-dialog::backdrop {
  background: rgba(3, 4, 5, 0.76);
  backdrop-filter: blur(5px);
}

.delete-model-dialog form {
  padding: 24px;
}

.delete-model-dialog h2 {
  margin: 8px 0 12px;
  font-size: 22px;
}

.delete-model-dialog p {
  margin: 0;
  color: #b5ada1;
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.dialog-actions button {
  width: auto;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(198, 170, 111, 0.38);
  border-radius: 6px;
  background: #1b1c1f;
  color: #eee9df;
}

@media (max-width: 1050px) {
  .constructor-header .manual-review-toolbar button {
    padding: 0 8px;
  }

  .family-configurator {
    grid-template-columns: 1fr 1.35fr;
  }

  .family-configurator__state {
    display: none;
  }

  .constructor-shell.has-family-configurator #constructorFrame {
    height: calc(100vh - 180px);
  }
}

/* The catalog lives over one production-oriented background scene. */
body {
  position: relative;
  isolation: isolate;
  background: #141519;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -3;
  background: url("./assets/korobox-panorama-still.webp") center center / cover no-repeat;
}

body::after {
  z-index: -1;
  background: linear-gradient(112deg, rgba(20, 21, 25, .64), rgba(12, 13, 16, .72));
}

.catalog-panorama {
  position: fixed;
  z-index: -2;
  inset: 0;
  display: block;
  visibility: hidden;
  width: 100%;
  height: 100%;
  filter: brightness(.7) saturate(.68) contrast(.96);
  pointer-events: none;
}

body:has(#catalogView:not([hidden])) .catalog-panorama[data-ready] {
  visibility: visible;
}

.catalog-shell {
  position: relative;
  z-index: 1;
}

.catalog-counts,
.catalog-counts div,
.category-button,
.category-reset,
.model-card,
.excluded-section summary,
.empty-state {
  background: rgba(20, 21, 25, .88);
}

.catalog-toolbar,
.result-summary {
  border-color: transparent;
  background: transparent;
}

.preview { background: rgba(17, 18, 22, .9); }

@media (max-width: 720px) {
  body::before { background-image: url("./assets/korobox-panorama-still-mobile.webp"); }
  body::after { background: rgba(8, 10, 12, .66); }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-panorama { display: none; }
}

@media (max-width: 720px) {
  .constructor-header {
    height: 108px;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    grid-template-rows: 40px 40px;
  }

  .manual-review-toolbar {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .constructor-header .manual-review-toolbar button {
    width: 50%;
  }

  #constructorFrame {
    height: calc(100vh - 108px);
  }

  .constructor-shell.has-family-configurator #constructorFrame {
    height: calc(100vh - 224px);
  }
}

/* Public controls use one neutral graphite palette. */
.catalog-cart-link,
.home-link,
.category-button,
.category-reset,
.open-model,
.add-to-cart,
.constructor-header button,
.pagination button,
.family-configurator__controls button,
.dialog-actions button {
  border-color: rgba(198, 170, 111, 0.28);
  background: #141519;
  color: #f0f2f5;
  box-shadow: none;
}

.catalog-cart-link:hover,
.catalog-cart-link.has-items,
.home-link:hover,
.home-link:focus-visible,
.category-button:hover,
.category-button.is-active,
.category-reset:hover,
.category-reset.is-active,
.open-model:hover,
.add-to-cart:hover,
.constructor-header button:hover,
.pagination button:hover:not(:disabled),
.pagination button.is-current,
.family-configurator__controls button:hover,
.family-configurator__controls button.is-active,
.dialog-actions button:hover {
  border-color: #c6a15f;
  background: #20232a;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(176, 185, 198, 0.08);
}

.catalog-cart-link strong {
  background: #20232a;
  color: #d7b978;
}

@media (max-width: 620px) {
  .constructor-identity span {
    display: none;
  }

  .family-configurator {
    min-height: 116px;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

}
