/*!
 * © 2026 Гореньков М. С. (сервис «КарЧоо», карчоо.рф).
 * Исключительные права на программу для ЭВМ и все материалы сервиса принадлежат
 * правообладателю (ст. 1257, 1259, 1296 ГК РФ). Копирование, распространение,
 * модификация и иное использование без письменного разрешения запрещены
 * (ст. 1252, 1270, 1280 ГК РФ). Контакт: kar.choo@yandex.com
 * @license proprietary
 */
/* шрифт бланка — для canvas-предпросмотра */
@font-face { font-family: "Liberation Serif"; font-weight: normal; font-style: normal;
  src: url("/static/fonts/LiberationSerif-Regular.ttf") format("truetype"); }
@font-face { font-family: "Liberation Serif"; font-weight: bold; font-style: normal;
  src: url("/static/fonts/LiberationSerif-Bold.ttf") format("truetype"); }
@font-face { font-family: "Liberation Serif"; font-weight: normal; font-style: italic;
  src: url("/static/fonts/LiberationSerif-Italic.ttf") format("truetype"); }
@font-face { font-family: "Liberation Serif"; font-weight: bold; font-style: italic;
  src: url("/static/fonts/LiberationSerif-BoldItalic.ttf") format("truetype"); }

:root {
  --bg: #f3f4f1;  --surface: #ffffff;
  --ink: #1c2422;
  --muted: #5a6663;
  --line: #d9ddd8;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #d9f0ea;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --radius-panel: 12px;
  --radius-ctrl: 7px;
  --shadow: 0 1px 2px rgba(28, 36, 34, .06), 0 10px 26px rgba(28, 36, 34, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "PT Sans", Ubuntu, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Интерфейс всегда представляет собой единый макет 1440×900. Размер окна,
   полноэкранный режим и zoom браузера меняют только общий равномерный scale. */
body.app-fixed-scale {
  position: fixed;
  left: var(--app-left, 0);
  top: var(--app-top, 0);
  width: 1440px;
  height: 900px;
  min-width: 1440px;
  min-height: 900px;
  overflow: visible;
  transform: scale(var(--app-scale, 1));
  transform-origin: top left;
}

/* Модальные подложки компенсируют масштаб и горизонтальное центрирование холста,
   поэтому затемняют всё реальное окно, включая свободные поля по краям. */
body.app-fixed-scale .modal-backdrop,
body.app-fixed-scale .wizard-backdrop,
body.app-fixed-scale .img-lightbox {
  inset: auto;
  left: var(--app-cover-left);
  top: var(--app-cover-top);
  width: var(--app-cover-width);
  height: var(--app-cover-height);
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }

/* ---- предупреждение для телефонов ---- */
.phone-notice {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
  background: linear-gradient(155deg, rgba(28, 36, 34, .93), rgba(15, 118, 110, .88));
  backdrop-filter: blur(6px);
}
.phone-notice.is-visible { display: flex; }
body.phone-warning-open { overflow: hidden; }
.phone-notice-card {
  width: min(100%, 430px);
  padding: 28px 24px 22px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(28, 36, 34, .38);
  text-align: center;
}
.phone-notice-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #0f766e;
  background: #d9f0ea;
}
.phone-notice-kicker {
  margin: 0 0 7px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.phone-notice h1, .phone-notice h2 {
  margin: 0 0 12px;
  color: #1c2422;
  font-family: Georgia, "PT Serif", "Times New Roman", serif;
  font-size: clamp(25px, 7vw, 32px);
  line-height: 1.12;
}
.phone-notice-card > p:not(.phone-notice-kicker):not(.phone-notice-foot) {
  margin: 0;
  color: #5a6663;
  font-size: 15px;
  line-height: 1.5;
}
.phone-notice-card .phone-notice-recommend {
  margin-top: 12px !important;
  padding: 11px 12px;
  border-radius: 10px;
  color: #1e4a44 !important;
  background: #e9f4f0;
  font-weight: 650;
}
.phone-notice-actions {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.phone-notice-actions .btn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 15px; }
.phone-notice-foot { margin: 15px 0 0; color: #6b7773; font-size: 11.5px; line-height: 1.4; }

@media (max-height: 620px) {
  .phone-notice { align-items: flex-start; }
  .phone-notice-card { padding-top: 20px; }
  .phone-notice-icon { width: 52px; height: 52px; margin-bottom: 10px; border-radius: 15px; }
  .phone-notice-icon svg { width: 27px; height: 27px; }
}

/* ---- top bar ---- */
.topbar {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 16px 20px 0;
  padding: 0 20px;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.btn.btn-wizard-top {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 13px 36px;
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(15, 118, 110, .5), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: wizTopPulse 2.6s ease-in-out infinite;
}
@keyframes wizTopPulse {
  0%, 100% { box-shadow: 0 3px 14px rgba(15, 118, 110, .5), 0 0 0 0 rgba(15, 118, 110, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
  50% { box-shadow: 0 3px 14px rgba(15, 118, 110, .5), 0 0 0 8px rgba(15, 118, 110, 0), inset 0 1px 0 rgba(255, 255, 255, .25); }
}
.btn.btn-wizard-top:hover { box-shadow: 0 5px 18px rgba(15, 118, 110, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.topbar-title { font-weight: 650; font-size: 15px; color: var(--ink); letter-spacing: .01em; }
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; justify-self: start; text-decoration: none; }
.topbar-text { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-sub { font-size: 11px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.topbar-logo { display: block; width: 42px; height: 40px; object-fit: contain; }
.topbar-wordmark { font-size: 22px; font-weight: 800; letter-spacing: .015em; color: #232b3e; white-space: nowrap; }
.topbar-wordmark em { font-style: normal; color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; justify-self: end; }
/* «Калибровка» остаётся строго по центру шапки; «Экскурс по программе»
   абсолютно позиционирован — JS ставит его ровно в середину промежутка
   между брендом «КарЧоо» и «Калибровкой» (на центр не влияет) */
.topbar-mid { position: relative; justify-self: center; display: flex; align-items: center; }
.btn-tour-top {
  position: absolute;
  top: 50%;
  left: 320px; /* пересчитывает positionTourBtn() */
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}
.topbar-actions a.btn { text-decoration: none; }
.btn.btn-top-mail { font-size: 14px; font-weight: 600; gap: 8px; white-space: nowrap; }
/* «Кабинет» — круглая иконка-кнопка в правом краю шапки */
.btn.btn-account {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}
.btn.btn-account:hover:not(:disabled) { border-color: #91c9bc; }

/* индикатор «онлайн» у кнопки поддержки: медленное «дыхание» */
.support-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex: none;
  animation: support-dot-breathe 2.6s ease-in-out infinite;
}
@keyframes support-dot-breathe {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
  }
  50% {
    opacity: .45;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
  }
}

/* ---- buttons ---- */
.btn {
  font: inherit;
  font-weight: 550;
  border: 1px solid transparent;
  border-radius: var(--radius-ctrl);
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .08s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { background: #eef0ec; }
.btn.small { padding: 5px 10px; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.btn.small:hover { background: #b3ddd2; }
.btn-xl { padding: 12px 30px; font-size: 16px; font-weight: 650; border-radius: 10px; gap: 9px; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.danger-ghost { background: transparent; color: var(--danger); border-color: var(--line); }
.btn.danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }
.btn.icon-only { padding: 8px; }

/* ---- layout ---- */
.layout {
  flex: 1;
  display: grid;
  /* ширина превью-колонки дополнительно уточняется JS (fitPreview) под портрет 110×140 */
  grid-template-columns: 230px minmax(420px, 1fr) 490px;
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  padding: 12px 20px 20px;
  min-height: 0;
}
.center-col {
  display: grid;
  /* Карточка и выбор изготовителя сохраняют размеры при смене бланка.
     Дополнительные строки настройки занимают только нижнюю панель. */
  grid-template-rows: max-content 110px minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  min-width: 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 650; }
.dirty-flag { font-size: 12px; color: var(--danger); font-weight: 550; }

/* ---- registry ---- */
.search { padding: 12px 16px 10px; }
.kind-sections {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 4px;
}
.kind-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.kind-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 8px 7px;
  padding: 8px 12px;
  background: #f3f4f1;
  border: 1px solid #d9ddd8;
  border-radius: var(--radius-ctrl);
}
.kind-head-title { font-size: 12.5px; font-weight: 700; color: var(--accent-hover); }
.kind-head-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.card-list {
  list-style: none;
  margin: 0;
  padding: 0 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.card-list li.li-empty {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  cursor: default;
}
.card-list li.li-empty:hover { background: transparent; }
.card-list li {
  position: relative;
  padding: 9px 84px 9px 10px;
  border-radius: var(--radius-ctrl);
  cursor: pointer;
  line-height: 1.3;
  transition: background .15s ease;
}
.card-list li:hover { background: #eef0ec; }
.card-list li.active { background: var(--accent-soft); }
.test-sample-list { flex: none; margin-bottom: 8px; }
.card-list .test-sample-row { padding-right: 10px; border: 1px solid var(--accent); }
.card-list .test-sample-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; font-weight: 400; }
.card-list .test-sample-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* запись без типа (охранник/работник) — красная подсветка, печать заблокирована */
.card-list li.no-kind { background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger); }
.card-list li.no-kind:hover { background: #fdd7d7; }
.card-list .li-name {
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.li-date {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: opacity .15s ease;
}
.card-list li:hover .li-date { opacity: 0; }
.li-del {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease, color .15s ease;
}
.card-list li:hover .li-del { opacity: 1; }
.li-del:hover { background: var(--danger-soft); color: var(--danger); }
.empty { padding: 28px 18px; text-align: center; }
.empty p { margin: 4px 0; }
.muted { color: var(--muted); font-size: 12.5px; }

.migrate-banner {
  margin: 8px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  background: #fef3c7;
  border-radius: var(--radius-ctrl);
  font-size: 12.5px;
}
.migrate-banner p { margin: 0 0 8px; }
.migrate-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.registry-foot {
  border-top: 1px solid var(--line);
  padding: 10px 14px 12px;
  margin-top: auto;
}
.empty-import {
  font-size: 14.5px;
  padding: 12px 18px;
  margin: 12px 0;
  justify-content: center;
  width: 100%;
  white-space: normal;
  text-align: center;
}
.privacy-note {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.registry-io { display: flex; gap: 8px; }
.registry-io .btn { flex: 1; justify-content: center; }

/* ---- form ---- */
.form-panel form {
  padding: 8px 14px 8px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-areas:
    "worker worker"
    "org boss"
    "issue boss"
    "actions actions";
  gap: 8px 12px;
  align-content: start;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin: 0;
  padding: 6px 12px 8px;
  display: grid;
  column-gap: 12px;
  align-content: start;
}
legend {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  padding: 0;
  margin-bottom: 4px;
}
.blk-worker { grid-area: worker; grid-template-columns: repeat(3, 1fr); }
.blk-org { grid-area: org; grid-template-columns: 1fr 1fr; }
.blk-org .field { display: flex; flex-direction: column; justify-content: flex-end; }
/* блок «Руководитель» тянется на 2–3 строки: «Должность» сверху,
   «Инициалы и фамилия» прижаты к низу — на уровне поля «Дата выдачи» */
.blk-boss { grid-area: boss; display: flex; flex-direction: column; }
.blk-boss .field:first-of-type label {
  min-height: 30px;
  display: flex;
  align-items: flex-end;
}
.blk-boss .field:last-child { margin-top: auto; }
.blk-issue { grid-area: issue; display: flex; flex-direction: column; }
.blk-issue .field { margin-top: auto; }

/* едва заметный зеленоватый тон у блоков */
fieldset { background: #f3f4f1; border-color: #d9ddd8; }
.form-panel .panel-head { padding: 10px 16px 9px; }
.field { margin-bottom: 5px; }
.field label { display: block; font-size: 12.5px; font-weight: 550; margin-bottom: 3px; }
.field input.missing { border-color: var(--danger); background: var(--danger-soft); }
input[type="text"], input[type="search"], input[type="number"], select {
  font: inherit;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: #93a39d; }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .15);
}
.date-row { display: flex; gap: 6px; position: relative; }
/* невидимый input под кнопкой: нативный календарь открывается под ней, а не в углу экрана */
.date-pop { position: absolute; right: 0; top: 100%; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.date-row input[type="text"] { flex: 1; }
.date-row .btn { flex: none; }
.form-actions {
  grid-area: actions;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding-top: 2px;
}
.form-actions .primary { flex: 1; justify-content: center; }

/* ---- преднастройка бланка (производитель): закреплённая полоса ---- */
.preset-panel {
  padding: 7px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
  container-type: size;
}
.preset-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.preset-title { font-weight: 700; font-size: 13px; white-space: nowrap; }
.preset-note { color: #828f8a; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preset-opts {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.3fr) minmax(0, 1.25fr) minmax(0, .95fr) minmax(0, 1.25fr) minmax(0, .95fr) minmax(0, 1.25fr);
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.preset-opt {
  position: relative;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 3px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-ctrl);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  min-width: 0;
  min-height: 0;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.preset-opt b { max-width: 100%; font-size: 12px; font-weight: 650; line-height: 1.15; overflow-wrap: anywhere; }
.preset-opt[data-preset="tip1"] b { font-size: 11px; letter-spacing: -.2px; overflow-wrap: normal; }
.preset-opt[data-preset="neoblank"] b { font-size: 11px; overflow-wrap: normal; }
.preset-opt[data-preset="ao-format"] b { white-space: nowrap; }
.preset-opt[data-preset="sibpro"] b { font-size: 11px; white-space: nowrap; }
.preset-opt[data-preset="custom"] b { font-size: 10.5px; overflow-wrap: normal; }
.preset-opt:has(.preset-legal) { padding-top: 18px; }
.preset-legal {
  position: absolute;
  top: 6px;
  left: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}
.preset-opt:hover { border-color: var(--accent); }
.preset-opt.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.preset-opt.active b { color: var(--accent-hover); }

/* переключатель типа карточки: охранник (ЛКО) / работник (ЛКР) */
.kind-switch {
  display: flex;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  background: #eef0ec;
  padding: 3px;
  gap: 3px;
}
.kind-switch.missing { border-color: var(--danger); background: var(--danger-soft); box-shadow: 0 0 0 1px var(--danger); }
.kind-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.kind-opt:hover { color: var(--ink); }
.kind-opt.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(15, 118, 110, .35);
}
.kind-opt .kind-sub {
  font-size: 10.5px;
  font-weight: 500;
  opacity: .75;
}

/* ---- preview ---- */
.preview-head { flex-wrap: wrap; }
.preview-actions { display: flex; gap: 8px; width: 100%; }
.preview-actions .btn { flex: 1; justify-content: center; white-space: nowrap; }
.preview-body {
  position: relative;
  flex: 1;
  min-height: 320px;
  background: #d9ddd8;
  display: flex;
  justify-content: center;
}
.preview-body canvas {
  height: 100%;
  width: auto;
  display: block;
}
.preview-footer .btn.preview-delete-custom,
.btn.custom-blank-delete {
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
  border: 2px solid #dc2626;
  color: #9b3227;
  box-shadow: 0 2px 8px rgba(28, 36, 34, .12);
}
.preview-delete-custom[hidden] { display: none; }
.preview-footer .btn.preview-delete-custom:hover,
.btn.custom-blank-delete:hover { background: #fff0ed; border-color: #b91c1c; }
.custom-blank-delete[hidden] { display: none; }
#confirmBackdrop { z-index: 150; }
.preview-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #d9ddd8;
  z-index: 1;
  transition: opacity .25s ease;
}
.preview-skeleton.gone { opacity: 0; pointer-events: none; }
.preview-skeleton span {
  display: block;
  width: 46%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #d9ddd8 25%, #eef0ec 50%, #d9ddd8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
.preview-skeleton span:nth-child(2) { width: 34%; }
.preview-skeleton span:nth-child(3) { width: 52%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.preview-hint {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

/* ---- панель настройки печати ---- */
.cal-panel { transition: box-shadow .3s ease; }
.cal-panel .panel-head { padding: 10px 16px 9px; }
.cal-settings-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cal-controls-zone {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cal-lockable {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  transition: filter .22s ease, opacity .22s ease, transform .22s ease;
}
.cal-panel.is-locked .cal-lockable {
  filter: blur(4px);
  opacity: .42;
  transform: scale(.995);
  pointer-events: none;
  user-select: none;
}
.cal-panel.is-locked #btnSaveSettings {
  filter: blur(2px);
  opacity: .42;
}
.cal-lock {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 10px 18px;
  background: rgba(238, 240, 236, .2);
  backdrop-filter: blur(1px);
}
.cal-lock[hidden] { display: none; }
.cal-lock-card {
  width: min(550px, 100%);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 15px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #b3d4c8;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(30, 74, 68, .16);
}
.cal-lock-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #0f766e;
  background: #e4efe9;
}
.cal-lock-copy { min-width: 0; }
.cal-lock-copy strong { display: block; margin: 0 0 3px; font-size: 14px; color: #173c37; }
.cal-lock-copy p { margin: 0 0 10px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.cal-lock-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-lock-actions .btn { padding: 7px 12px; font-size: 12.5px; }
.cal-panel.flash { box-shadow: 0 0 0 3px rgba(15, 118, 110, .35); }
.cal-body { flex: 1; overflow-y: auto; padding: 8px 14px; }
.cal-table { display: flex; flex-direction: column; }
.cal-foot {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 7px 18px; /* ровно по краям таблицы: текст строк и поле шрифта */
  border-top: 1px solid var(--line);
}
.cal-copy {
  margin-right: auto;
  align-self: center;
  font-size: 11px;
  color: var(--muted);
  opacity: .8;
}

@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.cal-row { margin-bottom: 18px; }
.cal-row > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cal-row .muted { margin: 6px 0 0; }
.cal-ctrl { display: flex; align-items: center; gap: 10px; }
.cal-ctrl input[type="range"] { flex: 1; accent-color: var(--accent); }
.cal-ctrl output {
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #eef0ec;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12.5px;
}

/* per-row calibration sliders */
.rows-cal .muted { margin: 0 0 10px; }
.row-cal {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1fr) 54px;
  align-items: center;
  gap: 0 8px;
  padding: 1px 4px;
  border-radius: 6px;
}
.row-cal input[type="range"] { height: 18px; }
.row-cal-name { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 550; }
.row-cal label { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); min-width: 0; overflow: hidden; }
.row-cal input[type="range"] { flex: 1 1 0; min-width: 16px; accent-color: var(--accent); }
.row-cal output {
  flex: none;
  width: 46px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #eef0ec;
  border-radius: 6px;
  padding: 1px 3px;
  font-size: 10.5px;
}
.row-cal-head { color: var(--muted); font-size: 10px; line-height: 1.1; padding: 0 4px; }
.row-cal-head span:not(.row-cal-name) { text-align: center; }
.row-all { background: var(--accent-soft); margin-bottom: 4px; }
.row-all .row-cal-name { font-weight: 700; }
.row-size-wrap { position: relative; display: block; min-width: 0; }
.row-size { width: 100%; min-width: 0; box-sizing: border-box; padding: 3px 16px 3px 6px; font-size: 11.5px; appearance: none; -moz-appearance: none; }
.row-size::-webkit-inner-spin-button, .row-size::-webkit-outer-spin-button { display: none; }
.row-size-btns {
  position: absolute;
  right: 3px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column;
}
.row-size-btns button {
  border: 0; background: none; cursor: pointer;
  padding: 1px 3px;
  font-size: 7px; line-height: 1.2;
  color: var(--accent);
  border-radius: 3px;
}
.row-size-btns button:hover:not(:disabled) { background: var(--accent-soft); }
.row-size-btns button:disabled { opacity: .35; cursor: default; }
/* ---- окно подстройки по пробе ---- */
.modal.calib-modal.calib7 {
  width: 1382px;
  height: 846px;
  max-width: none;
  max-height: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.calib7-head { display: flex; align-items: center; gap: 12px; padding: 9px 14px 8px; flex: none; }
.calib7-head-text {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(220px, .7fr) minmax(360px, 1fr);
  align-items: center;
  gap: 12px;
}
.calib7-head h2 {
  margin: 0;
  white-space: nowrap;
  font-size: 19px;
  color: #1e4a44;
}
.calib7-lead { margin: 0 !important; font-size: 12.5px !important; line-height: 1.3; color: var(--muted); }
.calib7-warn {
  margin: 0 !important;
  padding: 6px 10px;
  background: #e9f2ee;
  border-left: 3px solid #0f766e;
  border-radius: 7px;
  font-size: 11.5px !important;
  line-height: 1.3;
  color: #173c37;
}
.calib7-warn b { font-weight: 800; }
.calib7-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(680px, 58%) minmax(0, 1fr); /* левая колонка ещё шире: карточки-подсказки крупнее */
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  padding: 0 12px 10px;
  overflow: hidden;
}
.calib7-left {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.calib7-listcol {
  flex: none;
  min-width: 0;
  min-height: 0;
  max-height: 272px; /* при большом числе полей список скроллится, а не сжимает гайды — текст шага 2 должен помещаться */
  padding: 7px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f4f1;
}
.calib7-left .calib7-h { margin-bottom: 4px; }
.calib7-left .calib-list { gap: 4px; }
.calib7-left .calib-list li { padding: 5px 22px 5px 10px; }
.calib7-left .calib-li-name { font-size: 12.5px; }
.calib7-left .calib-li-pos { font-size: 11px; }
/* пустая строка — в одну линию: название слева, «Нет текста» справа */
.calib7-left .calib-list li.empty { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.calib7-left .calib-list li.empty .calib-li-name { display: inline; }
.calib7-left .calib-list li.sel::after { top: 5px; font-size: 14px; }
/* много полей (СИБПРО: ФИО тремя строками) — список в две колонки, наполнение
   СВЕРХУ ВНИЗ: сначала левая колонка, затем правая (не слева направо).
   Multicol балансирует высоты: 7 полей → 4+3, 6 → 3+3 */
.calib7-left .calib-list.cols2 { display: block; columns: 2; column-gap: 6px; }
.calib7-left .calib-list.cols2 li { padding: 4px 20px 4px 8px; margin: 0 0 4px; break-inside: avoid; }
.calib7-left .calib-list.cols2 .calib-li-name { font-size: 12px; }
.calib7-left .calib-list.cols2 .calib-li-pos { font-size: 10px; }
.calib7-left .calib-list.cols2 li.empty { flex-wrap: wrap; row-gap: 0; }
.calib7-left .calib-list.cols2 li.sel::after { top: 4px; right: 7px; font-size: 13px; }
.calib7-left .calib7-listcol:has(.calib-list.cols2) { max-height: 210px; }
.calib7-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto; /* сначала гарантируем место тексту */
  align-items: start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  background: #fff;
}
.calib7-card .calib7-how { margin: 0; }
.calib7-card .calib7-imgwrap { min-height: 0; height: 100%; }
.calib7-card .calib7-guide-img { height: 100%; object-fit: contain; }
.row-size-shared { text-align: center; font-size: 10px; color: var(--muted); }
.calib7-card .calib7-how-text p { margin: 0 0 4px; line-height: 1.3; }
.calib7-guide-img {
  display: block;
  width: 100%;   /* ровно по ширине карточки — без пустых полей по бокам */
  height: auto;  /* высота по пропорции картинки, целиком */
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0f5f1;
  cursor: zoom-in;
}
.calib7-imgwrap { position: relative; }
.calib7-zoomhint {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(28, 36, 34, .62);
  color: #fff;
  pointer-events: none; /* клик проходит к картинке */
  transition: background .15s ease;
}
.calib7-imgwrap:hover .calib7-zoomhint { background: rgba(255, 255, 255, .92); color: var(--accent); }

/* картинка-подсказка на весь экран по клику */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 36, 34, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.img-lightbox img {
  width: 1354px;
  height: 846px;
  object-fit: contain; /* апскейл до экрана, пропорции сохраняются */
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
}
.calib7-h { margin: 0 0 6px; font-size: 14px; font-weight: 650; color: #1e4a44; }
.calib7-how { display: flex; gap: 9px; }
.calib7-how .w1-num { width: 26px; height: 26px; font-size: 12.5px; margin-top: 2px; }
.calib7-how-text { flex: 1; min-width: 0; }
.calib7-how-text p { margin: 0 0 5px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.calib7-how-title { font-weight: 650; font-size: 13px !important; color: #1e4a44 !important; }
.calib7-left .calib7-how-text p:not(.calib7-how-title) { font-size: 12px; line-height: 1.3; }
.calib7-left .calib7-how-title { font-size: 14px !important; line-height: 1.3 !important; }
.calib7-how-em { font-weight: 650; color: #173c37 !important; }
.img-placeholder {
  aspect-ratio: 4 / 3;
  margin-top: 6px;
  background: #f0f5f1;
  border: 1.5px dashed #8dbbab;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: #7d9a90;
  font-size: 11.5px;
  line-height: 1.35;
  text-align: center;
}
.calib7-next {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  background: #e9f2ee;
  border: 1px solid #a8cfc2;
  border-radius: 10px;
  padding: 4px 8px;
}
.calib7-next > .w1-num { width: 26px; height: 26px; font-size: 12px; }
.calib7-next-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.calib7-next-copy > strong { display: block; margin: 0; color: #173c37; font-size: 12px; line-height: 1.25; }
.calib7-next-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.modal.calib7 .calib7-next p { margin: 0; font-size: 10.5px; line-height: 1.25; color: var(--muted); }
.modal.calib7 .calib7-next p b { color: #173c37; font-weight: 750; }
/* пункт 3 — ответы на вопросы «что нажать»; развёрнут у всех бланков (next-lg) */
.calib7-next .nx-q { margin: 0 0 3px; font-weight: 750; color: #173c37; }
.calib7-next .calib7-next-lead { display: none; }
#calibBackdrop.next-lg .calib7-next { padding: 10px 12px; align-items: start; }
#calibBackdrop.next-lg .calib7-next > .w1-num { width: 30px; height: 30px; font-size: 13px; }
#calibBackdrop.next-lg .calib7-next-copy { grid-template-columns: minmax(0, 1fr); gap: 6px; }
#calibBackdrop.next-lg .calib7-next-copy > strong { font-size: 13.5px; }
#calibBackdrop.next-lg .calib7-next-actions { gap: 8px 10px; }
#calibBackdrop.next-lg .calib7-next p { font-size: 11.5px; line-height: 1.4; }
#calibBackdrop.next-lg .calib7-next .nx-q { font-size: 12px; }
#calibBackdrop.next-lg .calib7-next-lead {
  display: block;
  margin: 2px 0 0;
  padding-top: 7px;
  border-top: 1px dashed #a8cfc2;
  font-size: 11px;
  line-height: 1.35;
  color: #31594f;
}
.calib7-guides {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* карточки рядом, картинка во всю ширину карточки */
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: end; /* прижаты к низу левой колонки */
  gap: 6px;
}
.calib7-card { height: 100%; }
.calib7-next { grid-column: 1 / -1; }
.calib7-stage-wrap { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.calib7-stage-head { min-height: 30px; display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 5px; margin-bottom: 5px; }
.calib7-stage-head .calib7-h { margin: 0; }
.calib7-stage-tools { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calib7-hints {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 8;
  display: grid;
  gap: 8px;
  max-height: calc(100% - 20px);
  overflow-y: auto;
  pointer-events: none;
}
.calib7-hints > aside { pointer-events: auto; }
.calib-precision-tip {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #a8cfc2;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #f0f7f4;
  animation: precision-tip-in .22s cubic-bezier(.16, 1, .3, 1);
}
.calib-precision-tip[hidden] { display: none; }
@keyframes precision-tip-in { from { opacity: 0; } }
.calib-precision-mouse {
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px #c6dcd2;
}
.calib-precision-tip strong { display: block; margin-bottom: 2px; color: #173c37; font-size: 13px; }
.calib-precision-tip p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.calib-precision-tip .btn { margin-top: 9px; padding: 5px 12px; }

.calib-position-warning {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: start;
  gap: 14px;
  padding: 12px 12px 12px 16px;
  border: 2px solid #dc2626;
  border-left-width: 6px;
  border-radius: 12px;
  background: #fff7f7;
  animation: position-warning-in .22s cubic-bezier(.16, 1, .3, 1);
}
.calib-position-warning[hidden] { display: none; }
@keyframes position-warning-in { from { opacity: 0; } }
.calib-position-warning-badge {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.calib-position-warning strong { display: block; margin-bottom: 4px; color: #7f1d1d; font-size: 14px; line-height: 1.25; }
.calib-position-warning p { margin: 0; color: #3f1d1d; font-size: 12px; line-height: 1.4; }
.calib-position-warning p b { color: #991b1b; font-weight: 800; }
.calib-position-warning-avoid {
  padding: 1px 5px;
  border-radius: 5px;
  color: #b91c1c;
  background: #fee2e2;
  box-shadow: inset 0 0 0 1px #fecaca;
  font-weight: 800;
  white-space: nowrap;
}
.calib-position-warning-result {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  color: #991b1b;
  background: #fee2e2;
  box-shadow: inset 0 0 0 1px #fecaca;
  font-weight: 750;
}
.calib-position-warning-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  background: #fff;
  color: #b91c1c;
  font: 400 29px/1 var(--font);
  cursor: pointer;
}
.calib-position-warning-close:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
.calib7-zoom { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.calib7-zoom button {
  height: 26px;
  min-width: 30px;
  padding: 0 8px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #1e4a44;
  font: 650 12px/1 var(--font);
  cursor: pointer;
}
.calib7-zoom button:last-child { border-right: 0; }
.calib7-zoom button:hover { background: var(--accent-soft); color: var(--accent); }
#btnCalibZoomReset { min-width: 52px; font-variant-numeric: tabular-nums; }
.calib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.calib-list li {
  position: relative;
  padding: 7px 24px 7px 9px;
  border-radius: var(--radius-ctrl);
  cursor: pointer;
  line-height: 1.3;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 36, 34, .05);
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease, transform .12s ease;
}
.calib-list li:hover { border-color: var(--accent); transform: translateX(2px); }
.calib-list li.sel {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.calib-list li.sel .calib-li-name { color: var(--accent); }
.calib-list li.sel::after {
  content: "\2192";
  position: absolute;
  right: 9px;
  top: 6px;
  color: var(--accent);
  font-weight: 700;
}
.calib-list li.empty { opacity: .45; }
.calib-li-name { font-weight: 600; font-size: 12.5px; display: block; }
.calib-li-pos { font-size: 11px; color: #6b7773; font-variant-numeric: tabular-nums; }
.calib-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2eae5;
  border: 1px solid #d2dcd6;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
}
.calib-stage.panning { cursor: grabbing; }
.calib-canvas {
  position: relative;
  display: inline-block;
  flex: none;
  line-height: 0;
  transform-origin: center center;
}
#calibImg { display: block; max-width: none; max-height: none; border: 1px solid var(--line); border-radius: 0; user-select: none; -webkit-user-drag: none; }
.calib-blank-vector {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  overflow: hidden;
  border-radius: 0;
  background: #fff;
  pointer-events: none;
  user-select: none;
}
.calib7-legend { margin: 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.calib7-lg { display: inline-block; flex: none; width: 24px; height: 16px; border-radius: 0; margin-left: 10px; }
.calib7-lg:first-child { margin-left: 0; }
.calib7-lg-sel { border: 2px solid #0f766e; background: rgba(15, 118, 110, .12); }
.calib7-lg-base { border: 1.5px dashed #93a39d; background: transparent; }
.calib-chip {
  position: absolute;
  box-sizing: content-box;
  background: rgba(15, 118, 110, .035);
  outline: none;
  box-shadow: 0 0 0 calc(1px / var(--calib-view-scale, 1)) rgba(15, 118, 110, .8);
  border-radius: 0;
  padding: 4px 6px;
  margin: -4px 0 0 -6px;
  cursor: grab;
  overflow: visible;
  user-select: none;
  touch-action: none;
}
.calib-chip-text { display: block; }
.calib-chip.sel {
  background: rgba(15, 118, 110, .035);
  box-shadow: 0 0 0 calc(1px / var(--calib-view-scale, 1)) rgba(15, 118, 110, .8);
}
.calib-chip.drag {
  cursor: grabbing;
  background: transparent;
  box-shadow: none;
  opacity: .9;
}
.calib-group {
  position: absolute;
  z-index: 1;
  border-radius: 0;
  background: rgba(15, 118, 110, .025);
  box-shadow: 0 0 0 calc(1px / var(--calib-view-scale, 1)) rgba(15, 118, 110, .8);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.calib-group.drag { cursor: grabbing; background: transparent; box-shadow: none; }
.calib-canvas.calib-grouped .calib-chip {
  z-index: 2;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
.calib-group-lock {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #b6ccc1;
  border-radius: 10px;
  background: #fff;
  color: #436158;
  box-shadow: 0 2px 6px rgba(28, 64, 52, .12);
  cursor: pointer;
}
.calib-group-lock.is-locked { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.calib-group-lock:hover { border-color: var(--accent); color: var(--accent); }
.calib-group-lock:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.calib-group-lock svg[hidden] { display: none; }
.calib-base {
  position: absolute;
  border: 1.5px dashed #93a39d;
  border-radius: 0;
  pointer-events: none;
}
.calib7-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  flex: none;
}
.calib7-foot-l, .calib7-foot-r { display: flex; gap: 8px; }

body.calib-open .wizard,
body.calib-open .wizard-backdrop { visibility: hidden; }

.row-size.auto {
  color: var(--accent);
  font-weight: 700;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cal-arr { color: var(--accent); font-size: 13px; font-weight: 700; flex: none; }
.cal-axis-y { border-left: 1px dashed var(--line); padding-left: 8px; }
.row-cal-head span:nth-child(2) { color: var(--accent); }

/* ---- modal ---- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 36, 34, .32);
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  padding: 22px;
  width: 360px;
  /* страховка от «белый блок заехал за низ экрана»: любое окно — не выше
     подложки (холст 1440×900 всегда целиком влезает в viewport) */
  max-height: calc(100% - 16px);
  overflow-y: auto;
  animation: drawer-in .18s cubic-bezier(.16, 1, .3, 1);
}
.modal p { margin: 0 0 18px; font-size: 14.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---- вход в приложение: объяснение сервиса перед мастером/пейволлом ---- */
.app-intro-backdrop {
  z-index: 85;
  background:
    radial-gradient(circle at 22% 20%, rgba(15, 118, 110, .18), transparent 34%),
    rgba(28, 36, 34, .62);
}
.modal.app-intro {
  width: 740px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, .28);
  box-shadow: 0 30px 90px rgba(14, 45, 41, .34), 0 6px 18px rgba(28, 36, 34, .16);
}
.app-intro-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 23px 26px 20px;
  background: linear-gradient(135deg, #eff9f6 0%, #fff 72%);
  border-bottom: 1px solid #cfe5df;
}
.modal.app-intro .app-intro-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.modal.app-intro h2 {
  margin: 0;
  color: #173c37;
  font-size: 20px;
  line-height: 1.16;
  white-space: nowrap;
}
.modal.app-intro .app-intro-lead {
  margin: 8px 0 0;
  padding: 0;
  color: #465450;
  font-size: 13.5px;
  line-height: 1.4;
}
.app-intro-body { padding: 14px 26px 18px; }
.app-intro-flow {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: minmax(0, 1.2fr) 28px 130px 28px minmax(0, .86fr);
  align-items: center;
  gap: 6px;
}
.app-intro-registry {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(28, 36, 34, .07);
}
.app-intro-registry-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px -8px 6px;
  padding: 6px 8px;
  border-bottom: 1px solid #dde4e1;
  border-radius: 11px 11px 0 0;
  background: #f1f5f3;
}
.app-intro-registry-bar b {
  color: #40514d;
  font-size: 10px;
  letter-spacing: .02em;
}
.app-intro-window-dots { display: flex; gap: 3px; }
.app-intro-window-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9c5c1;
}
.app-intro-registry-table {
  overflow: hidden;
  border: 1px solid #e0e5e2;
  border-radius: 6px;
}
.app-intro-registry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 35px;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-top: 1px solid #edf0ee;
  color: #40514d;
  font-size: 9.5px;
}
.app-intro-registry-row:first-child { border-top: 0; }
.app-intro-registry-head {
  min-height: 18px;
  color: #70807b;
  font-size: 8px;
  font-weight: 700;
  background: #f7f9f8;
}
.app-intro-registry-row em {
  justify-self: end;
  padding: 1px 4px;
  border-radius: 4px;
  color: #0f766e;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  background: #e2f3ef;
}
.app-intro-registry > small {
  display: block;
  margin: 6px 1px 0;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}
.app-intro-brand-node {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 0;
  text-align: center;
}
.app-intro-brand-logo {
  width: 88px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border: 1px solid #b7dfd6;
  border-radius: 26px;
  background: radial-gradient(circle at 50% 38%, #fff 0%, #edf9f6 72%);
  box-shadow: 0 10px 24px rgba(15, 118, 110, .16);
}
.app-intro-brand-logo img {
  width: 78px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(15, 118, 110, .15));
}
.app-intro-brand-node b,
.app-intro-ready-card b {
  display: block;
  color: #173c37;
  font-size: 12px;
  line-height: 1.2;
}
.app-intro-brand-node small,
.app-intro-ready-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.25;
}
.app-intro-ready-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}
.app-intro-ready-card-frame {
  position: relative;
  width: 70px;
  height: 89px;
  flex: none;
  overflow: hidden;
  border: 1px solid #b9c5c1;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 6px 13px rgba(28, 36, 34, .14);
}
.app-intro-ready-card-frame .demo-card-base {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: block;
}
.demo-card-face {
  position: absolute;
  z-index: 1;
  left: 2.8%;
  top: 10.3%;
  width: 27.2%;
  height: 28.7%;
  object-fit: cover;
}
.app-intro-arrow {
  color: var(--accent);
  font-size: 25px;
  line-height: 1;
  text-align: center;
}
.app-intro-flow > :not(.app-intro-flow-note) { grid-row: 2; }
.modal.app-intro .app-intro-flow-note {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
  display: flex;
  width: max-content;
  max-width: 686px;
  box-sizing: border-box;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  padding: 9px 12px;
  border: 1px solid #b7dfd6;
  border-radius: 10px;
  color: #28514a;
  background: linear-gradient(90deg, #edf8f5, #f7fbfa);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
  white-space: normal;
  text-align: left;
}
.modal.app-intro .app-intro-flow-note span { min-width: 0; overflow-wrap: anywhere; }
.modal.app-intro .app-intro-flow-note svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-intro-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-intro-benefits li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f1f5f3;
  color: #33524c;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-align: left;
}
.app-intro-benefits svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-intro-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: #f3f4f1;
}
.app-intro-actions .btn {
  min-height: 46px;
  justify-content: center;
  padding: 11px 16px;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
}
.app-intro-home { box-shadow: 0 7px 18px rgba(15, 118, 110, .22); }

/* Белая информационная плашка перед входом в настройку. */
.app-intro-cookie { padding: 14px 26px; background: var(--surface); border-top: 1px solid var(--line); }
.app-intro-cookie[hidden] { display: none; }
.modal.app-intro .app-intro-cookie p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.app-intro-cookie a { color: var(--accent); }
.cookie-choice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.cookie-choice { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; line-height: 1.4; cursor: pointer; }
.cookie-choice input { flex: none; width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.cookie-choice small, .cookie-choice-hint { color: var(--muted); font-size: 11.5px; }
.cookie-settings-link { margin-left: 10px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.cookie-settings-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* обязательное пояснение перед шагом 7 */
.calib-intro-backdrop { z-index: 70; background: rgba(28, 36, 34, .56); }
.modal.calib-intro {
  width: 680px;
  max-height: 846px;
  padding: 0;
  overflow-y: auto;
  border: 1px solid rgba(245, 158, 11, .38);
  box-shadow: 0 28px 80px rgba(28, 36, 34, .32), 0 5px 16px rgba(28, 36, 34, .14);
}
.calib-intro-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 15px;
}
.calib-intro-icon {
  width: 50px;
  height: 50px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #b45309;
  background: #fff4d6;
}
.calib-intro-step {
  display: block;
  margin-bottom: 3px;
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.calib-intro h2 { margin: 0; color: #173c37; font-size: 21px; line-height: 1.25; }
.modal.calib-intro .calib-intro-main {
  margin: 0 24px 15px;
  padding: 14px 16px;
  border: 1px solid #f3cf79;
  border-left: 5px solid #d97706;
  border-radius: 10px;
  background: #fff8e6;
  color: #66470c;
  font-size: 15.5px;
  line-height: 1.45;
}
.calib-intro-main strong { color: #8a4b08; font-weight: 800; }
.calib-intro-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0 24px;
  list-style: none;
}
.calib-intro-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.calib-intro-list li > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e4efe9;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}
.calib-intro-list b { display: block; margin-bottom: 1px; color: #173c37; font-size: 13.5px; }
.calib-intro-list small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.calib-intro-reminder {
  margin: 15px 24px 0;
  padding: 10px 13px;
  border-radius: 9px;
  background: #e9f2ee;
  color: #173c37;
  font-size: 13.5px;
  text-align: center;
}
.calib-intro-reminder em { color: #b45309; font-style: normal; font-weight: 800; }
.calib-intro-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 24px 22px;
}
.calib-intro-actions .btn { padding: 10px 17px; }

/* окно проверки настроек печати перед повторной пробой */
.modal.print-check {
  width: 580px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(147, 163, 157, .32);
  box-shadow: 0 24px 70px rgba(28, 36, 34, .2), 0 4px 12px rgba(28, 36, 34, .08);
}
.pcheck-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 21px 24px 11px;
}
.pcheck-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--accent);
  background: var(--accent-soft);
}
.modal.print-check .pcheck-step {
  margin: 0 0 3px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--accent);
}
.modal.print-check h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  color: #1e4a44;
}
.modal.print-check .pcheck-sub {
  margin: 0;
  padding: 0 24px 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}
.pcheck-list {
  margin: 0 24px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: #f3f4f1;
}
.pcheck-row {
  display: grid;
  grid-template-columns: 22px minmax(150px, 1fr) 88px;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 13px;
  color: #3a4744;
  font-size: 13.5px;
}
.pcheck-row + .pcheck-row { border-top: 1px solid var(--line); }
.pcheck-row.pcheck-paper-row {
  background: #fff4d6;
  box-shadow: inset 0 0 0 2px #e7a32a;
  min-height: 86px;
}
.pcheck-paper-row > span { font-weight: 750; color: #82420d; }
.pcheck-row > :last-child { text-align: center; }
.pcheck-paper-value { min-width: 0; }
.pcheck-paper-row .pcheck-paper-value strong { font-size: 19px; color: #82420d; }
.pcheck-paper-hint { display: block; margin-top: 5px; font-size: 12px; line-height: 1.4; color: #82420d; }
.pcheck-paper-hint[hidden] { display: none; }
.pcheck-row::before {
  content: "✓";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
}
.pcheck-row strong {
  color: #173c37;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pcheck-warn {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 24px 18px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #854d0e;
}
.pcheck-warn svg { flex: none; margin-top: 1px; }
.pcheck-trial-confirm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 24px 18px;
  padding: 14px 12px;
  border: 1px solid #f0cc78;
  border-radius: 9px;
  background: #fff7e0;
  color: #6d4a10;
  cursor: pointer;
}
.pcheck-trial-confirm[hidden] { display: none; }
.pcheck-trial-confirm input {
  appearance: none;
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  margin: 2px 0 0;
  border: 1px solid #a7b4af;
  border-radius: 11px;
  background: #d5dfda;
  cursor: pointer;
  transition: background .15s ease;
}
.pcheck-trial-confirm input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #0002;
  transition: transform .15s ease;
}
.pcheck-trial-confirm input:checked { border-color: var(--accent); background: var(--accent); }
.pcheck-trial-confirm input:checked::after { transform: translateX(16px); }
.pcheck-trial-confirm input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pcheck-trial-confirm.is-invalid {
  border-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}
.pcheck-trial-confirm.is-invalid input { border-color: #dc2626; background: #fee2e2; }
.pcheck-trial-confirm.is-invalid input:focus-visible { outline-color: #dc2626; }
.pcheck-trial-copy { display: grid; gap: 5px; min-width: 0; font-size: 13px; line-height: 1.45; }
.pcheck-trial-copy strong { font-size: 14px; }
.pcheck-actions {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--line);
  background: #f3f4f1;
}
.pcheck-actions .btn {
  justify-content: center;
  min-height: 42px;
  padding-left: 12px;
  padding-right: 12px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

/* ---- пейволл: плашка оплаты перед печатью ---- */
.modal.paywall {
  position: relative;
  width: 740px; /* одна колонка с 01.10 (aside убран) */
  padding: 0;
  overflow: hidden;
  max-height: 840px; /* холст 900px: воздух по 30px сверху/снизу; лишнее скроллится внутри */
  overflow-y: auto;
  border: 1px solid rgba(147, 163, 157, .32);
  box-shadow: 0 24px 70px rgba(28, 36, 34, .2), 0 4px 12px rgba(28, 36, 34, .08);
}
.pay-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* aside «Оплата по счёту» убран 01.10: реквизиты — details внизу колонки */
  gap: 20px;
  align-items: start;
  padding: 0 24px 12px; /* 12px снизу — часть центровки строки реквизитов (.pay-req-inline) */
}
/* плашка «мы написали вам на почту» после регистрации */
.pay-mailnote {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 24px 14px;
  padding: 11px 14px;
  background: #e9f6f1;
  border: 1px solid #bfe3d6;
  border-radius: 10px;
  color: #0f5e4e;
  font-size: 14px;
  line-height: 1.45;
}
.pay-mailnote svg { flex-shrink: 0; margin-top: 1px; }
.pay-mailnote b { color: #0b4a3e; }
.pay-mailnote-x {
  flex-shrink: 0;
  margin: -2px -4px 0 auto;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: #4d7a6e;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.pay-mailnote-x:hover { background: rgba(15, 94, 78, .1); color: #0b4a3e; }
.pay-col-main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.pay-payment {
  grid-column: 1;
  grid-row: 1;
  padding: 17px;
  border: 1px solid #ead8aa;
  border-radius: 15px;
  background: linear-gradient(180deg, #fffaf0, #fff 160px);
  box-shadow: 0 9px 24px rgba(113, 78, 18, .08);
  color: #3a4744;
}
.pay-payment-status {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fef0c7;
  color: #8a5b0b;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 800;
}
.pay-payment h3 {
  margin: 0 0 7px;
  color: #173f39;
  font-size: 18px;
  line-height: 1.2;
}
.pay-payment .pay-selected-summary {
  margin: 0 0 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid #eee2c5;
  font-size: 12.5px;
}
.pay-payment-lead {
  margin: 0 0 7px;
  color: #274a45;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}
.pay-payment-list {
  margin: 0 0 7px;
  padding-left: 20px;
  color: #4c5d58;
  font-size: 12.5px;
  line-height: 1.55;
}
.pay-payment-list li::marker { color: var(--accent); }
.pay-payment-to {
  margin: 0 0 8px;
  color: #66746f;
  font-size: 11.5px;
}
.pay-payment .pay-closed-mailbtn,
.pay-payment .pay-closed-tgbtn {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  font-size: 12.5px;
}
.pay-payment .pay-closed-tgbtn { margin-top: 7px; }
.pay-payment-note {
  margin: 10px 0 0;
  color: #66746f;
  font-size: 11.5px;
  line-height: 1.4;
}
.pay-profile .pay-payment { margin-top: 13px; }
.pay-manual-fields {
  display: grid;
  gap: 7px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.pay-manual-fields li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 11px;
  border: 1px solid #d7e7e1;
  border-radius: 10px;
  background: #f4faf8;
  color: #294b45;
}
.pay-manual-fields li > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.pay-manual-fields b { color: #123f38; font-size: 12.5px; }
.pay-manual-fields small { color: #63746f; font-size: 11.5px; }
.pay-manual-fields li:last-child {
  border-color: #a8d8cd;
  background: #eaf7f3;
}
.pay-manual-fields li:last-child small { color: var(--accent-hover); font-weight: 750; }
.pay-manual-field-no {
  display: grid;
  width: 25px;
  height: 25px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}
.pay-manual-actions {
  display: block;
  margin-top: 12px;
}
.pay-manual-actions .btn {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  margin: 0;
  text-align: center;
  text-decoration: none;
}
.pay-manual-copy { font-size: 13px; }
.pay-req-details {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid #eee2c5;
  font-size: 11.5px;
  color: #596b66;
}
.pay-req-details summary {
  color: #34534e;
  font-weight: 700;
  cursor: pointer;
}
.pay-req-details-body { padding-top: 9px; }
.pay-req-details-body p { margin: 0 0 6px; line-height: 1.4; }
/* реквизиты внизу основной колонки пейволла (aside убран 01.10).
   Отступы подобраны так, чтобы середина свёрнутой строки была ровно
   посередине между линией border-top и нижним краем окна:
   16px сверху = 4px снизу + 12px нижний padding .pay-cols */
.pay-req-inline {
  margin-top: 4px;
  padding: 16px 14px 4px;
  border-top-color: var(--line);
}
.pay-req-inline summary {
  text-align: center;
  list-style: none; /* стандартный маркер сдвигал текст вправо от центра */
}
.pay-req-inline summary::-webkit-details-marker { display: none; }
.pay-req-marker {
  display: inline-block;
  color: var(--accent);
  transition: transform .15s ease;
}
.pay-req-inline[open] .pay-req-marker { transform: rotate(90deg); }
.pay-req-inline[open] { padding-bottom: 4px; }
.pay-req-inline .pay-req-details-body {
  padding: 8px 4px 6px;
  text-align: center;
}
.pay-req-inline .pay-req-details-body p { margin: 0 0 4px; }
.pay-req-details a {
  color: var(--accent-hover);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 118, 110, .25);
}
.pay-req {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  padding: 12px 15px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #3a4744;
}
.pay-req p { margin: 0 0 4px; }
.pay-req a {
  color: var(--accent-hover);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 118, 110, .3);
}
.pay-req a:hover { border-bottom-color: var(--accent-hover); }
.pay-req-title {
  margin: 0 0 9px !important;
  font-size: 13px !important;
  font-weight: 750;
  color: #1e4a44;
}
.pay-req-note {
  margin-top: 8px !important;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.modal.paywall .pcheck-head {
  align-items: center;
  padding: 20px 72px 16px 24px;
}
.modal.paywall .pcheck-head > div {
  display: flex;
  min-height: 44px;
  flex-direction: column;
  justify-content: center;
}
.modal.paywall .pcheck-step {
  margin: 0 0 3px !important;
  font-size: 12.5px !important;
  line-height: 1.15;
}
.modal.paywall .pcheck-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}
/* режим «только вход» (круг «Кабинет» в шапке, аноним): без тарифов,
   оплаты и продающих блоков — только форма входа/регистрации */
.pay-auth-only .pay-plans,
.pay-auth-only .pay-selected-summary,
.pay-auth-only .pay-plan-foot,
.pay-auth-only .pay-benefits,
.pay-auth-only .pay-req-details {
  display: none !important;
}
.pay-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 7px;
}
.pay-plan {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 14px 14px 12px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pay-plan:hover { border-color: #91c9bc; transform: translateY(-1px); }
.pay-plan.active {
  border-color: var(--accent);
  background: linear-gradient(145deg, #eef9f6, #fff);
  box-shadow: 0 7px 18px rgba(15, 118, 110, .12), inset 0 0 0 1px rgba(15, 118, 110, .18);
}
.pay-plan-year:not(.active) { border-color: #b7dacf; }
.pay-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.pay-plan-name { color: #244b45; font-size: 13.5px; font-weight: 750; }
.pay-plan-mark {
  padding: 3px 7px;
  border-radius: 999px;
  color: #58706a;
  background: #edf1ef;
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}
.pay-plan-year .pay-plan-mark { color: #0d685f; background: #dff3ee; }
.pay-plan-price { display: flex; align-items: baseline; gap: 5px; }
.pay-plan-price strong { color: #17463f; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.pay-plan-price small { color: var(--muted); font-size: 11.5px; }
.pay-plan-desc,
.pay-plan-monthly,
.pay-plan-saving { display: block; margin-top: 7px; padding-right: 23px; font-size: 10.5px; line-height: 1.25; }
.pay-plan-desc { color: var(--muted); }
.pay-plan-monthly { color: #42625c; font-weight: 650; }
.pay-plan-saving { margin-top: 3px; color: var(--accent-hover); font-weight: 750; }
.pay-plan-ribbon {
  position: absolute;
  top: -12px;
  right: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 13px rgba(15, 118, 110, .26);
  font-size: 12.5px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .01em;
}
.pay-plan-radio {
  position: absolute;
  right: 13px;
  bottom: 12px;
  width: 17px;
  height: 17px;
  border: 1.5px solid #aebbb7;
  border-radius: 50%;
  background: #fff;
}
.pay-plan.active .pay-plan-radio { border-color: var(--accent); }
.pay-plan.active .pay-plan-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.modal.paywall .pay-plan-foot {
  margin: 0 0 9px;
  color: #64726e;
  font-size: 10.5px;
  line-height: 1.3;
  text-align: center;
}
.pay-benefits {
  display: flex;
  flex-wrap: nowrap; /* три галочки — в одну строку (01.10) */
  justify-content: space-between;
  gap: 2px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pay-benefits li {
  position: relative;
  padding: 1px 0 1px 20px;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  color: #3a4744;
}
.pay-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dcfce7;
  color: #15803d;
  font-size: 10.5px;
  font-weight: 800;
}
/* ---- нижний блок «напишите нам» в пейволле ---- */
.pay-contact {
  margin: 12px 24px 0;
  padding: 11px 16px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdfb;
  text-align: center;
}
.pay-contact-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.pay-contact .pay-closed-mailbtn,
.pay-contact .pay-closed-tgbtn {
  width: auto;
  margin-top: 0;
  padding: 9px 16px;
}
.pay-contact-note {
  margin: 9px 0 0 !important;
  font-size: 11.5px !important;
  color: var(--muted);
}
.pay-closed-badge {
  display: inline-block;
  margin: 0 0 10px !important;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 15px !important;
  font-weight: 800;
  letter-spacing: .01em;
}
.modal.paywall .pay-selected-summary {
  margin: -2px 0 8px;
  color: #4c5d58;
  font-size: 12.5px;
}
.pay-selected-summary b { color: var(--accent-hover); }
.pay-closed-lead {
  margin: 0 0 13px !important;
  font-size: 15.5px !important;
  line-height: 1.4;
  color: #0f2e29;
  font-weight: 750;
}
.pay-closed-lead b { color: var(--accent-hover); }
.pay-closed-mailbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  font-size: 14.5px;
}
.pay-closed-addr { font-weight: 700; }
.pay-closed-copyicon { margin-left: auto; opacity: .7; flex: none; }
.pay-closed-tgbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  font-size: 14px;
  text-decoration: none;
}
.pay-closed-alt {
  margin: 12px 0 8px !important;
  font-size: 12.5px !important;
  color: var(--muted);
}
.pay-account {
  margin: 12px 0 14px;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid #acd8ce;
  border-radius: 15px;
  background: linear-gradient(180deg, #f5fbf9 0, #fff 105px);
  box-shadow: 0 10px 28px rgba(15, 118, 110, .10);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.pay-account.is-register {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(15, 118, 110, .16), inset 0 0 0 1px rgba(15, 118, 110, .08);
}
.pay-closed { text-align: center; }
.pay-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px 12px;
}
.pay-account-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  color: #08786d;
  background: #dff3ee;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .08);
}
.pay-account-title {
  margin: 0 0 3px !important;
  font-size: 16px !important;
  line-height: 1.2;
  font-weight: 780;
  color: #123f38;
}
.pay-account-note {
  margin: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.35;
  color: #5d716c;
}
.pay-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 0 17px 13px;
  padding: 4px;
  border-radius: 11px;
  background: #e8efec;
}
.pay-tab {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.pay-tab.active { background: #fff; color: var(--accent-hover); box-shadow: 0 2px 7px rgba(28, 36, 34, .13); }
.pay-account form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  align-items: start; /* не растягивать поля по высоте ряда (подсказка ЧОО высокая) */
  padding: 0 17px 17px;
}
.pay-account .pay-consent,
.pay-account .pay-auth-error,
.pay-account .pay-auth-submit { grid-column: 1 / -1; }
/* блок «Оплата по счёту или по QR» — запасной вариант для бухгалтерии
   юрлица (по умолчанию анониму показывается форма входа/регистрации) */
.pay-invoice-steps {
  margin: 0;
  padding: 0 17px 4px 38px;
  display: grid;
  gap: 5px;
  color: #4c5d58;
  font-size: 13px;
  line-height: 1.5;
}
.pay-invoice-steps li::marker { color: var(--accent); font-weight: 700; }
.pay-invoice-steps b { color: #123f38; }
.pay-invoice-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
  padding: 11px 17px 17px;
}
.pay-invoice-actions .pay-closed-mailbtn {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 12px;
  font-size: 13px;
}
.pay-invoice-actions .btn.ghost {
  width: 100%;
  min-height: 42px;
  margin: 0;
  justify-content: center;
  font-size: 13px;
}
/* QR мгновенной оплаты месячного тарифа (фиксированный счёт Робокассы) */
.pay-invoice-qr {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 4px 17px 0;
  padding: 11px 13px;
  border: 1px dashed #c9d8d2;
  border-radius: 10px;
  background: #f6faf8;
}
.pay-invoice-qr[hidden] { display: none; }
.pay-invoice-qr img { width: 132px; height: 132px; flex: none; border-radius: 6px; }
.pay-invoice-qr-text p { margin: 0 0 5px; font-size: 12.5px; line-height: 1.45; color: #4c5d58; }
.pay-invoice-qr-text p:first-child { color: #123f38; }
.pay-invoice-qr-text a { color: var(--accent); font-size: 12.5px; }
.pay-back { flex: 0 0 auto; padding: 8px 14px; min-height: 36px; }
.pay-auth-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}
.pay-auth-actions .pay-auth-submit { flex: 1; width: 100%; margin-top: 0; }
.pay-account:not(.is-register) .pay-auth-actions { margin-top: 16px; }
.pay-invoice-reqrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pay-invoice-req {
  display: inline-block;
  padding: 3px 11px;
  border: 1px solid #9fd0c4;
  border-radius: 999px;
  background: #eaf6f2;
  color: #123f38;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}
.pay-profile { padding: 17px; }
.pay-account .field { margin-bottom: 10px; }
.pay-account .field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 680;
  color: #294b46;
}
.pay-field-hint {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #748681;
}
.pay-field-required {
  margin-left: 5px;
  font-size: 10.5px;
  font-weight: 750;
  color: #9a5b13;
}
.pay-account input[type="email"],
.pay-account input[type="password"],
.pay-account input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 14.5px;
  color: inherit;
  box-shadow: inset 0 1px 2px rgba(28, 36, 34, .025);
}
.pay-account input::placeholder { color: #91a09c; }
.pay-account input:focus { outline: 3px solid rgba(15, 118, 110, .15); border-color: var(--accent); }
/* автоподсказки ЧОО при регистрации и в профиле кабинета (bootstrap.js,
   attachOrgSuggest; position: relative на обёртку ставит скрипт) */
.org-suggest {
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 40;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(28, 36, 34, .16);
  overflow: hidden;
}
.org-suggest-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
}
.org-suggest-item:hover, .org-suggest-item.active { background: #eef4f2; }
.org-suggest-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-suggest-inn { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.org-suggest-empty {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.org-hint {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}
.pay-consent {
  display: grid;
  gap: 8px;
  margin: 4px 0 12px;
  text-align: left;
}
.pay-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.35;
  color: #3a4744;
  cursor: pointer;
}
.pay-check input {
  margin: 0;
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}
.pay-check a {
  color: var(--accent-hover);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 118, 110, .3);
}
.pay-auth-error {
  margin: 0 0 8px !important;
  font-size: 12.5px !important;
  color: #b91c1c;
}
.pay-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 3px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 6px 14px rgba(15, 118, 110, .18);
}
.pay-profile-email {
  margin: 0 0 4px !important;
  font-size: 13.5px !important;
  font-weight: 700;
  color: #173c37;
  word-break: break-all;
}
.pay-profile-sub {
  margin: 0 0 10px !important;
  font-size: 12.5px !important;
  line-height: 1.4;
  color: var(--muted);
}
.pay-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px; /* кнопка оплаты теперь под QR-блоком */
  margin-bottom: 8px;
}
.pay-profile-actions .btn { padding: 6px 12px; font-size: 12.5px; }
/* главная кнопка оплаты в профиле пейволла — крупная, на всю ширину */
.pay-main-btn {
  width: 100%;
  justify-content: center;
  padding: 13px 20px !important;
  font-size: 16px !important;
  font-weight: 750;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(15, 118, 110, .22);
}
/* QR выбранного тарифа под кнопкой оплаты (переключается syncPayPlans) */
.pay-qr-block {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 12px 0 0;
  padding: 14px 16px; /* отступы от краёв — структура, а не прилипший текст */
  border: 1px dashed #c9d8d2;
  border-radius: 10px;
  background: #f6faf8;
}
.pay-qr-block img { width: 148px; height: 148px; flex: none; border-radius: 6px; }
.pay-qr-text { min-width: 0; }
.pay-qr-text p { margin: 0 0 7px !important; font-size: 13px !important; line-height: 1.45; color: #4c5d58; }
.pay-qr-text p:last-child { margin-bottom: 0 !important; }
.pay-qr-text .pay-qr-lead { margin-bottom: 4px !important; }
.pay-qr-text b { color: #123f38; }
.pay-qr-text a { color: var(--accent); font-weight: 650; text-decoration: none; }
.pay-qr-text a:hover { text-decoration: underline; }
/* ключевое условие QR-оплаты — отдельными янтарными строками */
.pay-qr-alert {
  padding: 5px 10px;
  border-left: 3px solid #d97706;
  border-radius: 5px;
  background: #fdf6ec;
  color: #7c4a03 !important;
}
.pay-qr-alert b { color: #92400e; }
/* QR в карточке тарифов кабинета */
.cab-qr-block { margin-top: 14px; }
/* плашка неуспешной оплаты в пейволле (возврат ?paid=0) */
.pay-failed-note {
  margin: 0 24px 12px !important;
  padding: 10px 14px;
  border: 1px solid #f0c98f;
  border-left: 4px solid #d97706;
  border-radius: 9px;
  background: #fdf6ec;
  color: #7c4a03 !important;
  font-size: 13.5px !important;
  line-height: 1.45;
}
.pay-failed-note b { color: #92400e; }
/* вторичный ряд профиля: кабинет и выход */
.pay-profile-secondary { display: flex; gap: 10px; margin-top: 12px; }
.pay-profile-secondary .btn { flex: 1; justify-content: center; }
/* второстепенное действие профиля (отмена автопродления) — серая тихая строка
   внизу блока, не конкурирует с основными кнопками */
.pay-profile-subtle {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.btn-subtle {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  cursor: pointer;
}
.btn-subtle:hover { color: var(--ink); border-color: #b8bfba; }
.pay-mock-note {
  margin: 10px 0 0 !important; /* под пунктиром .pay-profile-subtle — воздух сверху */
  font-size: 11.5px !important;
  line-height: 1.35;
  color: var(--muted);
}
/* янтарная плашка «письмо об оплате — проверьте спам» в кабинете */
.pay-mailnote {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #f0d492;
  border-radius: 10px;
  background: #fef7e6;
  color: #714e12;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: left;
}
.pay-mailnote svg { flex: none; margin-top: 1px; color: #b45309; }
.pay-mailnote p { margin: 0; }
.pay-mailnote-spam { color: #92400e; }
.pay-mailnote-close {
  flex: none;
  margin: -2px -4px 0 0;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a16207;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.pay-mailnote-close:hover { background: #fbe8b8; }

/* ---- админ-панель «Пользователи» ---- */
.modal.users-modal {
  width: 520px;
  padding: 0;
  max-height: 864px;
  overflow-y: auto;
  border: 1px solid rgba(147, 163, 157, .32);
}
.users-body {
  padding: 4px 24px 6px;
}
.users-body .field { margin-bottom: 8px; }
.users-body .field label { font-size: 12px; color: #3a4744; }
.users-body input[type="email"],
.users-body input[type="text"],
.users-body input[type="password"],
.users-body input[type="number"] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  color: inherit;
}
.users-body input:focus { outline: 2px solid rgba(15, 118, 110, .35); border-color: var(--accent); }
.adm-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  align-items: end;
}
.adm-row .btn { margin-bottom: 8px; }
.adm-sec {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdfb;
}
.adm-title {
  margin: 0 0 10px !important;
  font-size: 12px !important;
  font-weight: 650;
  color: #1e4a44;
}
.adm-result {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #a8cfc2;
  border-radius: 11px;
  background: #e9f2ee;
}
.adm-creds {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: #173c37;
}
.adm-found {
  margin: 4px 0 0 !important;
  font-size: 12.5px !important;
  color: #3a4744;
}
.modal.paywall .pcheck-actions {
  position: absolute;
  top: 17px;
  right: 17px;
  z-index: 4;
  display: block;
  padding: 0;
  background: transparent;
  border-top: 0;
}
.modal.paywall .pcheck-actions .btn {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  min-height: 35px;
  padding: 0;
  border-radius: 10px;
  color: #61706c;
  background: #f7faf8;
  line-height: 1;
}
.modal.paywall .pcheck-actions .btn svg { display: block; }
.modal.paywall .pcheck-actions .btn:hover {
  color: #173f39;
  background: #edf4f1;
}

/* ---- личный кабинет: подписка, профиль, платежи, безопасность ---- */
.cab-backdrop { z-index: 60; }
.modal.cab-modal {
  width: 920px;
  height: 660px;
  max-height: 864px;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  border: 1px solid rgba(147, 163, 157, .32);
  box-shadow: 0 24px 70px rgba(28, 36, 34, .22), 0 4px 12px rgba(28, 36, 34, .08);
}
.cab-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 14px 14px;
  background: #f6f8f6;
  border-right: 1px solid var(--line);
}
.cab-id {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px 16px;
  border-bottom: 1px solid var(--line);
}
.cab-ava {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #0f766e, #35a791);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(15, 118, 110, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.cab-id-text { min-width: 0; display: grid; }
.cab-email {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #173c37;
  word-break: break-all;
}
.cab-org { margin-top: 2px; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.cab-nav { display: grid; gap: 3px; margin-top: 12px; }
.cab-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  color: #3a4744;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.cab-nav-btn svg { flex: none; color: #7d8b87; transition: color .15s ease; }
.cab-nav-btn:hover { background: #ecefef; }
.cab-nav-btn.active { background: #fff; color: var(--accent-hover); box-shadow: 0 1px 4px rgba(28, 36, 34, .1); }
.cab-nav-btn.active svg { color: var(--accent); }
.cab-side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.cab-side-foot .btn { width: 100%; justify-content: flex-start; }
.cab-admin-nav {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cab-admin-nav:not([hidden]) + .cab-side-foot { margin-top: 12px; }
.cab-admin-nav [data-cab-tab="admin"] { background: #e2f1ec; color: var(--accent-hover); }
.cab-admin-nav [data-cab-tab="admin"] svg { color: var(--accent); }
.cab-admin-nav [data-cab-tab="admin"]:hover { background: #d5eae2; }

.cab-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.cab-main-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 24px 8px;
}
.cab-title { flex: 1; min-width: 0; }
.cab-title h2 { margin: 0; font-size: 17.5px; font-weight: 750; color: #173c37; }
.cab-title p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.cab-close { flex: none; }
.cab-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 24px 22px;
  scrollbar-width: thin;
}
.cab-card {
  margin-top: 12px;
  padding: 15px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfb;
}
/* «Что входит в подписку» в карточке кабинета — колонкой и крупнее:
   пейволл-вариант (строка, nowrap) в узкой карточке вылезал за края */
.cab-card .pay-benefits {
  flex-direction: column;
  gap: 8px;
}
.cab-card .pay-benefits li {
  padding-left: 26px;
  white-space: normal;
  font-size: 13px;
}
.cab-card .pay-benefits li::before {
  top: 0;
  width: 19px;
  height: 19px;
}
.cab-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px !important;
  font-size: 13px !important;
  font-weight: 750;
  color: #1e4a44;
}
.cab-card-title svg { color: var(--accent); }
.cab-hint { font-size: 12px; line-height: 1.45; color: var(--muted); }
/* герой подписки */
.cab-sub-hero {
  margin-top: 12px;
  padding: 17px 20px 16px;
  border: 1px solid #cfe3dc;
  border-radius: 14px;
  background: linear-gradient(150deg, #eef8f4, #fff 62%);
}
.cab-sub-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cab-sub-name { font-size: 15px; font-weight: 800; color: #173c37; }
.cab-sub-price { display: flex; align-items: baseline; gap: 6px; margin-top: 7px; }
.cab-sub-price strong { font-size: 30px; line-height: 1; color: #17463f; font-variant-numeric: tabular-nums; }
.cab-sub-price small { font-size: 12px; color: var(--muted); }
.cab-sub-until { margin: 9px 0 0 !important; font-size: 13px !important; line-height: 1.45; color: #42625c; }
.cab-sub-until b { color: #1e4a44; }
.cab-sub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px dashed #cfe0d8;
}
.cab-sub-actions .cab-hint { flex: 1; min-width: 210px; }
/* отмена автопродления — тихая серая кнопка в правом нижнем углу
   страницы подписки, не конкурирует с основными действиями */
.cab-sub-wrap { display: flex; flex-direction: column; min-height: 100%; }
.cab-sub-cancel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 4px 0;
  border-top: 1px dashed var(--line);
}
.cab-sub-cancel .cab-hint { order: 1; flex: 0 1 auto; max-width: 520px; }
.cab-sub-cancel .btn-subtle { order: 2; margin-left: auto; }
/* статусные пилюли */
.cab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
  white-space: nowrap;
}
.cab-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cab-pill.ok { background: #dcf3e4; color: #15803d; }
.cab-pill.warn { background: #fdf0d3; color: #a16207; }
.cab-pill.bad { background: #fee2e2; color: #b91c1c; }
.cab-pill.mute { background: #edf0ed; color: #5a6663; }
/* формы */
.cab-form { display: grid; gap: 10px; }
.cab-form .field { margin: 0; }
.cab-form .field label { font-size: 12.5px; color: #3a4744; }
.cab-form input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  color: inherit;
}
.cab-form input:focus { outline: 2px solid rgba(15, 118, 110, .35); border-color: var(--accent); }
.cab-form input:disabled { background: #f1f4f1; color: #6b7773; }
.cab-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cab-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cab-form-actions .cab-hint { flex: 1; min-width: 200px; }
/* большая кнопка оплаты на всю ширину (как .pay-main-btn в пейволле),
   подсказка строкой ниже */
.cab-pay-actions { flex-direction: column; align-items: stretch; }
.cab-err { margin: 0 !important; font-size: 12.5px !important; color: #b91c1c; }
.cab-reg { margin: 12px 4px 0 !important; font-size: 12px !important; text-align: right; color: var(--muted); }
.cab-mock {
  margin-top: 12px;
  padding: 10px 13px;
  border: 1px solid #f0d492;
  border-radius: 10px;
  background: #fef7e6;
  color: #714e12;
  font-size: 12px;
  line-height: 1.45;
}
/* списки платежей и сессий */
.cab-list { display: grid; }
.cab-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; }
.cab-row + .cab-row { border-top: 1px solid var(--line); }
.cab-row-ic {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.cab-row-main { flex: 1; min-width: 0; }
.cab-row-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: #244b45; }
.cab-row-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.cab-row-right { flex: none; display: grid; justify-items: end; gap: 4px; }
.cab-amount { font-size: 14.5px; font-weight: 750; color: #173c37; font-variant-numeric: tabular-nums; }
/* пустые состояния и загрузка */
.cab-empty {
  margin-top: 12px;
  padding: 34px 20px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}
.cab-empty svg { margin-bottom: 8px; color: #aebbb7; }
.cab-empty p { margin: 0; font-size: 12.5px; }
.cab-empty-title { margin: 0 0 3px !important; font-size: 13.5px !important; font-weight: 700; color: #3a4744; }
.cab-empty .btn { margin-top: 12px; }
@keyframes cab-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.cab-skel { display: grid; gap: 10px; margin-top: 14px; }
.cab-skel div { height: 54px; border-radius: 12px; background: #edf1ee; animation: cab-pulse 1.2s ease-in-out infinite; }
.cab-skel div:nth-child(2) { width: 82%; }
.cab-skel div:nth-child(3) { width: 64%; }

/* ---- printer guide (SVG-схема лотка) ---- */
.guide-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 6px;
}
.guide-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.guide-svg { display: block; width: 100%; height: auto; padding: 0 8px; }
.guide-svg text { font-family: var(--font); }
.gd-feed { animation: gd-feed 6s ease-in-out infinite; }
@keyframes gd-feed {
  0% { transform: translateY(0); opacity: 1; }
  40% { transform: translateY(0); opacity: 1; }
  62% { transform: translateY(-340px); opacity: 1; }
  73% { transform: translateY(-340px); opacity: 1; }
  74% { transform: translateY(-340px); opacity: 0; }
  75% { transform: translateY(0); opacity: 0; }
  90% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---- proof modal ---- */
.proof-title { margin: 0 0 6px; font-size: 15px; font-weight: 650; }
.proof-row { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.proof-row label { font-size: 13px; font-weight: 550; }
.proof-row .spin-wrap { position: relative; display: inline-block; width: 84px; }
.proof-row .spin-wrap input { width: 100%; box-sizing: border-box; padding-right: 18px; appearance: textfield; -moz-appearance: textfield; }
.proof-row .spin-wrap input::-webkit-inner-spin-button,
.proof-row .spin-wrap input::-webkit-outer-spin-button { display: none; }

/* ---- import help modal ---- */
.import-help-modal { width: 480px; padding: 0; }
.import-help-body { padding: 4px 18px 6px; }
.ih-label {
  margin: 10px 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ih-label:first-child { margin-top: 2px; }
.ih-formats { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0; align-items: center; }
.ih-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ih-text { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.ih-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  overflow: hidden;
  margin-bottom: 10px;
}
.ih-table th, .ih-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.ih-table th { background: #f3f4f1; color: var(--muted); font-weight: 650; }
.ih-table tr:last-child td { border-bottom: 0; }
.ih-table .ih-skip { color: #93a39d; font-style: italic; }
.import-help-actions { padding: 12px 18px 16px; }

/* ---- csv import modal ---- */
.csv-modal { width: 640px; max-height: 846px; overflow-y: auto; }
.csv-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  background: #fff;
  margin: 0 0 12px;
}
.csv-list-head, .csv-list-row {
  display: grid;
  grid-template-columns: 34px 1.15fr 1fr 1.25fr 1.15fr;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  align-items: baseline;
}
.csv-list-head {
  font-weight: 650;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #f3f4f1;
  border-radius: var(--radius-ctrl) var(--radius-ctrl) 0 0;
  position: sticky;
  top: 0;
}
.csv-list-head span, .csv-list-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.csv-list-head span:first-child, .csv-list-row span:first-child { color: var(--muted); }
.csv-list-body { max-height: 240px; overflow-y: auto; }
.csv-list-row:nth-child(even) { background: #f3f4f1; }
.csv-cell-empty { color: #b3bdb9; }
.csv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.csv-common {
  background: #f3f4f1;
  border: 1px solid #d9ddd8;
  border-radius: 10px;
  padding: 10px 12px 4px;
  margin-bottom: 12px;
}
.csv-common-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

/* ---- toast ---- */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #f3f4f1;
  padding: 10px 18px;
  border-radius: var(--radius-ctrl);
  font-size: 13.5px;
  z-index: 60;
  animation: toast-in .25s cubic-bezier(.16, 1, .3, 1);
  box-shadow: 0 8px 28px rgba(28, 36, 34, .3);
}
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---- переключатель бланка ---- */
.blank-switch select { width: 150px; }

/* ---- редактор разметки полей ---- */
.markup-modal {
  background: var(--surface);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  width: 1120px;
  height: 846px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawer-in .18s cubic-bezier(.16, 1, .3, 1);
}
.markup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.markup-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.markup-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.markup-head-right .btn { padding: 6px 12px; font-size: 13px; }
.markup-blank-switch { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550; }
.markup-blank-switch select { width: 120px; padding: 6px 8px; }
.markup-preset-note { font-size: 13px; font-weight: 600; color: var(--accent); align-self: center; }
.markup-body {
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 0;
}
.markup-side {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.markup-side .muted { margin: 0 0 12px; line-height: 1.45; }
.markup-preview-note { margin: 0 0 10px; font-size: 12px; line-height: 1.4; color: var(--accent-hover); }
.markup-guides-toggle { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; cursor: pointer; }
.markup-guides-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.markup-side .markup-print-error { color: var(--danger); }
.markup-fields { list-style: none; margin: 0 0 12px; padding: 0; }
.markup-fields li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-ctrl);
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  border: 1px solid transparent;
}
.markup-fields li:hover { background: #eef0ec; }
.markup-fields li.armed { border-color: var(--accent); background: var(--accent-soft); }
.markup-fields li.selected { background: var(--accent-soft); }
.mk-chip { width: 16px; height: 4px; border-radius: 2px; flex: none; }
.mk-label { flex: 1; }
.mk-state { color: var(--muted); font-weight: 400; }
.markup-canvas-wrap {
  background: #d9ddd8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  min-height: 0;
}
#markupCanvas { display: block; box-shadow: 0 4px 18px rgba(28, 36, 34, .25); cursor: crosshair; margin: auto; }
.markup-canvas-wrap.zoomed { justify-content: flex-start; align-items: flex-start; }
.markup-zoom { display: flex; align-items: center; gap: 2px; }
.markup-zoom .btn { min-width: 34px; padding-left: 8px; padding-right: 8px; }
#markupZoomVal { display: inline-block; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
/* ---- responsive: внутренней перестройки нет; весь холст масштабируется целиком ---- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- wizard: пошаговый мастер ---- */
.wizard-exit-backdrop { z-index: 100; }
.wizard-exit-modal { width: 560px; padding: 24px; }
.wizard-exit-modal h2 { margin: 0 0 14px; font-size: 23px; line-height: 1.3; }
.wizard-exit-modal > p { color: var(--muted); line-height: 1.6; }
.wizard-exit-actions { gap: 12px; }
.wizard-exit-actions .btn { flex: 1; justify-content: center; }
.wizard-restart-backdrop { z-index: 90; }
.wizard-restart-modal { width: 560px; padding: 24px; }
.wizard-restart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.wizard-restart-head h2 { margin: 0; font-size: 23px; line-height: 1.25; color: var(--accent-hover); }
.wizard-restart-head .btn { flex: none; font-size: 22px; line-height: 1; }
.wizard-restart-modal > p { color: var(--muted); line-height: 1.5; }
.wizard-restart-options { display: grid; gap: 12px; }
.wizard-restart-option {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wizard-restart-option strong { font-size: 17px; line-height: 1.3; }
.wizard-restart-option span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.wizard-restart-option:hover { border-color: var(--accent); }
.wizard-restart-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wizard-restart-continue { background: var(--accent-soft); border-color: var(--accent); }
.wizard-restart-continue strong { color: var(--accent-hover); }
.wizard-restart-option:disabled { opacity: .55; cursor: default; border-color: var(--line); }
.wizard {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 500px;
  max-height: 780px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: 0 12px 44px rgba(28, 36, 34, .22);
  z-index: 45;
  animation: wiz-in .25s cubic-bezier(.16, 1, .3, 1);
}
@keyframes wiz-in { from { transform: translateY(16px); opacity: 0; } }
.wiz-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 10px;
}
/* слева — название этапа, по центру — плашка «Калибровка печати»,
   справа — кнопки свернуть/закрыть; подпись переносится на 2-ю строку,
   чтобы в узком окне не сдвигать плашку от центра */
.wiz-heading {
  grid-column: 2;
  justify-self: center;
  white-space: nowrap;
}
.wiz-purpose {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid #99d5ca;
  border-radius: 9px;
  background: #d9f0ea;
  color: #115e59;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}
.wiz-purpose svg { flex: none; width: 19px; height: 19px; }
.wiz-step-label {
  grid-column: 1;
  justify-self: start;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}
.wiz-head-btns { grid-column: 3; justify-self: end; display: flex; gap: 4px; }
.wiz-head-btns .btn { padding: 6px; }
.wiz-progress {
  height: 5px;
  margin: 0 18px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.wiz-progress div { height: 100%; background: var(--accent); transition: width .25s ease; }
.wiz-body {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.5;
}
.wiz-body h3 { margin: 0 0 10px; font-size: 17px; font-weight: 650; }
.wiz-body p { margin: 0 0 10px; }
.wiz-body img {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctrl);
}
.wiz-note { font-size: 13px; color: var(--muted); }
.wiz-choice { display: flex; flex-direction: column; gap: 8px; }
.wiz-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px 16px;
}
.wiz-foot .btn { padding: 9px 18px; font-size: 14px; }
#wizBack { margin-right: auto; }
.wizard.min .wiz-progress,
.wizard.min .wiz-body,
.wizard.min .wiz-foot { display: none; }

.wiz-highlight {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-ctrl);
  animation: wiz-pulse 1.6s ease-in-out infinite;
}
@keyframes wiz-pulse { 50% { outline-color: rgba(15, 118, 110, .25); } }

/* ---- wizard: режим первого визита (по центру, остальное затемнено) ---- */
.wizard-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 36, 34, .48);
  z-index: 39;
  pointer-events: none;
}
.wizard.center {
  --wiz-scale: 1;
  left: 50%;
  top: 50%;
  bottom: auto;
  width: 680px;
  max-height: none;
  transform: translate(-50%, -50%) scale(var(--wiz-scale));
  transform-origin: center center;
  will-change: transform;
  animation: wiz-in-center .28s cubic-bezier(.16, 1, .3, 1);
}
@keyframes wiz-in-center {
  from { transform: translate(-50%, calc(-50% + 18px)) scale(var(--wiz-scale)); opacity: 0; }
}
.wizard.center .wiz-purpose { font-size: 19px; padding: 8px 16px; }
.wizard.center .wiz-purpose svg { width: 21px; height: 21px; }
.wizard.center .wiz-step-label { font-size: 13.5px; }
.wizard.center .wiz-body { font-size: 16.5px; padding: 20px 24px; }
.wizard.center .wiz-body h3 { font-size: 19px; }
.wizard.center .wiz-note { font-size: 14px; }
.wizard.center .wiz-foot { padding: 14px 24px 20px; }
.wizard.center .wiz-foot .btn { padding: 12px 22px; font-size: 15.5px; }

/* ---- wizard: широкие экраны шагов 1–6 (три карточки) ---- */
.wizard.center.wide { width: 1360px; max-height: none; }
.wizard.center.wide .wiz-head { padding: 14px 32px 10px; }
.wizard.center.wide .wiz-progress { margin: 0 32px; }
.wizard.center.wide .wiz-body { padding: 14px 32px 16px; overflow: visible; font-size: 17px; }
.wizard.center.wide .wiz-foot { padding: 12px 32px 16px; }
.wizard.center.wide .wiz-foot .btn { padding: 13px 26px; font-size: 16.5px; }
.wizard.center.wide #wizNext {
  background: #fff;
  color: #0f766e;
  border: 1.5px solid #8dbbab;
}
.wizard.center.wide #wizNext:hover { background: #eaf3ef; }
.wizard.center.wide .wiz-print { background: #0f766e; }
.wizard.center.wide .wiz-print:hover { background: #115e59; }
.wizard.center.wide.compact-bottom .wiz-body { padding-bottom: 8px; }
.wizard.center.wide.compact-bottom .wiz-foot { padding-top: 10px; padding-bottom: 16px; }

/* степпер количества пробников — больше не используется (удалён из мастера 18.09) */

.wizard .wiz-body h3.w1-title {
  margin: 2px 0 8px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #173c37;
}
.w1-sub { margin: 0 0 12px; font-size: 18px; color: var(--muted); }
/* ---- шаг 0: выбор изготовителя бланка ---- */
.w0-grid { display: grid; grid-template-columns: 5fr 6fr; grid-template-rows: auto 440px auto; column-gap: 28px; align-items: stretch; }
.w0-col { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
.w0-col-title { margin: 0 0 12px; font-size: 18px; font-weight: 750; color: var(--ink); }
.w0-fig {
  margin: 0;
  padding: 18px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f8f6;
  height: 440px; /* фиксированная высота изображения и списка типографий */
  display: flex;
  align-items: center;
  justify-content: center;
}
.w0-fig > img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; margin: 0 auto; border-radius: 10px; }
.w0-fig .w0-blank { position: relative; height: 100%; margin: 0 auto; border-radius: 10px; box-shadow: 0 10px 28px rgba(20, 30, 27, .14); }
.w0-fig .w0-blank-img { display: block; width: auto; max-width: none; height: 100%; margin: 0; border-radius: 10px; }
.wizard .wiz-body .w0-cap { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.w0-opts { grid-row: 2; display: grid; grid-template-rows: repeat(7, minmax(0, 1fr)); gap: 12px; }
.w0-opts.w0-need-choice { outline: 2.5px solid rgba(220, 38, 38, .6); outline-offset: 4px; border-radius: 12px; animation: w0-shake .45s ease; }
@keyframes w0-shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.w0-opt {
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.w0-opt:hover { border-color: #8dbbab; }
.w0-opt-name { flex: 1; }
.w0-radio {
  flex: none;
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid #b9c2bd;
  border-radius: 50%;
  transition: border-color .15s ease;
}
.w0-opt.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.w0-opt.active .w0-radio { border-color: var(--accent); }
.w0-opt.active .w0-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.w0-opt[data-preset="custom"] { border-style: dashed; border-color: #8dbbab; }
.w0-opt[data-preset="custom"].active { border-style: solid; }
.w0-opt-note { margin: 2px 4px 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
/* Пламя за плашкой ППД: декор не перехватывает выбор изготовителя. */
.w0-opts { grid-template-rows: 98px repeat(6, minmax(0, 1fr)); }
.w0-opts .w0-opt { padding-top: 10px; padding-bottom: 10px; }
.w0-opt.w0-opt-fire {
  position: relative;
  isolation: isolate;
  margin-top: 38px;
  border-color: #84c8aa;
  background: linear-gradient(105deg, #f7fff9, #edfff4);
  color: #234338;
  box-shadow: 0 3px 18px #20b67e26, inset 0 0 0 1px #f1fff6;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.w0-opt-fire::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 14px;
  background: linear-gradient(90deg, #19bb7e40, #7bf4b680, #0fb67c40);
  filter: blur(7px);
  pointer-events: none;
}
.w0-opt-fire > .w0-opt-name, .w0-opt-fire > .w0-radio { position: relative; z-index: 1; }
.w0-opt-fire > .w0-opt-name { text-shadow: 0 1px 3px #ffffffc9; }
.w0-opt-fire > .w0-opt-name::after {
  content: "Выбрано";
  display: inline-block;
  margin-left: 12px;
  padding: 3px 9px;
  border-radius: 20px;
  background: #d9f1e8;
  color: #096553;
  font-size: 12px;
  font-weight: 750;
  vertical-align: middle;
  visibility: hidden;
}
.w0-fire { position: absolute; inset: -40px -1px -1px; border-radius: 12px; pointer-events: none; }
.w0-fire::after {
  content: "";
  position: absolute;
  inset: 40px 0 0;
  border-radius: 11px;
  background: linear-gradient(90deg, #fffffff7 0%, #fffffff0 54%, #ffffffe6 85%, #fffffff0);
  transition: background .18s ease;
}
.w0-fire svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 -2px 3px #10bc7b80); }
.w0-fire svg.w0-fire-bottom { position: absolute; left: 0; bottom: -8px; height: 32px; transform: rotate(180deg); opacity: .85; }
.w0-fire-back, .w0-fire-front { transform-origin: 50% 100%; animation: w0-flame-sway 1.4s ease-in-out infinite alternate; }
.w0-fire-front { animation-duration: .95s; animation-delay: -.4s; }
.w0-flame-tongue { transform-box: fill-box; transform-origin: 50% 100%; animation: w0-tongue-dance 1.05s ease-in-out infinite alternate; }
.w0-flame-tongue:nth-child(2n) { animation-delay: -.65s; animation-duration: .85s; }
.w0-flame-tongue:nth-child(3n) { animation-delay: -.3s; animation-duration: 1.3s; }
.w0-flame-tongue:nth-child(4n) { animation-delay: -.9s; animation-duration: .95s; }
.w0-flame-tongue:nth-child(5n) { animation-delay: -.17s; animation-duration: 1.17s; }
.w0-flame-tongue:nth-child(7n) { animation-delay: -.48s; animation-duration: .77s; }
.w0-fire-front .w0-flame-tongue { animation-direction: alternate-reverse; }
.w0-fire-bottom .w0-flame-tongue { animation-duration: 1.35s; animation-direction: alternate-reverse; }
.w0-ember { position: absolute; z-index: 1; left: 73%; bottom: 14%; width: 3px; height: 3px; border-radius: 50%; background: #5fe6a0; box-shadow: 0 0 5px #15b976; animation: w0-ember-rise 2.2s ease-out infinite; }
.w0-ember:nth-of-type(2) { left: 90%; animation-delay: -1.2s; width: 2px; height: 2px; }
.w0-ember:nth-of-type(3) { left: 38%; animation-delay: -2.3s; }
.w0-ember:nth-of-type(4) { left: 12%; animation-delay: -.6s; width: 2px; height: 2px; }
.w0-opt.w0-opt-fire:hover { border-color: #8dbbab; }

.w0-opt-fire .w0-radio { border-color: #7c9e8c; background: #ffffffe6; }
.w0-opt.w0-opt-fire.active { border-color: var(--accent); background: var(--accent-soft); color: #17483c; box-shadow: inset 0 0 0 1px var(--accent); }
.w0-opt-fire.active::after { content: ""; position: absolute; inset: -1.5px; z-index: 2; border: 1.5px solid var(--accent); border-radius: inherit; box-shadow: inset 0 0 0 1px var(--accent); pointer-events: none; }
.w0-opt-fire.active .w0-fire::after { background: linear-gradient(90deg, #f4fffaf5, #f4fffad9 65%, #ffffffa6); }
.w0-opt-fire.active > .w0-opt-name::after { visibility: visible; }
.w0-opt-fire.active .w0-radio { border-color: var(--accent); background: var(--accent); }
.w0-opt-fire.active .w0-radio::after { inset: auto; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; border-radius: 0; background: none; transform: rotate(45deg); }
@keyframes w0-flame-sway { from { transform: skewX(-1deg) scaleY(.88); opacity: .9; } to { transform: skewX(1deg) scaleY(1); opacity: 1; } }
@keyframes w0-tongue-dance { from { transform: skewX(-7deg) scaleY(.7); } to { transform: skewX(6deg) scaleY(1.08); } }
@keyframes w0-ember-rise { 0% { transform: translate(0, 0); opacity: 0; } 18% { opacity: .9; } 100% { transform: translate(9px, -57px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .w0-fire-back, .w0-fire-front, .w0-flame-tongue, .w0-ember { animation: none; }
  .w0-ember { display: none; }
}
.w1-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.w1-cards-proof { row-gap: 12px; }
.w1-cards-proof .w1-card img { height: auto; aspect-ratio: 4 / 3; }
.w1-cards:not(.w1-cards-proof) .w1-card { min-height: 570px; }
.w1-cards:not(.w1-cards-proof) .w1-card > :last-child { margin-top: auto; }
.w1-cards:not(.w1-cards-proof) .w1-card img { height: auto; aspect-ratio: 4 / 3; }
.w1-cards-proof .w1-card:first-child { grid-row: 1 / 3; }
.w1-cards-proof .w1-memo { grid-column: 2 / 4; grid-row: 2; margin: 0; }
.w1-card {
  background: #fff;
  border: 1px solid #d3e4dc;
  border-radius: 17px;
  box-shadow: 0 2px 10px rgba(30, 74, 68, .08);
  padding: 20px 20px 14px;
  display: flex;
  flex-direction: column;
}
.w1-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.w1-head-text { display: flex; flex-direction: column; gap: 2px; }
.w1-step-cap {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7773;
}
.w1-num {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: #134e4a;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
}
.w1-card-title { font-weight: 650; font-size: 17.5px; color: #1e4a44; line-height: 1.25; }
.w1-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin: 0 0 8px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #d3e4dc;
}
.w1-card p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.45; }

/* Шаг 6 целого ППД: крупный вид печатного макета с контурами. */
.w1-cards .w1-card img[src*="trial-offset-ppd-whole-"] {
  aspect-ratio: auto; /* формат приближённого макета, без пустых полос внутри IMG */
}

.w1-cards:has(> .w1-card > img[src*="trial-offset-ppd-whole-"]) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.65fr);
  gap: 16px;
}
.w1-cards:has(> .w1-card > img[src*="trial-offset-ppd-whole-"]) > .w1-card {
  min-width: 0;
  padding: 18px 16px 14px;
}

/* финальный шаг: один реальный рабочий сценарий от картотеки до печати */
.w1-cards.w1-cards-final { gap: 18px; }
.w1-cards.w1-cards-final .w1-card {
  min-height: 0;
  padding: 17px 17px 15px;
}
.w1-cards-final .w1-card-head { margin-bottom: 10px; }
.w1-cards-final .w1-num { width: 43px; height: 43px; font-size: 18px; }
.wiz-final-media {
  height: 238px;
  overflow: hidden;
  margin: 0 0 11px;
  padding: 0 18px; /* гармоничные боковые поля — как у карточек на главной */
  border: 1px solid #d3e4dc;
  border-radius: 10px;
  background: var(--bg); /* фон #f3f4f1 — как у daily-media на лендинге, не белый */
  display: grid;
  place-items: center;
}
.w1-cards.w1-cards-final .w1-card .wiz-final-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain; /* целиком, без растяжения и обрезки */
  object-position: center;
}
.w1-cards-final .w1-card p b { color: #173c37; }
.wiz-final-result {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
  padding: 12px 16px;
  border: 1px solid #9fd8cb;
  border-radius: 12px;
  background: #e9f7f3;
  color: #28514a;
}
.wiz-final-result-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.wiz-final-result-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wizard .wiz-body .wiz-final-result p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}
.wiz-final-result strong { color: #17463f; }
.w1-card-print {
  align-self: stretch;
  margin-top: auto;
  width: 100%;
  justify-content: center;
  transform: translateY(9px);
  padding: 13px 16px;
  font-size: 15px;
}
/* действия внутри карточки (шаг 5): кнопка прижата к низу и по центру */
.w1-actions { margin-top: auto; padding-top: 14px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.w1-actions .w1-print { flex: 1; justify-content: center; padding: 13px 18px; font-size: 15.5px; }
/* шаг 7.1 «Импорт сотрудников»: устойчивая центральная колонка */
.w1-import { max-width: 780px; margin: 0 auto; }
.w1-import-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 6px;
  min-width: 0; /* не разгонять шаг по ширине — заголовок переносится */
}
.wizard .wiz-body .w1-import .w1-title { margin-bottom: 0; font-size: 30px; }
.wizard .wiz-body .w1-import .w1-sub {
  margin: 0 0 12px;
  font-size: 12px;
  white-space: nowrap;
}
.wizard.center.import-step .wiz-body { padding-bottom: 6px; }
.wizard.center.import-step .wiz-foot { align-items: center; padding-top: 6px; padding-bottom: 14px; }
.wizard.import-step #wizBack { margin-right: 0; }
.wizard.import-step .wiz-foot .btn { flex: none; }
.w1-import-title-row > div { min-width: 0; }
.w1-import-optional {
  flex: none;
  margin-top: 6px;
  padding: 7px 11px;
  border: 1px solid #cbd7d2;
  border-radius: 999px;
  color: #5d6b67;
  background: #f5f7f6;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}
.w1-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.w1-import-upload,
.w1-import-preview {
  min-width: 0;
  border: 1px solid #d3e4dc;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(30, 74, 68, .07);
}
.w1-import-upload {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon copy copy"
    "formats formats action";
  align-items: center;
  gap: 13px 17px;
  padding: 20px 22px;
  text-align: left;
  background: linear-gradient(145deg, #f2faf7, #fff);
}
.w1-import-file-icon {
  grid-area: icon;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 17px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(15, 118, 110, .2);
}
.w1-import-file-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.w1-import-upload > div:not(.ih-formats) { grid-area: copy; }
.w1-import-upload h4,
.w1-import-preview h4 {
  margin: 0 0 5px;
  color: #173c37;
  font-size: 17px;
  line-height: 1.25;
}
.w1-import-upload p { max-width: none; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.w1-import-upload .ih-formats { grid-area: formats; justify-content: flex-start; margin: 0; }
.w1-import-upload .ih-chip { border-color: #a9d7cd; background: #e7f5f1; color: #17665e; }
.w1-import-pick { grid-area: action; min-width: 190px; justify-content: center; padding: 12px 19px; font-size: 15px; }
.w1-import-preview { padding: 18px 20px 16px; }
.w1-import-preview-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.w1-import-preview-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.w1-import-sheet-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--accent);
  background: #e5f4f0;
}
.w1-import-sheet-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.w1-import-preview .ih-table { margin: 0; font-size: 12.5px; }
.w1-import-preview .ih-table th,
.w1-import-preview .ih-table td { padding: 10px 11px; }
.w1-role-chip {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  color: #0f766e;
  background: #dff3ee;
  font-size: 11px;
  font-weight: 700;
}
.w1-role-chip.worker { color: #53635f; background: #edf0ee; }
.w1-import-rules { display: grid; gap: 6px; margin: 13px 0 0; padding: 0; list-style: none; }
.w1-import-rules li { position: relative; padding-left: 20px; color: #596762; font-size: 13px; line-height: 1.35; }
.w1-import-rules li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }
.wizard .w1-import-note {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #53635f;
  background: #f1f4f2;
  font-size: 12px;
  line-height: 1.35;
}
.w1-import-note svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* степпер количества макетов слева от кнопки (шаг 1) */
.w1-qty {
  flex: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.w1-qty input {
  width: 42px;
  border: 0;
  text-align: center;
  font: 650 15.5px/1 system-ui, sans-serif;
  color: #1e4a44;
  padding: 12px 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.w1-qty input::-webkit-outer-spin-button,
.w1-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.w1-qty-btn {
  border: 0;
  background: #e9f2ee;
  color: #0f766e;
  font-size: 17px;
  font-weight: 700;
  padding: 12px 12px;
  cursor: pointer;
}
.w1-qty-btn:hover { background: #d9f0ea; }
.w1-memo {
  margin: 16px 0 6px;
  padding: 15px 20px;
  background: #d9f0ea;
  border: 1.5px solid #5eead4;
  border-left: 5px solid #0f766e;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #173c37;
  display: flex;
  align-items: center;
  gap: 12px;
}
.w1-memo > span { min-width: 0; white-space: nowrap; }
.w1-memo svg { flex: none; color: #0f766e; width: 20px; height: 20px; }
.w1-memo b { font-weight: 800; }
.w1-memo-badge {
  display: inline-block;
  flex: none;
  background: #0f766e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 6px;
  padding: 5px 10px;
  margin-right: 2px;
}
.w1-memo-text { flex: 1; }

/* объединённая страница мастера «Пробная печать» (шаги 4–6) */
.w1-card p + p { margin-top: 9px; }
.w1-card-note { font-size: 14px !important; color: #828f8a !important; }
.w1-chip {
  background: #e9f2ee;
  border: 1px solid #cfe3da;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px !important;
  color: #1e4a44 !important;
}
.w1-chip b { font-weight: 800; }
.w1-warn {
  background: #fff8e6;
  border: 1px solid #f3e2b3;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px !important;
  color: #8a6d1a !important;
  line-height: 1.4 !important;
}

/* На фиксированном холсте все семь строк калибровки помещаются внутри
   нижней панели, не сжимая карточку и закреплённый выбор изготовителя. */
body.app-fixed-scale .form-panel .panel-head,
body.app-fixed-scale .cal-panel .panel-head { padding: 8px 16px 7px; }
body.app-fixed-scale .form-panel form { padding: 6px 14px; gap: 7px 12px; }
body.app-fixed-scale fieldset { padding: 5px 12px 7px; }
body.app-fixed-scale legend { margin-bottom: 3px; }
body.app-fixed-scale .field { margin-bottom: 4px; }
body.app-fixed-scale input[type="text"],
body.app-fixed-scale input[type="search"],
body.app-fixed-scale input[type="number"],
body.app-fixed-scale select { padding: 6px 10px; }
body.app-fixed-scale .form-actions .btn { padding: 6px 12px; }
body.app-fixed-scale .cal-body { padding: 5px 14px; }
body.app-fixed-scale .cal-table .row-size { height: 24px; padding: 3px 16px 3px 6px; }
body.app-fixed-scale .cal-foot { padding: 5px 18px; }

/* «Свой вариант» — выделенный пресет: пунктирная акцентная рамка */
.preset-opt small { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.preset-opt[data-preset="custom"] {
  border-style: dashed;
  border-color: var(--accent);
  background: #f0f7f4;
  color: var(--accent-hover);
}
.preset-opt[data-preset="custom"]:hover { background: var(--accent-soft); }
.preset-opt[data-preset="custom"].active {
  border-style: solid;
  background: var(--accent-soft);
}

/* ---- «Свой вариант»: intro и экран обрезки скана ---- */
.modal.custom-intro {
  width: 720px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(28, 36, 34, .28);
}
.custom-intro-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 28px 0;
}
.custom-intro-kicker { display: flex; align-items: center; gap: 12px; color: var(--accent); font-size: 12px; font-weight: 650; }
.custom-intro-step { padding: 4px 9px; border-radius: 6px; background: var(--accent-soft); font-size: 11px; }
.custom-intro h2 { margin: 10px 0 7px; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.custom-intro-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.custom-intro-close { flex: none; margin: -4px -6px 0 0; border-color: transparent !important; color: var(--muted) !important; }
.custom-intro-body { padding: 22px 28px; }
.custom-intro-guide {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f8f6;
}
.custom-intro-blank { width: 88px; height: 107px; flex: none; }
.custom-blank-paper { fill: var(--surface); stroke: #b4cdc3; stroke-width: 1.5; }
.custom-blank-corners { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.custom-blank-photo { fill: var(--accent-soft); stroke: #b4cdc3; }
.custom-blank-lines { stroke: #b4cdc3; stroke-width: 2; stroke-linecap: round; }
.custom-intro-guide h3 { margin: 0 0 7px; font-size: 16px; font-weight: 650; }
.custom-intro-guide p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.custom-intro-series { display: block; margin-top: 10px; color: var(--accent-hover); font-size: 12px; font-weight: 550; }
.custom-intro-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 24px 0 0; padding: 0; list-style: none; }
.custom-intro-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px; align-items: start; }
.custom-intro-steps li > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 12px; font-weight: 650; }
.custom-intro-steps li[aria-current="step"] > span { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.custom-intro-steps b { display: block; margin: 4px 0 6px; font-size: 13px; font-weight: 650; line-height: 1.3; }
.custom-intro-steps small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.custom-intro-have {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #b4d9cc;
  border-radius: 10px;
  background: #eef7f3;
  color: var(--accent-hover);
}
.custom-intro-check { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.custom-intro-have b { font-size: 13.5px; font-weight: 650; }
.custom-intro-have p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.custom-intro p.custom-intro-privacy { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.custom-intro-privacy svg { flex: none; color: var(--accent); }
.custom-intro-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 28px; border-top: 1px solid var(--line); background: #fafbf9; }
.custom-intro-next { display: flex; gap: 10px; }
.custom-intro-actions .btn { min-height: 42px; padding: 10px 16px; font-size: 13px; font-weight: 550; white-space: nowrap; }
.custom-intro-next .primary { gap: 12px; }
.custom-intro .btn:focus-visible { outline: 3px solid #84c6b7; outline-offset: 3px; }

/* кроп: левая колонка узкая (только подписи), сцена широкая */
.modal.calib-modal.crop7 .calib7-body {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
}
.crop-help { margin: 0; }
.crop-help li { margin-bottom: 10px; }

/* рамка обрезки: пропорции бланка 110×140, затемнение вокруг */
.crop-rect {
  position: absolute;
  box-sizing: border-box;
  aspect-ratio: 110 / 140;
  border: 2px solid #0f766e;
  border-radius: 2px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 20, 0.55);
  cursor: move;
  outline: none;
  touch-action: none;
}
.crop-rect:focus-visible { border-color: #0d9488; }
.crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: transparent;
  border: 2px solid #0f766e;
  border-radius: 3px;
  touch-action: none;
}
.crop-handle::before, .crop-handle::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.crop-handle::before { left: 1px; right: 1px; top: 50%; border-top: 1px dashed rgba(15, 118, 110, .22); }
.crop-handle::after { top: 1px; bottom: 1px; left: 50%; border-left: 1px dashed rgba(15, 118, 110, .22); }
.crop-handle[data-h="nw"] { left: -8px;  top: -8px;    cursor: nwse-resize; }
.crop-handle[data-h="ne"] { right: -8px; top: -8px;    cursor: nesw-resize; }
.crop-handle[data-h="sw"] { left: -8px;  bottom: -8px; cursor: nesw-resize; }
.crop-handle[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }

#cropImg { display: block; max-width: none; max-height: none; border: 0; border-radius: 0; user-select: none; -webkit-user-drag: none; }
.crop-corners { position:absolute; left:0; top:0; pointer-events:none; }
#cropOutline { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
#cropPolygon { fill:rgba(15,118,110,.08); stroke:#0f766e; stroke-width:2; vector-effect:non-scaling-stroke; }
.crop-point { position:absolute; width:68px; height:68px; padding:0; transform:translate(-50%,-50%); border:2px solid #0f766e; border-radius:5px; background:#fff; color:#0f766e; font-weight:700; cursor:move; pointer-events:auto; touch-action:none; box-shadow:0 2px 8px #0003; }
.crop-point canvas { display:block; width:64px; height:64px; border-radius:3px; image-rendering:pixelated; pointer-events:none; }
.crop-point > span { position:absolute; left:-2px; top:-22px; padding:0 5px; height:18px; line-height:18px; white-space:nowrap; border-radius:4px; background:#0f766e; color:white; font-size:11px; pointer-events:none; }
.crop-cursor { pointer-events:none; z-index:4; border-style:dashed; }
#cropStage.placing-corner, #cropStage.placing-corner #cropImg { cursor:none; }
.crop-point[hidden] { display:none; }
.crop-point.selected { outline:3px solid #34d399; z-index:2; }
.crop-corner-status { font-size:13px; line-height:1.4; font-weight:600; color:#0f766e; }
.crop7 .calib7-listcol { max-height: none; overflow: visible; }
.crop7 .crop-corner-status { margin:0; }
#customCropBackdrop .crop-adjustments { flex:none; margin-top:0; gap:10px; padding:10px; }
.crop7 .crop-rotation .crop-quarter-turns { margin-top:8px; }
#customCropBackdrop .crop-contrast input { margin:8px 0; }

/* переключатель режима ФИО в редакторе разметки (custom) */
.mk-fio-mode {
  margin: 0 0 8px;
  padding: 7px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f4f1;
  display: grid;
  gap: 5px;
  font-size: 12.5px;
}
.mk-fio-mode legend { font-size: 11px; color: var(--muted); padding: 0 4px; }
.mk-fio-mode label { display: flex; align-items: baseline; gap: 6px; cursor: pointer; line-height: 1.3; }

/* Уведомление о cookies вне приветствия: для прямого входа.
   Позиционируется от общего холста 1440×900. */
.cookie-note { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: 14px; max-width: 720px;
  width: calc(100% - 32px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-panel); box-shadow: var(--shadow); padding: 12px 16px;
  font-size: 13.5px; line-height: 1.45; }
.cookie-note[hidden] { display: none; }
.cookie-note-text { color: var(--muted); margin: 0; }
.cookie-note-text a { color: var(--accent); }
.cookie-note-content { min-width: 0; }
.cookie-note-content .cookie-choice { margin-top: 10px; }
.cookie-note-btn { flex: none; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; border-radius: var(--radius-ctrl); padding: 7px 14px; font-size: 13.5px;
  cursor: pointer; }
@media (max-width: 560px) { .cookie-note { flex-direction: column; align-items: stretch; gap: 8px; } }

/* Персональный URL-QR: сохраняем плотность кода для чтения камерой. */
.pay-qr-block[data-robo-qr]{align-items:center;gap:18px}
.pay-qr-block[data-robo-qr] img{width:256px;height:256px;image-rendering:pixelated;background:white}
.cab-body .pay-qr-block[data-robo-qr]{flex-wrap:wrap}

/* Краткая сумма/период перед оплатой; полные условия — по ссылке на оферту. */
.renewal-consent { margin: 12px 0; font-size: 14px; line-height: 1.5; }
.renewal-consent p { margin: 8px 0; }
.renewal-consent input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; }

/* Ссылка восстановления справа от подписи поля пароля. */
.pay-password-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.pay-account .field .pay-password-heading label { margin: 0; }
.pay-forgot { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; line-height: 1.25; color: var(--accent); text-decoration: underline; cursor: pointer; }
.pay-forgot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#payForgotHint { margin: 8px 0 0; }
.pay-plan-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 8px; }
.modal.paywall .pay-plan-caption .pay-selected-summary { flex-shrink: 0; margin: 0; }
.modal.paywall .pay-plan-caption .pay-plan-foot { margin: 0; text-align: right; }
.pay-auth-only .pay-plan-caption { display: none; }
@media (max-width: 600px) {
  .pay-plan-caption { flex-wrap: wrap; }
  .pay-plan-caption .pay-plan-foot { margin-left: auto !important; }
}

/* Короткие диалоги показываются целиком, без полосы прокрутки. */
.modal.fit-compact-dialog { max-height: none; overflow: hidden; transform: scale(var(--dialog-fit, 1)); transform-origin: center; animation: none; }
#payReqBackdrop { z-index: 95; }
.modal.pay-req-modal { width: 480px; }
.pay-req-modal h2 { margin: 0 0 16px; font-size: 22px; }
.pay-req-modal .pay-req-details-body { padding: 0 0 18px; }
.pay-req-modal a { color: var(--accent); }
.pay-req-open { width: 100%; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: #34534e; cursor: pointer; text-align: center; }
.pay-req-open:hover { color: var(--accent); text-decoration: underline; }
.pay-req-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Оплата во всю ширину; ниже QR слева и годовой счёт справа. */
.pay-method-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.pay-method-actions .btn { width: 100%; min-width: 0; min-height: 44px; padding: 10px 8px; font-size: 13px; line-height: 1.3; white-space: normal; justify-content: center; }
.pay-method-actions [data-robo-qr-show] { grid-column: 1; grid-row: 2; }
.pay-method-actions .pay-main-btn { grid-column: 1 / -1; grid-row: 1; }
.pay-method-actions [data-year-invoice-open] { grid-column: 2; grid-row: 2; }
.pay-method-actions .cab-hint { grid-column: 1 / -1; min-width: 0; }
#payYearInvoiceBackdrop { z-index: 95; }
.modal.pay-year-invoice-modal { width: 540px; }
.pay-year-invoice-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pay-year-invoice-head h2 { margin: 0; }
.pay-year-invoice-head .btn { display: grid; place-items: center; flex: 0 0 36px; min-height: 36px; padding: 0; }
.pay-year-invoice-head svg { display: block; }
.pay-year-invoice-plan { margin: 14px 0; color: var(--accent); font-size: 17px; }
.pay-year-invoice-modal .pay-payment-lead { font-size: 15px; }
.pay-year-invoice-modal .pay-manual-fields b { font-size: 14px; }
.pay-year-invoice-modal .pay-manual-fields small { font-size: 13px; overflow-wrap: anywhere; }

#payForgotBackdrop { z-index: 95; }
.pay-recovery-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 28px; }
.pay-recovery-email { display: block; padding: 14px 16px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; background: #f1faf7; font-size: 18px; font-weight: 700; text-decoration: none; text-align: center; }
.pay-forgot-modal .modal-actions { gap: 10px; }

/* Подготовка своего скана: верхняя половина вращающегося диска. */
.crop-adjustments { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding: 12px 16px 8px; border: 1px solid var(--line); border-radius: 12px; background: #f6faf8; }
.crop-adjustment-heading { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 700; }
.crop-adjustment-heading output { color: var(--accent); font-variant-numeric: tabular-nums; }
.crop-adjustment-heading button { margin-left: auto; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.crop-compass { position: relative; height: 68px; overflow: hidden; margin-top: 8px; cursor: grab; touch-action: none; outline-offset: 3px; }
.crop-compass:active { cursor: grabbing; }
.crop-compass-disk { position: absolute; width: 180px; height: 180px; left: calc(50% - 90px); top: 8px; border: 1px solid #b8d4cb; border-radius: 50%; background: radial-gradient(circle, #f6faf8 59%, transparent 60%), repeating-conic-gradient(from -1deg, #81a89b 0deg 1deg, #e2efe9 1deg 10deg); }
.crop-compass-disk span { position: absolute; top: 22px; left: 0; width: 100%; text-align: center; color: var(--accent); font-size: 12px; font-weight: 700; }
.crop-compass-pointer { position: absolute; top: 0; left: calc(50% - 5px); border-top: 9px solid var(--accent); border-left: 5px solid transparent; border-right: 5px solid transparent; }
.crop-quarter-turns { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crop-quarter-turns button { border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.crop-adjustments small { color: var(--muted); font-size: 10px; }
.crop-contrast input { width: 100%; margin: 22px 0 16px; accent-color: var(--accent); }

/* Компас лежит на поле скана широкой прозрачной дугой. */
#cropStage > .crop-compass { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 118px; margin: 0; background: linear-gradient(transparent 45%, rgba(234, 244, 238, .22)); }
#cropStage .crop-compass-disk { width: var(--compass-diameter, 900px); height: var(--compass-diameter, 900px); left: calc(50% - var(--compass-diameter, 900px) / 2); top: 12px; border: 1px solid rgba(15, 118, 110, .22); background: transparent; opacity: .65; }
#cropStage .crop-compass-disk::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from -1deg, rgba(15, 118, 110, .7) 0deg .3deg, rgba(234, 244, 238, .45) .3deg 2deg); mask-image: radial-gradient(circle closest-side, transparent calc(100% - 14px), #000 calc(100% - 14px)); }
#cropStage .crop-compass-disk span { display: none; }
#cropStage .crop-compass-pointer { top: 4px; opacity: .7; }
#cropAngleValue { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); padding: 4px 10px; border-radius: 20px; background: rgba(244, 250, 247, .72); color: var(--accent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
.crop-rotation .crop-quarter-turns { margin-top: 18px; }

/* Регуляторы — в левой колонке, поле скана занимает всю доступную высоту. */
.crop7 .crop-adjustments { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 14px; margin-top: 16px; }
.crop7 .crop-quarter-turns { flex-wrap: wrap; row-gap: 10px; }
.crop7 .crop-quarter-turns small { order: 3; flex-basis: 100%; text-align: center; }
.crop7 .crop-contrast input { margin: 16px 0 10px; }
#cropStage > .crop-compass { height: 64px; }
#cropAngleValue { top: 28px; }

/* Линии рамки обрываются перед угловыми квадратами: внутри только пунктир. */
.crop-rect { border-color: transparent; --crop-line: #0f766e; }
.crop-rect:focus-visible { border-color: transparent; --crop-line: #0d9488; }
.crop-rect::before {
  content: ""; position: absolute; inset: -2px; pointer-events: none;
  background:
    linear-gradient(var(--crop-line), var(--crop-line)) center top / calc(100% - 14px) 2px,
    linear-gradient(var(--crop-line), var(--crop-line)) center bottom / calc(100% - 14px) 2px,
    linear-gradient(var(--crop-line), var(--crop-line)) left center / 2px calc(100% - 14px),
    linear-gradient(var(--crop-line), var(--crop-line)) right center / 2px calc(100% - 14px);
  background-repeat: no-repeat;
}

.owner-account-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #edf4f1; gap: 2px; }
#customCropBackdrop .crop-quarter-turns #cropAngleValue { position:static; transform:none; padding:0; background:none; }
.owner-account-switch button { border: 0; padding: 7px 9px; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.owner-account-switch button[aria-pressed="true"] { color: var(--accent); background: white; box-shadow: 0 1px 4px #0001; }
.owner-account-switch button:disabled { opacity: .5; cursor: wait; }

.cab-side .owner-account-switch { display: flex; margin: 12px 14px 0; }
.cab-side .owner-account-switch button { flex: 1; }

.preview-footer { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); }
.preview-footer .preview-hint { flex: 1; padding: 0; border: 0; }
.diag-shared-note { display:none; }
.calibration-diagnostics-enabled .diag-shared-note { display:inline; }
.calibration-diagnostics-enabled .diag-local-note { display:none; }
.diag-recording { display:none; margin:0 14px 8px !important; color:#576a62; font-size:11px !important; }
.calibration-diagnostics-enabled .diag-recording { display:block; }

/* Заявка на типографию: сканы и контакт отправляются отдельными шагами. */
.blank-request-backdrop { z-index: 12000; padding: 18px; overflow: auto; }
.blank-request-modal { width: min(820px, 100%); max-height: calc(100dvh - 36px); padding: 28px; overflow: auto; border: 1px solid var(--accent); border-radius: 20px; background: var(--surface); box-shadow: 0 24px 90px #103d3952; font-size: 16px; line-height: 1.5; }
/* Компенсация масштаба холста сохраняет читаемый размер текста в окне. */
body.app-fixed-scale .blank-request-modal { width: min(820px, calc(100vw - 36px)); transform: scale(calc(1 / var(--app-scale, 1))); transform-origin: center; animation: none; }
.blank-request-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.blank-request-head > div { min-width: 0; }
.blank-request-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 14px; color: var(--accent); background: var(--accent-soft); font-size: 28px; }
.blank-request-modal .blank-request-kicker { margin: 0 0 5px; font-size: 14px; font-weight: 750; color: var(--accent); }
.blank-request-head h2 { margin: 0; font-size: 26px; line-height: 1.25; color: #164843; text-wrap: balance; }
.blank-request-head #blankRequestClose { margin-left: auto; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; justify-content: center; align-items: center; line-height: 1; }
.blank-request-head #blankRequestClose svg { display: block; flex: none; }
.blank-request-modal.has-uploaded .blank-request-head { align-items: center; padding: 22px; border: 1px solid #b8dcd5; border-radius: 14px; background: #ecf8f5; }
.blank-request-modal.has-uploaded .blank-request-head h2 { font-size: 32px; text-wrap: initial; }
.blank-request-modal.has-uploaded .blank-request-kicker { display: none; }
.blank-request-modal h3 { margin: 0; font-size: 20px; line-height: 1.35; color: #164843; }
.blank-request-modal p { font-size: 16px; line-height: 1.5; }
.blank-request-promise { display: flex; flex-direction: column; gap: 6px; padding: 15px 18px; border-radius: 12px; background: #ecf8f5; border: 1px solid #b8dcd5; color: #164843; }
.blank-request-promise strong { font-size: 18px; line-height: 1.4; }
.blank-request-promise span { color: var(--muted); }
.blank-request-steps { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
.blank-request-guide { padding: 22px; border: 1px solid #b8dcd5; border-radius: 14px; background: #ecf8f5; }
.blank-request-step-head { display: flex; align-items: flex-start; gap: 14px; text-align: left; }
.blank-request-step-number { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; color: white; background: var(--accent); font-size: 24px; font-weight: 750; line-height: 1; }
.blank-request-modal .blank-request-step-head h3, .blank-request-step-title { margin: 0; color: #164843; font-size: 25px; font-weight: 750; line-height: 1.25; }
.blank-request-sample { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.blank-request-sample svg { flex: 0 0 76px; color: var(--accent); }
.blank-request-modal .blank-request-sample p { margin: 0; }
.blank-request-modal .blank-request-sample p + p { margin-top: 10px; color: var(--muted); }
.blank-request-file { position: relative; padding: 22px; border: 2px dashed #98beb7; border-radius: 14px; background: #f8faf9; }
.blank-request-file:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.blank-request-file:hover { border-color: var(--accent); }
.blank-request-picker { display: flex; flex-direction: column; align-items: stretch; gap: 18px; height: 100%; cursor: pointer; text-align: center; }
.blank-request-pick-label { display: block; margin-top: auto; padding: 12px 14px; border-radius: 8px; background: var(--accent); color: white; font-size: 18px; font-weight: 650; }
.blank-request-picker > span:last-child { color: var(--muted); }
.blank-request-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.blank-request-modal .blank-request-file-note { margin: 10px 0 16px; color: var(--muted); }
.blank-request-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.blank-request-preview { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.blank-request-preview img { display: block; height: 44px; width: 44px; object-fit: contain; }
.blank-request-preview figcaption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.blank-request-remove { padding: 5px 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.blank-request-fields label { display: block; font-weight: 650; color: #284f49; }
.blank-request-fields input { display: block; width: 100%; margin-top: 8px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; color: var(--ink); background: white; }
.blank-request-fields input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.blank-request-consent { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.blank-request-consent input { flex: 0 0 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.blank-request-consent a { color: var(--accent); }
.blank-request-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.blank-request-footer > span { color: var(--muted); }
.blank-request-footer > strong { color: var(--accent); font-size: 18px; }
.blank-request-footer .btn, .blank-request-success .btn { min-height: 46px; padding: 11px 24px; font-size: 16px; }
.blank-request-modal .blank-request-error { margin: 14px 0; color: var(--danger); }
.blank-request-modal #blankRequestNumber { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.blank-request-accepted { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 14px 0; }
.blank-request-accepted figure { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.blank-request-accepted img { display: block; width: 64px; height: 56px; object-fit: contain; margin-bottom: 4px; }
.blank-request-contact-heading { margin: 18px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.blank-request-modal .blank-request-contact-heading p { margin: 8px 0 0; }
.blank-request-modal.has-success { padding: 0; border: 0; border-radius: 12px; background: transparent; box-shadow: none; }
body.app-fixed-scale .blank-request-modal.has-success { width: min(680px, calc(100vw - 36px)); }
.blank-request-notice { padding: 14px 18px; border: 1px solid #e5c76f; border-radius: 12px; background: #fff7df; color: #624414; font-size: 15px; line-height: 1.5; }
.blank-request-notice p { margin: 0; }
.blank-request-notice strong { display: block; margin-bottom: 4px; font-size: 18px; }
.blank-request-success .blank-request-notice { display: flex; align-items: flex-start; gap: 18px; padding: 24px; text-align: left; }
.blank-request-success .blank-request-notice > div { flex: 1; min-width: 0; }
.blank-request-modal .blank-request-notice p { font-size: 16px; }
.blank-request-success #blankRequestSuccessClose { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; align-items: center; line-height: 1; background: transparent; border-color: #e5c76f; color: inherit; }
.blank-request-success #blankRequestSuccessClose:hover { background: #f9edc7; }
.blank-request-success #blankRequestSuccessClose svg { display: block; flex: none; }
.preset-request { border-style: dashed; }
.preset-request b { font-size: 10px; }
.preset-request small { max-width: 100%; font-size: 9px; line-height: 1.2; letter-spacing: -.15px; }
.blank-request-inline { padding:0; border:0; background:none; color:var(--accent); font:inherit; text-decoration:underline; cursor:pointer; }
.w0-request { border-style: dashed !important; color: var(--accent); }
.w0-request.active { border-style: solid !important; }
@media (max-width: 560px) {
  .blank-request-backdrop { padding: 10px; }
  .blank-request-modal { padding: 18px; max-height: calc(100dvh - 20px); border-radius: 16px; }
  body.app-fixed-scale .blank-request-modal { width: calc(100vw - 20px); }
  body.app-fixed-scale .blank-request-modal.has-success { width: calc(100vw - 20px); }
  .blank-request-modal.has-success { padding: 0; }
  .blank-request-success .blank-request-notice { padding: 18px; gap: 14px; }
  .blank-request-head { gap: 10px; margin-bottom: 18px; }
  .blank-request-icon { display: none; }
  .blank-request-head h2 { font-size: 22px; }
  .blank-request-modal.has-uploaded .blank-request-head { padding: 18px; }
  .blank-request-modal.has-uploaded .blank-request-head h2 { font-size: 26px; }
  .blank-request-steps { grid-template-columns: 1fr; gap: 16px; }
  .blank-request-guide, .blank-request-file { padding: 18px; }
  .blank-request-modal .blank-request-step-head h3, .blank-request-step-title { font-size: 23px; }
  .blank-request-sample { margin-top: 18px; }
  .blank-request-picker { gap: 18px; }
  .blank-request-consent { align-items: flex-start; font-size: 14px; }
  .blank-request-consent input { margin-top: 1px; }
  .blank-request-footer { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Уведомление только браузеру отправителя, вне масштабируемого холста. */
.blank-sender-notice {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 20000; display: flex; align-items: center; gap: 16px;
  max-width: calc(100vw - 32px); box-sizing: border-box; padding: 12px 14px 12px 18px;
  border: 1px solid #acd9cf; border-radius: 12px; background: #edf8f4; color: #20574d;
  box-shadow: 0 6px 24px #173e3526; font: 14px/20px system-ui, sans-serif;
}
.blank-sender-notice span { min-width: 0; white-space: nowrap; overflow-x: auto; }
.blank-sender-notice button {
  flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0;
  border-radius: 6px; background: transparent; color: inherit; font: 24px/28px system-ui;
  cursor: pointer;
}
.blank-sender-notice button:hover, .blank-sender-notice button:focus-visible { background: #d6eee5; }

/* Точное положение строк: только кнопки, без перетаскивания ползунка. */
.cal-position { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; }
.row-cal .cal-position input[hidden] { display: none; }
.cal-position output { flex: 1; min-width: 0; width: auto; padding: 5px 2px; }
.cal-nudge { flex: 0 0 26px; width: 26px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--accent); font-size: 18px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.cal-nudge:hover { background: var(--accent-soft); border-color: var(--accent); }
.cal-nudge:active { background: #cce9e4; }
.cal-nudge:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Подсказка у выбора типографии перед печатью пустых макетов. */
.preset-panel.missing { border-color:var(--danger); box-shadow:0 0 0 1px var(--danger); }
.preset-panel.missing .preset-title { color:var(--danger); }
.preset-panel.missing .preset-opt { border-color:var(--danger); background:var(--danger-soft); }

.manual-demo-notice { margin:0 12px 6px; display:flex; justify-content:flex-end; align-items:center; }
.manual-demo-notice[hidden] { display:none; }
.manual-demo-notice .btn { flex-shrink:0; }
#cardForm input[readonly] { color:var(--muted); }

.calnotice-manual{display:flex;align-items:center;justify-content:center;gap:14px;background:#fff!important;border-color:#cbd8d3!important;color:#34544b!important}
.calnotice-caution{font-size:11px;font-weight:600;line-height:1.4;padding:4px 8px;border-radius:6px;color:#946313;background:#fff3d5;white-space:nowrap}

/* Подпись предпросмотра на шаге выбора производителя. */
.w0-fig { position: relative; }
.w0-fig::after {
  content: "Макеты";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 12px;
  border: 1px solid #c8dfda;
  border-radius: 10px;
  background: #ffffff;
  color: #08776f;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(20, 60, 50, .06);
  pointer-events: none;
}

/* Анонс видео на первом шаге выбора типографии. */
.w0-video-notice { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 11px 16px; border: 1px solid #b9ded7; border-radius: 13px; background: linear-gradient(110deg, #e9f6f2, #f5faf8); color: #205c52; box-shadow: 0 3px 12px rgba(24, 88, 74, .04); }
.w0-video-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: #0f766e; box-shadow: 0 1px 4px rgba(24, 88, 74, .06); }
.w0-video-icon svg { width: 23px; height: 23px; }
.w0-video-text { flex: 1; font-size: 16px; font-weight: 750; line-height: 1.35; }
.w0-video-badge { flex: none; padding: 4px 11px; border: 1px solid #c5e2da; border-radius: 999px; background: #fff; color: #42786c; font-size: 12px; font-weight: 750; letter-spacing: .02em; }

/* Явное подтверждение готовности принтера — главное действие предупреждения. */
.calnotice #btnCalNoticeConfirm, .calnotice .calnotice-manual { grid-column: 1 / -1; }

/* Два равноправных по размеру пути настройки; рекомендуемый — зелёный слева. */
.calnotice .pcheck-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.calnotice #btnCalNoticeConfirm,
.calnotice #btnCalNoticePrintAnyway { grid-column: 1 / -1; }
.calnotice #btnCalNoticeWizard,
.calnotice #btnCalNoticeManual { grid-column: auto; min-height: 66px; border-radius: 10px; }
.calnotice #btnCalNoticeWizard { font-weight: 600; border-color: var(--accent); }
.calnotice #btnCalNoticeManual { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; font-size: 14px; }
.calnotice .pcheck-actions .btn:focus-visible { outline: 3px solid #70b7aa; outline-offset: 3px; }

/* Компактный выбор числа пробных макетов. */
#proofBackdrop .proof-row {justify-content:space-between;gap:16px;margin:20px 0 0}
#proofBackdrop .proof-row label {font-size:14px}
#proofBackdrop .spin-wrap {width:88px;flex:none}
#proofBackdrop #proofCount {min-height:38px}
#proofBackdrop .modal-actions {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}
#proofBackdrop .modal-actions .btn {min-width:0;min-height:40px;justify-content:center;text-align:center}

/* Краткое описание подписки целиком помещается под тарифами. */
.cab-sub-benefits { padding: 10px 18px; }
.cab-sub-benefits .cab-card-title { margin-bottom: 5px !important; }
.cab-sub-benefits p:last-child { margin: 0; font-size: 13px; line-height: 1.4; color: #3a4744; }
.cab-pay-actions [data-robo-qr-show]:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.cab-sub-wrap .cab-sub-hero { padding-top: 12px; padding-bottom: 12px; }
.cab-sub-wrap .cab-tariffs, .cab-sub-wrap .cab-sub-benefits { margin-top: 8px; }

/* Профиль — серверные сведения об аккаунте и подключённых ЧОО. */
.cab-profile-details { display: grid; grid-template-columns: 145px minmax(0,1fr); margin: 4px 0 0; }
.cab-profile-details > div { display: contents; }
.cab-profile-details dt, .cab-profile-details dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #e5eeeb; font-size: 13px; line-height: 1.4; }
.cab-profile-details dt { color: var(--muted); }
.cab-profile-details dd { font-weight: 600; color: #234b44; overflow-wrap: anywhere; }
.cab-profile-details > div:last-child > * { border-bottom: 0; }
.cab-profile-note { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.cab-organizations-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cab-organizations-head .cab-card-title { margin: 0 !important; }
.cab-org-count { border-radius: 20px; background: #deefea; color: #16675c; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.cab-organization-access { margin: 10px 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.cab-organization-access.is-active { color: #087b75; }
.cab-organizations-list { padding: 0; margin: 12px 0 0; list-style: none; border: 1px solid #dce9e5; border-radius: 10px; overflow: hidden; }
.cab-organization { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: #fff; }
.cab-organization + .cab-organization { border-top: 1px solid #e5eeeb; }
.cab-organization-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #eef7f4; color: #087b75; flex: none; }
.cab-organization > div { min-width: 0; }
.cab-organization strong { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; color: #234b44; }
.cab-organization div > span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }

/* Первый экран подписки заканчивается преимуществами; управление продлением ниже. */
.cab-body:has(.cab-sub-overview) { container-type:size; }
.cab-sub-overview { display:flex;flex-direction:column;min-height:100cqh; }
.cab-sub-overview > * { flex-shrink:0; }
.cab-sub-wrap .cab-sub-benefits { margin-top:8px;padding:14px 18px;background:linear-gradient(120deg,#eef8f4,#fafdfe);border-color:#c9e3dc; }
.cab-sub-overview .cab-sub-benefits { flex:1 0 auto;display:flex;flex-direction:column;justify-content:center; }
.cab-sub-benefits .cab-card-title { margin-bottom:12px!important; }
.cab-benefit-list { display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0;padding:0;list-style:none; }
.cab-benefit-list li { display:flex;align-items:flex-start;gap:10px;min-width:0; }
.cab-benefit-check { display:flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border-radius:9px;background:#d9eee7;color:#087b70;font-size:16px;font-weight:700; }
.cab-benefit-list strong { display:block;color:#214e45;font-size:13px;line-height:18px; }
.cab-benefit-list li div > span { display:block;margin-top:3px;color:#60776f;font-size:12px;line-height:17px; }
.cab-sub-wrap .cab-sub-renewal { margin-top:26px; }

.cab-sub-overview + * { margin-top:26px; }
.cab-sub-overview .renewal-consent { margin:5px 0; }

/* При активной подписке без тарифов преимущества остаются компактными внизу. */
.cab-sub-overview:not(:has(.cab-tariffs)) .cab-sub-benefits { flex:0 0 auto;margin-top:auto; }
