/* Фото в PDF. Сначала телефон: крупные кнопки, панель действий внизу экрана. */
.foto-pdf { --fp-brand: #8c1821; --fp-brand-soft: #fbf1f2; --fp-ink: #1b1b1b; --fp-muted: #63676c; --fp-line: #d9dbde; --fp-frame: #a7adb3; --fp-soft: #f5f6f7; --fp-warn: #9a5b00; --fp-warn-soft: #fff7eb;
  max-width: 1280px; margin-block: 1.5rem; color: var(--fp-ink); }
.foto-pdf h2 { font-size: 24px; line-height: 1.25; margin: 0 0 .5rem; }
.foto-pdf__hint { color: var(--fp-muted); font-size: 14px; line-height: 1.45; margin: .25rem 0 .75rem; }
.foto-pdf .zknopka { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: .45rem .9rem; border: 1px solid var(--fp-brand); border-radius: 6px; font-size: 14px; background: var(--knopka-fon, var(--fp-brand)); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.foto-pdf .zknopka--tihaya { background: #fff; color: var(--fp-brand); border-color: var(--fp-frame); }
.foto-pdf .zknopka:hover:not(:disabled) { filter: brightness(.95); }
.foto-pdf .zknopka:disabled { opacity: .5; cursor: not-allowed; }
.foto-pdf .zknopka:focus-within, .foto-pdf .zknopka:focus-visible { outline: 2px solid var(--fp-brand); outline-offset: 2px; }
.foto-pdf .zknopka svg { width: 18px; height: 18px; flex: none; }
.foto-pdf__file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.foto-pdf__text-button { background: none; border: 0; padding: .4rem .2rem; color: var(--fp-brand); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Первый экран (диктовка Павла 20.11): пункты в две колонки «Как загрузить» | «Что сделает инструмент», ниже два поля -
   «Выбрать фото» (сюда же перетаскивать) и «Сделать фото» (советы к съемке). Размеры кнопок zknopka задает общий
   слой tools/shared/edinyj_stil.css - здесь их не трогать. */
/* Три способа загрузки - одной строкой сразу под H1 (схема Павла 20.11). */
.foto-pdf__stroka-zagruzki { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 2.2rem; margin: -.4rem 0 1rem; padding: 0; font-size: 15px; line-height: 1.35; }
.foto-pdf__stroka-zagruzki li { position: relative; padding-left: 1.4rem; }
.foto-pdf__stroka-zagruzki li::before { content: ""; position: absolute; left: .2rem; top: .28em; width: .42rem; height: .72rem; border: solid var(--fp-brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.foto-pdf__umeet { margin: 0 0 1.25rem; }
.foto-pdf__kol-zag { margin: 0 0 .4rem; font-size: 15px; font-weight: 700; }
.foto-pdf__punkty, .foto-pdf__pole-punkty { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; line-height: 1.35; }
.foto-pdf__punkty { font-size: 14.5px; }
.foto-pdf__punkty--dva { display: block; columns: 3; column-gap: 2rem; } /* читается сверху вниз, потом второй столбец */
.foto-pdf__punkty--dva li { break-inside: avoid; margin-bottom: .3rem; }
.foto-pdf__punkty li ul { list-style: none; margin: .2rem 0 0; padding: 0; }
.foto-pdf__punkty li li { padding-left: 1.1rem; color: var(--fp-muted); font-size: .95em; }
.foto-pdf__punkty li li::before { content: "-"; border: 0; transform: none; width: auto; height: auto; top: 0; left: .2rem; color: var(--fp-muted); }
.foto-pdf__punkty li, .foto-pdf__pole-punkty li { position: relative; padding-left: 1.4rem; }
.foto-pdf__punkty li::before, .foto-pdf__pole-punkty li::before { content: ""; position: absolute; left: .2rem; top: .28em; width: .42rem; height: .72rem; border: solid var(--fp-brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.foto-pdf__add { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.foto-pdf__pole { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; min-width: 0; padding: 1rem 1.1rem; border: 1.5px dashed var(--fp-frame); border-radius: 12px; background: var(--fp-soft); }
.foto-pdf__add.is-over .foto-pdf__pole:first-child { border-color: var(--fp-brand); background: var(--fp-brand-soft); }
.foto-pdf__pole-punkty { color: var(--fp-muted); font-size: 13.5px; }
.foto-pdf__net-kamery { margin: 0; padding: .5rem .7rem; border-radius: 8px; background: var(--fp-warn-soft); color: var(--fp-warn); font-size: 13.5px; line-height: 1.35; }
.foto-pdf__net-kamery[hidden] { display: none; }
/* Снимки с прошлого раза: выбор «Восстановить» / «Очистить». */
.foto-pdf__vozvrat { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 1rem; padding: .7rem .9rem; border: 1px solid #c9ded3; border-radius: 10px; background: #eef7f1; }
.foto-pdf__vozvrat p { margin: 0; font-size: 14.5px; font-weight: 600; }
.foto-pdf__vozvrat-knopki { display: flex; gap: .5rem; }
.foto-pdf__choice span small { margin-left: .3rem; color: var(--fp-muted); font-size: 11.5px; font-weight: 400; }
/* «Перетащите снимки сюда» - только там, где есть мышь. */
.foto-pdf__desk { display: none; }
@media (hover: hover) and (pointer: fine) { .foto-pdf__pole-punkty .foto-pdf__desk { display: list-item; } }
.foto-pdf__errors { margin: .75rem 0 0; padding: .6rem .9rem .6rem 1.8rem; border-radius: 8px; background: var(--fp-brand-soft); color: #a92020; font-size: 14px; }

.foto-pdf__work { margin-top: 1.5rem; scroll-margin-top: 64px; } /* на телефоне сверху закреплена шапка сайта 56 px */
.foto-pdf__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.foto-pdf__busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .7); color: var(--fp-muted); font-size: 13px; }
/* «Страница удалена - Вернуть»: над нижней панелью, несколько секунд. */
.foto-pdf__undo { position: fixed; left: 50%; bottom: calc(var(--fp-bar-bottom, 0px) + 72px); z-index: 20; transform: translateX(-50%); display: flex; align-items: center; gap: .75rem; max-width: calc(100vw - 32px); padding: .55rem .6rem .55rem 1rem; border-radius: 8px; background: #2b2d30; color: #fff; font-size: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.foto-pdf__undo[hidden] { display: none; }
.foto-pdf__undo button { min-height: 36px; padding: 0 .8rem; border: 0; border-radius: 6px; background: #fff; color: var(--fp-brand); font: inherit; font-weight: 700; cursor: pointer; }
@media (min-width: 851px) { .foto-pdf__undo { bottom: 24px; } }

/* Настройки одной строкой выпадающими списками (диктовка Павла 20.11). */
/* Рабочее поле (диктовки Павла 20.11): снимок слева, инструменты выбранной страницы - колонкой справа
   (документы обычно A4 стоя - вся ширина снимку не нужна), ниже - кнопка «Скачать» и полоса маленьких миниатюр. */
.foto-pdf__head-knopki { display: flex; flex-wrap: wrap; gap: .5rem; }
.foto-pdf__head { flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .foto-pdf__head h2 { flex-basis: 100%; margin: 0; } .foto-pdf__head-knopki { flex: 1 1 100%; } .foto-pdf__head-knopki > * { flex: 1 1 auto; } }
.foto-pdf__snyat-esche { display: none; }
@media (max-width: 850px) and (pointer: coarse) { .foto-pdf__snyat-esche { display: inline-flex; } }
.foto-pdf__stol { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1rem; margin: .6rem 0 .5rem; padding: .7rem; border: 1px solid var(--fp-line); border-radius: 12px; background: #fff; }
.foto-pdf__stol[hidden] { display: none; }
.foto-pdf__stol-pole { min-width: 0; }
.foto-pdf__stol-pole > .foto-pdf__hint { margin: .45rem 0 0; font-size: 13px; }
.foto-pdf__panel { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.foto-pdf__panel-zag { margin: 0; font-size: 16px; font-weight: 700; }
.foto-pdf__vid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--fp-frame); border-radius: 8px; overflow: hidden; }
.foto-pdf__vid button { min-height: 40px; padding: 0 .9rem; border: 0; background: #fff; color: var(--fp-brand); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.foto-pdf__vid button + button { border-left: 1px solid var(--fp-frame); }
.foto-pdf__vid button[aria-pressed="true"] { background: var(--fp-brand); color: #fff; }
.foto-pdf__panel-knopki { display: flex; flex-direction: column; gap: .4rem; }
.foto-pdf__panel-knopki .zknopka { width: 100%; }
.foto-pdf__panel-knopki .zknopka[hidden] { display: none; }
.foto-pdf__povorot { margin: -.2rem 0 0; color: var(--fp-muted); font-size: 13px; }
.foto-pdf__povorot:empty { display: none; }
.foto-pdf__panel-spiski { display: flex; flex-direction: column; gap: .45rem; }
.foto-pdf__panel-pole { display: flex; flex-direction: column; gap: .2rem; font-size: 13.5px; font-weight: 700; }
.foto-pdf__panel-pole select { width: 100%; min-height: 40px; padding: 0 1.8rem 0 .6rem; border: 1px solid var(--fp-frame); border-radius: 8px; background: #fff; color: var(--fp-ink); font: inherit; font-size: 14px; font-weight: 400; cursor: pointer; }
.foto-pdf__panel-pole select:disabled { background: var(--fp-soft); color: var(--fp-muted); }
.foto-pdf__ves { margin: -.2rem 0 0; color: var(--fp-muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.foto-pdf__udalit { color: #a92020; }
.foto-pdf__badge { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--fp-warn-soft); color: var(--fp-warn); font-size: 13px; line-height: 1.35; }
.foto-pdf__badge[hidden] { display: none; }
.foto-pdf__stage { position: relative; display: flex; align-items: center; justify-content: center; height: min(70vh, 720px); background: #2b2d30; border-radius: 8px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.foto-pdf__stage > canvas:first-child { display: block; touch-action: none; cursor: crosshair; }
.foto-pdf__loupe { position: absolute; left: 0; top: 0; width: 132px; height: 132px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); pointer-events: none; }
.foto-pdf__pages-hint { margin: .3rem 0 .4rem; font-size: 13px; }
.foto-pdf__tach { display: none; }
@media (hover: none) { .foto-pdf__tach { display: inline; } }
/* Миниатюры вдвое меньше прежних: по 12 в ряд; только номер и снимок, выбранная - в рамке. */
.foto-pdf__pages { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; -webkit-user-select: none; user-select: none; }
.foto-pdf__page { position: relative; min-width: 0; border: 1px solid var(--fp-frame); border-radius: 6px; background: #fff; overflow: hidden; cursor: pointer; }
.foto-pdf__page:focus-visible { outline: 2px solid var(--fp-brand); outline-offset: 2px; }
.foto-pdf__page.is-selected { border-color: var(--fp-brand); box-shadow: 0 0 0 2px var(--fp-brand); }
.foto-pdf__page.is-dragging { opacity: .45; }
.foto-pdf__page.is-target { box-shadow: 0 0 0 3px var(--fp-brand); }
.foto-pdf__thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; padding: 3px; background: var(--fp-soft); touch-action: pan-x pan-y; }
.foto-pdf__thumb canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.foto-pdf__num { position: absolute; left: 3px; top: 3px; min-width: 18px; padding: 0 4px; border-radius: 9px; background: rgba(27, 27, 27, .75); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.foto-pdf__warn { position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--fp-warn); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
.foto-pdf__warn[hidden] { display: none; }
@media (max-width: 1100px) { .foto-pdf__stol { grid-template-columns: minmax(0, 1fr) 280px; } .foto-pdf__pages { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
/* Планшет и телефон: одно поле - инструменты над снимком, миниатюры полосой во всю ширину с прокруткой вбок. */
@media (max-width: 850px) {
  .foto-pdf__stol { grid-template-columns: 1fr; }
  .foto-pdf__panel { order: 0; } /* телефон: сначала страница, под ней инструменты (колонка 690 px отодвигала снимок) */
  .foto-pdf__panel-knopki { flex-direction: row; flex-wrap: wrap; }
  .foto-pdf__panel-knopki .zknopka { width: auto; flex: 1 1 auto; }
  .foto-pdf__panel-spiski { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem .4rem; }
  .foto-pdf__stage { height: 60vh; }
  .foto-pdf__pages { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
  .foto-pdf__page { flex: 0 0 13%; scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .foto-pdf__stol { padding: .5rem; margin-inline: -4px; gap: .6rem; }
  .foto-pdf__panel { gap: .45rem; }
  .foto-pdf__panel-pole { font-size: 12px; }
  .foto-pdf__panel-pole select { padding: 0 1.3rem 0 .35rem; font-size: 12.5px; }
  .foto-pdf__badge { padding: 4px 8px; font-size: 12.5px; }
  .foto-pdf__stage { height: 58vh; }
  .foto-pdf__page { flex: 0 0 15%; }
}
/* Кнопка «Скачать» между снимком и миниатюрами; на телефоне - прилипает к низу экрана. */
.foto-pdf .foto-pdf__bar { display: flex; justify-content: center; }
.foto-pdf .foto-pdf__bar .foto-pdf__build { min-width: min(100%, 360px); white-space: normal; }
@media (max-width: 850px) { .foto-pdf .foto-pdf__bar .foto-pdf__build { flex: 1; } }

/* Разделы текста страницы - карточками в две колонки, как «Нужен перевод документа?» (диктовка Павла 20.11):
   рамка-тень, без подсветки при наведении. Раздел с таблицей - во всю ширину. */
body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) > section.instrument-tekst { margin: 0; padding: 20px 24px; border-radius: 16px; background: #fff; box-shadow: 0 10px 20px rgba(21, 72, 137, .08); }
body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) > section.instrument-tekst:has(.instrument-tablica) { grid-column: 1 / -1; }
body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) > section.instrument-tekst > h2 { margin: 0 0 12px; font-size: 21px; line-height: 1.3; }
body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) > section.instrument-tekst > p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) { grid-template-columns: 1fr; gap: 14px; }
  body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) > section.instrument-tekst { padding: 16px; }
  body.template-instrumentpage .instrument-page__body:not(.instrument-page__voprosy) > section.instrument-tekst > h2 { font-size: 19px; }
}

.foto-pdf__settings { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem 1rem; align-items: start; padding: .4rem 0 .6rem; }
.foto-pdf__nastr { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.foto-pdf__nastr > label { font-size: 13.5px; font-weight: 700; }
.foto-pdf__nastr select { width: 100%; min-height: 40px; padding: 0 2rem 0 .7rem; border: 1px solid var(--fp-frame); border-radius: 8px; background: #fff; color: var(--fp-ink); font: inherit; font-size: 14px; cursor: pointer; }
.foto-pdf__nastr select:focus-visible { outline: 2px solid var(--fp-brand); outline-offset: 1px; }
.foto-pdf__nastr select:disabled { color: var(--fp-muted); background: var(--fp-soft); cursor: not-allowed; }
.foto-pdf__nastr .foto-pdf__hint { margin: 0; font-size: 12.5px; line-height: 1.3; }
@media (max-width: 850px) { .foto-pdf__punkty--dva { columns: 1; } }
@media (max-width: 1100px) { .foto-pdf__settings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .foto-pdf__settings { grid-template-columns: 1fr 1fr; gap: .5rem .6rem; } .foto-pdf__nastr select { font-size: 13.5px; padding-right: 1.6rem; } }

.foto-pdf__status { min-height: 1.4em; margin: .5rem 0; font-size: 14px; }
.foto-pdf progress { width: 100%; height: 8px; accent-color: var(--fp-brand); }
.foto-pdf__result { margin: 1rem 0; padding: 1rem; border: 1px solid #c9ded3; border-radius: 10px; background: #eef7f1; }
.foto-pdf__result-text { margin: 0 0 .75rem; font-weight: 600; }
.foto-pdf__result-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.foto-pdf__bar { position: sticky; bottom: var(--fp-bar-bottom, 0px); z-index: 5; display: grid; grid-template-columns: auto auto 1fr; gap: .4rem; margin: 0; padding: .45rem 0 calc(.45rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--fp-line); box-shadow: 0 -6px 16px rgba(0, 0, 0, .06); }
.foto-pdf__bar .zknopka { min-height: 40px; padding: .4rem .7rem; font-size: 14px; white-space: nowrap; }


@media (min-width: 851px) {
  .foto-pdf__bar { position: static; display: flex; justify-content: flex-end; margin: 0; padding: 1rem 0 0; background: none; border-top: 0; box-shadow: none; }
}
@media (max-width: 420px) {
  .foto-pdf__bar { gap: .3rem; }
  .foto-pdf__bar .zknopka { padding: .4rem .45rem; font-size: 13px; }
}
@media (max-width: 359px) {
  .foto-pdf__bar { grid-template-columns: 1fr 1fr; }
  .foto-pdf__bar .foto-pdf__build { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .foto-pdf h2 { font-size: 20px; }
  /* Телефон: сначала два поля с кнопками (они должны быть на первом экране над панелью связи сайта - указание Павла 19.11),
     пункты «Как загрузить» и «Что сделает инструмент» - под ними, в одну колонку. */
  .foto-pdf__start { display: flex; flex-direction: column; }
  .foto-pdf__stroka-zagruzki { order: 0; flex-direction: column; gap: .2rem; margin: -.3rem 0 .7rem; font-size: 14px; }
  .foto-pdf__add { order: 1; gap: .5rem; }
  .foto-pdf__umeet { order: 2; grid-template-columns: 1fr; gap: .9rem; margin: 1rem 0 0; }
  .foto-pdf__errors { order: 1; }
  .foto-pdf__punkty { font-size: 14px; }
  .foto-pdf__pole { padding: .7rem .6rem; gap: .5rem; }
  .foto-pdf__pole .zknopka { align-self: stretch; }
  .foto-pdf__pole-punkty { font-size: 12.5px; gap: .2rem; }
  .foto-pdf__pole-punkty li { padding-left: 1.1rem; }
  .foto-pdf__pole-punkty li::before { left: .1rem; width: .36rem; height: .62rem; }
  /* Телефон: подпись ползунка прячем - настройки в минимум строк (указание Павла 19.11). */
  .foto-pdf__strength .foto-pdf__hint { display: none; }
  .foto-pdf__result-actions .zknopka { flex: 1 1 100%; }
}

/* ---- Накопитель правок Павла 20.11 ---- */
/* П1. Пункты первого экрана - три колонки, полужирно: заметно, но не тянет на себя все внимание. */
.foto-pdf__umeet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem 2rem; margin: 0 0 1.25rem; }
.foto-pdf__punkty3 { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; align-content: start; font-size: 15px; font-weight: 600; line-height: 1.35; }
.foto-pdf__punkty3 li { position: relative; padding-left: 1.4rem; }
.foto-pdf__punkty3 li::before { content: ""; position: absolute; left: .2rem; top: .26em; width: .42rem; height: .72rem; border: solid var(--fp-brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* П2. В поле выбора - «Выбрать фото» и, когда страницы уже есть, «Добавить фото». */
.foto-pdf__pole-knopki { display: flex; flex-wrap: wrap; gap: .5rem; }
.foto-pdf__pole-knopki [hidden] { display: none; }
/* П4. «Очистить страницы» - рядом с надписью «N страниц». */
.foto-pdf .foto-pdf__head { justify-content: flex-start; align-items: center; gap: .5rem 1.25rem; }
/* П5. Поле со снимком меньше на 20 % (было min(70vh, 720px)). */
.foto-pdf .foto-pdf__stage { height: min(56vh, 576px); }
/* П9. Подсказка - по центру поля, поверх, у верхнего края. */
.foto-pdf__stage-hint { position: absolute; top: 8px; left: 50%; z-index: 2; transform: translateX(-50%); width: max-content; max-width: 92%; margin: 0; padding: 4px 10px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12.5px; line-height: 1.35; text-align: center; pointer-events: none; }
.foto-pdf__stage-hint:empty { display: none; }
/* П6. Колонка страницы по схеме: кнопки и поля в два столбца, поля - подпись сверху, поле снизу. */
.foto-pdf__setka { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.foto-pdf__setka .zknopka { width: 100%; min-width: 0; }
.foto-pdf .foto-pdf__vid-k[aria-pressed="true"] { background: var(--fp-brand); border-color: var(--fp-brand); color: #fff; }
.foto-pdf .foto-pdf__panel-spiski { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.foto-pdf__panel-pole { display: flex; flex-direction: column; gap: .2rem; min-width: 0; font-size: 13px; font-weight: 700; }
.foto-pdf .foto-pdf__ves { display: flex; align-items: center; min-height: 40px; margin: 0; padding: 0 .6rem; border: 1px solid var(--fp-line); border-radius: 8px; background: var(--fp-soft); color: var(--fp-ink); font-size: 14px; font-weight: 400; }
.foto-pdf__panel .foto-pdf__build { width: 100%; }
@media (max-width: 850px) {
  .foto-pdf .foto-pdf__panel-spiski { grid-template-columns: 1fr 1fr; }
  .foto-pdf .foto-pdf__stage { height: 48vh; }
}
@media (max-width: 760px) { .foto-pdf__umeet { grid-template-columns: 1fr; gap: .3rem; } .foto-pdf__punkty3 { font-size: 14px; } }

/* ---- Отделка 20.11: одна рамка, ровная колонка страницы, четыре вида шрифта (слово Павла) ---- */
/* Шрифт на всем инструменте - четыре вида, размеры из общей шкалы tools/shared/edinyj_stil.css:
   16/600 - строка под H1, крупные кнопки «Выбрать фото», «Сделать фото», «Скачать»;
   16/400 - значение в поле: списки и вес страницы;
   14/600 - заголовки частей («N страниц. Общие параметры для всех», «Параметры для каждой страницы»), подписи полей,
            кнопки, пункты;
   14/400 - пояснения серым.
   Правила с приставкой P сильнее общего стиля (там приставка с :not(#_) и двумя классами). */
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__stroka-zagruzki { gap: .3rem 2rem; margin: -.4rem 0 1.5rem; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__stroka-zagruzki li { padding-left: 0; font-weight: 600; }
.foto-pdf .foto-pdf__stroka-zagruzki li::before { content: none; }
/* Одна рамка: пунктир общего стиля вокруг блока, внутри два поля без своих рамок, между ними - тонкая черта. */
.foto-pdf .foto-pdf__add { gap: 0; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__pole { padding: 1.1rem 1.4rem; border: 0; border-radius: 0; background: transparent; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__pole + .foto-pdf__pole { border-left: 1px solid #d9dbde; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__add.is-over .foto-pdf__pole:first-child { background: transparent; }
/* Заголовки частей - размером с подписи полей. */
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__head > h2, html body:not(#_) .instrument-page .foto-pdf .foto-pdf__panel-zag { margin: 0; font-size: 14px; font-weight: 600; line-height: 20px; }
/* Колонка страницы шире (330 -> 420), снимок слева - во всю высоту колонки. */
.foto-pdf .foto-pdf__stol { grid-template-columns: minmax(0, 1fr) 420px; align-items: stretch; gap: 1.25rem; padding: .9rem; }
.foto-pdf .foto-pdf__panel { gap: .65rem; }
.foto-pdf .foto-pdf__stol-pole { display: flex; flex-direction: column; gap: .45rem; min-height: 0; }
.foto-pdf .foto-pdf__stage { flex: 1 1 auto; height: auto; min-height: 380px; contain: size; }
/* Подсказка над снимком - серым, как пояснения к настройкам; место под нее держится, снимок не прыгает. */
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__stage-hint { position: static; transform: none; width: auto; max-width: none; min-height: 20px; margin: 0; padding: 0; border-radius: 0; background: none; color: #63676c; text-align: left; pointer-events: auto; }
.foto-pdf .foto-pdf__stage-hint:empty { display: block; }
/* Кнопки и поля колонки - в два ровных столбца, высота 42, подпись по центру, длинная переносится, а не вылезает. */
.foto-pdf .foto-pdf__setka, .foto-pdf .foto-pdf__panel-spiski { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__panel .zknopka { width: 100%; min-height: 42px; padding: 4px 10px; white-space: normal; text-align: center; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__panel-pole select { height: 42px; min-height: 42px; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__ves { box-sizing: border-box; height: 42px; min-height: 42px; padding: 0 12px; border: 1px solid #b9bec7; border-radius: 8px; background: #f7f7f8; color: #1b1b1b; font-size: 16px; font-weight: 400; line-height: 22px; }
/* «Скачать» - крупнее остальных кнопок колонки. */
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__panel .foto-pdf__build { min-height: 52px; margin-top: .25rem; padding: 6px 16px; font-size: 16px; line-height: 22px; }
/* Остальные надписи - в те же четыре вида. */
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__povorot, html body:not(#_) .instrument-page .foto-pdf .foto-pdf__badge, html body:not(#_) .instrument-page .foto-pdf .foto-pdf__net-kamery, html body:not(#_) .instrument-page .foto-pdf .foto-pdf__busy, html body:not(#_) .instrument-page .foto-pdf .foto-pdf__errors, html body:not(#_) .instrument-page .foto-pdf .foto-pdf__status { font-size: 14px; font-weight: 400; line-height: 20px; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__vozvrat p { font-size: 14px; font-weight: 600; line-height: 20px; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__pages .foto-pdf__num { font-weight: 600; }
html body:not(#_) .instrument-page .foto-pdf .foto-pdf__pages .foto-pdf__warn { font-size: 14px; font-weight: 600; line-height: 16px; }
@media (max-width: 1100px) { .foto-pdf .foto-pdf__stol { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 850px) {
  .foto-pdf .foto-pdf__stol { grid-template-columns: 1fr; }
  .foto-pdf .foto-pdf__stage { flex: none; height: 48vh; min-height: 0; }
}
@media (max-width: 560px) {
  .foto-pdf .foto-pdf__stol { padding: .5rem; }
  html body:not(#_) .instrument-page .foto-pdf .foto-pdf__pole { padding: .7rem .45rem; }
  html body:not(#_) .instrument-page .foto-pdf .foto-pdf__pole .zknopka { gap: .35rem; padding: 0 8px; }
  html body:not(#_) .instrument-page .foto-pdf .foto-pdf__stroka-zagruzki { margin: -.3rem 0 1rem; }
}

/* Телефон уже 400: значок фотоаппарата не помещается рядом с подписью «Сделать фото» - подпись важнее. */
@media (max-width: 400px) { .foto-pdf .foto-pdf__camera svg { display: none; } }

/* Карточки «Нужен перевод документа?» - как на /tools/pdf-v-skan/ (перенести в общий page.css при следующей правке общих файлов). */
body.template-instrumentpage .pdf-uslugi{margin-top:70px}
body.template-instrumentpage .pdf-uslugi > h2{font-size:28px;line-height:33.6px;font-weight:700;text-align:center;color:#1b1b1b;margin:0 0 24px}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid[data-h]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:30px;padding-top:0;border-top:0}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]{
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;margin:0;padding:20px 24px;
  border:0;border-radius:16px;background:#fff;box-shadow:0 10px 20px rgba(21,72,137,.08);text-align:center;cursor:pointer;text-decoration:none}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::before{
  content:"";position:static;display:block;flex:none;width:70px;height:70px;border:0;background:center/contain no-repeat;pointer-events:none}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="perevod-lichnyh-dokumentov"]::before{background-image:url("../shared/img/uslugi/pasport.7f4948911ead.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="tehnicheskij-perevod"]::before{background-image:url("../shared/img/uslugi/tehnicheskij.06147fac4e19.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="perevod-dogovorov"]::before{background-image:url("../shared/img/uslugi/juridicheskij.0fd1a583d75f.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="meditsinskij-perevod"]::before{background-image:url("../shared/img/uslugi/meditsinskij.28be8e9f2a47.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[href*="notarialnyj-perevod"]::before{background-image:url("../shared/img/uslugi/viza.c9a6f99d0100.webp")}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::after{content:"Подробнее \203A";margin-top:auto;font-size:13px;line-height:17px;font-style:italic;color:#8c1821}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]:is(:hover,:focus-visible)::after{color:#fff}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bn[data-h]{font-size:16px;line-height:20.8px;font-weight:650;color:#1b1b1b}
body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bt[data-h]{font-size:15px;line-height:21.75px;font-weight:400;color:#3d4247}
@media (max-width:900px){
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid[data-h]{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
@media (max-width:700px),(max-width:980px) and (max-height:500px){
  body.template-instrumentpage .pdf-uslugi{margin-top:35px}
  body.template-instrumentpage .pdf-uslugi > h2{font-size:20px;line-height:24px;margin-bottom:16px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]{padding:14px 10px;gap:8px;width:auto}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::before{width:56px;height:56px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bn[data-h]{font-size:15px;line-height:19px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid .bt[data-h]{font-size:13px;line-height:17.55px}
  body.template-instrumentpage .pdf-uslugi .pdf-uslugi__grid a.bul[data-h]::after{font-size:12px;line-height:16px}
}

.foto-pdf__strength[hidden] { display: none; }
.foto-pdf__strength input { width: 100%; height: 40px; margin: 0; accent-color: var(--fp-brand); }
.foto-pdf__strength output { font-weight: 400; color: var(--fp-muted); font-variant-numeric: tabular-nums; }
.foto-pdf__text-button[aria-pressed="true"] { background: var(--fp-brand-soft); border-radius: 4px; text-decoration: none; }
