/* Изолированные стили маршрута /configurator/. Префикс: .configurator-page */

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

.page-shell.page-shell--cfg {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-shell.page-shell--cfg > main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.configurator-page {
  --cfg-topbar-h: 52px;
  --cfg-site-header-height: 64px;
  isolation: isolate;
  contain: layout style;
  box-sizing: border-box;
  flex: 1 1 auto;
  height: calc(100dvh - var(--cfg-site-header-height));
  min-height: calc(100dvh - var(--cfg-site-header-height));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: clip;
  padding: 0;
  max-width: 100vw;
}

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

.configurator-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: 0 0 12px;
  max-width: 100%;
}

.configurator-desktop-only {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cfg-system-banner {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(120, 180, 255, 0.35);
  background: rgba(80, 140, 255, 0.1);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.cfg-draft-restored {
  margin: 0;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(160, 220, 160, 0.35);
  background: rgba(80, 160, 90, 0.12);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}

.cfg-structure-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.cfg-structure-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cfg-structure-item-btn {
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(70px, auto) minmax(0, 0.95fr) 16px;
  align-items: center;
  gap: 6px;
  word-break: normal;
}

.cfg-structure-item-btn.is-active {
  border-color: rgba(217, 0, 18, 0.52);
  background: rgba(217, 0, 18, 0.1);
  box-shadow: inset 0 0 0 1px rgba(217, 0, 18, 0.34);
}

.cfg-row-status-end {
  display: inline-flex;
  min-width: 16px;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.cfg-row-col {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfg-row-col--title {
  font-weight: 600;
}

.cfg-row-col--qty {
  color: rgba(255, 255, 255, 0.78);
  text-align: right;
}

.cfg-row-col--attrs {
  color: rgba(255, 255, 255, 0.6);
}

.cfg-row-add-btn {
  flex: 0 0 auto;
  padding: 6px 10px;
}

.cfg-count-label {
  display: block;
  max-width: 200px;
}

.cfg-count-input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: inherit;
}

.cfg-package-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cfg-package-row .mini-button.is-active {
  border-color: rgba(217, 0, 18, 0.55);
  background: rgba(217, 0, 18, 0.18);
  color: #fff;
}

.cfg-valid-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.cfg-valid-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.cfg-valid-actions .button,
.cfg-valid-actions .button-secondary {
  justify-content: center;
}

.cfg-rule-hint {
  margin-top: 0;
}

.cfg-quote-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}

.cfg-quote-panel--compact {
  padding: 10px 12px;
  margin-bottom: 10px;
}

.cfg-quote-sub {
  margin: 8px 0 0;
  font-size: 12px;
}

.cfg-quote-warn {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #ffb4a8;
}

.cfg-quote-total-line strong {
  min-width: 0;
  word-break: break-word;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.cfg-quote-sub--compact {
  margin-top: 6px;
}

.cfg-subheading {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.cfg-access-system,
.cfg-video-system {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.cfg-video-system--mobile {
  margin-bottom: 14px;
}

.cfg-access-field {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.cfg-access-field:last-child {
  margin-bottom: 0;
}

.cfg-access-field--checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.cfg-access-field--checkbox input {
  margin-top: 3px;
  flex-shrink: 0;
}

.cfg-access-field--toggle span {
  font-weight: 600;
}

.cfg-access-field--segmented-control {
  display: grid;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.cfg-segmented-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px rgba(0, 0, 0, 0.18);
  padding: 2px;
  overflow: hidden;
}

.cfg-segmented-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.cfg-segmented-option + .cfg-segmented-option::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.cfg-segmented-option:hover {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
}

.cfg-segmented-option.is-active {
  border-color: rgba(217, 0, 18, 0.46);
  background: linear-gradient(180deg, rgba(217, 0, 18, 0.24), rgba(217, 0, 18, 0.12));
  color: rgba(255, 255, 255, 0.96);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(217, 0, 18, 0.24), 0 4px 12px rgba(0, 0, 0, 0.14);
}

.cfg-segmented-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.cfg-segmented-option input:focus-visible + span {
  outline: 2px solid rgba(217, 0, 18, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

.cfg-segmented-option span {
  display: block;
  min-width: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.cfg-param-grid--zone > .cfg-access-field--segmented-control {
  grid-column: span 2;
}

.cfg-access-field-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}

.cfg-access-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.cfg-access-select {
  width: 100%;
  max-width: 100%;
}

.cfg-count-input option,
.cfg-count-input optgroup,
.cfg-access-select option,
.cfg-access-select optgroup {
  color: rgba(245, 247, 255, 0.94) !important;
  background: #121521 !important;
}

.cfg-count-input option:disabled,
.cfg-access-select option:disabled {
  color: rgba(255, 255, 255, 0.42);
}

.cfg-count-input option:checked,
.cfg-access-select option:checked {
  color: #ffffff !important;
  background: rgba(217, 0, 18, 0.35) !important;
  box-shadow: inset 0 0 0 999px rgba(217, 0, 18, 0.35);
  -webkit-text-fill-color: #ffffff;
}

.cfg-count-input option:hover,
.cfg-count-input option:focus,
.cfg-access-select option:hover,
.cfg-access-select option:focus {
  color: #ffffff !important;
  background: rgba(217, 0, 18, 0.28) !important;
  box-shadow: inset 0 0 0 999px rgba(217, 0, 18, 0.28);
  -webkit-text-fill-color: #ffffff;
}

.cfg-access-capacity {
  margin-top: 6px;
  font-size: 13px;
}

.configurator-topbar {
  flex: 0 0 auto;
  min-height: 48px;
  max-height: 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  position: sticky;
  top: 0;
  z-index: 20;
}

.configurator-topbar-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.configurator-topbar-spacer {
  flex: 1 1 auto;
  min-width: 8px;
}

.configurator-mode-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.configurator-mode-switch button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  cursor: pointer;
}

.configurator-mode-switch button.is-active {
  background: linear-gradient(180deg, rgba(217, 0, 18, 0.28), rgba(217, 0, 18, 0.12));
  color: #fff;
}

.configurator-topbar .mini-button,
.configurator-topbar .button-secondary {
  font-size: 12px;
  padding: 8px 12px;
  white-space: nowrap;
}

.configurator-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: minmax(340px, 37fr) minmax(560px, 45fr) minmax(300px, 22fr);
  gap: 8px;
  overflow: hidden;
}

.configurator-grid > aside,
.configurator-grid > section {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow-y: hidden;
  overflow-x: hidden;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(18, 18, 21, 0.92);
}

.editor-panel {
  position: relative;
  overflow-y: auto !important;
}

.editor-panel.editor-panel--with-corner-add > h2 {
  padding-right: 140px;
  min-height: 28px;
}

.structure-panel h2,
.editor-panel h2,
.summary-panel h2 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.25;
}

.cfg-empty-hint {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.cfg-starter-actions {
  display: grid;
  gap: 10px;
}

.cfg-starter-actions--editor-corner {
  position: absolute;
  top: 10px;
  right: 12px;
  margin: 0;
  z-index: 4;
  width: auto;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.cfg-starter-actions--editor-corner .button,
.cfg-starter-actions--editor-corner .button-secondary {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.cfg-starter-actions--editor-center {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfg-editor-empty-center {
  min-height: clamp(260px, 52vh, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.cfg-editor-empty-center .cfg-empty-hint {
  margin: 0;
}

.cfg-add-zone-center-btn {
  min-height: 42px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
}

.cfg-starter-actions .button,
.cfg-starter-actions .button-secondary {
  justify-content: center;
}

.cfg-editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cfg-editor-actions--top {
  margin-top: 0;
  margin-bottom: 10px;
}

.cfg-spec-wrap {
  display: grid;
  gap: 10px;
}

.cfg-spec-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
}

.cfg-spec-group summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.cfg-spec-lines {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.cfg-spec-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, auto) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.cfg-spec-line-title {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
}

.cfg-spec-line-metrics {
  font-size: 12px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.65);
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}

.cfg-mini-edit {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 8px;
  min-width: 28px;
  min-height: 28px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.cfg-spec-edit-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.cfg-spec-edit-panel--active {
  border-color: transparent;
  background: transparent;
  padding: 0;
}

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

.cfg-param-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cfg-param-group-title {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
}

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

.cfg-param-grid--disk-main {
  grid-template-columns: minmax(210px, 1fr) minmax(170px, 0.72fr);
  grid-template-areas:
    "days capacity"
    "hours capacity";
  column-gap: 14px;
  align-items: start;
}

.cfg-param-grid--disk-main .cfg-access-field--disk-archive-days {
  grid-area: days;
}

.cfg-param-grid .cfg-access-field--disk-archive-days .cfg-access-field-label {
  color: rgba(255, 255, 255, 0.84);
}

.cfg-param-grid--disk-main .cfg-access-field--disk-archive-hours {
  grid-area: hours;
}

.cfg-param-grid--disk-main .cfg-access-field--disk-capacity {
  grid-area: capacity;
  align-self: stretch;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.cfg-param-grid--disk-main .cfg-access-field--disk-archive-hours .cfg-count-input {
  text-align: center;
}

.cfg-param-hint--disk-choice {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.7);
}

.cfg-access-field--disk-stepper .cfg-access-field-label {
  margin-bottom: 4px;
}

.cfg-disk-stepper {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 6px;
}

.cfg-disk-stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(217, 0, 18, 0.95);
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.cfg-disk-stepper-btn:hover {
  color: #ff3b4d;
}

.cfg-disk-stepper-btn:focus-visible {
  outline: 2px solid rgba(217, 0, 18, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

.cfg-disk-stepper-input {
  text-align: center;
  padding: 0 8px;
}

.cfg-disk-stepper-input::-webkit-outer-spin-button,
.cfg-disk-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cfg-disk-stepper-input[type="number"] {
  -moz-appearance: textfield;
}

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

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

.cfg-zone-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.cfg-zone-headline .cfg-empty-hint {
  margin: 0;
  line-height: 1.35;
  flex: 1 1 auto;
}

.cfg-zone-topline {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
  flex: 0 0 auto;
  margin-top: -2px;
}

.cfg-zone-count-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cfg-zone-count-inline .cfg-access-field-label {
  margin-right: 2px;
}

.cfg-zone-count-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(217, 0, 18, 0.95);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.cfg-zone-count-step:hover {
  color: #ff3b4d;
}

.cfg-zone-count-step:focus-visible {
  outline: 2px solid rgba(217, 0, 18, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

.cfg-zone-count-value {
  width: 38px;
  min-height: 34px;
  margin-top: 0;
  padding: 0;
  text-align: center;
  border-radius: 13px;
}

.cfg-zone-count-value::-webkit-outer-spin-button,
.cfg-zone-count-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cfg-zone-count-value[type="number"] {
  -moz-appearance: textfield;
}

.cfg-zone-topline .cfg-count-input {
  margin-top: 0;
}

.cfg-zone-fieldset .cfg-access-field {
  margin-bottom: 6px;
}

.cfg-zone-fieldset .cfg-access-field--video-mp {
  grid-column: span 2;
}

.cfg-zone-fieldset .cfg-count-input {
  min-height: 36px;
  margin-top: 4px;
  padding: 0 10px;
}

.cfg-param-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.cfg-apply-prominent {
  min-width: 128px;
  font-weight: 700;
  border-color: rgba(217, 0, 18, 0.52);
  background: linear-gradient(180deg, rgba(217, 0, 18, 0.32), rgba(217, 0, 18, 0.16));
}

.cfg-seed-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(217, 0, 18, 0.35);
  background: rgba(217, 0, 18, 0.08);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.summary-panel .cfg-muted {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.summary-panel .cfg-price-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 6px;
}

.cfg-summary-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.cfg-summary-kpi {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.cfg-summary-kpi span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.58);
}

.cfg-summary-kpi strong {
  font-size: 16px;
  color: #fff;
}

@media (min-width: 1680px) {
  .cfg-param-grid,
  .cfg-param-grid--zone {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1400px) {
  .cfg-zone-groups {
    grid-template-columns: 1fr;
  }

  .cfg-zone-topline {
    justify-content: stretch;
  }

  .cfg-zone-headline {
    flex-wrap: wrap;
    margin-bottom: 4px;
  }

  .cfg-zone-count-inline {
    width: 100%;
    justify-content: flex-end;
  }

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

  .cfg-segmented-option {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .cfg-param-grid--disk-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "days"
      "hours"
      "capacity";
  }

  .cfg-param-grid--disk-main .cfg-access-field--disk-capacity {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 0;
    padding-top: 6px;
  }
}

.summary-panel [data-cfg-summary-total] {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.cfg-toast-host {
  position: fixed;
  right: 18px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 80;
  pointer-events: none;
}

.cfg-toast {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(217, 0, 18, 0.45);
  background: rgba(26, 26, 30, 0.95);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cfg-toast.is-out {
  opacity: 0;
  transform: translateY(6px);
}

@media (max-width: 1100px) {
  .configurator-desktop-only .configurator-grid {
    grid-template-columns: minmax(250px, 36fr) minmax(340px, 44fr) minmax(220px, 20fr);
  }
}

@media (max-width: 1350px) {
  .configurator-desktop-only .configurator-grid {
    grid-template-columns: minmax(290px, 36fr) minmax(430px, 44fr) minmax(260px, 20fr);
  }
}

/* Отдельный mobile shell вместо desktop-колонок */
.cfg-mobile-shell {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  --cfg-m-top: 52px;
  --cfg-m-progress: 40px;
  --cfg-m-bottom: 72px;
}

.cfg-mobile-topbar {
  flex: 0 0 var(--cfg-m-top);
  height: var(--cfg-m-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.cfg-mobile-kp {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

.cfg-mobile-icon-btn {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.cfg-mobile-progress {
  flex: 0 0 var(--cfg-m-progress);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 6px 2px 0;
}

.cfg-mobile-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cfg-mobile-progress-track {
  display: flex;
  gap: 6px;
}

.cfg-mobile-dot {
  flex: 1 1 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.cfg-mobile-dot.is-active {
  background: rgba(217, 0, 18, 0.75);
}

.cfg-mobile-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 8px 0 10px;
}

.cfg-step-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(18, 18, 21, 0.92);
  overflow: auto;
}

.cfg-step-card[hidden] {
  display: none !important;
}

.cfg-step-card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.cfg-step-card-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
}

.cfg-step-card-micro {
  margin: 0;
  font-size: 13px;
}

.cfg-mobile-mode-switch {
  align-self: flex-start;
}

.cfg-mobile-inline-link {
  align-self: flex-start;
  margin-top: 4px;
}

.cfg-mobile-bottom {
  flex: 0 0 var(--cfg-m-bottom);
  min-height: var(--cfg-m-bottom);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 max(6px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cfg-mobile-nav-btn {
  flex: 1 1 0;
  min-height: 48px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .configurator-desktop-only {
    display: none !important;
  }

  .cfg-mobile-shell {
    display: flex !important;
  }

  .configurator-shell {
    gap: 10px;
  }
}

@media (min-width: 761px) {
  .cfg-mobile-shell {
    display: none !important;
  }
}

.configurator-page > .container {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  width: min(2200px, calc(100vw - 8px));
  min-width: 0;
  max-width: 100%;
  padding-left: 4px;
  padding-right: 4px;
  overflow: hidden;
}

@media (min-width: 761px) and (max-height: 920px) {
  .configurator-shell {
    gap: 8px;
    padding-bottom: 8px;
  }

  .cfg-system-banner,
  .cfg-draft-restored {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 12px;
    line-height: 1.35;
  }

  .configurator-topbar {
    min-height: 50px;
    gap: 8px 10px;
    padding: 6px 10px;
  }

  .configurator-grid {
    gap: 8px;
  }

  .configurator-grid > aside,
  .configurator-grid > section {
    padding: 8px 10px;
    border-radius: 8px;
  }

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

  .cfg-param-grid--zone,
  .cfg-summary-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cfg-summary-split {
    grid-template-columns: 1fr;
  }

  .cfg-structure-item-btn {
    grid-template-columns: minmax(0, 1fr) minmax(64px, auto) minmax(0, 0.85fr) 16px;
  }

  .structure-panel h2,
  .editor-panel h2,
  .summary-panel h2 {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .cfg-empty-hint {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.35;
  }

  .cfg-starter-actions--editor-corner {
    top: 8px;
    right: 10px;
  }

  .cfg-starter-actions--editor-center {
    margin-bottom: 0;
  }

  .cfg-editor-empty-center {
    min-height: clamp(180px, 44vh, 360px);
    gap: 8px;
  }
}

/* Печатный лист КП (fallback для печати/PDF) */
.cfg-print-sheet {
  box-sizing: border-box;
}

.configurator-host-page {
  min-height: calc(100dvh - 120px);
  padding: 10px 0 12px;
  background: transparent;
}

.configurator-host-page--wide {
  min-height: calc(100dvh - 92px);
}

.configurator-embed-container {
  min-height: 0;
}

.configurator-embed-container--wide {
  width: min(1920px, calc(100vw - 20px));
  max-width: min(1920px, calc(100vw - 20px));
}

.configurator-embed-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.configurator-embed-card--wide {
  border-radius: 0;
}

.configurator-embed-title {
  display: none;
}

.configurator-embed-frame {
  width: 100%;
  min-height: 760px;
  height: calc(100dvh - 138px);
  border: 0;
  border-radius: 0;
  display: block;
  background: transparent;
}

@media (max-width: 1200px) {
  .configurator-embed-container--wide {
    width: min(1400px, calc(100vw - 14px));
    max-width: min(1400px, calc(100vw - 14px));
  }

  .configurator-embed-frame {
    min-height: 700px;
    height: calc(100dvh - 126px);
  }
}

.configurator-embed-fallback {
  margin: 10px 0 0;
}

.cfg-print-sheet[hidden] {
  display: none !important;
}

@media screen {
  .cfg-print-sheet:not([hidden]) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
  }
}

.cfg-print-sheet-inner h1 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.cfg-print-sheet-inner h2 {
  margin: 16px 0 8px;
  font-size: 15px;
}

.cfg-print-sheet-inner ul {
  margin: 0;
  padding-left: 1.2em;
}

.cfg-print-sheet-inner li {
  margin-bottom: 4px;
}

.cfg-print-meta,
.cfg-print-note {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
}

@media print {
  @page {
    margin: 14mm;
  }

  body * {
    visibility: hidden;
  }

  .cfg-print-sheet:not([hidden]),
  .cfg-print-sheet:not([hidden]) * {
    visibility: visible;
  }

  .cfg-print-sheet:not([hidden]) {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    background: #fff !important;
    color: #111 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cfg-print-sheet-inner h1 {
    font-size: 18pt;
    color: #000 !important;
  }

  .cfg-print-sheet-inner h2,
  .cfg-print-sheet-inner p,
  .cfg-print-sheet-inner li {
    color: #111 !important;
  }
}
