@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --graphite: #2d2b2b;
  --accent: #f51906;
  --action: #dd1908;
  --accent-dark: #c91c10;
  --accent-light: #fff1ef;
  --surface-neutral: #f7f7f7;
  --muted: #625e5c;
  --line: #e4e1e0;
  --radius: 5px;
  font-family: Montserrat, Arial, sans-serif;
  color: var(--graphite);
  background: white;
  color-scheme: light;
  accent-color: var(--accent-dark);
}

.stage {
  background: radial-gradient(ellipse at 50% 43%, #fcfbfa, #f3f1ef 78%, #eeecea);
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, .surface-swatches button:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}

h1, h2, .brand strong { font-weight: 750; }
.prototype, .intro, .room-summary, .stage-footer, .custom-surface,
.fit-filter, .catalog-meta, .catalog-empty, .catalog-card small, .catalog-card .product-size,
.finish-colors span, .decor-colors span, .project-cost > span, .project-cost small,
.part-price-detail, .selection-heading, .selection-fields label, .selection-panel > p,
.door-controls small, .flow-muted, .flow-dialog label:not(.flow-check), .flow-check,
.library-note, .library-card small, .divider-row label {
  color: var(--muted);
}

.button, .flow-primary, .fit-button, .zoom-buttons,
.cost-actions button, .dialog-close, .catalog-category, .catalog-card,
.editor-steps button, .wall-actions button, .layout-tools button,
.project-cost, .mounting-panel, .surface-controls, .number-field,
.flow-dialog input:not([type=checkbox]), .flow-dialog textarea,
.catalog-selection select, #catalog-group, #catalog-depth, #catalog-search,
.selection-fields input, .door-controls input[type=number] {
  border-radius: var(--radius);
}

.header-actions .primary, .flow-primary, .cost-actions button:last-child {
  color: white;
  background: var(--action);
  border-color: var(--action);
}

.header-actions .primary:hover, .flow-primary:hover, .cost-actions button:last-child:hover {
  background: #a7190e;
  border-color: #a7190e;
}

.button.subtle, .continue-button, .fit-button, .zoom-buttons button, .dialog-close,
.catalog-drawer-heading button, .layout-tools button, .cost-actions button,
.selection-actions button, .selection-heading button, .wall-actions button,
.catalog-flyout .catalog-add, .share-link-row button, #add-basket-divider,
.library-close, .library-card-actions button {
  color: var(--graphite);
  background: var(--surface-neutral);
  border-color: var(--line);
}

.catalog-flyout .catalog-add, .continue-button {
  color: var(--accent-dark);
  background: var(--accent-light);
}

.editor-steps, .catalog-finishes, .door-controls, .stage-footer,
.selection-panel, .share-result, #basket-divider-controls { border-color: var(--line); }
.workspace { grid-template-rows: auto minmax(0, 1fr); }
.workspace > .editor-steps {
  grid-column: 1 / -1;
  order: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 138px));
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  background: #fff;
}
.workspace > .editor-steps button {
  min-width: 0;
  min-height: 40px;
  padding: 7px 8px;
  color: var(--graphite);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.workspace > .editor-steps button:disabled { color: var(--muted); opacity: 1; }
.workspace > .editor-steps button.active { color: var(--accent-dark); }

.catalog-mode .layout-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, 32px);
  gap: 4px;
}
.catalog-mode .layout-tools button { min-width: 0; }
.catalog-mode .layout-tools #clear-all {
  min-height: 38px;
  padding: 4px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.editor-steps button:focus-visible, .catalog-mode .layout-tools button:focus-visible {
  outline-offset: -3px;
}

.editor-steps .active, .catalog-category.active {
  color: var(--accent-dark);
  background: var(--accent-light);
  border-color: #efa69f;
  box-shadow: inset 3px 0 var(--accent);
}

.catalog-category, .surface-controls, .project-cost, .mounting-panel, .shared-copy-note {
  color: var(--graphite);
  background: var(--surface-neutral);
  border-color: var(--line);
}

.catalog-category-label {
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.catalog-category.active { color: var(--accent-dark); }

.catalog-order-panel .project-cost { width: 260px; background: #fff; }
.project-cost > span {
  color: var(--graphite);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.project-cost strong, .catalog-order-panel .project-cost strong {
  font-size: 24px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
}
.project-cost small { font-size: 11px; font-weight: 550; }
.project-cost .cost-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}
.project-cost .cost-actions button {
  min-height: 36px;
  padding: 6px 5px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.project-cost .cost-actions button:last-child { font-weight: 700; }
.project-cost .cost-actions button:disabled {
  opacity: 1;
  background: #eee;
  border-color: #dedbd9;
  color: var(--muted);
  cursor: default;
}
.catalog-order-panel .mounting-panel { background: #fff; }
.catalog-order-panel .mounting-panel summary { font-size: 13px; font-weight: 700; }
.mounting-panel li { padding-block: 10px; }
.mounting-panel .part-name {
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.mounting-panel .part-price-detail {
  font-size: 11px;
  font-weight: 550;
  color: #55514f;
}
.mounting-panel .part-price-sum {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  align-self: start;
}

.catalog-drawer-heading, .catalog-flyout, .catalog-selection, .catalog-card h3,
.catalog-selection h2, .number-field input, .field label,
.door-controls label, .flow-dialog, .flow-dialog input:not([type=checkbox]),
.flow-dialog textarea, .project-library, .part-price-sum, .mounting-panel .part-price-sum {
  color: var(--graphite);
}

.step-label, .step-label > span, .field label > span, .number-field > span, kbd {
  color: var(--muted);
  border-color: var(--line);
}
.step-label > span, .catalog-card img, th { background: var(--surface-neutral); }
.catalog-card, .catalog-flyout, .catalog-selection, .flow-dialog, .zoom-buttons,
.selection-fields input, .door-controls input[type=number], .catalog-selection select,
#catalog-group, #catalog-depth, #catalog-search, .number-field, .mounting-panel li,
.flow-dialog input:not([type=checkbox]), .flow-dialog textarea, .order-table-wrap,
td, th, .custom-surface input, .library-card, .library-toolbar input, .library-card > input {
  border-color: var(--line);
}

#catalog-group, #catalog-depth, #catalog-search, .selection-fields input,
.door-controls input[type=number], .catalog-selection select, .divider-row input[type=number] {
  color: var(--graphite);
}

.number-field:focus-within {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.project-cost strong, .catalog-product-price, .order-total,
.share-result a, .order-result a, .library-error, .error, #placement-error,
#mounting-error, .flow-error, .layout-tools #clear-all, .selection-actions .danger {
  color: var(--accent-dark);
}

.layout-tools #clear-all, .selection-actions .danger {
  background: var(--accent-light);
  border-color: #f0c4bf;
}

.fit-filter input, .flow-check input, .divider-row input[type=range] {
  accent-color: var(--accent-dark);
}

.finish-colors button, .decor-colors button, .surface-swatches button {
  box-shadow: 0 0 0 1px #d3d0cf;
}

.finish-colors button.active, .decor-colors button.active, .surface-swatches button.active {
  box-shadow: 0 0 0 2px var(--accent-dark);
}

.wall-actions .wall-absent { color: var(--accent-dark); background: var(--accent-light); }
.dimension, .item-dimensions-key { color: var(--graphite); border-color: var(--line); }
.dimension#dim-width, .item-dimensions-button[aria-pressed=true],
.wall-action-label, .toast, .library-open strong {
  color: white;
  background: var(--graphite);
  border-color: var(--graphite);
}

.stage.drop-target { outline-color: var(--graphite); }
.stage.drop-invalid { outline-color: var(--accent-dark); }
.catalog-drag-status { color: var(--graphite); border-color: var(--line); }
.drop-invalid .catalog-drag-status { color: var(--accent-dark); }
.flow-dialog::backdrop, .project-library::backdrop { background: #2d2b2b80; }
.library-card.current { border-color: var(--accent-dark); }
.library-placeholder, .library-open, .project-library, .share-image { background: var(--surface-neutral); }
th, td small { color: var(--muted); }

@media (min-width: 701px) {
  .catalog-mode .workspace { grid-template-columns: 184px minmax(0, 1fr); }
  .catalog-order-panel { width: clamp(260px, 22vw, 320px); }
}

@media (max-width: 700px) {
  .catalog-category-label { font-size: 12px; }
  .catalog-mode .layout-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-mode .layout-tools #clear-all { grid-column: 1 / -1; min-height: 32px; }
  .catalog-order-panel { width: min(244px, calc(100% - 16px)); }
  .catalog-order-panel .project-cost strong { font-size: 22px; }
  .catalog-order-panel .cost-actions { grid-template-columns: auto minmax(0, 1fr); }
  .catalog-order-panel .cost-actions button:first-child { white-space: nowrap; }
  .catalog-order-panel:has(.mounting-panel[open]) { width: min(248px, calc(100% - 16px)); }
}

.brand.titangs-brand { flex-direction: row; align-items: center; gap: 10px; }
.brand.titangs-brand img { width: 54px; height: 54px; }
@media (max-width: 700px) { .brand.titangs-brand img { width: 42px; height: 42px; } }
