/* ПОБУБНИМ — вызывной лист (instrumenty/vyzyvnoj-list.html).
   Пара к paper.css: строки-редакторы, полоса светового дня, готовность листа,
   окно рассылки, мобильная панель и сам лист. Лист здесь набран гротеском и
   табличными цифрами: это расписание, которое читают на бегу, а не договор. */

.art-hero { max-width: 880px; }
.art-hero p.lead { max-width: 720px; }

.cs-builder { --gold: #d9a441; --bluehr: #7396c8; --well: #0c0c0b; --mono: var(--font-mono, ui-monospace, "SF Mono", Consolas, monospace); }
/* общий отступ секций сайта (88–140 px) здесь лишний: шесть разделов формы растягивали
   страницу на три экрана пустоты. Разделы держит зазор колонки и номер в подписи */
.cs-builder .cfg { gap: 44px; }
.cs-builder .cfg-sec, .cs-builder .blk, .send-body section { padding-top: 0; padding-bottom: 0; }
.cfg-sec .sub { margin: -6px 0 12px; font-size: 13px; color: var(--mute); text-wrap: pretty; }

/* ---------- первый визит ---------- */
.starter { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r-card); }
.starter b { display: block; font-weight: 500; font-size: 14.5px; }
.starter span { font-size: 13px; color: var(--smoke); font-weight: 300; text-wrap: pretty; }
.starter > div { flex: 1; min-width: 200px; }

/* ---------- поля вне .fld ---------- */
.row-i input, .blk textarea, #f-notes, #paste-text, .shift select, #f-contact {
  background: var(--well); border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
  font: 400 14px var(--font-ui); padding: 9px 10px; min-height: 42px; width: 100%; min-width: 0; outline: none;
}
.row-i input:focus, .blk textarea:focus, #f-notes:focus, #paste-text:focus, .shift select:focus, #f-contact:focus { border-color: var(--lamp); }
.row-i input::placeholder, .cs-builder textarea::placeholder { color: var(--mute); font-weight: 300; }
.row-i input[type="time"] { font-variant-numeric: tabular-nums; }
.cs-builder textarea { resize: vertical; min-height: 78px; font-size: 15px; padding: 11px 12px; line-height: 1.45; }
#f-notes { min-height: 92px; }
#f-contact, .shift select { font-size: 14px; min-height: 44px; }

/* ---------- строки: главное в первой линии, подробности ниже ---------- */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row-i { display: grid; gap: 6px 8px; align-items: end; }
.row-i .rn { grid-area: n; height: 42px; display: flex; align-items: center; justify-content: center; font: 500 12px var(--mono); color: var(--mute); }
.row-i .rowbtns { grid-area: btns; }
.x-t { grid-area: t; } .x-what { grid-area: what; } .x-name { grid-area: name; } .x-time { grid-area: time; }
.x-addr { grid-area: addr; } .x-how { grid-area: how; } .x-role { grid-area: role; } .x-at { grid-area: at; }
.x-who { grid-area: who; } .x-phone { grid-area: phone; } .x-ready { grid-area: ready; } .x-part { grid-area: part; }
.x-where { grid-area: where; } .x-note { grid-area: note; }
#sched .row-i { grid-template-columns: 26px 112px 1fr auto; grid-template-areas: "n t what btns"; }
#locs .row-i { grid-template-columns: 26px 1fr 112px auto; grid-template-areas: "n name time btns" ". addr addr ." ". how how ."; }
#crew .row-i { grid-template-columns: 26px minmax(0, 1.6fr) minmax(0, 0.5fr) 112px auto; grid-template-areas: "n role role at btns" ". who phone phone ."; }
#cast .row-i { grid-template-columns: 26px minmax(0, 1fr) 104px 104px auto; grid-template-areas: "n who at ready btns" ". part phone phone ."; }
#scenes .row-i { grid-template-columns: 26px 1fr 1fr auto; grid-template-areas: "n what what btns" ". where note ."; }
/* подпись над временем — только у первой строки: она работает шапкой столбца */
.tm { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tm span { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); font-weight: 500; line-height: 1; white-space: nowrap; }
.row-i:not(:first-child) .tm span, #sched .tm span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.row-add { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mini.solid { background: var(--lamp); color: #000; border-color: var(--lamp); font-weight: 500; }
.mini.solid:hover { background: #fff; color: #000; }
.chip:active, .miss:active { transform: scale(0.97); }
.chip.tog[aria-pressed="true"] { background: var(--lamp); color: #000; border-color: var(--lamp); font-weight: 400; }

/* ---------- ссылки-действия ---------- */
.lnk { background: none; border: 0; padding: 8px 0; font: 400 13px var(--font-ui); color: var(--smoke); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(255, 253, 245, 0.25); text-underline-offset: 3px; transition: color 0.15s var(--ease); }
.lnk:hover { color: var(--ink); }
.lnk.danger:hover { color: var(--dv-rec, #e0492f); }
.hint .lnk { padding: 0; }
a.lnk { display: inline-block; }

/* ---------- логотип и прогноз ---------- */
.logo-row { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.logo-note { flex: 1; min-width: 200px; font-size: 12.5px; color: var(--mute); text-wrap: pretty; }
.wx-row { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.wx-by { margin-top: 6px; font-size: 12.5px; color: var(--mute); text-wrap: pretty; }
.wx-by a { text-decoration: underline; text-decoration-color: rgba(255, 253, 245, 0.25); text-underline-offset: 3px; }
.wx-by a:hover { color: var(--ink); }
.mini:disabled { opacity: 0.55; cursor: default; }

/* ---------- координаты ---------- */
.geo { margin-top: 6px; }
.geo summary { list-style: none; display: inline-block; padding: 8px 0; font-size: 13px; color: var(--smoke); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(255, 253, 245, 0.25); text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.geo summary::-webkit-details-marker { display: none; }
.geo summary:hover, .geo[open] summary { color: var(--ink); }
.coords { display: grid; grid-template-columns: 1fr 1fr 92px; gap: 10px 12px; margin-top: 6px; }
.geo-act { margin-top: 10px; }

/* ---------- сдвиг смены ---------- */
.shift { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--smoke); }
.shift select { width: auto; max-width: 190px; }
.shift-b { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.shift-b button { min-width: 46px; min-height: 42px; background: none; border: 0; border-left: 1px solid var(--line); color: var(--ink); font: 500 13px var(--mono); cursor: pointer; transition: background 0.15s var(--ease); }
.shift-b button:first-child { border-left: 0; }
.shift-b button:hover { background: var(--char2); }
.shift-b button:active { background: var(--char2); transform: scale(0.97); }
.shift-u { color: var(--mute); }

/* ---------- полоса светового дня — сигнатура инструмента ---------- */
.sunbar { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--char); }
.sb-top { position: relative; height: 18px; font: 400 10.5px var(--mono); color: var(--smoke); }
.sb-top span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.sunbar .track { position: relative; height: 14px; border-radius: 7px; background: var(--well); overflow: hidden; }
.sunbar .track i { position: absolute; top: 0; height: 100%; }
.sunbar .track .day { background: #3a352c; }
.sunbar .track .gold { background: var(--gold); }
.sunbar .track .blue { background: var(--bluehr); }
.sunbar .track .shift { margin: 0; background: rgba(255, 255, 255, 0.1); box-shadow: inset 2px 0 0 var(--ink), inset -2px 0 0 var(--ink); }
.sunbar .track .tick { top: 3px; height: 8px; width: 1px; background: rgba(242, 239, 232, 0.75); }
.sunbar .scale { display: flex; justify-content: space-between; margin-top: 6px; font: 400 10.5px var(--mono); color: var(--mute); }
.sunbar .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 11.5px; color: var(--mute); }
.sunbar .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.k-day::before { background: #3a352c; } .k-gold::before { background: var(--gold); } .k-blue::before { background: var(--bluehr); }
.sunbar .legend .k-shift::before { border-radius: 0; background: rgba(255, 255, 255, 0.1); box-shadow: inset 2px 0 0 var(--ink), inset -2px 0 0 var(--ink); }
.sunbar .stext { margin-top: 10px; font-size: 13.5px; color: var(--smoke); font-weight: 300; text-wrap: pretty; font-variant-numeric: tabular-nums; }
.sunbar .stext b { color: var(--ink); font-weight: 500; }
.fld.wx { margin-top: 14px; }

/* ---------- вставка списком ---------- */
.paste summary { list-style: none; display: inline-flex; align-items: center; }
.paste summary::-webkit-details-marker { display: none; }
.paste[open] { flex-basis: 100%; }
.paste[open] summary { background: var(--char2); color: var(--ink); }
.paste-in { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.paste-in label { font-size: 13px; color: var(--smoke); }
#contact-box { margin-top: 14px; }

/* ---------- блоки по выбору ---------- */
#blocks { display: flex; flex-direction: column; gap: 20px; }
#blocks:has(.blk:not([hidden])) { margin-top: 8px; }
.blk { border-left: 2px solid var(--line); padding-left: 14px; }
.blk:not([hidden]) { animation: blk-in 0.22s var(--ease); }
@keyframes blk-in { from { opacity: 0; transform: translateY(-4px); } }
.blk-h { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 10px; }

/* ---------- готовность листа ---------- */
.ready { margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--char); }
.ready-top { display: flex; align-items: center; gap: 14px; }
.ready-top b { font-size: 13.5px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ready-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--well); overflow: hidden; }
.ready-bar i { display: block; height: 100%; background: var(--lamp); transform-origin: left; transform: scaleX(0); transition: transform 0.3s var(--ease); }
.ready-miss { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ready-miss:empty { display: none; }
.ready-miss .lbl { font-size: 12px; color: var(--mute); margin-right: 2px; }
.miss { padding: 6px 12px; min-height: 36px; border-radius: var(--r-pill); border: 1px solid var(--line); background: none; color: var(--smoke); font: 300 12.5px var(--font-ui); cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.miss:hover { background: var(--char2); color: var(--ink); }
#ready-warn .hint { margin-top: 10px; }

/* ---------- колонка листа: всё, включая кнопки, помещается в экран ---------- */
@media (min-width: 921px) {
  .cs-builder .paper-col { display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
  .cs-builder .paper-shell { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .cs-builder .paper { flex: 1; min-height: 200px; max-height: none; }
}
.cs-builder .paper-bar .pbtn { min-width: 92px; padding: 10px 8px; }
.cs-builder .paper-bar .pbtn.main { flex: 1 0 100%; min-height: 48px; font-size: 15px; }
.cs-builder .paper-note { display: none; }   /* то же сказано строкой ниже листа; ответы кнопки идут тостом */
.cs-builder .paper-hint { margin: 0; padding: 0 14px 12px; }
.pbtn:disabled { opacity: 0.45; cursor: default; }
.paper-opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; margin-top: 10px; }
.paper-links { display: flex; gap: 18px; }
.draft-note, .priv { margin-top: 6px; font-size: 12.5px; color: var(--mute); text-wrap: pretty; }

/* ---------- лист ---------- */
.paper.cs { font-family: var(--font-ui); font-size: 12.5px; line-height: 1.45; font-variant-numeric: tabular-nums; padding: clamp(18px, 2.6vw, 32px); }
.paper.cs h2 { text-align: left; font-size: 10.5px; letter-spacing: 0.14em; color: #6b675e; font-weight: 600; margin: 0; }
.paper.cs .cs-proj { text-align: left !important; font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 4px 0 0; hyphens: manual; -webkit-hyphens: manual; text-wrap: balance; }
.paper.cs table.doc-meta { margin: 6px 0 14px; font-size: 12.5px; color: #4a463e; }
.paper.cs h3 { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; margin: 20px 0 0; padding-bottom: 5px; border-bottom: 1.5px solid #22201c; }
.paper.cs p { text-align: left; hyphens: manual; -webkit-hyphens: manual; margin: 8px 0 0; text-wrap: pretty; }
.paper.cs a[href^="tel:"] { white-space: nowrap; }
.paper.cs a { color: inherit; text-decoration: underline; text-decoration-color: #a39c8c; text-underline-offset: 2px; }
.paper.cs table.items { margin: 0; font-size: 12.5px; }
.paper.cs table.items th, .paper.cs table.items td { border: 0; border-bottom: 1px solid #d9d2c2; padding: 6px 10px 6px 0; text-align: left; vertical-align: top; background: none; width: auto; }
.paper.cs table.items th { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #6b675e; font-weight: 600; }
.paper.cs table.items td:first-child { font-weight: 600; }
.paper.cs table.items td:last-child, .paper.cs table.items th:last-child { white-space: nowrap; padding-right: 0; }
.paper.cs table.items tr.grp th { padding-top: 12px; color: #22201c; font-size: 10px; border-bottom-color: #a39c8c; }
/* плитки главных времён: общий сбор — единственная тёмная, с неё начинают читать лист */
.paper.cs table.cs-facts { table-layout: fixed; border-collapse: separate; border-spacing: 0; margin: 0 0 12px; }
.paper.cs table.cs-facts th { border: 0; border-top: 1.5px solid #22201c; padding: 8px 8px 0 0; }
.paper.cs table.cs-facts td { border: 0; padding: 2px 8px 9px 0; font-size: 22px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.paper.cs table.cs-facts th:first-child, .paper.cs table.cs-facts td:first-child { background: #22201c; color: #f7f4ec; padding-left: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paper.cs table.cs-facts th:first-child { color: #c9c2b2; border-radius: 6px 6px 0 0; }
.paper.cs table.cs-facts td:first-child { border-radius: 0 0 6px 6px; }
.paper.cs table.cs-facts th:nth-child(2), .paper.cs table.cs-facts td:nth-child(2) { padding-left: 12px; }
.paper.cs table.cs-facts .blank { min-width: 44px; border-color: currentColor; }
.paper.cs .line { border-bottom: 1px solid #d9d2c2; padding: 6px 0; gap: 16px; }
.paper.cs .line b { font-weight: 600; white-space: nowrap; }
.paper.cs .line span { text-align: right; }
.paper.cs .doc-note { margin-top: 18px; }
/* логотип встаёт в строку с маркой «Б», код маршрута — под таблицей локаций */
.paper.cs .cs-logo { float: right; margin: -34px 0 6px 12px; }
.paper.cs .cs-logo img { display: block; max-width: 160px; max-height: 64px; width: auto; height: auto; }
.paper.cs .cs-qr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; margin-top: 12px; break-inside: avoid; }
.paper.cs .cs-qr span { display: flex; flex-direction: column; gap: 4px; max-width: 150px; }
.paper.cs .cs-qr img { display: block; image-rendering: pixelated; outline: 1px solid #d9d2c2; }
.paper.cs .cs-qr i { font-style: normal; font-size: 10.5px; line-height: 1.3; color: #4a463e; overflow-wrap: anywhere; }
.paper.cs .cs-qr p { flex: 1; min-width: 150px; margin: 0; font-size: 11px; color: #6b675e; }

/* ---------- образец листа в тексте страницы ---------- */
.cs-sample { margin: 6px 0 0; }
.cs-sample img { display: block; width: 100%; max-width: 589px; height: auto; border-radius: 12px; outline: 1px solid rgba(255, 255, 255, 0.1); outline-offset: -1px; }
.cs-sample figcaption { margin-top: 10px; max-width: 589px; font-size: 13.5px; color: var(--mute); text-wrap: pretty; }

/* ---------- окно рассылки ---------- */
dialog.send { margin: auto; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--char); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); overflow: hidden; }
dialog.send::backdrop { background: rgba(0, 0, 0, 0.78); }
dialog.send[open] { animation: send-in 0.22s var(--ease); }
@keyframes send-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.send-in { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.send-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.send-hd h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.send-x { width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; border-radius: 8px; color: var(--mute); font-size: 16px; cursor: pointer; transition: color 0.15s var(--ease); }
.send-x:hover { color: var(--ink); }
.send-body { overflow-y: auto; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 26px; }
.send-body .label { display: block; margin-bottom: 10px; }
.msg { margin: 0; max-height: 216px; overflow: auto; padding: 12px 14px; background: var(--well, #0c0c0b); border: 1px solid var(--line); border-radius: 10px; font: 400 13px/1.5 var(--font-ui); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--smoke); }
.send-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.send-row .pbtn, .send-ft .pbtn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.send-note { margin-top: 8px; font-size: 12.5px; color: var(--mute); text-wrap: pretty; }
.per-i { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.per-i:first-child { border-top: 0; padding-top: 0; }
.per-who { min-width: 150px; flex: 1; }
.per-who b { display: block; font-size: 14.5px; font-weight: 500; }
.per-who span { font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; }
.per-act { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.per-act .mini { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; text-decoration: none; }
.per-st { min-height: 40px; padding: 6px 8px; background: #0c0c0b; color: var(--smoke); border: 1px solid var(--line); border-radius: 8px; font: 400 13px var(--font-ui); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.per-i[data-st="sent"] .per-st { color: var(--ink); border-color: rgba(255, 253, 245, 0.3); }
.per-i[data-st="ok"] .per-st { background: var(--lamp); color: #000; border-color: var(--lamp); }
.per-empty { font-size: 13.5px; color: var(--mute); }
.per-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.per-sum { font-size: 13px; color: var(--smoke); font-variant-numeric: tabular-nums; }
.diff { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; color: var(--smoke); }
.diff li { margin-bottom: 3px; }
.send-ft { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.send-ft .pbtn { flex: none; }
.send-ft span { flex: 1; min-width: 200px; font-size: 12.5px; color: var(--mute); text-wrap: pretty; }

/* ---------- мобильная панель: лист и рассылка всегда под пальцем ---------- */
.mbar { display: none; }
@media (max-width: 920px) {
  .mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(10, 10, 9, 0.95); border-top: 1px solid var(--line); }
  .mbar-s { flex: 1; display: flex; flex-direction: column; font-size: 11.5px; line-height: 1.25; color: var(--mute); }
  .mbar-s b { font-size: 14px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
  .mbar .pbtn { flex: none; min-width: 0; padding: 10px 16px; display: inline-flex; align-items: center; text-decoration: none; }
  body.cs-page { padding-bottom: 68px; }
  body.cs-page .pb-tip { bottom: 80px; }
  body.cs-page .pb-toast { bottom: 80px; }
  .cs-builder .paper { max-height: none; }
  #paper-top { scroll-margin-top: 70px; }
}
@media (max-width: 560px) {
  #sched .row-i { grid-template-columns: 22px 108px 1fr; grid-template-areas: "n t btns" ". what what"; }
  #locs .row-i { grid-template-columns: 22px 1fr 108px; grid-template-areas: "n name time" ". addr addr" ". how btns"; }
  #crew .row-i { grid-template-columns: 22px 1fr 108px; grid-template-areas: "n role at" ". who who" ". phone btns"; }
  #cast .row-i { grid-template-columns: 22px 1fr 1fr; grid-template-areas: "n who who" ". part part" ". phone phone" ". at ready" ". btns btns"; }
  #scenes .row-i { grid-template-columns: 22px 1fr auto; grid-template-areas: "n what what" ". where where" ". note btns"; }
  .row-i .rowbtns { justify-content: flex-end; }
  .coords { grid-template-columns: 1fr 1fr; }
  .shift { margin-left: 0; width: 100%; }
  .paper.cs { font-size: 11.5px; }
  .paper.cs table.items { font-size: 11.5px; }
  .paper.cs table.cs-facts td { font-size: 18px; }
  .paper.cs .cs-proj { font-size: 18px; }
  .send-body { padding: 16px; }
  .send-hd, .send-ft { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .blk:not([hidden]), dialog.send[open] { animation: none; }
  .ready-bar i { transition: none; }
}

/* ---------- печать: чистый A4, строки таблиц не рвутся ----------
   Общее правило paper.css прячет страницу через visibility, и её пустая высота
   уезжала в PDF чистыми листами (замер 05.10: 7 страниц вместо одной). Здесь из
   потока убирается всё, что не лист и не его предки. */
@media print {
  @page { size: A4; margin: 12mm; }
  body.cs-page :not(:has(.paper.cs)):not(.paper.cs):not(.paper.cs *) { display: none !important; }
  body.cs-page, body.cs-page :has(.paper.cs) { display: block !important; position: static !important; margin: 0 !important; padding: 0 !important; max-width: none !important; max-height: none !important; border: 0 !important; box-shadow: none !important; background: #fff !important; }
  .paper.cs { position: static; inset: auto; max-height: none; overflow: visible; padding: 0; font-size: 10.5pt; background: #fff; }
  .paper.cs tr, .paper.cs .line { break-inside: avoid; }
  .paper.cs h3 { break-after: avoid; }
}
