/* Constructor-specific styles */

/* Единый вид кнопок/полей внутри приложения конструктора (не переопределяем шапку/футер сайта) */
body.constructor-page .constructor-app button,
body.constructor-page .constructor-app input[type="number"],
body.constructor-page .constructor-app input[type="text"],
body.constructor-page .constructor-app select,
body.constructor-page .constructor-app textarea {
  font-family: inherit;
}
body.constructor-page .constructor-app button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
body.constructor-page .modal-overlay button,
body.constructor-page dialog button {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
body.constructor-page .constructor-app input[type="number"],
body.constructor-page .constructor-app input[type="text"] {
  -webkit-appearance: none;
  appearance: none;
}
body.constructor-page .constructor-svg-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}
body.constructor-page .btn.btn-icon > .constructor-svg-icon,
body.constructor-page .btn.btn-icon-outline > .constructor-svg-icon {
  margin: 0 auto;
}

/* Прячем сайтовый футер, когда в конструктор загружены файлы. */
body.constructor-page.constructor-has-files .site-chrome--footer {
  display: none !important;
}

/* Модалка условий: кнопка «Понятно» строго по центру. */
body.constructor-page .system-work-terms-modal .crop-help-modal__actions {
  justify-content: center;
}
body.constructor-page .system-work-terms-modal__body p {
  margin: 0 0 12px;
}
body.constructor-page .system-work-terms-modal__body p:last-child {
  margin-bottom: 0;
}

/* Button icons */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Drop hint */
.drop-hint__text {
  display: block;
  line-height: 1.5;
  white-space: normal;
}

body.sheet-constructor-page .drop-hint__pdf-note {
  display: block;
  margin: 0.2em 0 0.34em;
  font-size: 0.9em;
  line-height: 1.35;
  font-weight: 500;
  color: #667186;
}

.drop-hint__important {
  font-size: 2em;
  font-weight: 700;
  display: block;
  margin: 0.28em 0 0.06em;
  color: #c85a5a;
}

.drop-hint__sheet-limits {
  display: block;
  margin-bottom: 0.45em;
  font-size: 0.95em;
  font-weight: 600;
  color: #1e3a5f;
  line-height: 1.45;
}

.drop-hint__sheet-limits strong {
  font-weight: 700;
}

.drop-hint__link {
  display: inline-flex;
  align-items: center;
  color: #005BFF;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  margin-top: 0.5em;
}

.drop-hint__link:hover {
  color: #0050E0;
}

.drop-hint__link svg {
  margin-left: 6px;
  flex-shrink: 0;
}

.drop-hint__copies {
  display: block;
  margin: 0.5em 0;
}

.drop-hint__copies-mobile {
  display: none;
}

@media (max-width: 768px) {
  .drop-hint__copies-desktop {
    display: none;
  }

  .drop-hint__copies-mobile {
    display: block;
  }

}

/* Зона загрузки: синий при наведении/выборе файла (глобальный --accent в style.css — оранжевый) */
body.constructor-page .drop-hint:hover,
body.constructor-page .drop-hint:focus-within,
body.constructor-page .drop-hint:active {
  border-color: #005BFF;
  color: #005BFF;
}

body.constructor-page .drop-hint:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

body.constructor-page .loading__fill {
  background: linear-gradient(90deg, #005BFF, rgba(0,91,255,.5)) !important;
}
body.constructor-page .loading__bar.loading__bar--indeterminate::before {
  background: linear-gradient(90deg, #e8ecf2 35%, #005BFF 50%, #e8ecf2 65%) !important;
  background-size: 50% 100% !important;
}

/* Выделение файла: синяя обводка (глобальный --accent из style.css — оранжевый, перекрывает layout-tool) */
body.constructor-page .file-card.selected {
  border-color: #005BFF;
}
body.constructor-page .file-card.oversize.selected {
  border-color: #005BFF;
  box-shadow: 0 0 0 1px #005BFF, var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
}
/* Карточка с дырой на листе: зелёный фон + обводка (видно и при выделении) */
body.constructor-page .file-card.can-add {
  background: rgba(76, 175, 80, 0.14);
  border-color: #43a047;
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.38), var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
  transition: background-color 0.2s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
body.constructor-page .file-card.can-add.white-file {
  background: linear-gradient(180deg, rgba(76, 175, 80, 0.16) 0%, rgba(76, 175, 80, 0.08) 100%), var(--beige, #f5f0e8);
}
body.constructor-page .file-card.can-add.selected {
  border-color: #43a047;
  background: rgba(76, 175, 80, 0.2);
  box-shadow:
    0 0 0 2px #005BFF,
    0 0 0 4px rgba(76, 175, 80, 0.5),
    var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
}
body.constructor-page .file-card.duplicate.selected {
  border-color: #005BFF !important;
  box-shadow: 0 0 0 2px #005BFF, var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.08)) !important;
}

/* Export confirmation modal */
.export-confirm-modal {
  text-align: center;
  width: 750px;
  min-width: 550px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
}

.export-confirm__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  line-height: 1.6;
}

.export-confirm__body--centered {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.export-confirm__body--centered > * {
  width: 100%;
  box-sizing: border-box;
}

.export-confirm__text {
  margin-bottom: 1em;
}

.export-confirm__terms-link {
  color: var(--primary, #005bff);
  font-weight: 700;
  text-decoration: underline;
}
.export-confirm__terms-link:hover {
  color: var(--primary-hover, #0048cc);
}

.export-confirm__gap-agreed {
  text-align: center;
  margin: 0.5em 0 1em;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

.export-confirm__edits-list,
.export-confirm__trim-list,
.export-confirm__dpi-list {
  margin: 0.5em 0;
  text-align: left;
  font-size: 13px;
}

.export-confirm__file-row {
  padding: 0.55em 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
  text-align: left;
}

.export-confirm__file-row:last-child {
  border-bottom: none;
}

.export-confirm__mirror-warn {
  text-align: center;
  margin: 0 0 1em;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
}

.export-confirm__attention {
  color: #c00;
  font-weight: 700;
  text-align: center;
  margin: 1em 0 0.5em;
}

.export-confirm__block {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0.8em 0;
  text-align: left;
}

.export-confirm__block-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 0.5em;
  text-align: center;
}

.export-confirm__dpi-list {
  margin: 0;
}

.export-confirm__dpi-warn {
  margin-top: 1em;
  font-size: 13px;
}

.export-confirm__recommend {
  font-weight: 700;
}

.export-confirm__risks {
  margin-top: 1em;
  font-weight: 600;
  text-align: center;
}

.export-confirm__actions {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1em;
  padding-top: 1em;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
  border-top: 1px solid var(--border);
}

.export-confirm__actions .btn-small {
  font-size: 12px;
  padding: 5px 12px;
}

.export-confirm__replace {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  padding: 11px 26px;
  min-height: 44px;
  border: 2px solid var(--primary, #005bff);
  border-radius: 8px;
  background: var(--bg-secondary, #fff);
  color: var(--primary, #005bff);
  box-sizing: border-box;
}

.export-confirm__replace:hover {
  background: var(--primary-light, rgba(0, 91, 255, 0.1));
  border-color: var(--primary-hover, #0048cc);
  color: var(--primary-hover, #0048cc);
}

.export-confirm__submit {
  min-width: 160px;
  padding: 10px 24px;
}

.export-confirm__submit.btn--disabled,
.export-confirm__submit:disabled,
.export-confirm__submit[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Info modal */
.info-modal {
  text-align: center;
  max-width: 380px;
}

.info-modal.info-modal--wide {
  width: min(calc(92vw * 1.22), 928px);
  max-width: min(calc(92vw * 1.22), 928px);
}

.info-modal__text {
  line-height: 1.6;
  margin-bottom: 1em;
}

.info-modal .modal-actions {
  justify-content: center;
}

/* Sheet limits block */
.sheet-limits-block {
  position: sticky;
  top: 0;
  z-index: 2;
  flex-shrink: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
}
.sheet-limits-block__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1976d2;
  text-align: center;
}
.sheet-limits-block__price {
  text-align: center;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.sheet-limits-block__body {
  margin-bottom: 0;
}
.sheet-limits-block__metrics {
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.sheet-limits-block__metrics-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.sheet-limits-block__hint {
  background: #e3f2fd;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 8px 0;
}
.sheet-limits-block__min-order {
  background: #fff3e0;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 8px 0;
}
.sheet-limits-block__meta {
  margin-top: 12px;
  font-size: 14px;
  color: #666;
  border-top: 1px solid #ddd;
  padding-top: 12px;
}
.sheet-limits-block__meta-line2 {
  margin-top: 4px;
}

/*
 * Без sticky: колонка .sheets-col уже смещена margin-top у .main под фикс. информеры и панель настроек;
 * иначе блок «Ограничения» визуально уезжает под эти полосы при прокрутке.
 */
body.constructor-page .sheet-limits-block {
  position: relative;
  z-index: 1;
  top: auto !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
/* layout-tool-local.css (моб.) и konstruktor-local/constructor.css задают sticky — перебиваем на /sheet-constructor */
body.constructor-page.sheet-constructor-page .sheet-limits-block {
  position: relative !important;
  top: auto !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .export-confirm-modal {
    width: min(96vw, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 8px));
    min-width: 0;
    max-width: min(96vw, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 8px));
    max-height: 96vh;
    max-height: 96dvh;
  }
}

/* Cart button - blue */
.btn-cart {
  background: linear-gradient(135deg, #005BFF 0%, #005BFF 100%);
  color: #fff;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: all 0.2s;
}
.btn-cart:hover {
  background: linear-gradient(135deg, #005BFF 0%, #0050E0 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .mobile-footer .btn-cart {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
  }
}

/* Green success button */
.btn-success {
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
  color: #fff;
}
.btn-success:hover {
  background: linear-gradient(135deg, #388E3C 0%, #2e7d32 100%);
}

/* Tech bar inline in toolbar (desktop) */
.tech-bar-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
body.constructor-page:not(.sheet-constructor-page) .constructor-price-row:not(.constructor-price-row--has-files),
.tech-bar-inline:not(:empty),
.tech-bar:not(:empty) {
  --tech-hint-bg: rgba(0, 91, 255, 0.2);
  --tech-hint-ring: rgba(0, 91, 255, 0.35);
  --tech-hint-glow: rgba(0, 91, 255, 0.45);
  --tech-hint-label-color: #005BFF;
}
.tech-bar-inline .tech-bar-label,
.tech-bar .tech-bar-label {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #1e3a8a;
  margin-right: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.2;
  animation: tech-bar-label-hint-color 5s ease-in-out infinite;
}
@keyframes tech-bar-hint-overlay {
  0%, 18%, 100% {
    opacity: 0;
    box-shadow: none;
  }
  5%, 12% {
    opacity: 1;
    background-color: var(--tech-hint-bg);
    box-shadow: inset 0 0 0 2px var(--tech-hint-ring), 0 0 16px var(--tech-hint-glow);
  }
}
@keyframes tech-bar-label-hint-color {
  0%, 18%, 100% {
    color: var(--tech-bar-label-base, #1e3a8a);
    text-shadow: none;
  }
  5%, 12% {
    color: var(--tech-hint-label-color, #005BFF);
    text-shadow: 0 0 8px var(--tech-hint-glow);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.constructor-page:not(.sheet-constructor-page) .constructor-price-row:not(.constructor-price-row--has-files)::before,
  body.constructor-page:not(.constructor-has-files) .tech-bar:not(:empty)::before,
  .tech-bar-inline .tech-bar-label,
  .tech-bar .tech-bar-label {
    animation: none;
  }
}
.tech-bar-inline:empty {
  display: none;
}
.tech-bar-inline .tech-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.tech-bar-inline .tech-btn:hover {
  background: rgba(0,91,255,.06);
  border-color: #005BFF;
}
.tech-bar-inline .tech-btn.active {
  background: linear-gradient(135deg, #005BFF 0%, #0050E0 100%);
  color: #fff;
  border-color: #0050E0;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35);
}

/* Обёртка кнопки прайса + карточка «Ценовая политика» при наведении */
.tech-bar-inline .tech-btn-wrap,
.tech-bar .tech-btn-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 100%;
}
@media (min-width: 769px) {
  .tech-bar-inline .tech-btn-wrap:hover,
  .tech-bar-inline .tech-btn-wrap:focus-within {
    z-index: 5;
  }
}

.price-policy-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 10222;
  width: min(320px, calc(100vw - 24px));
  padding: 18px 20px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #1A1A1A;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.price-policy-tooltip__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.price-policy-tooltip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #4CAF50;
  color: #fff;
  flex-shrink: 0;
}

.price-policy-tooltip__title {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.price-policy-tooltip__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: rgba(0,91,255,.06);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 13px;
}

.price-policy-tooltip__base-val {
  font-weight: 700;
  color: #005BFF;
  white-space: nowrap;
}

.price-policy-tooltip__discounts-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  color: #111827;
}

.price-policy-tooltip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  flex-shrink: 0;
}

.price-policy-tooltip__tiers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.price-policy-tooltip__tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--success-bg, rgba(76,175,80,.1));
  border-radius: 8px;
  font-size: 12px;
}

.price-policy-tooltip__tier--empty {
  justify-content: center;
  color: #666666;
  font-weight: 500;
}

.price-policy-tooltip__tier-val {
  font-weight: 700;
  color: #2e7d32;
  white-space: nowrap;
}

.price-policy-tooltip__footer {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #E0E0E0;
}

.price-policy-tooltip__foot-col {
  flex: 1;
  min-width: 0;
}

.price-policy-tooltip__foot-label {
  font-weight: 700;
  font-size: 12px;
  color: #111827;
  margin-bottom: 2px;
}

.price-policy-tooltip__foot-val {
  font-size: 13px;
  color: var(--text-muted, #999);
}

/* Десктоп: без (hover:hover)+(pointer:fine) — в Safari карточка могла не показываться */
@media (min-width: 769px) {
  .tech-btn-wrap:hover .price-policy-tooltip,
  .tech-btn-wrap:focus-within .price-policy-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* Мобильная полоса прайсов: overflow-x ломает всплывашку; только десктоп с hover */
@media (max-width: 768px) {
  .price-policy-tooltip {
    display: none !important;
  }
  .tech-bar-inline {
    display: none !important;
  }
}

/* ── Встроен в сайт: шапка/футер + смещение фиксированной панели конструктора ── */
html.constructor-page,
body.constructor-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  /* layout-tool задаёт body { overflow:hidden } — модалка цвета на <dialog> (top layer) */
  overflow-y: visible !important;
}
body.constructor-page {
  --constructor-top: calc(env(safe-area-inset-top, 0px) + var(--header-height, 56px));
  --constructor-settings-h: 54px;
  --constructor-price-row-h: 40px;
  --toolbar-h: 0px;
  --stats-h: 0px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg, #f0f2f5);
}
/* Шапка сайта: фиксация к вьюпорту (не уезжает при прокрутке страницы) */
body.constructor-page > .site-chrome--header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Выше .mobile-stats (10218) и нижнего дока (10225), чтобы выпадающее меню не перекрывалось */
  z-index: 10260;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  background: var(--card, #fff);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}
body.constructor-page .header {
  overflow: visible;
  position: relative;
  top: auto;
}
/* konstruktor-local/layout-tool-local.css задаёт устаревший .header{height:48px;…} после style.css — иначе шапка и кнопки отличаются от остальных страниц */
body.constructor-page .site-chrome--header .header {
  height: auto !important;
  max-height: none;
  min-height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0) 16px 0 !important;
  gap: 0 !important;
  border-bottom: none !important;
  box-shadow: var(--shadow-sm) !important;
  display: flex !important;
  align-items: center !important;
  background: var(--card) !important;
}
@media (max-width: 767px) {
  body.constructor-page .header__logo {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
  }
  body.constructor-page .header__mobicons-tray {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
  }
}
body.constructor-page .constructor-app {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  width: 100%;
  margin-top: var(--constructor-top);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 768px) {
  body.constructor-page .constructor-app {
    min-height: calc(100dvh - var(--constructor-top));
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: visible;
  }
}
/* Блок настроек: под полосой прайсов (десктоп) или под stats+tech (мобильный) */
body.constructor-page .constructor-settings-bar {
  display: flex;
  position: fixed;
  top: calc(var(--constructor-top) + var(--constructor-price-row-h));
  left: 0;
  right: 0;
  /* Выше шапки сайта (10200), иначе при заниженном --constructor-top клики уходят в header */
  z-index: 10220;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px;
  background: var(--bg-secondary, #FAFAFA);
  border-bottom: 1px solid var(--border, #E0E0E0);
  font-size: 12px;
  color: var(--text, #1A1A1A);
}
body.constructor-page .constructor-settings-bar > * {
  flex-shrink: 0;
}
@media (max-width: 768px) {
  /* Панель настроек — прилипшая к низу экрана (как нижний док) */
  body.constructor-page .constructor-settings-bar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-bottom: none;
    border-top: 1px solid var(--border, #E0E0E0);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 6px 10px;
    z-index: 10225;
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    overflow-y: visible;
  }
}
body.constructor-page .constructor-settings-bar__ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}
body.constructor-page .constructor-settings-bar__ctrl--check {
  white-space: normal;
  max-width: 200px;
  line-height: 1.25;
}
body.constructor-page .constructor-settings-bar__ctrl--gap {
  gap: 6px;
}
body.constructor-page .constructor-settings-bar__gap-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: normal;
}
body.constructor-page .constructor-settings-bar__gap-label-line {
  display: block;
}
body.constructor-page .constructor-settings-bar__input {
  width: 44px;
  height: 36px;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid var(--border, #E0E0E0);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
}
body.constructor-page .constructor-settings-bar .btn-cart.constructor-settings-bar__cart {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  white-space: nowrap;
  gap: 8px;
  border-radius: 8px;
}
body.constructor-page .constructor-settings-bar .constructor-settings-bar__cart-icon {
  flex-shrink: 0;
  display: block;
}
body.constructor-page .constructor-settings-bar .constructor-settings-bar__order-excel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  white-space: nowrap;
  border-radius: 8px;
  box-sizing: border-box;
}
body.constructor-page .constructor-settings-bar .constructor-settings-bar__order-excel .constructor-svg-icon {
  flex-shrink: 0;
}

/* Синяя обводка кнопок панели конструктора (иконки и корзина) */
body.constructor-page .constructor-settings-bar .btn,
body.constructor-page .mobile-footer .constructor-help-btn.btn {
  border: 1px solid rgba(0,91,255,.35);
  box-sizing: border-box;
}
body.constructor-page .constructor-settings-bar .btn:hover,
body.constructor-page .mobile-footer .constructor-help-btn.btn:hover {
  border-color: #005BFF;
}
body.constructor-page .constructor-settings-bar .btn-cart {
  border-color: rgba(0,91,255,.5);
}
body.constructor-page .constructor-settings-bar .btn-cart:hover {
  border-color: #0050E0;
}

/* Иконки панели — та же высота, что у кнопки W (36px); в моб. футере — та же кнопка «?», что в панели */
body.constructor-page .constructor-settings-bar .btn.btn-icon,
body.constructor-page .mobile-footer .constructor-help-btn.btn.btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
}
body.constructor-page .constructor-settings-bar .btn.btn-icon svg,
body.constructor-page .constructor-settings-bar .btn.btn-icon .constructor-svg-icon,
body.constructor-page .mobile-footer .constructor-help-btn.btn.btn-icon svg,
body.constructor-page .mobile-footer .constructor-help-btn.btn.btn-icon .constructor-svg-icon {
  display: block;
  flex-shrink: 0;
}

/* Как у кнопки «?» в панели: не цвет акцента из .crop-modal__help-btn:hover */
body.constructor-page .mobile-footer .constructor-help-btn.btn.btn-icon:hover {
  background: #fff;
  color: var(--text, #1a1a1a);
}

/* Кнопка справки «?» на панели: квадратная (как другие btn-icon), не круглая из crop-modal__help-btn */
body.constructor-page .constructor-settings-bar .constructor-help-btn.crop-modal__help-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--muted, #666);
  border: 1px solid rgba(0,91,255,.35);
}
body.constructor-page .constructor-settings-bar .constructor-help-btn.crop-modal__help-btn:hover {
  border-color: #005BFF;
  background: #fff;
  color: var(--text, #1a1a1a);
}

/* Обновить раскладку — зелёная обводка, белый фон (как на макете) */
body.constructor-page .constructor-settings-bar #btnRecalc {
  border-color: #4CAF50;
  color: #2e7d32;
  background: #fff;
}
body.constructor-page .constructor-settings-bar #btnRecalc:hover {
  border-color: #388E3C;
  background: var(--success-bg, rgba(76,175,80,.1));
  color: #1b5e20;
}

/* Очистить — красная обводка, белый фон */
body.constructor-page .constructor-settings-bar #btnClear {
  border: 1px solid #f44336;
  border-color: #f44336;
  color: #d32f2f;
  background: #fff;
}
body.constructor-page .constructor-settings-bar #btnClear:hover {
  border-color: #d32f2f;
  background: var(--danger-bg, rgba(244,67,54,.1));
  color: #c62828;
}
body.constructor-page .constructor-settings-bar #btnClear .constructor-svg-icon {
  color: inherit;
}

/* Полоса прайсов: сразу под шапкой (десктоп); на мобиле — techBarMobile */
body.constructor-page .constructor-price-row {
  position: fixed;
  top: var(--constructor-top);
  left: 0;
  right: 0;
  /* Высота задаётся JS (--constructor-price-row-h) по фактическому блоку; иначе при переносе информеров .main уезжает под полосу */
  min-height: 36px;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  /* Выше области листа (.main), чтобы карточка «Ценовая политика» не уходила под контент */
  z-index: 10230;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--border, #E0E0E0);
}
/* Подсветка полосы прайсов — только /constructor (выбор техпараметров), не сводка /sheet-constructor */
body.constructor-page:not(.sheet-constructor-page) .constructor-price-row:not(.constructor-price-row--has-files)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  animation: tech-bar-hint-overlay 5s ease-in-out infinite;
}
body.constructor-page:not(.sheet-constructor-page) .constructor-price-row:not(.constructor-price-row--has-files) > * {
  position: relative;
  z-index: 1;
}
body.constructor-page .constructor-price-row .tech-bar-inline {
  display: flex !important;
  margin-left: 0;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}
body.constructor-page .constructor-price-summary {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1A1A1A);
  text-align: center;
  line-height: 1.35;
}
body.constructor-page .constructor-price-summary:not([hidden]) {
  display: flex;
}
body.constructor-page .constructor-price-summary span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 6px;
  white-space: nowrap;
}
body.constructor-page .constructor-price-summary span.stats-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  padding: 0 1px;
  min-width: 0;
  flex-shrink: 0;
  color: var(--muted, #6b7280);
  font-weight: 600;
  font-size: 1.1em;
  line-height: 1;
  user-select: none;
}
body.constructor-page .constructor-price-summary .stats-sum-hint,
body.constructor-page .constructor-price-row .stats-bar .stats-sum-hint {
  font-weight: 500;
  color: var(--muted, #6b7280);
  white-space: normal;
}
body.constructor-page .constructor-price-row.constructor-price-row--has-files .tech-bar-inline#techBar {
  display: none !important;
}
body.constructor-page .main {
  margin-top: calc(var(--constructor-settings-h) + var(--constructor-price-row-h));
  height: calc(100vh - var(--constructor-top) - var(--constructor-settings-h) - var(--constructor-price-row-h));
  height: calc(100dvh - var(--constructor-top) - var(--constructor-settings-h) - var(--constructor-price-row-h));
  min-height: 0;
  /* Горизонтальный скролл, если min ширины колонок (листы ≥400px + файлы ≥220px) больше окна */
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1 1 auto;
}
body.constructor-page .sheets-col {
  min-height: 0;
}
/* Пустая колонка листов: как карточки раскладки — от верхнего края под панелью (layout-tool центрирует по высоте). */
body.constructor-page .empty-sheets {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px;
  text-align: left;
}
body.constructor-page .empty-sheets .sheet-limits-block {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body.constructor-page .empty-sheets .sheet-limits-block__title {
  text-align: center;
  width: 100%;
}
/* #loader снаружи .constructor-app — на всю ширину viewport (Safari: 100vw + translateZ, без клипа колонкой) */
body.constructor-page #loader.loading {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  top: 0 !important;
  z-index: 20000;
  contain: none;
}
body.constructor-page #loader.loading.loading--cart.active {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  min-width: 100% !important;
  height: auto !important;
  min-height: 100dvh !important;
  z-index: 2147483647;
}
/* /constructor и /sheet-constructor: центрированный overlay-спиннер */
body.constructor-page.constructor-print-page #loader.loading:not(.loading--cart),
body.constructor-page.sheet-constructor-page #loader.loading:not(.loading--cart) {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  /* Ниже тостов (26000): «Триминг всех файлов» и др. видны поверх спиннера раскладки */
  z-index: 20000 !important;
  pointer-events: none !important;
  background: transparent !important;
  animation: none !important;
}
body.constructor-page.constructor-print-page #loader.loading.active:not(.loading--cart),
body.constructor-page.sheet-constructor-page #loader.loading.active:not(.loading--cart) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  animation: none !important;
}
body.constructor-page.constructor-print-page #loader.loading.active:not(.loading--cart) .loading__overlay,
body.constructor-page.sheet-constructor-page #loader.loading.active:not(.loading--cart) .loading__overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}
[data-theme="dark"] body.constructor-page.constructor-print-page #loader.loading.active:not(.loading--cart) .loading__overlay,
[data-theme="dark"] body.constructor-page.sheet-constructor-page #loader.loading.active:not(.loading--cart) .loading__overlay {
  background: rgba(15, 23, 42, 0.45) !important;
}
body.constructor-page.constructor-print-page #loader.loading.active:not(.loading--cart) .loading__spinner,
body.constructor-page.sheet-constructor-page #loader.loading.active:not(.loading--cart) .loading__spinner {
  display: block !important;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
body.constructor-page .loading.loading--cart.active .loading__spinner {
  display: none !important;
}
body.constructor-page .loading.loading--cart.active .loading__overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  min-height: 100dvh !important;
  margin: 0 !important;
}
body.constructor-page .loading.loading--cart.active .loading__card {
  position: relative;
  z-index: 1;
}
/*
 * Info / export: подключён style.css — там .modal-overlay всегда display:flex, но скрыт через
 * opacity:0 + visibility:hidden и показывается классом .active. Конструктор (layout-tool) использует .open.
 * Без переопределения окна остаются невидимыми при .open.
 */
body.constructor-page #infoModal.modal-overlay,
body.constructor-page #exportConfirmModal.modal-overlay,
body.constructor-page #systemWorkTermsModal.modal-overlay,
body.constructor-page #colorModal.modal-overlay,
body.constructor-page #cropModal.modal-overlay,
body.constructor-page #cropHelpModal.modal-overlay,
body.constructor-page #constructorHelpModal.modal-overlay,
body.constructor-page #cropPreviewColorModal.modal-overlay,
body.constructor-page #duplicateListModal.modal-overlay,
body.constructor-page #techPickModal.modal-overlay,
body.constructor-page #pdfToPngModal.modal-overlay,
body.constructor-page #orderExcelPngGateModal.modal-overlay,
body.constructor-page #manualEditorHotkeysModal.modal-overlay {
  z-index: 10500;
  transition: none;
  opacity: 1;
  visibility: visible;
  padding: 16px;
  box-sizing: border-box;
}
body.constructor-page #infoModal.modal-overlay:not(.open),
body.constructor-page #exportConfirmModal.modal-overlay:not(.open),
body.constructor-page #systemWorkTermsModal.modal-overlay:not(.open),
body.constructor-page #colorModal.modal-overlay:not(.open),
body.constructor-page #cropModal.modal-overlay:not(.open),
body.constructor-page #cropHelpModal.modal-overlay:not(.open),
body.constructor-page #constructorHelpModal.modal-overlay:not(.open),
body.constructor-page #cropPreviewColorModal.modal-overlay:not(.open),
body.constructor-page #duplicateListModal.modal-overlay:not(.open),
body.constructor-page #techPickModal.modal-overlay:not(.open),
body.constructor-page #pdfToPngModal.modal-overlay:not(.open),
body.constructor-page #orderExcelPngGateModal.modal-overlay:not(.open),
body.constructor-page #manualEditorHotkeysModal.modal-overlay:not(.open) {
  display: none !important;
  pointer-events: none;
}
body.constructor-page #infoModal.modal-overlay.open,
body.constructor-page #exportConfirmModal.modal-overlay.open,
body.constructor-page #systemWorkTermsModal.modal-overlay.open,
body.constructor-page #colorModal.modal-overlay.open,
body.constructor-page #cropModal.modal-overlay.open,
body.constructor-page #cropHelpModal.modal-overlay.open,
body.constructor-page #constructorHelpModal.modal-overlay.open,
body.constructor-page #cropPreviewColorModal.modal-overlay.open,
body.constructor-page #duplicateListModal.modal-overlay.open,
body.constructor-page #techPickModal.modal-overlay.open,
body.constructor-page #pdfToPngModal.modal-overlay.open,
body.constructor-page #orderExcelPngGateModal.modal-overlay.open,
body.constructor-page #manualEditorHotkeysModal.modal-overlay.open {
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
body.constructor-page #infoModal.modal-overlay.open .modal,
body.constructor-page #exportConfirmModal.modal-overlay.open .modal,
body.constructor-page #systemWorkTermsModal.modal-overlay.open .modal,
body.constructor-page #colorModal.modal-overlay.open .modal,
body.constructor-page #cropModal.modal-overlay.open .modal,
body.constructor-page #cropHelpModal.modal-overlay.open .modal,
body.constructor-page #constructorHelpModal.modal-overlay.open .modal,
body.constructor-page #cropPreviewColorModal.modal-overlay.open .modal,
body.constructor-page #duplicateListModal.modal-overlay.open .modal,
body.constructor-page #techPickModal.modal-overlay.open .modal,
body.constructor-page #pdfToPngModal.modal-overlay.open .modal,
body.constructor-page #orderExcelPngGateModal.modal-overlay.open .modal,
body.constructor-page #manualEditorHotkeysModal.modal-overlay.open .modal {
  transform: none;
}
body.constructor-page #pdfToPngModal.modal-overlay {
  z-index: 10512;
}
body.constructor-page #colorModal.modal-overlay { z-index: 10509; }
body.constructor-page #cropHelpModal.modal-overlay { z-index: 10501; }
body.constructor-page #constructorHelpModal.modal-overlay { z-index: 10503; }
body.constructor-page #cropPreviewColorModal.modal-overlay { z-index: 10502; }
/* В окне «Обработка изображения» не затемняем превью при выборе цвета фона листа */
body.constructor-page #cropPreviewColorModal.modal-overlay.open {
  background: transparent !important;
}
body.constructor-page #systemWorkTermsModal.modal-overlay { z-index: 10511; }
body.constructor-page #duplicateListModal.modal-overlay { z-index: 10510; }
body.constructor-page #techPickModal.modal-overlay { z-index: 10514; }
body.constructor-page #techPickModal.modal-overlay.tech-pick-modal--mandatory.open {
  cursor: default;
}
body.constructor-page #techPickModal.modal-overlay.tech-pick-modal--mandatory.open .modal {
  cursor: auto;
}
body.constructor-page #orderExcelPngGateModal.modal-overlay { z-index: 10508; }
/* Редактор ручной раскладки: z-index 2147483646 — модалка настроек горячих клавиш поверх него */
body.constructor-page #manualEditorHotkeysModal.modal-overlay { z-index: 2147483647; }

/*
 * /sheet-constructor и /constructor (печать): без боковых отступов у оверлея модалок (в style.css выше — padding:16px).
 */
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #infoModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #exportConfirmModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #systemWorkTermsModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #colorModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #cropModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #cropHelpModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #constructorHelpModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #cropPreviewColorModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #duplicateListModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #techPickModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #pdfToPngModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #orderExcelPngGateModal.modal-overlay,
body.constructor-page:is(.sheet-constructor-page, .constructor-print-page) #manualEditorHotkeysModal.modal-overlay {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/*
 * «Настройки размеров листа» (#colorModal): одни и те же отступы и размер карточки на любой ширине окна
 * (раньше они были только в @media (max-width: 768px), из‑за этого широкий вьюпорт вёл себя иначе).
 */
body.constructor-page.sheet-constructor-page #colorModal.modal-overlay.open,
body.constructor-page.constructor-print-page #colorModal.modal-overlay.open {
  /* Над site-chrome--header (z-index:10260) */
  z-index: 20000 !important;
  padding-top: max(env(safe-area-inset-top, 0px), 1vh);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 1vh);
  align-items: flex-start !important;
  justify-content: center !important;
  overflow: visible;
  min-height: 100dvh;
}

body.constructor-page.sheet-constructor-page #colorModal.modal-overlay.open {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.constructor-page.sheet-constructor-page #colorModal.modal-overlay.open > .modal,
body.constructor-page.constructor-print-page #colorModal.modal-overlay.open > .modal {
  align-self: flex-start !important;
  margin-top: 0 !important;
  box-sizing: border-box;
  flex-shrink: 0;
  width: calc(100vw - 24px) !important;
  max-width: 520px !important;
  max-height: calc(
    100dvh - max(env(safe-area-inset-top, 0px), 1vh) - max(env(safe-area-inset-bottom, 0px), 1vh)
  ) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

body.constructor-page .drop-overlay {
  z-index: 10510;
  border-color: #005BFF;
  color: #005BFF;
  background: rgba(37, 99, 235, 0.12);
}
body.constructor-page .toast {
  /* Выше #loader.loading (20000): тосты видны во время раскладки/триминга */
  z-index: 26000 !important;
  /* css/style.css: .toast { animation: slideInRight } — перебивает transform из layout-tool (центр экрана),
   * тост уезжает/мигает с opacity из keyframes и может выглядеть «пустым» белым блоком */
  animation: none !important;
  transform: translate(-50%, -50%);
}
body.constructor-page > #toast.toast {
  z-index: 26000 !important;
}
/* Успех «в корзину»: многострочный текст по центру экрана (базовая позиция — layout-tool.css) */
body.constructor-page .toast.toast-cart-success {
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 1.25rem 1.5rem;
  font-weight: 500;
  line-height: 1.5;
  background: #d9f0dc;
  color: #1e3d22;
  border: 1px solid #b5d9bc;
  box-shadow: 0 6px 24px rgba(30, 61, 34, 0.12);
}
/* Подгонка под листа: превышение размеров */
body.constructor-page .toast.toast-oversize {
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 1.25rem 1.5rem;
  font-weight: 500;
  line-height: 1.5;
  background: #fde8e8;
  color: #5c2222;
  border: 1px solid #e8b8b8;
  box-shadow: 0 6px 24px rgba(92, 34, 34, 0.1);
}
/* Прогресс восстановления/миграции сессии (долгие тосты) */
body.constructor-page .toast.toast-session {
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 1.1rem 1.35rem;
  font-weight: 500;
  line-height: 1.5;
  background: #e8eef5;
  color: var(--text, #1A1A1A);
  border: 1px solid var(--border, #E0E0E0);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}
/* Оранжевые тосты: перебить фон из css/style.css у .toast */
body.constructor-page .toast.toast-orange {
  background: #f59e0b;
  color: #fff;
  border: 1px solid #d97706;
  box-shadow: 0 6px 24px rgba(217, 119, 6, 0.25);
}
/* Обычные тосты — поверх модалок (#colorModal до z-index 20000) и у верхнего края.
 * Позиция без .visible: иначе при скрытии тост прыгает в центр (layout-tool top:50%)
 * и мигает на opacity-transition — «пустой» блок в центре после загрузки/восстановления. */
body.constructor-page:not(.driver-active) #toast.toast:not(.toast-tour):not(.toast-tour-prompt):not(.toast-cart-success) {
  z-index: 26000 !important;
  top: max(12px, calc(env(safe-area-inset-top, 0px) + 8px));
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
body.constructor-page:not(.driver-active) #toast.toast.visible:not(.toast-tour):not(.toast-tour-prompt):not(.toast-cart-success) {
  z-index: 26000 !important;
}
/* Успех «в корзину» — по центру (без скачка top: 12px → 50% при добавлении .visible) */
body.constructor-page:not(.driver-active) #toast.toast.visible.toast-cart-success {
  z-index: 26000 !important;
  top: 50%;
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
}
/* Во время тура: обычные тосты под затемнением и попапом Driver (overlay ~1e9−100, .driver-popover в driver-tour.css). */
body.constructor-page.driver-active .toast.visible:not(.toast-tour-prompt),
body.driver-active .toast.visible:not(.toast-tour-prompt) {
  z-index: 10520 !important;
}
/* Подсказки шагов тура («технология», «загрузите файлы») — над затемнением и попапом подсказки. */
body.constructor-page.driver-active .toast.visible.toast-tour-prompt,
body.driver-active .toast.visible.toast-tour-prompt {
  z-index: 1000000003 !important;
}
@media (max-width: 768px) {
  body.constructor-page #toast.toast.visible.toast-cart-success {
    width: min(96vw, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 8px));
    max-width: min(96vw, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 8px));
    padding: 14px max(14px, env(safe-area-inset-right, 0px)) 14px max(14px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
  }
  body.constructor-page #toast.toast.visible.toast-tour-prompt.toast-orange {
    max-width: 90vw !important;
    width: 90% !important;
    box-sizing: border-box;
  }
  body.constructor-print-page:not(.sheet-constructor-page) .sheet-edit-btns {
    display: none !important;
  }
}
body.constructor-page .sheet-fullscreen {
  z-index: 10530;
}

/* Полоса перед футером: в site-chrome.css у .site-footer margin-top: 40px вне тёмного фона */
body.constructor-page > .site-chrome--footer .site-footer {
  margin-top: 0;
}

/* Мобильный информер: две строки, на всю ширину экрана (как isMobile() ≤768) */
@media (max-width: 768px) {
  body.constructor-page .mobile-stats.mobile-stats--constructor {
    position: fixed;
    top: var(--constructor-top, var(--site-header-offset, 0px));
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    z-index: 10218;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    padding: 6px max(12px, env(safe-area-inset-left)) 6px max(12px, env(safe-area-inset-right));
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    background: var(--bg-secondary, #fafafa);
    border-bottom: 1px solid var(--border, #e0e0e0);
    font-size: clamp(11px, 2.9vw, 14px);
    font-weight: 700;
    color: var(--text, #1a1a1a);
    overflow: visible;
    text-align: center;
    line-height: 1.35;
    white-space: normal;
  }
  body.constructor-page .mobile-stats.mobile-stats--constructor .mobile-stats__row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

@media (max-width: 768px) {
  body.constructor-page {
    --constructor-price-row-h: 0px;
  }
  body.constructor-page .constructor-price-row {
    display: none !important;
  }
  body.constructor-page > .site-chrome--footer {
    display: none !important;
  }
  body.constructor-page .main {
    margin-top: 0;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    box-sizing: border-box;
    overflow: visible;
    /* layout-tool задаёт padding-bottom 52px под скрытый mobile-footer — убираем */
    padding-bottom: 0;
  }
  /* Область листа: фиксированная высота на мобильном */
  body.constructor-page .sheets-col {
    flex: 0 0 550px;
    height: 550px;
    min-height: 550px !important;
    max-height: 550px;
    box-sizing: border-box;
  }
  body.constructor-page .sheet-card {
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
  body.constructor-page .sheet-card__canvas-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: auto;
  }
  body.constructor-page .empty-sheets {
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }
  body.constructor-page .files-col {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  /* Overlay-спиннер — /constructor и /sheet-constructor */
  body.constructor-page.constructor-print-page #loader.loading:not(.loading--cart),
  body.constructor-page.sheet-constructor-page #loader.loading:not(.loading--cart) {
    inset: 0 !important;
    width: 100vw !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
  }
  body.constructor-page.constructor-print-page #loader.loading.active:not(.loading--cart),
  body.constructor-page.sheet-constructor-page #loader.loading.active:not(.loading--cart) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    background: transparent !important;
    animation: none !important;
  }
  body.constructor-page #loader.loading.loading--cart.active {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100vw !important;
    height: 3px !important;
    min-height: 0 !important;
    max-height: 3px !important;
    display: block !important;
    pointer-events: none !important;
    background: linear-gradient(90deg, #005bff 30%, transparent 30%) !important;
    background-size: 200% 100% !important;
    animation: loading 0.8s linear infinite !important;
  }
  /* Редактирование листа: на весь экран, колонка листов сворачивается */
  body.constructor-page.constructor-sheet-edit-fullscreen .sheets-col {
    flex: 0 0 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: none !important;
  }
  body.constructor-page.constructor-sheet-edit-fullscreen .sheet-card.sheet-editing {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    z-index: 10280;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 0 0 2px var(--accent, #4a6cf7), var(--shadow, 0 1px 3px rgba(0, 0, 0, 0.08)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0);
    /* Без pinch/double-tap zoom по листу; перетаскивание через Pointer Events */
    touch-action: none;
  }
  body.constructor-page.constructor-sheet-edit-fullscreen .sheet-card.sheet-editing .sheet-card__canvas-wrap,
  body.constructor-page.constructor-sheet-edit-fullscreen .sheet-card.sheet-editing canvas {
    touch-action: none;
  }
  body.constructor-page.constructor-sheet-edit-fullscreen {
    overflow: hidden !important;
  }
  body.constructor-page .sheet-card__head,
  body.constructor-page .sheet-card__info {
    flex-shrink: 0;
  }
  /* Горизонтальный скролл: синяя полоса (WebKit; на iOS может оставаться оверлейной, но цвет заметнее) */
  body.constructor-page .files-col,
  body.constructor-page .sheets-col {
    scrollbar-width: thin;
    scrollbar-color: #005BFF rgba(0,91,255,.08);
  }
  body.constructor-page .files-col::-webkit-scrollbar,
  body.constructor-page .sheets-col::-webkit-scrollbar {
    display: block;
    height: 8px;
    width: 8px;
  }
  body.constructor-page .files-col::-webkit-scrollbar-track,
  body.constructor-page .sheets-col::-webkit-scrollbar-track {
    background: rgba(0,91,255,.08);
    border-radius: 4px;
    -webkit-box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
  }
  body.constructor-page .files-col::-webkit-scrollbar-thumb,
  body.constructor-page .sheets-col::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #005BFF 0%, #005BFF 100%);
    border-radius: 4px;
    border: 1px solid rgba(29, 78, 216, 0.35);
  }
  body.constructor-page .tech-bar::-webkit-scrollbar {
    display: block !important;
    height: 6px;
  }
  body.constructor-page .tech-bar::-webkit-scrollbar-track {
    background: rgba(0,91,255,.08);
    border-radius: 3px;
  }
  body.constructor-page .tech-bar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #005BFF 0%, #005BFF 100%);
    border-radius: 3px;
    border: 1px solid rgba(29, 78, 216, 0.3);
  }
  /* ✓ в режиме редактирования; ✎ не нужен */
  body.constructor-page .sheet-card.sheet-editing .sheet-edit-save {
    display: flex !important;
  }
  body.constructor-page .sheet-card.sheet-editing .sheet-edit-pencil {
    display: none !important;
  }
  body.constructor-page .tech-bar {
    z-index: 10216;
    justify-content: center;
    align-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 36px;
    row-gap: 6px;
    column-gap: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
    white-space: normal !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    border-radius: 0;
  }
  body.constructor-page:not(.constructor-has-files) .tech-bar:not(:empty)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    animation: tech-bar-hint-overlay 5s ease-in-out infinite;
  }
  body.constructor-page:not(.constructor-has-files) .tech-bar:not(:empty) > * {
    position: relative;
    z-index: 1;
  }
  body.constructor-page .tech-bar .tech-bar-label {
    display: flex !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 0;
    justify-content: center;
    text-align: center;
    white-space: normal !important;
    font-size: 13px;
    line-height: 1.25;
  }
  body.constructor-page .tech-bar .tech-btn-wrap {
    flex-shrink: 0;
  }
  body.constructor-page .tech-bar .tech-btn:hover {
    border-color: #005BFF;
    background: rgba(0,91,255,.06);
  }
  body.constructor-page .tech-bar .tech-btn.active {
    background: linear-gradient(135deg, #005BFF 0%, #0050E0 100%);
    color: #fff;
    border-color: #0050E0;
  }
  /* Мобильный Safari/Chrome: при font-size < 16px на input зумит весь viewport (в т.ч. шапку). */
  body.constructor-page input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='hidden']):not([type='file']):not([type='color']),
  body.constructor-page select,
  body.constructor-page textarea {
    font-size: 16px !important;
  }
  /* Снижает лишний double-tap zoom; не мешает скроллу */
  body.constructor-page {
    touch-action: manipulation;
  }
}

/* Модалка цвета: <dialog> — весь вьюпорт перехватывает клики (иначе на старых WebKit «пробивает» под карточку) */
.color-settings-dialog {
  border: none;
  margin: 0;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
}
.color-settings-dialog:not([open]) {
  display: none !important;
}
.color-settings-dialog[open] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  border: none;
  top: 0;
  left: 0;
  transform: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.color-settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.color-settings-dialog__inner {
  width: 92vw;
  max-width: 380px;
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-height: min(85vh, 90vh);
  overflow-y: auto;
  box-sizing: border-box;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
@supports (width: min(10px, 5vw)) {
  .color-settings-dialog__inner {
    width: min(380px, 92vw);
  }
}
.color-settings-dialog__inner .btn:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-secondary):not(.btn-outline) {
  color: #1a1a1a;
  background: transparent;
}
.color-settings-dialog__inner .btn:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-secondary):not(.btn-outline):hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}
.color-settings-dialog__title {
  font-size: 16px;
  margin: 0 0 14px;
  text-align: center;
  font-weight: 600;
}
/* Убрать системные синие обводки фокуса (iOS Safari и др.) */
.color-settings-dialog,
.color-settings-dialog * {
  -webkit-tap-highlight-color: transparent;
}
.color-settings-dialog:focus,
.color-settings-dialog:focus-visible,
.color-settings-dialog *:focus,
.color-settings-dialog *:focus-visible {
  outline: none !important;
}
.color-settings-dialog .btn:focus,
.color-settings-dialog .btn:focus-visible {
  box-shadow: none !important;
}
.color-settings-dialog__title:focus,
.color-settings-dialog__title:focus-visible {
  box-shadow: none !important;
}
.color-settings-dialog input[type='range']:focus,
.color-settings-dialog input[type='range']:focus-visible {
  box-shadow: none !important;
}
.color-settings-dialog__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  margin-bottom: 0;
}
.color-settings-dialog__label-text {
  text-align: center;
}
.color-settings-dialog__section-title {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.color-settings-dialog__label-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: stretch;
  align-items: stretch;
  margin-bottom: 4px;
}
.color-settings-dialog__field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  font-size: 11px;
  margin: 0;
  text-align: center;
}
.color-settings-dialog__field-caption {
  display: block;
  min-height: 2.6em;
  line-height: 1.3;
  text-align: center;
}
.color-settings-dialog__field input[type='number'] {
  width: 100%;
  box-sizing: border-box;
  height: 28px;
  padding: 4px 6px;
  font-size: 12px;
}
.color-settings-dialog__field--color input[type='color'] {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 2px;
  border-radius: 8px;
}
.color-settings-dialog__threshold {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
}
.color-settings-dialog__threshold-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.color-settings-dialog__threshold-title {
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
.color-settings-dialog__threshold-value {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.color-settings-dialog__actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.color-settings-dialog__actions .btn {
  min-height: 44px;
  min-width: 128px;
  padding: 0 18px;
  font-size: 15px;
  border-radius: 10px;
}
.color-settings-dialog__actions #cpCancel {
  border: 1px solid var(--border, #d1d5db);
  background: transparent;
}
.color-settings-dialog__actions #cpCancel:hover:not(:disabled) {
  border-color: #9ca3af;
  background: rgba(0, 0, 0, 0.06);
}
.color-settings-dialog .color-modal__row {
  display: flex;
  gap: 12px;
}
.color-settings-dialog .color-modal__row .color-settings-dialog__label {
  flex: 1;
}
.color-settings-dialog input[type='color'] {
  height: 28px;
  padding: 2px;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.color-settings-dialog input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-settings-dialog input[type='color']::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}
.color-settings-dialog input[type='color']::-moz-color-swatch {
  border: none;
  border-radius: 6px;
}
.color-settings-dialog input[type='color']:focus,
.color-settings-dialog input[type='color']:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.color-settings-dialog input[type='range'] {
  width: 100%;
}
.color-settings-dialog__section-title {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.color-settings-dialog__zip-hint {
  font-size: 11px;
  color: #555;
  line-height: 1.4;
  margin: 0 0 8px;
  text-align: center;
}
.color-settings-dialog__zip-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 0 0 4px;
  cursor: pointer;
}
.color-settings-dialog.color-settings-dialog--polyfill {
  z-index: 2147483647 !important;
}

/* Product tour (Driver.js) */
/* driver-tour.css: .driver-popover * { font-family: sans-serif } перебивает глифы Font Awesome */
body.constructor-page .driver-popover i[class*='fa-'] {
  font-family: 'Font Awesome 6 Free' !important;
  font-style: normal;
  font-variant: normal;
}
body.constructor-page .driver-popover .fa-regular,
body.constructor-page .driver-popover .far {
  font-weight: 400 !important;
}
body.constructor-page .driver-popover .fa-solid,
body.constructor-page .driver-popover .fas {
  font-weight: 900 !important;
}
/* driver-active: выше специфичность, чем у vendor .driver-popover после all:unset */
body.constructor-page .constructor-driver-popover,
body.constructor-page.driver-active .driver-popover.constructor-driver-popover {
  /* driver-tour.css: узкий max-width — шире попап; на мобильном — почти на всю ширину */
  box-sizing: border-box !important;
  max-width: 560px !important;
  min-width: 260px !important;
  border-radius: 12px;
  box-shadow:
    0 10px 40px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  font-family: inherit;
}
@media (max-width: 768px) {
  body.constructor-page .constructor-driver-popover,
  body.constructor-page.driver-active .driver-popover.constructor-driver-popover {
    width: calc(100vw - 16px) !important;
    max-width: 560px !important;
    min-width: 280px !important;
    box-sizing: border-box !important;
  }
}
body.constructor-page .constructor-driver-popover .driver-popover-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
body.constructor-page .constructor-driver-popover .driver-popover-description {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.45;
  text-shadow: none;
  /* Длинные шаги: шире/выше окно — на десктопе текст помещается без прокрутки */
  max-height: min(88vh, 900px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 6px;
  margin-right: -2px;
  scrollbar-gutter: stable;
}
/* Шаг «Параметры раскладки»: демо-иконки в колонке, текст рядом — без «наезда» текста под кнопки */
body.constructor-page .constructor-driver-popover .constructor-tour-settings-desc {
  display: flex;
  flex-direction: column;
  gap: 0.65em;
}
body.constructor-page .constructor-driver-popover .constructor-tour-settings-desc__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
}
body.constructor-page .constructor-driver-popover .constructor-tour-settings-desc__row--nowrap {
  display: block;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
body.constructor-page .constructor-driver-popover .constructor-tour-settings-desc__lead {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: flex-start;
  max-width: 100%;
}
body.constructor-page .constructor-driver-popover .constructor-tour-settings-desc__text {
  flex: 1 1 180px;
  min-width: 0;
  line-height: 1.45;
}
body.constructor-page .constructor-driver-popover .constructor-tour-settings-desc .constructor-tour-panel-demo--cart-first {
  margin-top: 4px;
}
body.constructor-page .constructor-driver-popover .driver-popover-close-btn {
  text-shadow: none !important;
}
body.constructor-page .constructor-driver-popover .driver-popover-footer button {
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border, #E0E0E0);
  /* driver.js по умолчанию: text-shadow + zoom — дают «мыльный» текст на «Готово» / «Далее» */
  text-shadow: none !important;
  zoom: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.constructor-page .constructor-driver-popover .driver-popover-next-btn {
  background: #005BFF !important;
  color: #fff !important;
  border-color: #005BFF !important;
}
body.constructor-page .constructor-driver-popover .driver-popover-next-btn:hover {
  background: #0050E0 !important;
}
body.constructor-page .constructor-driver-popover .driver-popover-prev-btn {
  text-shadow: none !important;
}
body.constructor-page .constructor-driver-popover .driver-popover-progress-text {
  color: #64748b;
  font-size: 12px;
  text-shadow: none;
  zoom: 1;
}

/* Подсказки внутри описания шага тура */
body.constructor-page .constructor-driver-popover .constructor-tour-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
  box-sizing: border-box;
}
body.constructor-page .constructor-driver-popover .constructor-tour-key--green {
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
  color: #fff !important;
  border: 1px solid #2e7d32;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.35);
}
/* Демо: переключатели W и A+ножницы как в панели (.mfooter-toggle-btn) */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle-pair {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  vertical-align: middle;
  margin-right: 4px;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle-pair__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle {
  pointer-events: none;
  user-select: none;
  cursor: default;
  flex-shrink: 0;
  font-family: inherit;
}
/* W: выкл. — как #headerSepWhite:not(:checked)+… */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--w-off {
  position: relative;
  overflow: hidden;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #e0e0e0;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--w-off::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 2px;
  height: 160%;
  background: rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  pointer-events: none;
}
/* W: вкл. — как :checked */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--w-on {
  position: relative;
  overflow: hidden;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #4caf50;
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.25);
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-w-text {
  font-size: 28px;
  font-weight: 700;
  font-family: inherit;
  position: relative;
  z-index: 0;
  line-height: 1;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--w-on .constructor-tour-demo-w-text {
  color: #2e7d32;
}
/* A+ножницы: выкл. */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--autotrim-off {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  gap: 0;
  padding: 2px 4px 3px;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #e0e0e0;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--autotrim-off::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 2px;
  height: 160%;
  background: rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  pointer-events: none;
}
/* A+ножницы: вкл. */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--autotrim-on {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  gap: 0;
  padding: 2px 4px 3px;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #4caf50;
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.25);
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-autotrim__a {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 1px;
  opacity: 0.85;
  position: relative;
  z-index: 0;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--autotrim-on .constructor-tour-demo-autotrim__a {
  color: #2e7d32;
  opacity: 1;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--autotrim-off svg,
body.constructor-page .constructor-driver-popover .constructor-tour-demo-toggle--autotrim-on svg {
  position: relative;
  z-index: 0;
  flex-shrink: 0;
  display: block;
  width: 14px;
  height: 14px;
}

/* Демо-кнопки как на панели настроек (только подсказка, не кликабельны) */
body.constructor-page .constructor-driver-popover .constructor-tour-panel-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 10px 0 0 0;
  line-height: 1.45;
}
body.constructor-page .constructor-driver-popover .constructor-tour-panel-demo.constructor-tour-panel-demo--cart-first {
  margin-top: 4px;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn {
  pointer-events: none;
  user-select: none;
  cursor: default;
  flex-shrink: 0;
  font-family: inherit;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  line-height: 1.2;
  color: #fff !important;
  border: 1px solid rgba(0,91,255,.5);
  background: linear-gradient(135deg, #005BFF 0%, #005BFF 100%);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
/* Как #btnConstructorTour (на sheet-constructor — ещё #btnConstructorTourFooter в нижней панели) */
body.constructor-page .constructor-driver-popover .constructor-tour-bar-btn-demo.btn.btn-icon,
body.constructor-page .toast .constructor-tour-bar-btn-demo.btn.btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid rgba(0, 91, 255, 0.35);
  box-sizing: border-box;
  background: #fff;
  /* Не var(--text): в тёмной теме сайта --text светлый, попап тура — светлый фон → «пустые» иконки */
  color: #1a1a1a;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
  cursor: default;
}
body.constructor-page .toast .constructor-tour-bar-btn-demo.btn.btn-icon {
  margin: 0 2px;
}
body.constructor-page .constructor-driver-popover .constructor-tour-bar-btn-demo .constructor-tour-help-svg,
body.constructor-page .toast .constructor-tour-bar-btn-demo .constructor-tour-help-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  color: #1a1a1a;
}
/* Как .btn-icon-outline #btnTrimming */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--trim-outline {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--border, #e0e0e0);
  box-sizing: border-box;
  background: #fff;
  /* Не var(--text): см. .constructor-tour-bar-btn-demo — stroke currentColor на белом фоне */
  color: #1a1a1a;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--trim-outline .constructor-svg-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  color: #1a1a1a;
}
/* Как .btn-icon-outline #btnBulkMirror */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--mirror-outline {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--border, #e0e0e0);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--mirror-outline .constructor-svg-icon,
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--mirror-outline svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  color: #1a1a1a;
}
/* Как .btn-success.btn-icon-outline #btnRecalc */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--recalc {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--green, #4caf50);
  box-sizing: border-box;
  background: #fff;
  color: #2e7d32;
}
/* Как .btn-icon-outline #btnColor — сетка-превью */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--palette {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--border, #e0e0e0);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  vertical-align: middle;
  box-shadow: none;
  overflow: hidden;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--palette .constructor-tour-svg--palette {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 1px;
}
/* Как .btn-danger.btn-icon-outline #btnClear */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--trash {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--red, #f44336);
  box-sizing: border-box;
  background: #fff;
  color: var(--red, #f44336);
  vertical-align: middle;
  box-shadow: none;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn .constructor-tour-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* Как .file-card__remove в layout-tool: компактная × */
body.constructor-page .constructor-driver-popover .constructor-tour-demo-btn--remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: auto;
  height: auto;
  padding: 0 3px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  vertical-align: middle;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #666666;
  box-shadow: none;
}
body.constructor-page .constructor-driver-popover .constructor-tour-demo-caption {
  flex: 1 1 160px;
  min-width: 0;
  font-weight: 400;
  color: #334155;
}
body.constructor-page .constructor-driver-popover .constructor-tour-panel-demo--help {
  margin-top: 12px;
}

/* Приглашение к туру (кнопка «Обучение»): полноэкранный слой + карточка .toast-tour-block (иначе клики уходят под страницу — псевдоэлемент с z-index:-1 не перехватывает hit-test за пределами коробки #toast). */
body.constructor-page #toast.toast.toast-tour.visible {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100%;
  min-height: 100dvh;
  height: auto;
  margin: 0 !important;
  padding: max(env(safe-area-inset-top, 0px), 12px) max(env(safe-area-inset-right, 0px), 16px) max(env(safe-area-inset-bottom, 0px), 16px)
    max(env(safe-area-inset-left, 0px), 16px);
  transform: none !important;
  background: rgba(0, 0, 0, 0.38) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 10524 !important;
  text-align: center;
  font-weight: 500;
  pointer-events: auto;
}

body.constructor-page #toast.toast.toast-tour.visible .toast-tour-block {
  width: 100%;
  max-width: 560px;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
  background: #fff;
  color: #333;
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  text-align: left;
  flex-shrink: 1;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body.constructor-page #toast.toast.toast-tour.visible .toast-tour-block {
    padding: 22px 18px 18px;
  }
}

body.constructor-page .toast .toast-tour-block {
  display: block;
}
body.constructor-page .toast.toast-tour .toast-tour-title {
  display: block;
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1a1a2e;
  text-align: center;
}
body.constructor-page .toast.toast-tour .toast-tour-text {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
}
body.constructor-page .toast.toast-tour .toast-tour-text:last-of-type {
  margin-bottom: 18px;
}
body.constructor-page .toast.toast-tour .toast-tour-text--note {
  font-size: 0.82rem;
  color: #666;
}
body.constructor-page .toast .toast-tour-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  margin-top: 0;
  width: 100%;
  text-align: center;
}
/* Как .pwa-btn в cookie-consent */
body.constructor-page .toast .toast-tour-btn,
body.constructor-page .toast .toast-tour-dismiss {
  margin: 0;
  flex: 1 1 140px;
  min-width: 0;
  max-width: 100%;
  width: auto;
  padding: 12px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
body.constructor-page .toast.toast-tour .toast-tour-btn {
  border: none;
  background: #005bff;
  color: #fff;
}
body.constructor-page .toast.toast-tour .toast-tour-btn:hover:not(:disabled) {
  background: #0047cc;
}
body.constructor-page .toast.toast-tour .toast-tour-dismiss {
  border: none;
  color: #333;
  background: #f0f0f0;
}
body.constructor-page .toast.toast-tour .toast-tour-dismiss:hover:not(:disabled) {
  background: #e0e0e0;
}

/* Тур-приглашение: тёмная тема — затемнение слоя и карточка */
[data-theme='dark'] body.constructor-page #toast.toast.toast-tour.visible {
  background: rgba(0, 0, 0, 0.52) !important;
}
[data-theme='dark'] body.constructor-page #toast.toast.toast-tour.visible .toast-tour-block {
  background: var(--card, #1a1d26) !important;
  color: var(--text, #e8eaef);
  border: 1px solid var(--border, #2d3340) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .toast-tour-title {
  color: var(--text, #f1f5f9);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .toast-tour-text {
  color: var(--text-secondary, #cbd5e1);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .toast-tour-text--note {
  color: var(--text-muted, #94a3b8);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .constructor-tour-bar-btn-demo.btn.btn-icon {
  background: var(--bg-secondary, #252a33);
  border-color: var(--border, #3d4654);
  color: var(--text, #e8eaef);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .constructor-tour-bar-btn-demo .constructor-tour-help-svg {
  color: var(--text, #e8eaef);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .toast-tour-btn {
  background: var(--primary, #005bff);
  color: #fff;
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .toast-tour-btn:hover:not(:disabled) {
  background: var(--primary-hover, #0047cc);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .toast-tour-dismiss {
  background: var(--bg-secondary, #252a33);
  color: var(--text, #e8eaef);
  border: 1px solid var(--border, #3d4654);
}
[data-theme='dark'] body.constructor-page .toast.toast-tour .toast-tour-dismiss:hover:not(:disabled) {
  background: var(--border, #3d4654);
}

/*
 * Driver.js: затемнение — SVG с одним path (evenodd: вырез под подсветку).
 * Корень svg НЕ должен иметь pointer-events: auto — иначе весь bounding box SVG перехватывает hit-test,
 * в том числе «дырку», и клики не доходят до .driver-active-element (z-index тут не помогает: оверлей — sibling).
 * Клики только по затемнённым пикселям path; в вырезе события проходят к странице (как задумано в Driver).
 */
body.constructor-page.driver-active svg.driver-overlay,
body.driver-active svg.driver-overlay {
  z-index: 999999900 !important;
  pointer-events: none !important;
}
body.constructor-page.driver-active svg.driver-overlay path,
body.driver-active svg.driver-overlay path {
  pointer-events: auto !important;
}
body.constructor-page.driver-active .driver-active-element,
body.driver-active .driver-active-element {
  position: relative !important;
  z-index: 1 !important;
}
body.constructor-page.driver-active #driver-dummy-element,
body.driver-active #driver-dummy-element {
  z-index: 999999950 !important;
}

/* Колонка листов и прочие цели тура — relative уже задано выше для всех .driver-active-element */

/* ── btn-icon-outline & btn-trim ── */

/* Обводка у иконок (триминг, палитра, обновление, корзина) и согласованный вид с кнопкой «В корзину» */
.btn-icon-outline {
  border: 1px solid var(--border);
  background: #fff;
  box-sizing: border-box;
}
.btn-icon-outline:hover {
  background: #eef0f4;
}
.toolbar .btn-icon.btn-trim--active,
.mobile-footer .btn-icon.btn-trim--active,
body.constructor-page .constructor-settings-bar .btn-icon.btn-trim--active {
  border-color: var(--green);
  color: #2e7d32;
  background: var(--success-bg, rgba(76,175,80,.1));
}
.toolbar .btn-icon.btn-trim--active:hover,
.mobile-footer .btn-icon.btn-trim--active:hover,
body.constructor-page .constructor-settings-bar .btn-icon.btn-trim--active:hover {
  background: #d1fae5;
  border-color: var(--green);
}
.toolbar .btn-icon.btn-mirror--active,
.mobile-footer .btn-icon.btn-mirror--active,
body.constructor-page .constructor-settings-bar .btn-icon.btn-mirror--active {
  border-color: var(--green);
  color: #2e7d32;
  background: var(--success-bg, rgba(76,175,80,.1));
}
.toolbar .btn-icon.btn-mirror--active:hover,
.mobile-footer .btn-icon.btn-mirror--active:hover,
body.constructor-page .constructor-settings-bar .btn-icon.btn-mirror--active:hover {
  background: #d1fae5;
  border-color: var(--green);
}
.toolbar .btn-success.btn-icon-outline,
body.constructor-page .constructor-settings-bar .btn-success.btn-icon-outline,
.mobile-footer .btn-success.btn-icon-outline {
  border-color: var(--green);
  color: #2e7d32;
  background: #fff;
}
.toolbar .btn-success.btn-icon-outline:hover,
body.constructor-page .constructor-settings-bar .btn-success.btn-icon-outline:hover,
.mobile-footer .btn-success.btn-icon-outline:hover {
  background: var(--success-bg, rgba(76,175,80,.1));
}
.toolbar .btn-danger.btn-icon-outline,
body.constructor-page .constructor-settings-bar .btn-danger.btn-icon-outline,
.mobile-footer .btn-danger.btn-icon-outline {
  border: 1px solid var(--red, #f44336);
  border-color: var(--red, #f44336);
  color: var(--red, #f44336);
  background: #fff;
}
.toolbar .btn-danger.btn-icon-outline:hover,
body.constructor-page .constructor-settings-bar .btn-danger.btn-icon-outline:hover,
.mobile-footer .btn-danger.btn-icon-outline:hover {
  background: var(--danger-bg, rgba(244,67,54,.1));
  border-color: #d32f2f;
}

/* ── Tech confirm banner + pick modal ── */

body.constructor-page .tech-confirm-banner {
  position: fixed;
  inset: 0;
  z-index: 10515;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 12px;
  transform: none;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}
body.constructor-page .tech-confirm-banner__card {
  box-sizing: border-box;
  width: min(458px, calc(100vw - 30px));
  max-width: min(458px, calc(100vw - 30px));
  max-height: calc(100vh - 24px);
  margin: 0;
  padding: 15px 0;
  border-radius: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  text-align: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 4px 0;
  container-type: inline-size;
}
body.constructor-page .tech-confirm-banner__card > .tech-confirm-banner__lead,
body.constructor-page .tech-confirm-banner__card > .tech-confirm-banner__tech-wrap,
body.constructor-page .tech-confirm-banner__card > .tech-confirm-banner__dismiss,
body.constructor-page .tech-confirm-banner__card > .tech-confirm-banner__actions {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}
body.constructor-page .tech-confirm-banner__card > .tech-confirm-banner__lead {
  padding-left: 20px;
  padding-right: 20px;
}
body.constructor-page .tech-confirm-banner__tech-wrap {
  display: grid;
  place-items: center;
  align-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  padding: 0;
}
body.constructor-page .tech-confirm-banner__card > .tech-confirm-banner__dismiss {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  margin-top: 2px;
}
body.constructor-page .tech-confirm-banner__dismiss {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  text-align: center;
  font-size: clamp(11px, 3.6cqi, 14px);
  line-height: 1.35;
  font-weight: 500;
  user-select: none;
  white-space: nowrap;
}
body.constructor-page .tech-confirm-banner__dismiss-input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #005bff;
}
body.constructor-page .tech-confirm-banner__dismiss-text {
  flex: 0 0 auto;
  min-width: max-content;
  text-align: center;
  white-space: nowrap;
}
html:not([data-theme="dark"]) body.constructor-page .tech-confirm-banner__dismiss {
  color: #3a3a3a;
}
[data-theme="dark"] body.constructor-page .tech-confirm-banner__dismiss {
  color: #d8dce6;
}
/* Светлая тема: светло-синий фон → плавно в синее свечение */
html:not([data-theme="dark"]) body.constructor-page .tech-confirm-banner__card {
  border: 1px solid rgba(0, 91, 255, 0.22);
  background: linear-gradient(165deg, #c5dcff 0%, #e3efff 42%, #f6faff 100%);
  color: #1a1a1a;
  box-shadow:
    0 0 14px 4px rgba(0, 91, 255, 0.32),
    0 0 28px 10px rgba(0, 91, 255, 0.14),
    0 4px 14px rgba(0, 91, 255, 0.1);
}
body.constructor-page .tech-confirm-banner.tech-confirm-banner--visible {
  display: flex;
  pointer-events: none;
}
body.constructor-page .tech-confirm-banner .tech-confirm-banner__lead {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: clamp(18px, 6.2cqi, 28px);
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
html:not([data-theme="dark"]) body.constructor-page .tech-confirm-banner .tech-confirm-banner__lead {
  color: #2a2a2a;
}
body.constructor-page .tech-confirm-banner .tech-confirm-banner__tech {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: clamp(42px, 19cqi, 72px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  text-align: center;
}
html:not([data-theme="dark"]) body.constructor-page .tech-confirm-banner .tech-confirm-banner__tech {
  color: #0048cc;
}
body.constructor-page .tech-confirm-banner .tech-confirm-banner__actions {
  display: flex;
  gap: 12px;
  justify-content: stretch;
  width: 100%;
  margin-top: 10px;
  padding-top: 0;
}
body.constructor-page .tech-confirm-banner__btn {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: clamp(16px, 5.8cqi, 18px);
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
body.constructor-page #techConfirmBannerYes.tech-confirm-banner__btn.btn-success {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: #fff;
}
body.constructor-page #techConfirmBannerYes.tech-confirm-banner__btn.btn-success:hover {
  background: linear-gradient(135deg, #66bb6a 0%, #388e3c 100%);
  color: #fff;
}
body.constructor-page #techConfirmBannerNo.tech-confirm-banner__btn.btn-primary {
  background: linear-gradient(135deg, #005bff 0%, #0048cc 100%);
  color: #fff;
}
body.constructor-page #techConfirmBannerNo.tech-confirm-banner__btn.btn-primary:hover {
  background: linear-gradient(135deg, #1a6fff 0%, #005bff 100%);
  color: #fff;
}
/* Тёмная тема: тёмно-синий фон → плавно в свечение */
[data-theme="dark"] body.constructor-page .tech-confirm-banner__card {
  border: 1px solid rgba(107, 140, 255, 0.4);
  background: linear-gradient(165deg, #2a3f6e 0%, #1c2438 48%, #14161c 100%);
  color: #f5f5f5;
  box-shadow:
    0 0 14px 4px rgba(107, 140, 255, 0.45),
    0 0 30px 10px rgba(0, 91, 255, 0.22),
    0 6px 20px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] body.constructor-page .tech-confirm-banner .tech-confirm-banner__lead {
  color: #e8eaef;
}
[data-theme="dark"] body.constructor-page .tech-confirm-banner .tech-confirm-banner__tech {
  color: #ffffff;
}

.tech-pick-modal {
  width: max-content;
  max-width: min(96vw, 920px);
  min-width: min(96vw, 560px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  text-align: left;
}
/* Свечение окна выбора технологии — светло-серое */
body.constructor-page #techPickModal.modal-overlay.open .modal.tech-pick-modal {
  box-shadow:
    0 0 16px 4px rgba(232, 234, 238, 0.72),
    0 0 36px 12px rgba(206, 210, 218, 0.42),
    0 8px 24px rgba(0, 0, 0, 0.16);
}
html:not([data-theme="dark"]) body.constructor-page #techPickModal.modal-overlay.open .modal.tech-pick-modal {
  border: 1px solid rgba(180, 186, 196, 0.55);
  background: linear-gradient(165deg, #f4f6f9 0%, #ffffff 48%, #f7f8fa 100%);
  color: #1a1a1a;
}
html:not([data-theme="dark"]) body.constructor-page #techPickModal.modal-overlay.open .tech-pick-modal__title {
  color: #2a2a2a;
}
[data-theme="dark"] body.constructor-page #techPickModal.modal-overlay.open .modal.tech-pick-modal {
  border: 1px solid rgba(230, 232, 236, 0.55) !important;
  box-shadow:
    0 0 22px 6px rgba(240, 242, 245, 0.8),
    0 0 56px 18px rgba(214, 218, 224, 0.5),
    0 10px 28px rgba(0, 0, 0, 0.4) !important;
}
.tech-pick-modal__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  text-align: center;
}
.tech-pick-modal__body {
  flex: 1;
  min-height: 0;
  max-height: min(55vh, 400px);
  overflow-x: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 4px 4px;
}
body.constructor-page .tech-pick-modal__row {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  box-sizing: border-box;
  border-radius: 8px;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
body.constructor-page .tech-pick-modal__label {
  display: block;
  width: 100%;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
}
html:not([data-theme="dark"]) body.constructor-page .tech-pick-modal__row {
  border: 1px solid #d0d7e2;
  background: #ffffff;
  color: #1a1a1a;
}
html:not([data-theme="dark"]) body.constructor-page .tech-pick-modal__row:hover,
html:not([data-theme="dark"]) body.constructor-page .tech-pick-modal__row:focus-visible {
  border-color: #005bff;
  background: #f0f6ff;
  outline: none;
}
html:not([data-theme="dark"]) body.constructor-page .tech-pick-modal__row--active {
  border-color: #005bff;
  background: #e8f2ff;
  box-shadow: 0 0 0 1px rgba(0, 91, 255, 0.2), 0 0 12px rgba(0, 91, 255, 0.12);
  font-weight: 700;
  color: #005bff;
}
[data-theme="dark"] body.constructor-page .tech-pick-modal__row {
  border: 1px solid #404040;
  background: #252525;
  color: #f5f5f5;
}
[data-theme="dark"] body.constructor-page .tech-pick-modal__row:hover,
[data-theme="dark"] body.constructor-page .tech-pick-modal__row:focus-visible {
  border-color: #6b8cff;
  background: rgba(107, 140, 255, 0.1);
  outline: none;
}
[data-theme="dark"] body.constructor-page .tech-pick-modal__row--active {
  border-color: #6b8cff;
  background: rgba(107, 140, 255, 0.18);
  box-shadow: 0 0 12px rgba(107, 140, 255, 0.35);
  font-weight: 700;
  color: #6b8cff;
}
/* ── Duplicate list modal ── */

.duplicate-list-modal {
  width: min(520px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.duplicate-list-modal__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  text-align: center;
  flex-shrink: 0;
}
.duplicate-list-modal__body {
  flex: 1;
  min-height: 0;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text, #1A1A1A);
  border: 1px solid var(--border, #E0E0E0);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fafbfc;
}
.duplicate-list-modal__row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #E0E0E0);
  word-break: break-word;
}
.duplicate-list-modal__row:last-child {
  border-bottom: none;
}
.duplicate-list-modal .modal-actions {
  flex-shrink: 0;
  margin-top: 12px;
}
.toast.toast-orange .toast-duplicate-btn {
  margin-top: 12px;
  font-weight: 600;
  border: 2px solid var(--primary, #005bff);
  background: #fff;
  color: var(--primary, #005bff);
  box-shadow: 0 0 0 1px rgba(0, 91, 255, 0.2);
}
.toast.toast-orange .toast-duplicate-btn:hover {
  background: var(--primary-light, rgba(0, 91, 255, 0.1));
  border-color: var(--primary-hover, #0047cc);
  color: var(--primary-hover, #0047cc);
}
.toast.toast-green.toast-ack .toast-ack-actions {
  margin-top: 12px;
}
.toast.toast-green.toast-ack .toast-ack-btn {
  font-weight: 600;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.95);
  color: #2e7d32;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.toast.toast-green.toast-ack .toast-ack-btn:hover {
  background: #fff;
  color: #1b5e20;
  border-color: #fff;
}

/* ── Crop modal ── */

.modal.crop-modal {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(96vh, 920px);
  width: 100%;
  max-width: min(96vw, 920px);
  text-align: center;
}
.crop-modal__head {
  position: relative;
  flex-shrink: 0;
  z-index: 6;
  padding: 16px 48px 12px 20px;
  margin: 0;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid var(--border, #E0E0E0);
}
.crop-modal__title {
  margin: 0;
  font-size: clamp(13px, 2.8vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  padding: 0 8px;
}
.modal.crop-modal .crop-modal__title {
  margin-bottom: 0;
}
.crop-modal__help-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border, #E0E0E0);
  border-radius: 50%;
  background: var(--bg-soft, #f4f5f7);
  color: var(--muted, #666666);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.crop-modal__head > .crop-modal__help-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.crop-modal__help-btn:hover {
  border-color: var(--accent, #4a6cf7);
  color: var(--accent, #4a6cf7);
  background: #fff;
}
.crop-modal__help-btn--close {
  position: static;
  transform: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  font-weight: 400;
}
.crop-modal__help-btn--close:focus,
.crop-modal__help-btn--close:focus-visible {
  outline: none;
  box-shadow: none;
}
.crop-modal__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 20px 8px;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}
.crop-modal__viewport {
  position: relative;
  display: block;
  width: 100%;
  height: min(65vh, 640px);
  max-height: min(65vh, 640px);
  margin: 0 auto 12px;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  min-height: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.crop-modal__viewport.crop-modal__viewport--panning {
  cursor: grabbing;
}
.crop-modal__viewport-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  width: max-content;
  min-height: 100%;
  height: max-content;
  box-sizing: border-box;
}
.crop-modal__zoom-inner {
  position: relative;
  display: block;
  flex: 0 0 auto;
}
.crop-modal__viewport img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  user-select: none;
  pointer-events: none;
  vertical-align: top;
}
/* Сайт: img { max-width: 100% } — жёстко фиксируем превью, чтобы рамка обрезки совпадала с расчётом в JS */
body.constructor-page #cropModal img#cropImg {
  max-width: none !important;
}
.crop-modal__frame {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
  border: 1px solid #52525b;
  box-shadow: none;
  cursor: move;
  touch-action: none;
}
.crop-modal__handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fafafa;
  border: 1px solid #52525b;
  border-radius: 2px;
  z-index: 2;
  box-sizing: border-box;
}
.crop-modal__handle[data-h="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-modal__handle[data-h="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-modal__handle[data-h="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-modal__handle[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-modal__footer {
  flex-shrink: 0;
  z-index: 6;
  margin: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border, #E0E0E0);
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.crop-modal__footer-row--trim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}
.crop-modal__footer-left,
.crop-modal__footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.crop-modal__footer-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #666666);
  margin-right: 2px;
}

/* ── Crop help modal ── */

#cropHelpModal.modal-overlay {
  z-index: 10501;
}
.crop-help-modal {
  max-width: min(95vw, 880px);
  width: 100%;
  text-align: left;
  container-type: inline-size;
  container-name: crophelp;
}
.crop-help-modal__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 0 40px;
  min-height: 36px;
}
.crop-help-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}
.crop-help-modal__head .crop-modal__help-btn--close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.crop-help-modal__body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text, #1A1A1A);
  max-height: min(62vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
}
.crop-help-modal__body ul {
  margin: 0 0 12px;
  padding-left: 1.4em;
  list-style: disc outside;
  color: var(--muted, #4b5563);
}
.crop-help-modal__body ul li {
  display: list-item;
  margin-bottom: 6px;
}
.crop-help-modal__body ul li:last-child {
  margin-bottom: 0;
}
.crop-help-modal__body .crop-help-btn-img {
  height: 42px;
  width: auto;
  max-width: 100%;
  vertical-align: middle;
  margin: 0 6px 2px 0;
  object-fit: contain;
  display: inline-block;
}
.crop-help-modal__body .crop-help-btns-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
  margin-right: 4px;
}
.crop-help-modal__body .crop-help-btn-demo {
  vertical-align: middle;
  margin: 0 6px 2px 0;
  pointer-events: none;
}
.crop-help-modal__body .crop-help-clone {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin: 0 6px 2px 0;
  pointer-events: none;
}
.crop-help-modal__body .crop-help-clone__node {
  pointer-events: none;
}
.crop-help-modal .crop-help-clone .crop-modal__help-btn {
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
}
.crop-help-modal__body .crop-help-clone--btn .btn,
.crop-help-modal__body .crop-help-clone--btn.btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
.crop-help-modal__body .crop-help-clone--cart .btn,
.crop-help-modal__body .crop-help-clone--cart.btn {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}
.crop-help-modal__body .crop-help-clone--toggle .mfooter-toggle-btn {
  min-width: 44px;
  min-height: 36px;
}
.crop-help-modal__body .crop-help-btn-demo.btn-icon {
  width: 36px;
  height: 36px;
}
.crop-help-modal__body .crop-help-btn-demo--cart {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}
.crop-help-modal__body .crop-help-toggle-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border, #E0E0E0);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  color: var(--text-secondary, #666);
}
.crop-help-modal__body .crop-help-toggle-demo--on {
  border-color: #4caf50;
  color: #2e7d32;
  background: rgba(76, 175, 80, 0.12);
}
.crop-help-modal__body .crop-help-btns-pair .crop-help-btn-img {
  margin: 0 0 2px 0;
}
.crop-help-modal__ul--tight {
  margin-top: -4px !important;
  list-style: circle outside;
}
.crop-help-modal__body li > .crop-help-modal__ul--tight {
  margin-top: 6px !important;
  margin-bottom: 4px;
}
.crop-help-modal__h5 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1A1A1A);
}
.crop-help-modal__sec--hotkeys .crop-help-modal__h5 {
  margin: 12px 0 6px;
}
.crop-help-modal__sec--hotkeys > .crop-help-modal__h5:first-of-type {
  margin-top: 4px;
}
.crop-help-modal__hotkeys-note {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #666666);
}
.crop-help-modal__sec--hotkeys > ul:last-of-type {
  margin-bottom: 0;
}

.crop-help-visual {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.crop-help-figure {
  margin: 0 0 14px;
  padding: 0;
  min-width: 0;
}
.crop-help-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  object-position: left center;
  border-radius: 4px;
  border: 1px solid var(--border, #E0E0E0);
  box-sizing: border-box;
}

/* Полноширинные скриншоты панели и строки статистики в «Справка: Конструктор печати…» (как на /sheet-constructor) */
.constructor-help-print-toolbar.crop-help-figure,
.constructor-help-toolbar-demo.crop-help-figure,
.constructor-help-statistics-line.crop-help-figure {
  margin: 0 0 14px;
  padding: 0;
  max-width: 100%;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
.constructor-help-print-toolbar.crop-help-figure img,
.constructor-help-toolbar-demo.crop-help-figure img,
.constructor-help-statistics-line.crop-help-figure img {
  max-height: none;
  width: 100%;
  height: auto;
  border-radius: 0;
  border: none;
}

/* «Справка: Обработка изображения» — скриншоты на всю ширину карточки (идентично обоим конструкторам) */
#cropHelpModal .crop-help-figure.crop-help-visual {
  margin: 0 0 14px;
  padding: 0;
  max-width: 100%;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
#cropHelpModal .crop-help-figure.crop-help-visual img {
  display: block;
  max-height: none;
  width: 100%;
  height: auto;
  border-radius: 0;
  border: none;
  object-fit: contain;
  object-position: center center;
}

.crop-help-badge-block {
  margin: 0 0 14px;
}
.crop-help-badge-block__line {
  margin: 0 0 10px;
  color: var(--muted, #4b5563);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.crop-help-badge-block__line:last-child {
  margin-bottom: 0;
}
.crop-help-badge-block__line .alpha-badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 7px;
  line-height: 1.35;
  vertical-align: text-bottom;
  white-space: nowrap;
}
.crop-help-badge-block .crop-help-btn-img--badge {
  height: 28px;
  width: auto;
  max-width: 100%;
  margin: 0 4px 0 2px;
  vertical-align: -6px;
  object-fit: contain;
}
.crop-help-modal__sec {
  margin-bottom: 16px;
}
.crop-help-modal__sec:last-child {
  margin-bottom: 0;
}
.crop-help-modal__sec h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text, #1A1A1A);
}
.crop-help-modal__sec p {
  margin: 0 0 8px;
  color: var(--muted, #4b5563);
}
.crop-help-modal__sec p:last-child {
  margin-bottom: 0;
}
.crop-help-modal__actions {
  margin-top: 12px;
  justify-content: flex-end;
}

/* ── File card crop button (угол карточки, как × справа) ── */

.file-card__crop {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border, #E0E0E0);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #1a1a1a);
  opacity: 1;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}
.file-card__crop svg {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  pointer-events: none;
}
.file-card__crop:hover {
  border-color: var(--primary, #005BFF);
  color: var(--primary, #005BFF);
}
.file-card--cropped .file-card__crop {
  border-color: var(--success, #4caf50);
  background: #e8f5e9;
  color: #2e7d32;
}

.file-card__mirror {
  position: absolute;
  z-index: 2;
  top: 34px;
  left: 4px;
  width: 28px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border, #E0E0E0);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #1a1a1a);
  opacity: 1;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}
.file-card__mirror svg {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  pointer-events: none;
}
.file-card__mirror:hover {
  border-color: var(--primary, #005BFF);
  color: var(--primary, #005BFF);
}
.file-card--flipped .file-card__mirror {
  border-color: var(--success, #4caf50);
  background: #e8f5e9;
  color: #2e7d32;
}
.file-card__print-name{display:flex;align-items:center;gap:6px;margin:2px 0 4px;width:100%;min-width:0}
.file-card__print-name-input{flex:1;min-width:0;margin:0;padding:3px 6px;font-size:10px;font-weight:500;line-height:1.2;border:1px solid var(--border,#d1d5db);border-radius:4px;background:var(--input-bg,#fff);color:inherit}
.file-card__print-name-input::placeholder{color:var(--text-muted,#9ca3af);opacity:1}
.file-card__print-name-input:focus{outline:2px solid rgba(74,108,247,.35);outline-offset:0;border-color:rgba(74,108,247,.5)}
.file-card__print-name-toggle{display:flex;align-items:center;margin:0;flex-shrink:0;cursor:pointer}
.file-card__print-name-check{margin:0;width:15px;height:15px;cursor:pointer}

/* ── Тосты: standalone session / oversize ── */

.toast.toast-session {
  background: var(--info-bg, rgba(33,150,243,.1));
  color: var(--text, #1A1A1A);
  border: 1px solid var(--border, #E0E0E0);
  font-weight: 500;
}
.toast.toast-oversize {
  background: #fde8e8;
  color: #5c2222;
  border: 1px solid #e8b8b8;
  font-weight: 500;
}

/* ── Crop preview color modal ── */

.crop-preview-color-modal .modal{position:relative;width:min(440px,94vw);max-height:85vh;overflow-y:auto}
.crop-preview-color-modal .modal h3{font-size:14px;margin-bottom:8px;text-align:center}
.crop-preview-color-modal__hint{font-size:11px;color:var(--muted,#666666);margin:0 0 10px;line-height:1.4;text-align:center}
.crop-preview-color-modal__grid{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;margin:0 0 8px;width:100%;box-sizing:border-box}
.crop-prev-swatch{aspect-ratio:1;width:100%;min-height:0;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:4px;cursor:pointer;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.crop-prev-swatch:hover{filter:brightness(1.06);z-index:1}
.crop-prev-swatch.selected{outline:2px solid var(--accent,#4a6cf7);outline-offset:1px;box-shadow:0 0 0 1px #fff}
.crop-preview-color-modal__details{width:100%;margin:0 0 4px;text-align:left}
.crop-preview-color-modal__summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--accent,#4a6cf7);user-select:none;list-style:none;padding:6px 0}
.crop-preview-color-modal__summary::-webkit-details-marker{display:none}
.crop-preview-color-modal__details[open] .crop-preview-color-modal__summary{margin-bottom:0;color:var(--text,#1A1A1A)}
.crop-preview-color-modal__native-hidden{position:absolute;left:0;bottom:0;width:1px;height:1px;padding:0;margin:0;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0;opacity:0.001}
.crop-preview-color-modal__native-hidden input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:default}

/* ── Crop modal: mobile responsive ── */

@media (max-width: 768px) {
  .crop-modal__viewport {
    height: 50vh;
    max-height: 50vh;
  }
  .crop-modal__footer-row--trim {
    flex-direction: column;
    align-items: stretch;
  }
  .crop-modal__footer-left,
  .crop-modal__footer-right {
    justify-content: flex-start;
  }
}

/* ── /sheet-constructor (konstruktor-local): строка статистики и поля стоимости в шапке ── */
/* layout-tool задаёт .stats-bar { position:fixed } — внутри .constructor-price-row это ломает вёрстку: полоса пустая, текст уезжает */
body.constructor-page .constructor-price-row .stats-bar {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
  width: 100%;
  height: auto;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #1a1a1a);
  overflow: visible;
  white-space: normal;
  background: transparent;
  padding: 0 12px;
  box-sizing: border-box;
}

body.constructor-page .constructor-settings-bar #headerExportDpi,
body.constructor-page .constructor-settings-bar #headerCostPerM,
body.constructor-page .constructor-settings-bar #headerSheetW {
  width: auto;
  min-width: 44px;
  max-width: 100px;
}

/* Конструктор листов: сводка (#statsBar) — сразу под панелью настроек (десктоп) */
@media (min-width: 769px) {
  /* До первого sync JS не резервируем высоту пустой строки (раньше оставался дефолт 40px → зазор и перекрытие) */
  body.constructor-page.sheet-constructor-page {
    --constructor-price-row-h: 0px;
  }
  body.sheet-constructor-page .constructor-price-row.constructor-price-row--empty,
  body.sheet-constructor-page .constructor-price-row:has(#statsBar:empty) {
    display: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
  body.sheet-constructor-page .constructor-settings-bar {
    top: var(--constructor-top);
    z-index: 10235;
  }
  body.sheet-constructor-page .constructor-price-row {
    top: calc(var(--constructor-top) + var(--constructor-settings-h));
    z-index: 10228;
  }
}

/* /sheet-constructor: двухстрочная подпись поля ширины в верхней панели */
body.sheet-constructor-page .constructor-settings-bar .constructor-settings-bar__gap-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.05;
  white-space: normal;
}
body.sheet-constructor-page .constructor-settings-bar .constructor-settings-bar__sheet-width-label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  line-height: 1.05;
  white-space: normal;
}
body.sheet-constructor-page .constructor-settings-bar .constructor-settings-bar__sheet-width-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}
body.sheet-constructor-page .constructor-settings-bar #headerSheetW.constructor-settings-bar__input--sheet-width {
  min-width: 52px;
  height: 36px;
  line-height: 1;
  padding: 1px 6px 10px;
}
body.sheet-constructor-page .constructor-settings-bar .constructor-settings-bar__sheet-width-unit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  color: var(--muted, #666);
  pointer-events: none;
  user-select: none;
}

/* /sheet-constructor: «Очистить» — красная обводка (десктоп #btnClear; мобильный футер — #btnFooterClear ниже) */
body.sheet-constructor-page .constructor-settings-bar #btnClear {
  border: 1px solid #f44336;
  border-color: #f44336;
  color: #d32f2f;
  background: #fff;
}
body.sheet-constructor-page .constructor-settings-bar #btnClear:hover {
  border-color: #d32f2f;
  background: var(--danger-bg, rgba(244, 67, 54, 0.1));
  color: #c62828;
}
body.sheet-constructor-page .constructor-settings-bar #btnClear .constructor-svg-icon {
  color: inherit;
}

/* Нижняя панель /sheet-constructor на мобильном — те же обводки и акценты, что у верхней панели на десктопе */
@media (max-width: 768px) {
  body.sheet-constructor-page .mobile-footer .mfooter-top > .btn,
  body.sheet-constructor-page .mobile-footer .mfooter-bottom > .btn {
    border: 1px solid rgba(0, 91, 255, 0.35);
    box-sizing: border-box;
  }
  body.sheet-constructor-page .mobile-footer .mfooter-top > .btn:hover,
  body.sheet-constructor-page .mobile-footer .mfooter-bottom > .btn:hover {
    border-color: #005bff;
  }
  body.sheet-constructor-page .mobile-footer .mfooter-bottom .btn-cart {
    border-color: rgba(0, 91, 255, 0.5);
  }
  body.sheet-constructor-page .mobile-footer .mfooter-bottom .btn-cart:hover {
    border-color: #0050e0;
  }
  body.sheet-constructor-page .mobile-footer #btnFooterRecalc {
    border-color: #4caf50;
    color: #2e7d32;
    background: #fff;
  }
  body.sheet-constructor-page .mobile-footer #btnFooterRecalc:hover {
    border-color: #388e3c;
    background: rgba(76, 175, 80, 0.1);
    color: #1b5e20;
  }
  body.sheet-constructor-page .mobile-footer #btnFooterClear {
    border: 1px solid #f44336;
    border-color: #f44336;
    color: #d32f2f;
    background: #fff;
  }
  body.sheet-constructor-page .mobile-footer #btnFooterClear:hover {
    border-color: #d32f2f;
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
  }
  body.sheet-constructor-page .mobile-footer #btnFooterClear .constructor-svg-icon {
    color: inherit;
  }
}

/*
 * /sheet-constructor: в layout-tool-local у .mfooter-order-excel / .mfooter-pdf-to-png задано display:inline-flex;
 * в Safari/WebKit это может перебить сокрытие по атрибуту [hidden] (см. pdf-to-png-lk.css про flex и [hidden]).
 */
body.sheet-constructor-page #btnLoadOrderToolbar[hidden],
body.sheet-constructor-page #btnPdfToPngToolbar[hidden],
body.sheet-constructor-page #btnLoadOrderFooter[hidden],
body.sheet-constructor-page #btnPdfToPngFooter[hidden] {
  display: none !important;
}

/*
 * layout-tool(-local).css задаёт глобальный .btn после css/style.css — кнопка «Вход» / ЛК
 * в шапке выглядит как кнопка конструктора. Восстанавливаем стили .btn-outline.btn-sm магазина
 * на /sheet-constructor и /constructor (оба body.constructor-page).
 */
body.constructor-page .site-chrome--header .header .btn.btn-outline.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border: 2px solid transparent;
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}
body.constructor-page .site-chrome--header .header .btn.btn-outline.btn-sm:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Стили демо-кнопок для #constructorHelpModal (справка конструктора)
   ───────────────────────────────────────────────────────────────────────────── */
#constructorHelpModal .crop-help-pseudo-field {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  background: rgba(0, 91, 255, 0.08);
  border: 1px solid rgba(0, 91, 255, 0.22);
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
  box-sizing: border-box;
}
#constructorHelpModal .constructor-tour-demo-toggle-pair {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  vertical-align: middle;
  margin-right: 4px;
}
#constructorHelpModal .constructor-tour-demo-toggle-pair__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
#constructorHelpModal .constructor-tour-demo-toggle-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
#constructorHelpModal .constructor-tour-demo-toggle {
  pointer-events: none;
  user-select: none;
  cursor: default;
  flex-shrink: 0;
  font-family: inherit;
}
#constructorHelpModal .constructor-tour-demo-toggle--w-off {
  position: relative;
  overflow: hidden;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #e0e0e0;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
}
#constructorHelpModal .constructor-tour-demo-toggle--w-off::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 2px;
  height: 160%;
  background: rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  pointer-events: none;
}
#constructorHelpModal .constructor-tour-demo-toggle--w-on {
  position: relative;
  overflow: hidden;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #4caf50;
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.25);
}
#constructorHelpModal .constructor-tour-demo-w-text {
  font-size: 28px;
  font-weight: 700;
  font-family: inherit;
  position: relative;
  z-index: 0;
  line-height: 1;
}
#constructorHelpModal .constructor-tour-demo-toggle--w-on .constructor-tour-demo-w-text {
  color: #2e7d32;
}
#constructorHelpModal .constructor-tour-demo-toggle--autotrim-off {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  gap: 0;
  padding: 2px 4px 3px;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #e0e0e0;
  color: #999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
}
#constructorHelpModal .constructor-tour-demo-toggle--autotrim-off::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 2px;
  height: 160%;
  background: rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  pointer-events: none;
}
#constructorHelpModal .constructor-tour-demo-toggle--autotrim-on {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  gap: 0;
  padding: 2px 4px 3px;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #4caf50;
  background: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.25);
}
#constructorHelpModal .constructor-tour-demo-autotrim__a {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 1px;
  opacity: 0.85;
  position: relative;
  z-index: 0;
}
#constructorHelpModal .constructor-tour-demo-toggle--autotrim-on .constructor-tour-demo-autotrim__a {
  color: #2e7d32;
  opacity: 1;
}
#constructorHelpModal .constructor-tour-demo-toggle--autotrim-off svg,
#constructorHelpModal .constructor-tour-demo-toggle--autotrim-on svg {
  position: relative;
  z-index: 0;
  flex-shrink: 0;
  display: block;
  width: 14px;
  height: 14px;
}
#constructorHelpModal .constructor-tour-demo-btn {
  pointer-events: none;
  user-select: none;
  cursor: default;
  flex-shrink: 0;
  font-family: inherit;
}
#constructorHelpModal .constructor-tour-demo-btn--cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  line-height: 1.2;
  color: #fff !important;
  border: 1px solid rgba(0, 91, 255, 0.5);
  background: linear-gradient(135deg, #005bff 0%, #005bff 100%);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
#constructorHelpModal .constructor-tour-bar-btn-demo.btn.btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid rgba(0, 91, 255, 0.35);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
  cursor: default;
}
#constructorHelpModal .constructor-tour-bar-btn-demo .constructor-tour-help-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  color: #1a1a1a;
}
/* Как .constructor-settings-bar .constructor-help-btn — «?» без круга; отдельно тур — «? в круге» */
#constructorHelpModal .constructor-help-demo--plain {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid rgba(0, 91, 255, 0.35);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
  cursor: default;
}
#constructorHelpModal .constructor-help-demo--tour {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid rgba(0, 91, 255, 0.35);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
  cursor: default;
}
#constructorHelpModal .constructor-help-demo--tour .fa-circle-question {
  font-size: 18px;
  line-height: 1;
}
#constructorHelpModal .constructor-tour-demo-btn--trim-outline {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--border, #e0e0e0);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
}
#constructorHelpModal .constructor-tour-demo-btn--trim-outline .constructor-svg-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  color: #1a1a1a;
}
#constructorHelpModal .constructor-tour-demo-btn--mirror-outline {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--border, #e0e0e0);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
}
#constructorHelpModal .constructor-tour-demo-btn--mirror-outline .constructor-svg-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  color: #1a1a1a;
}
#constructorHelpModal .constructor-help-demo--file-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  border-radius: 4px;
  border: 1px solid var(--border, #e0e0e0);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}
#constructorHelpModal .constructor-help-demo--file-card-btn svg {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  pointer-events: none;
  color: #1a1a1a;
}
#constructorHelpModal .constructor-tour-demo-btn--recalc {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--green, #4caf50);
  box-sizing: border-box;
  background: #fff;
  color: #2e7d32;
}
#constructorHelpModal .constructor-tour-demo-btn--palette {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--border, #e0e0e0);
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  vertical-align: middle;
  box-shadow: none;
  overflow: hidden;
}
#constructorHelpModal .constructor-tour-demo-btn--palette .constructor-tour-svg--palette {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 1px;
}
#constructorHelpModal .constructor-tour-demo-btn--trash {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--red, #f44336);
  box-sizing: border-box;
  background: #fff;
  color: var(--red, #f44336);
  vertical-align: middle;
  box-shadow: none;
}
#constructorHelpModal .constructor-tour-demo-btn--print,
#constructorHelpModal .constructor-tour-demo-btn--print-all,
#constructorHelpModal .constructor-tour-demo-btn--add,
#constructorHelpModal .constructor-tour-demo-btn--merge {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  box-sizing: border-box;
  background: #fff;
  vertical-align: middle;
  box-shadow: none;
}
#constructorHelpModal .constructor-tour-demo-btn--print,
#constructorHelpModal .constructor-tour-demo-btn--print-all {
  border: 1px solid #c7d2fe;
  color: #4a6cf7;
  background: #eef2ff;
}
#constructorHelpModal .constructor-tour-demo-btn--merge {
  border: 1px solid #c7d2fe;
  color: #4a6cf7;
  background: #eef2ff;
}
#constructorHelpModal .constructor-tour-demo-btn--add {
  border: 1px solid #94a3b8;
  color: #334155;
}
#constructorHelpModal .constructor-tour-demo-btn .constructor-tour-svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

body.sheet-constructor-page .sheet-constructor-unlimited-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 12px 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 91, 255, 0.35);
  background: linear-gradient(100deg, #e8f2ff 0%, #f0faf4 100%);
  font-size: 0.88rem;
  line-height: 1.45;
  color: #1a2744;
  max-width: 100%;
  box-sizing: border-box;
}
/* После раскладки (#emptySheets с .sheet-limits-block убран из DOM) — скрыть баннер безлимита */
body.sheet-constructor-page:not(:has(#emptySheets)) .sheet-constructor-unlimited-notice {
  display: none;
}
/* Баннер подписки в потоке .constructor-app давал зазор под фикс. панелью (синяя кромка слева в щели) */
@media (min-width: 769px) {
  body.sheet-constructor-page .sheet-constructor-unlimited-notice {
    position: absolute;
    top: calc(var(--constructor-settings-h) + var(--constructor-price-row-h) + 12px);
    left: 20px;
    width: calc(30% - 40px);
    min-width: 360px;
    z-index: 4;
    margin: 0;
  }
  body.sheet-constructor-page:has(.sheet-constructor-unlimited-notice) .empty-sheets .sheet-limits-block {
    margin-top: var(--sheet-unlimited-notice-reserve, 0px);
  }
}
@media (max-width: 768px) {
  body.sheet-constructor-page .sheet-constructor-unlimited-notice {
    position: relative;
    margin: 12px 12px 10px;
  }
}

body.sheet-constructor-page .sheet-constructor-unlimited-notice i {
  flex-shrink: 0;
  margin-top: 2px;
  color: #005bff;
  font-size: 1.1rem;
}

body.sheet-constructor-page .sheet-constructor-unlimited-notice p {
  margin: 4px 0 0;
  font-weight: 400;
}

body.sheet-constructor-page .sheet-constructor-unlimited-notice strong {
  display: block;
  font-size: 0.95rem;
  color: #003d99;
}

/* Режим заказов (З): переключатель и строка-разделитель в списке файлов */
.mfooter-toggle--asorder .mfooter-toggle-asorder-text{font-size:18px;font-weight:800;position:relative;z-index:0;line-height:1}
#footerGroupAsOrder:not(:checked)+.mfooter-toggle--asorder,
#headerGroupAsOrder:not(:checked)+.mfooter-toggle--asorder{
  background:#e5e7eb;border-color:#d1d5db;color:#9ca3af;position:relative;overflow:hidden;
}
#footerGroupAsOrder:not(:checked)+.mfooter-toggle--asorder::after,
#headerGroupAsOrder:not(:checked)+.mfooter-toggle--asorder::after{
  content:'';
  position:absolute;left:50%;top:50%;z-index:1;
  width:2px;height:160%;
  background:rgba(107,114,128,.92);
  transform:translate(-50%,-50%) rotate(-45deg);
  border-radius:1px;pointer-events:none;
}
#footerGroupAsOrder:checked+.mfooter-toggle--asorder,
#headerGroupAsOrder:checked+.mfooter-toggle--asorder{
  background:#fef3c7;border-color:#f59e0b;color:#b45309;font-weight:700;
  box-shadow:0 0 0 1px rgba(245,158,11,.25);
}
.constructor-merge-order-sheets{
  flex-shrink:0;
}
.constructor-print-all-order-names{
  flex-shrink:0;
  color:#94a3b8;
}
.constructor-print-all-order-names.is-on,
.constructor-print-all-order-names[aria-pressed="true"]{
  color:#4a6cf7;
  background:#eef2ff;
  border-color:#c7d2fe;
}
.constructor-print-all-order-names:hover,
.constructor-print-all-order-names:focus{
  color:#4a6cf7;
  background:#fff;
  border-color:#c7d2fe;
}

.file-order-divider{
  flex:1 0 100%;
  width:100%;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  padding:8px 10px;
  margin:2px 0 4px;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  border-radius:8px;
  box-sizing:border-box;
}
.file-order-divider__title{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  gap:2px;
}
.file-order-divider__name{
  flex:1;
  min-width:0;
  margin:0;
  padding:4px 6px;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  border:1px solid transparent;
  border-radius:4px;
  background:transparent;
  color:inherit;
}
.file-order-divider__name:focus{
  outline:2px solid rgba(74,108,247,.35);
  border-color:rgba(74,108,247,.5);
  background:#fff;
}
.file-order-divider__meta{
  flex-shrink:0;
  font-size:14px;
  font-weight:700;
  line-height:1.25;
  color:var(--muted,#6b7280);
  white-space:nowrap;
}
.file-order-divider__meta--stale{
  color:#e65100;
  font-weight:700;
  cursor:pointer;
}
.file-order-divider__btn{
  width:32px;
  height:32px;
  margin:0;
  padding:0;
  flex-shrink:0;
}
.file-order-divider__btn.btn-success.btn-icon-outline{
  border-color:var(--green,#22c55e);
  color:#15803d;
  background:#fff;
}
.file-order-divider__btn.btn-success.btn-icon-outline:hover{
  background:#ecfdf5;
}
.file-order-divider__btn.btn-danger.btn-icon-outline{
  border-color:var(--red,#ef4444);
  color:var(--red,#dc2626);
  background:#fff;
}
.file-order-divider__btn.btn-danger.btn-icon-outline:hover{
  background:#fef2f2;
  border-color:#d32f2f;
}
.file-order-divider__btn--print{
  position:relative;
  width:28px;
  height:28px;
  margin-left:6px;
  color:#94a3b8;
  background:transparent;
  border:1px solid transparent;
}
.file-order-divider__btn--print:not(.is-on)::after{
  content:"";
  position:absolute;
  left:5px;
  right:5px;
  top:50%;
  height:1.5px;
  background:currentColor;
  transform:rotate(-45deg);
  pointer-events:none;
}
.file-order-divider__btn--print.is-on,
.file-order-divider__btn--print[aria-pressed="true"]{
  color:#4a6cf7;
  background:#eef2ff;
  border-color:#c7d2fe;
}
.file-order-divider__btn--print:hover,
.file-order-divider__btn--print:focus{
  color:#4a6cf7;
  background:#fff;
  border-color:#c7d2fe;
}
.file-order-divider__btn--add{
  border-color:#94a3b8;
  color:#334155;
  background:#fff;
}
.file-order-divider__btn--add:hover{
  background:#f8fafc;
  border-color:#64748b;
}

@media(max-width:768px){
  .mobile-footer .mfooter-toggle--asorder .mfooter-toggle-asorder-text{font-size:16px}
  .files-col__cards--orders{
    flex-wrap:wrap;
    overflow-x:hidden;
    overflow-y:visible;
    scroll-snap-type:none;
  }
  .files-col__cards--orders .file-order-divider{
    flex:1 0 100%;
    width:100%;
    min-width:0;
    scroll-snap-align:none;
  }
  .files-col__cards--orders .file-order-divider__meta{
    white-space:normal;
  }
  .files-col__cards--orders .file-card{scroll-snap-align:none}
}

/* Устаревшая раскладка — мигающая подсветка кнопки пересчёта и метка в статистике */
@keyframes constructor-layout-stale-blink {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.35);
    border-color: #ffb74d;
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.95), 0 0 14px rgba(255, 152, 0, 0.5);
    border-color: #f57c00;
  }
}

body.constructor-page #btnRecalc.layout-stale,
body.constructor-page #btnFooterRecalc.layout-stale,
body.sheet-constructor-page .file-order-divider__btn--recalc.layout-stale,
body.constructor-page .file-order-divider__btn--recalc.layout-stale {
  animation: constructor-layout-stale-blink 1.1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  body.constructor-page #btnRecalc.layout-stale,
  body.constructor-page #btnFooterRecalc.layout-stale,
  body.sheet-constructor-page .file-order-divider__btn--recalc.layout-stale,
  body.constructor-page .file-order-divider__btn--recalc.layout-stale {
    animation: none;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.85);
    border-color: #ff9800;
  }
}

body.constructor-page .stats-stale {
  color: #e65100;
  font-weight: 600;
  cursor: pointer;
}
/* Как #btnRecalc (.btn-success.btn-icon-outline): иначе .btn-success даёт белую иконку на прозрачном фоне */
body.constructor-page .stats-stale__icon-btn.btn.btn-success.btn-icon-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  margin: 0 4px;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--green, #4caf50);
  box-sizing: border-box;
  color: #2e7d32;
  background: #fff;
  animation: constructor-layout-stale-blink 1.1s ease-in-out infinite;
}
body.constructor-page .stats-stale__icon {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
body.constructor-page .stats-stale-recalc:hover .stats-stale__icon-btn,
body.constructor-page .stats-stale-recalc:focus-visible .stats-stale__icon-btn {
  background: var(--success-bg, rgba(76, 175, 80, 0.1));
  color: #2e7d32;
}
body.constructor-page .stats-stale-recalc:hover,
body.constructor-page .stats-stale-recalc:focus-visible {
  text-decoration: underline;
  outline: none;
}
@media (prefers-reduced-motion: reduce) {
  body.constructor-page .stats-stale__icon-btn.btn.btn-success.btn-icon-outline {
    animation: none;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.85);
    border-color: #ff9800;
  }
}

body.constructor-page .stats-layout-improve-wrap,
body.sheet-constructor-page .stats-layout-improve-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 3;
  pointer-events: auto;
  padding: 6px 2px;
  margin: 0;
  vertical-align: baseline;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.constructor-page .stats-layout-improve,
body.sheet-constructor-page .stats-layout-improve {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #005BFF);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  vertical-align: baseline;
}
body.constructor-page .stats-layout-improve:hover,
body.sheet-constructor-page .stats-layout-improve:hover,
body.constructor-page .stats-layout-improve:focus-visible,
body.sheet-constructor-page .stats-layout-improve:focus-visible {
  text-decoration: underline;
  outline: none;
}
body.constructor-page .stats-layout-improve--busy,
body.sheet-constructor-page .stats-layout-improve--busy {
  color: #e65100;
}
body.constructor-page .stats-layout-improve__spinner,
body.sheet-constructor-page .stats-layout-improve__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: stats-layout-improve-spin 0.75s linear infinite;
}
@keyframes stats-layout-improve-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  body.constructor-page .stats-layout-improve__spinner,
  body.sheet-constructor-page .stats-layout-improve__spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.65;
  }
}
.mobile-stats__row--improve .stats-layout-improve {
  margin-top: 2px;
}
