/*
 * Страница «Обрезать фото онлайн»: первый экран, инструмент (состояния А · Б · В), баннер ФотоМАСТЕРа, блоки под инструментом.
 * Использует общие стили из /libs/style.css и локальные переменные crop-tokens.css.
 */

.crop-page [hidden] { display: none !important; }

.crop-page {
  /* Высота сцены: редактор целиком под шапкой (карточка встаёт под неё при загрузке фото) */
  --stage-h: clamp(360px, calc(100vh - var(--header-h) - 96px), 640px);
  --checker: conic-gradient(var(--crop-checker-b) 25%, var(--crop-checker-a) 0 50%, var(--crop-checker-b) 0 75%, var(--crop-checker-a) 0) 0 0 / 16px 16px;
}

/* ── Первый экран ──────────────────────────────────────── */
.crop-page .tool-hero { background: var(--main-whitegray2); padding: 20px 0 calc(48px + var(--radius-media)); }
/* Заголовок и подводка — по центру, как все H2 страницы и симметричная карточка инструмента (P-107); крошки — слева, как на сайте */
.crop-page .tool-hero__title { margin: 18px 0 10px; text-align: center; }
.crop-page .tool-hero__lead { max-width: 720px; margin: 0 auto; text-align: center; text-wrap: balance; font-family: var(--second-family); font-weight: 400; font-size: 18px; line-height: 1.45; }

/* ── Карточка инструмента ──────────────────────────────── */
.crop-page .tool {
  position: relative; margin-top: 24px; padding: 24px;
  background: var(--main-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* А. Загрузка */
.crop-page .drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 340px; padding: 40px 24px; text-align: center; cursor: pointer;
  border: 2px dashed var(--drop-border); border-radius: var(--radius-stage); background: var(--main-whitegray);
  transition: border-color .2s ease, background-color .2s ease;
}
.crop-page .drop:hover { border-color: var(--main-gray); }
.crop-page .drop.has-error { border-color: var(--error-border); }
.crop-page .drop.is-over { border-color: var(--drop-active-border); background: var(--drop-active-bg); }
.crop-page .drop__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--color-blue); box-shadow: 0 0 0 8px var(--blue-ring); color: var(--main-white); }
.crop-page .drop__icon svg { width: 32px; height: 32px; }
.crop-page .drop__title { margin: 30px 0 20px; font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.crop-page .drop__btn { min-width: 220px; }
.crop-page .drop__sample {
  margin-top: 14px; padding: 4px 6px; border: 0; background: none; cursor: pointer;
  font-family: var(--second-family); font-weight: 400; font-size: 15px; line-height: 1.4;
  color: var(--link); text-decoration: underline; text-underline-offset: 3px; transition: text-decoration-color .3s ease;
}
.crop-page .drop__sample:hover { text-decoration-color: transparent; }
.crop-page .drop__loading, .crop-page .drop__over, .crop-page .stage__over {
  position: absolute; inset: 0; z-index: 3; display: none; align-items: center; justify-content: center; gap: 12px;
  border-radius: inherit; pointer-events: none;
}
.crop-page .drop__loading { background: rgba(239, 244, 244, .94); font-family: var(--second-family); font-weight: 400; font-size: 16px; color: var(--main-darkgray); }
.crop-page .drop.is-loading .drop__loading { display: flex; }
.crop-page .drop__over { background: var(--drop-active-bg); font-weight: 500; font-size: 20px; }
.crop-page .drop.is-over .drop__over { display: flex; }
.crop-page .stage__over { background: rgba(232, 244, 255, .95); border: 2px dashed var(--color-blue); font-weight: 500; font-size: 20px; }
.crop-page .stage.is-over .stage__over { display: flex; }
.crop-page .spinner { width: 22px; height: 22px; border: 3px solid var(--main-whitegray2); border-top-color: var(--color-blue); border-radius: 50%; animation: crop-photo-spin .8s linear infinite; }
@keyframes crop-photo-spin { to { transform: rotate(360deg); } }

.crop-page .alert { display: flex; align-items: flex-start; gap: 8px; max-width: 480px; margin-top: 16px; font-family: var(--second-family); font-weight: 400; font-size: 15px; line-height: 1.4; color: var(--color-red); text-align: left; }
.crop-page .alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.crop-page .alert--panel { margin: 0; padding: 10px 12px; border-radius: var(--radius-control); background: #fff1f3; }
.crop-page .alert--info { color: var(--main-black); }
.crop-page .alert--info svg { color: var(--color-blue); }
.crop-page .alert--panel.alert--info { background: var(--blue-tint); }

.crop-page .drop-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 16px; font-family: var(--second-family); font-weight: 400; font-size: 14px; line-height: 1.3; color: var(--main-darkgray); }
.crop-page .drop-facts li { display: inline-flex; align-items: center; gap: 8px; }
.crop-page .drop-facts svg { width: 16px; height: 16px; color: var(--main-gray); }

/* Б. Редактор и В. Результат — общая сетка: сцена слева, панель справа */
.crop-page .tool__view--edit, .crop-page .tool__view--result { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }

/* Фото центрируется в зоне высотой --stage-h. Если панель выше (ошибка, открыт «Точный размер»),
   сцена растягивается вниз, а фото остаётся на месте и не масштабируется заново. */
.crop-page .stage {
  --pad: 24px;
  position: relative; display: grid; place-items: center; align-content: start;
  grid-template-rows: calc(var(--stage-h) - 2 * var(--pad)); min-height: var(--stage-h); padding: var(--pad);
  border-radius: var(--radius-stage); background: var(--crop-stage); overflow: hidden;
}
.crop-page .stage__fit { position: relative; background: var(--checker); }
.crop-page .stage__img { width: 100%; height: 100%; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-page .shade { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.crop-page .shade__hole { position: absolute; box-shadow: 0 0 0 100vmax var(--crop-shade); }
.crop-page .tool[data-shape="circle"] .shade__hole { border-radius: 50%; }

.crop-page .frame { position: absolute; cursor: move; touch-action: none; box-shadow: 0 0 0 1px var(--crop-frame), 0 0 0 2px var(--crop-frame-outline); }
.crop-page .frame:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 4px; }
.crop-page .tool[data-shape="circle"] .frame { box-shadow: 0 0 0 1px rgba(255, 255, 255, .45); }
.crop-page .tool[data-shape="circle"] .frame::before { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1px var(--crop-frame), 0 0 0 2px var(--crop-frame-outline); pointer-events: none; }
.crop-page .frame__grid { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.crop-page .frame__grid::before, .crop-page .frame__grid::after { content: ""; position: absolute; border: 0 solid var(--crop-grid); }
.crop-page .frame__grid::before { inset: 0 33.333%; border-left-width: 1px; border-right-width: 1px; }
.crop-page .frame__grid::after { inset: 33.333% 0; border-top-width: 1px; border-bottom-width: 1px; }
.crop-page .tool[data-shape="circle"] .frame__grid { border-radius: 50%; overflow: hidden; }
.crop-page .frame.is-active .frame__grid { opacity: 1; }

/* Ручки: видимая часть 20 × 4, зона касания 44 × 44 */
.crop-page .h { position: absolute; z-index: 1; width: 44px; height: 44px; margin: -22px 0 0 -22px; touch-action: none; }
.crop-page .h::before { content: ""; position: absolute; border: 0 solid var(--crop-handle); filter: drop-shadow(0 0 2px rgba(0, 0, 0, .45)); transition: border-color .15s ease, background-color .15s ease; }
.crop-page .h--nw { left: 0; top: 0; cursor: nwse-resize; }
.crop-page .h--n { left: 50%; top: 0; cursor: ns-resize; }
.crop-page .h--ne { left: 100%; top: 0; cursor: nesw-resize; }
.crop-page .h--e { left: 100%; top: 50%; cursor: ew-resize; }
.crop-page .h--se { left: 100%; top: 100%; cursor: nwse-resize; }
.crop-page .h--s { left: 50%; top: 100%; cursor: ns-resize; }
.crop-page .h--sw { left: 0; top: 100%; cursor: nesw-resize; }
.crop-page .h--w { left: 0; top: 50%; cursor: ew-resize; }
.crop-page .h--nw::before { left: 20px; top: 20px; width: 20px; height: 20px; border-top-width: 4px; border-left-width: 4px; }
.crop-page .h--ne::before { right: 20px; top: 20px; width: 20px; height: 20px; border-top-width: 4px; border-right-width: 4px; }
.crop-page .h--se::before { right: 20px; bottom: 20px; width: 20px; height: 20px; border-bottom-width: 4px; border-right-width: 4px; }
.crop-page .h--sw::before { left: 20px; bottom: 20px; width: 20px; height: 20px; border-bottom-width: 4px; border-left-width: 4px; }
.crop-page .h--n::before, .crop-page .h--s::before { left: 8px; width: 28px; height: 4px; border-radius: 2px; background: var(--crop-handle); }
.crop-page .h--n::before { top: 20px; }
.crop-page .h--s::before { bottom: 20px; }
.crop-page .h--e::before, .crop-page .h--w::before { top: 8px; width: 4px; height: 28px; border-radius: 2px; background: var(--crop-handle); }
.crop-page .h--e::before { right: 20px; }
.crop-page .h--w::before { left: 20px; }
.crop-page .h:hover::before, .crop-page .h.is-active::before { border-color: var(--crop-handle-active); }
.crop-page .h--n:hover::before, .crop-page .h--s:hover::before, .crop-page .h--e:hover::before, .crop-page .h--w:hover::before, .crop-page .h--n.is-active::before, .crop-page .h--s.is-active::before, .crop-page .h--e.is-active::before, .crop-page .h--w.is-active::before { background: var(--crop-handle-active); }
.crop-page .frame.is-small .h--n, .crop-page .frame.is-small .h--e, .crop-page .frame.is-small .h--s, .crop-page .frame.is-small .h--w, .crop-page .tool[data-shape="circle"] .h--n, .crop-page .tool[data-shape="circle"] .h--e, .crop-page .tool[data-shape="circle"] .h--s, .crop-page .tool[data-shape="circle"] .h--w { display: none; }

/* Панель настроек */
.crop-page .panel { display: flex; flex-direction: column; gap: 22px; min-height: var(--stage-h); }
.crop-page .panel__group { display: flex; flex-direction: column; gap: 10px; }
.crop-page .panel__label { font-weight: 500; font-size: 16px; line-height: 1.5; }

.crop-page .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-control); background: var(--main-whitegray); }
.crop-page .seg__opt, .crop-page .chip { position: relative; }
.crop-page .seg__opt input, .crop-page .chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.crop-page .seg__opt span {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 9px;
  font-weight: 500; font-size: 14px; color: var(--main-darkgray); cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.crop-page .seg__opt svg { width: 16px; height: 16px; }
.crop-page .seg__opt span:hover { color: var(--color-blue); }
.crop-page .seg__opt input:checked + span { background: var(--main-white); color: var(--main-black); box-shadow: 0 1px 2px rgba(10, 13, 18, .06), var(--shadow-float); }
.crop-page .seg__opt input:checked + span svg { color: var(--color-blue); }
.crop-page .seg__opt input:focus-visible + span, .crop-page .chip input:focus-visible + span { outline: var(--focus-ring); outline-offset: 2px; }

/* Сетка 3 × 3 (P-145): «Свободно» на две клетки и 1:1, ниже ряд горизонтальных и ряд вертикальных форматов.
   Значок и подпись — в строку, как у «Свободно»: в 4 колонки подпись «Свободно» не помещалась в одну клетку.
   Высота 44 (--control-h): блок выше прежнего на 16 px, панель на 1366 × 768 не перерастает сцену */
.crop-page .ratios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.crop-page .chip--free { grid-column: span 2; }
.crop-page .chip span {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: var(--control-h);
  border: 1px solid var(--main-whitegray2); border-radius: var(--radius-control); background: var(--main-white);
  font-weight: 500; font-size: 14px; line-height: 1.2; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.crop-page .chip__shape { width: var(--w); height: var(--h); border: 2px solid var(--main-darkgray); border-radius: 3px; transition: border-color .2s ease; }
.crop-page .chip--free .chip__shape { border-style: dashed; }
.crop-page .chip span:hover { border-color: var(--main-lightgray); color: var(--color-blue); }
.crop-page .chip span:hover .chip__shape { border-color: var(--color-blue); }
.crop-page .chip input:checked + span { border-color: var(--color-blue); background: var(--blue-tint); color: var(--main-black); }
.crop-page .chip input:checked + span .chip__shape { border-color: var(--color-blue); }

.crop-page .note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-control); background: var(--blue-tint); font-family: var(--second-family); font-weight: 400; font-size: 14px; line-height: 1.4; }
.crop-page .note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--color-blue); }

.crop-page .area { padding: 14px 16px 2px; border-radius: var(--radius-control); background: var(--main-whitegray); }
.crop-page .area__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crop-page .area__label { font-family: var(--second-family); font-weight: 400; font-size: 14px; color: var(--main-darkgray); }
.crop-page .area__size { display: block; margin-top: 2px; font-family: var(--second-family); font-weight: 500; font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.crop-page .link-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--second-family); font-weight: 400; font-size: 14px; line-height: 1.3; color: var(--main-darkgray); transition: color .2s ease;
}
.crop-page .link-btn:hover { color: var(--color-blue); }
.crop-page .link-btn svg { width: 16px; height: 16px; }

.crop-page .exact { margin-top: 10px; border-top: 1px solid var(--main-whitegray2); }
.crop-page .exact summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; list-style: none; cursor: pointer; font-weight: 500; font-size: 15px; transition: color .2s ease; }
.crop-page .exact summary::-webkit-details-marker { display: none; }
.crop-page .exact summary:hover { color: var(--color-blue); }
.crop-page .exact summary svg { width: 18px; height: 18px; transition: transform .2s ease; }
.crop-page .exact[open] summary svg { transform: rotate(180deg); }
.crop-page .exact__body { padding-bottom: 14px; }
.crop-page .exact__fields { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: end; gap: 6px; }
.crop-page .field__label { display: block; margin-bottom: 6px; font-family: var(--second-family); font-weight: 400; font-size: 13px; color: var(--main-darkgray); }
.crop-page .field__box { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-control); background: var(--main-white); transition: border-color .2s ease, box-shadow .2s ease; }
.crop-page .field__box:focus-within { border-color: var(--color-blue); box-shadow: 0 0 0 1px var(--color-blue); }
.crop-page .field.has-error .field__box { border-color: var(--error-border); }
.crop-page .field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: none; font-family: var(--second-family); font-weight: 500; font-size: 16px; color: var(--main-black); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.crop-page .field input::-webkit-outer-spin-button, .crop-page .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.crop-page .field__unit { font-family: var(--second-family); font-weight: 400; font-size: 14px; color: var(--main-darkgray); }
.crop-page .exact__link { display: grid; place-items: center; height: 44px; color: var(--main-lightgray); }
.crop-page .exact__link svg { width: 18px; height: 18px; }
.crop-page .exact__link.is-on { color: var(--color-blue); }
.crop-page .exact__hint { margin-top: 8px; font-family: var(--second-family); font-weight: 400; font-size: 13px; line-height: 1.4; color: var(--main-darkgray); }

.crop-page .panel__actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: auto; }
.crop-page .panel__other { align-self: center; }
/* В результате кнопки сразу под «Готово!»: сообщение и «Скачать фото» читаются одной группой */
.crop-page .panel--result .panel__actions { margin-top: 6px; }

/* В. Результат */
.crop-page .result__img { max-width: 100%; max-height: calc(var(--stage-h) - 2 * var(--pad)); width: auto; height: auto; background: var(--checker); box-shadow: 0 0 0 1px rgba(42, 44, 47, .08), var(--shadow-card); }
.crop-page .done__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 7px 0 0 7px; border-radius: 50%; background: var(--color-blue); box-shadow: 0 0 0 7px var(--blue-ring); color: var(--main-white); }
.crop-page .done__icon svg { width: 28px; height: 28px; stroke-width: 2.5; }
.crop-page .done__title { margin-top: 24px; font-weight: 500; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; outline: none; }
.crop-page .done__meta { display: grid; gap: 10px; margin-top: 18px; font-family: var(--second-family); font-size: 15px; line-height: 1.4; }
.crop-page .done__meta div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--main-whitegray2); }
.crop-page .done__meta dt { font-weight: 400; color: var(--main-darkgray); }
.crop-page .done__meta dd { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* ── Адаптив ───────────────────────────────────────────── */
@media (max-width: 1199px) {

  .crop-page .tool__view--edit, .crop-page .tool__view--result { grid-template-columns: minmax(0, 1fr) 300px; }

}

@media (max-width: 991px) {

  .crop-page { --stage-h: clamp(300px, 56vh, 520px); }
  .crop-page .tool__view--edit, .crop-page .tool__view--result { grid-template-columns: minmax(0, 1fr); }
  .crop-page .panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "alert alert" "shape area" "ratios area" "ratios actions"; align-items: start; gap: 20px 24px; min-height: 0; }
  .crop-page .alert--panel { grid-area: alert; }
  .crop-page .panel:has(> .alert--panel[hidden]) { grid-template-areas: "shape area" "ratios area" "ratios actions"; }
  .crop-page .panel__group--shape { grid-area: shape; }
  .crop-page .panel__group--ratios, .crop-page .note { grid-area: ratios; }
  .crop-page .area { grid-area: area; }
  .crop-page .panel__actions { grid-area: actions; align-self: end; }
  .crop-page .panel--result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "alert alert" "done actions"; align-items: end; }
  .crop-page .panel--result:has(> .alert--panel[hidden]) { grid-template-areas: "done actions"; }
  .crop-page .panel--result .done { grid-area: done; }
  .crop-page .done { display: grid; grid-template-columns: 70px 1fr; column-gap: 16px; align-items: center; }
  .crop-page .done__icon { margin: 7px; }
  .crop-page .done__title { margin: 0; font-size: 22px; }
  .crop-page .done__meta { grid-column: 1 / -1; }

}

@media (max-width: 767px) {

  .crop-page .stage { grid-template-rows: auto; align-content: center; min-height: 200px; }
  .crop-page .result__img { max-height: 62vh; }
  .crop-page .panel { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .crop-page .panel--result { display: flex; }
  .crop-page .ratios { display: flex; gap: 8px; margin: 0 -10px; padding: 0 10px 2px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .crop-page .ratios::-webkit-scrollbar { display: none; }
  .crop-page .ratios .chip { flex: none; width: 66px; scroll-snap-align: start; }
  .crop-page .ratios .chip--free { width: 116px; }
  /* В ленте — значок над подписью: в 66 px строка не помещается; у «Свободно» — в строку */
  .crop-page .chip span { flex-direction: column; gap: 7px; height: 58px; }
  .crop-page .chip--free span { flex-direction: row; gap: 10px; }
  /* Главное действие всегда под рукой: «Обрезать фото» и «Скачать фото» прилипают к низу экрана, пока виден инструмент.
     Липнет только сама кнопка — второстепенные действия не отнимают высоту у фото на маленьком экране */
  .crop-page .panel__actions { display: contents; }
  .crop-page .panel__actions > .btn:first-child {
    position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 4;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, .96), 0 -6px 22px 4px rgba(42, 44, 47, .22);
  }
  .crop-page .panel__actions > * + * { margin-top: -8px; }

}

@media (max-width: 575px) {

  .crop-page .tool-hero { padding: 12px 0 calc(32px + var(--radius-media)); }
  .crop-page .tool-hero__title { margin: 10px 0 6px; }
  .crop-page .tool-hero__lead { font-size: 16px; }
  .crop-page .tool { margin-top: 16px; padding: 10px; border-radius: 20px; }
  .crop-page .drop { min-height: 0; padding: 28px 16px 20px; }
  .crop-page .drop__icon { width: 56px; height: 56px; box-shadow: 0 0 0 6px var(--blue-ring); }
  .crop-page .drop__icon svg { width: 26px; height: 26px; }
  .crop-page .drop__title { margin: 22px 0 16px; font-size: 19px; }
  .crop-page .drop__btn { width: 100%; }
  .crop-page .drop-facts { gap: 6px 16px; margin-top: 12px; font-size: 13px; }
  .crop-page .stage { --pad: 12px; border-radius: 16px; }
  .crop-page .area__size { font-size: 20px; }
  .crop-page .done__title { font-size: 21px; }

}

/* ── Баннер ФотоМАСТЕРа ────────────────────────────────── */
/* v3 (P-106). Слева текст на голубой подложке «Выбора редакции» с тёплым краем, справа — синяя панель со срезом
   по диагонали, как обложки статей amssoft.ru. На панели — окно программы с рамкой обрезки и пропорциями.
   Кнопка — .btn-green сайта: скачивает версию для своей системы, ссылка рядом — для другой. */
.crop-page .fm-banner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 424px; margin-top: 32px; border-radius: var(--radius-card); overflow: hidden; background: linear-gradient(115deg, #d9ebff 0%, #e9f4ff 48%, #fff1e2 100%); box-shadow: var(--shadow-card); }
.crop-page .fm-banner__body { position: relative; z-index: 1; padding: 38px 8px 42px 48px; }
.crop-page .fm-banner__title { margin-top: 20px; font-weight: 700; font-size: 32px; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.crop-page .fm-banner__desc { max-width: 580px; margin-top: 14px; font-family: var(--second-family); font-weight: 400; font-size: 18px; line-height: 1.45; }

.crop-page .fm-brand { display: flex; align-items: center; gap: 12px; }
.crop-page .fm-brand__logo { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--main-white); box-shadow: var(--shadow-card); }
.crop-page .fm-brand__logo img { width: 30px; height: 30px; }
.crop-page .fm-brand__name { display: block; font-weight: 700; font-size: 19px; line-height: 1.2; }
.crop-page .fm-brand__sub { display: block; margin-top: 2px; font-family: var(--second-family); font-weight: 400; font-size: 15px; line-height: 1.3; color: var(--main-darkgray); }

.crop-page .fm-list { display: grid; grid-template-columns: repeat(2, max-content); gap: 12px 32px; margin-top: 22px; font-family: var(--second-family); font-weight: 500; font-size: 16px; line-height: 1.35; }
.crop-page .fm-list li { display: flex; align-items: center; gap: 10px; }
.crop-page .fm-list svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--color-blue); color: var(--main-white); stroke-width: 3.5; }

.crop-page .btn-green { background: var(--green-buy); }
.crop-page .btn-green:hover { background: var(--green-buy-hover); }
.crop-page .fm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 30px; }
.crop-page .fm-actions__btn { min-height: 56px; padding: 5px 32px; font-size: 18px; box-shadow: 0 12px 24px -10px rgba(22, 176, 45, .7); }
.crop-page .fm-actions__btn svg { width: 20px; height: 20px; }
.crop-page .fm-actions__btn.is-page svg { order: 1; }  /* «Посмотреть ФотоМАСТЕР» — стрелка после текста, как у ссылок сайта */
.crop-page .fm-actions__alt { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 16px; line-height: 1.4; text-decoration: underline; text-decoration-color: rgba(42, 44, 47, .3); text-underline-offset: 5px; transition: color .2s ease, text-decoration-color .2s ease; }
.crop-page .fm-actions__alt:hover { color: var(--color-blue); text-decoration-color: currentColor; }
.crop-page .fm-actions__alt svg { flex: none; width: 18px; height: 18px; margin-top: -2px; }
.crop-page .fm-note { display: none; margin-top: 12px; text-align: center; text-wrap: balance; font-family: var(--second-family); font-weight: 400; font-size: 14px; line-height: 1.4; color: var(--main-darkgray); }

.crop-page .fm-banner__media { position: relative; min-height: 360px; }
.crop-page .fm-banner__media::before { content: ""; position: absolute; inset: 0; clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%); background: radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 34%), linear-gradient(160deg, #47acff 0%, var(--color-blue) 42%, var(--color-darkblue) 100%); }

/* Окно программы: все размеры в em — масштаб задаёт font-size у .fm-shot.
   Не повторяет инструмент над баннером (P-107): фото наклонено и выравнивается ползунком «Горизонт» — обрезка, которой нет онлайн.
   Правый край окна уходит за карточку: это картинка, а не второй редактор. */
.crop-page .fm-shot { position: absolute; z-index: 1; top: 50%; right: -28px; width: 40em; font-size: 9.8px; transform: translateY(-50%); }
.crop-page .fm-app { border-radius: 1.4em; overflow: hidden; background: var(--main-white); box-shadow: 0 2.4em 4.8em -1.6em rgba(2, 40, 90, .6); }
.crop-page .fm-app__bar { display: flex; align-items: center; gap: .5em; height: 3.4em; padding: 0 1.4em; border-bottom: 1px solid var(--main-whitegray2); }
.crop-page .fm-app__name { display: flex; align-items: center; gap: .5em; margin-right: auto; font-weight: 500; font-size: 1.3em; }
.crop-page .fm-app__name img { width: 1.3em; height: 1.3em; }
.crop-page .fm-app__bar i { width: .6em; height: .6em; border-radius: 50%; background: var(--main-black); }
.crop-page .fm-app__body { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); height: 23.6em; }
.crop-page .fm-app__tools { display: flex; flex-direction: column; align-items: center; gap: .8em; padding-top: 1.2em; background: var(--main-whitegray); }
.crop-page .fm-app__tools span { display: grid; place-items: center; width: 3.6em; height: 3.6em; border-radius: 1em; color: var(--main-darkgray); }
.crop-page .fm-app__tools svg { width: 1.8em; height: 1.8em; }
.crop-page .fm-app__tools .is-on { background: var(--color-blue); color: var(--main-white); }
.crop-page .fm-app__canvas { display: grid; place-items: center; background: #3a3d42; }
.crop-page .fm-app__photo { position: relative; display: block; width: 30em; aspect-ratio: 3 / 2; overflow: hidden; }
.crop-page .fm-app__photo img { display: block; width: 100%; height: 100%; object-fit: cover; transform: rotate(-4deg) scale(1.14); }
/* Рамка: затемнение снаружи, сетка третей, уголки-ручки */
.crop-page .fm-app__frame { position: absolute; left: 8%; top: 10%; width: 84%; height: 80%; border: 1px solid var(--crop-frame); box-shadow: 0 0 0 100em rgba(30, 32, 36, .5); }
.crop-page .fm-app__frame::before, .crop-page .fm-app__frame::after { content: ""; position: absolute; border: 0 solid var(--crop-grid); }
.crop-page .fm-app__frame::before { inset: 0 33.33%; border-width: 0 1px; }
.crop-page .fm-app__frame::after { inset: 33.33% 0; border-width: 1px 0; }
.crop-page .fm-app__frame i { position: absolute; width: 1.6em; height: 1.6em; border: 0 solid var(--crop-handle); }
.crop-page .fm-app__frame i:nth-child(1) { left: -.4em; top: -.4em; border-width: .4em 0 0 .4em; }
.crop-page .fm-app__frame i:nth-child(2) { right: -.4em; top: -.4em; border-width: .4em .4em 0 0; }
.crop-page .fm-app__frame i:nth-child(3) { left: -.4em; bottom: -.4em; border-width: 0 0 .4em .4em; }
.crop-page .fm-app__frame i:nth-child(4) { right: -.4em; bottom: -.4em; border-width: 0 .4em .4em 0; }
.crop-page .fm-level { position: absolute; left: -3.2em; bottom: -2.4em; display: flex; align-items: center; gap: 1.4em; padding: 1.1em 1.6em; border-radius: 1.6em; background: var(--main-white); box-shadow: 0 1.6em 3.2em -1.2em rgba(2, 40, 90, .55); }
.crop-page .fm-level__label { font-family: var(--second-family); font-weight: 500; font-size: 1.4em; }
.crop-page .fm-level__track { position: relative; width: 13em; height: .4em; border-radius: .2em; background: var(--main-whitegray2); }
.crop-page .fm-level__track::before { content: ""; position: absolute; left: 50%; top: -.5em; bottom: -.5em; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--main-lightgray); }
.crop-page .fm-level__track::after { content: ""; position: absolute; left: 36%; right: 50%; top: 0; bottom: 0; background: var(--color-blue); }
.crop-page .fm-level__track i { position: absolute; z-index: 1; left: 36%; top: 50%; width: 1.9em; height: 1.9em; margin: -.95em 0 0 -.95em; border: .4em solid var(--color-blue); border-radius: 50%; background: var(--main-white); box-shadow: 0 .2em .6em rgba(2, 40, 90, .3); }
.crop-page .fm-level__val { min-width: 2.6em; font-family: var(--second-family); font-weight: 500; font-size: 1.4em; color: var(--color-blue); }

/* ── Попап ФотоМАСТЕРа после третьего фото (P-106) ─────── */
.crop-page .fm-popup { width: min(860px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: var(--radius-card); background: var(--main-white); color: var(--main-black); box-shadow: 0 32px 64px -16px rgba(10, 13, 18, .35); overflow: auto; overscroll-behavior: contain; }
.crop-page .fm-popup::backdrop { background: rgba(30, 36, 48, .6); }
.crop-page .fm-popup[open] { animation: crop-photo-modal-pop .25s ease; }
@keyframes crop-photo-modal-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.crop-page .fm-popup__in { position: relative; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.crop-page .fm-popup__in > form:first-child { display: contents; }  /* крестик — поверх сетки, не занимает колонку */
.crop-page .fm-popup__media { position: relative; overflow: hidden; background: linear-gradient(160deg, #47acff 0%, var(--color-blue) 42%, var(--color-darkblue) 100%); }
.crop-page .fm-popup__media .fm-shot { right: auto; left: 40px; font-size: 8px; }
.crop-page .fm-popup__media .fm-level { left: -2em; }
.crop-page .fm-popup__body { padding: 44px 44px 36px 40px; }
.crop-page .fm-popup__title { margin-top: 20px; font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.crop-page .fm-popup__text { margin-top: 12px; font-family: var(--second-family); font-weight: 400; font-size: 17px; line-height: 1.45; }
.crop-page .fm-popup .fm-actions { margin-top: 24px; }
.crop-page .fm-popup__later { margin-top: 18px; padding: 6px 0; border: 0; background: none; font-family: var(--second-family); font-weight: 400; font-size: 15px; color: var(--main-darkgray); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(98, 105, 115, .4); }
.crop-page .fm-popup__later:hover { color: var(--color-blue); }
.crop-page .fm-popup__close { position: absolute; z-index: 2; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius-control); background: var(--main-whitegray); color: var(--main-black); cursor: pointer; transition: color .2s ease; }
.crop-page .fm-popup__close:hover { color: var(--color-blue); }
.crop-page .fm-popup__close svg { width: 20px; height: 20px; }

/* ── Блоки под инструментом ────────────────────────────── */
/* Полосы, как на сайте: белая → мятная → белая со скруглённым верхом. У каждого блока своя форма:
   шаги — путь с кадрами в «окне», примеры — белые карточки с цветным акцентом, сравнение — две цветные половины */
.crop-page .content { position: relative; margin-top: calc(-1 * var(--radius-media)); padding: 88px 0 104px; background: var(--main-white); border-radius: var(--radius-media) var(--radius-media) 0 0; }
.crop-page .band { padding: 88px 0 calc(104px + var(--radius-media)); background: var(--main-whitegray2); }
.crop-page .block + .block { margin-top: 104px; }
.crop-page .block__title { margin: 0 auto 48px; text-align: center; text-wrap: balance; }
.crop-page .block--narrow { max-width: 846px; margin-left: auto; margin-right: auto; }

/* Шаги: номера связаны пунктиром, кадры интерфейса — в «окне» с тремя точками, как графика amssoft.ru */
.crop-page .steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.crop-page .steps::before { content: ""; position: absolute; top: 27px; left: calc(100% / 6); right: calc(100% / 6); border-top: 2px dashed var(--main-lightgray); }
.crop-page .step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.crop-page .step__num {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-blue); box-shadow: 0 0 0 7px var(--blue-ring), 0 0 0 16px var(--main-white);
  color: var(--main-white); font-weight: 500; font-size: 24px; line-height: 1;
}
.crop-page .step__shot { width: 100%; margin-top: 36px; overflow: hidden; border-radius: var(--radius-stage); background: var(--main-white); box-shadow: 0 0 0 1px var(--main-whitegray2), var(--shadow-card); }
.crop-page .step__bar { display: flex; justify-content: flex-end; align-items: center; gap: 5px; height: 26px; padding: 0 14px; border-bottom: 1px solid var(--main-whitegray2); }
.crop-page .step__bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--main-black); }
.crop-page .step__shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.crop-page .step__title { margin-top: 26px; font-weight: 500; font-size: 24px; line-height: 1.17; letter-spacing: -.02em; }
.crop-page .step__text { max-width: 340px; margin-top: 10px; font-family: var(--second-family); font-weight: 400; font-size: 17px; line-height: 1.5; }

/* Возможности: «исходник → результат» на цветном поле; акценты — декоративные цвета сайта (плитки разделов).
   Все примеры — одно фото, кадр задаётся координатами в пикселях */
.crop-page .modes { --ph: 168px; --rw: 190px; --a: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.crop-page .mode { --accent: var(--color-orange); --accent-bg: #fff0e6; overflow: hidden; border-radius: var(--radius-card); background: var(--main-white); box-shadow: var(--shadow-card); }
.crop-page .mode--ratio { --accent: var(--color-blue); --accent-bg: #e8f4ff; }
.crop-page .mode--px { --accent: #16b02d; --accent-bg: #e8f7ea; }
.crop-page .mode--circle { --accent: #cc33ff; --accent-bg: #f9ebff; }
.crop-page .mode__ex { display: flex; align-items: center; justify-content: center; gap: 16px; height: calc(var(--ph) + 56px); padding: 0 24px; background: var(--accent-bg); }
.crop-page .mode__arrow {
  flex: none; display: grid; place-items: center; width: var(--a); height: var(--a); border-radius: 50%;
  background: var(--main-white); box-shadow: var(--shadow-float); color: var(--accent, var(--color-blue));
}
.crop-page .mode__arrow svg { width: 50%; height: 50%; stroke-width: 2.5; }
.crop-page .mode__body { padding: 24px 28px 30px; }
.crop-page .mode__title { display: flex; align-items: center; gap: 14px; font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.crop-page .mode__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-control); background: var(--accent-bg); color: var(--accent); }
.crop-page .mode__icon svg { width: 22px; height: 22px; }
.crop-page .mode__text { margin-top: 12px; font-family: var(--second-family); font-weight: 400; font-size: 17px; line-height: 1.5; }

.crop-page .pic { position: relative; display: block; flex: none; height: var(--ph); aspect-ratio: var(--sw) / var(--sh); overflow: hidden; border-radius: 10px; }
.crop-page .pic img { width: 100%; height: 100%; object-fit: cover; }
.crop-page .pic__frame {
  position: absolute;
  left: calc(var(--x) / var(--sw) * 100%); top: calc(var(--y) / var(--sh) * 100%);
  width: calc(var(--w) / var(--sw) * 100%); height: calc(var(--h) / var(--sh) * 100%);
  box-shadow: 0 0 0 2px var(--crop-frame), 0 0 0 999px var(--crop-shade);
}
.crop-page .pic__frame--circle { border-radius: 50%; }
.crop-page .pic__badge { position: absolute; left: 50%; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: var(--crop-badge-bg); transform: translateX(-50%); color: var(--main-white); font: 500 13px/1.3 var(--second-family); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Результат — как отпечаток: белая кайма и тень */
.crop-page .pic--crop { height: min(var(--ph), calc(var(--rw) * var(--h) / var(--w))); aspect-ratio: var(--w) / var(--h); box-shadow: 0 0 0 4px var(--main-white), 0 14px 28px -10px rgba(42, 44, 47, .4); }
.crop-page .pic--crop img {
  position: absolute; max-width: none; object-fit: fill;
  width: calc(var(--sw) / var(--w) * 100%); height: calc(var(--sh) / var(--h) * 100%);
  left: calc(var(--x) / var(--w) * -100%); top: calc(var(--y) / var(--h) * -100%);
}
.crop-page .pic--circle { border-radius: 50%; box-shadow: none; }
.crop-page .pic-checker { display: block; flex: none; border-radius: 10px; background: var(--checker); box-shadow: 0 0 0 4px var(--main-white), 0 14px 28px -10px rgba(42, 44, 47, .4); }

/* Обрезка и изменение размера: две цветные половины, схемы одного снимка в одном масштабе, размеры — плашками */
.crop-page .vs { --k: .13; --a: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.crop-page .vs__col { --accent: var(--color-orange); --accent-bg: #fff3ea; padding: 32px 36px 36px; border-radius: var(--radius-card); background: var(--accent-bg); }
.crop-page .vs__col--resize { --accent: var(--color-blue); --accent-bg: #eaf4ff; }
.crop-page .vs__title { display: flex; align-items: center; gap: 14px; font-weight: 500; font-size: 24px; line-height: 1.17; letter-spacing: -.02em; }
.crop-page .vs__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-control); background: var(--main-white); color: var(--accent); box-shadow: var(--shadow-float); }
.crop-page .vs__icon svg { width: 22px; height: 22px; }
.crop-page .vs__scheme { display: flex; align-items: flex-start; justify-content: center; gap: 18px; margin-top: 24px; padding: 28px 20px 24px; border-radius: 20px; background: var(--main-white); }
.crop-page .vs__scheme .mode__arrow { margin-top: calc(600px * var(--k) - var(--a) / 2); }
.crop-page .vs__item { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.crop-page .vs__box { display: flex; align-items: center; justify-content: center; height: calc(1200px * var(--k)); }
.crop-page .vs .pic { height: calc(var(--sh) * var(--k) * 1px); border-radius: 6px; }
.crop-page .vs .pic--crop { height: calc(var(--h) * var(--k) * 1px); }
.crop-page .vs .pic--half { height: calc(var(--sh) * var(--k) * .5px); box-shadow: 0 0 0 4px var(--main-white), 0 14px 28px -10px rgba(42, 44, 47, .4); }
.crop-page .vs__item figcaption {
  padding: 5px 12px; border-radius: 999px; background: var(--main-whitegray);
  font-family: var(--second-family); font-weight: 500; font-size: 15px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.crop-page .vs__item--result figcaption { background: var(--accent-bg); box-shadow: inset 0 0 0 1.5px var(--accent); }
.crop-page .vs__text { margin-top: 20px; font-family: var(--second-family); font-weight: 400; font-size: 17px; line-height: 1.5; }
.crop-page .vs__note {
  display: flex; align-items: center; gap: 18px; max-width: 920px; margin: 32px auto 0; padding: 20px 28px;
  border-radius: 20px; background: var(--main-whitegray); font-family: var(--second-family); font-weight: 400; font-size: 18px; line-height: 1.45;
}
.crop-page .vs__note-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff3c2; color: #b58500; }
.crop-page .vs__note-icon svg { width: 24px; height: 24px; }

/* FAQ — .spoiler сайта на <details>: ответы в HTML */
.crop-page .faq { display: grid; gap: 15px; }
.crop-page .spoiler { border-radius: var(--radius-faq); background: var(--main-whitegray2); }
.crop-page .spoiler summary { position: relative; display: block; padding: 18px 64px 18px 32px; list-style: none; cursor: pointer; font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.crop-page .spoiler summary::-webkit-details-marker { display: none; }
.crop-page .spoiler summary svg { position: absolute; top: 50%; right: 26px; width: 22px; height: 22px; margin-top: -11px; color: var(--color-blue); transition: transform .2s ease; }
.crop-page .spoiler[open] summary svg { transform: rotate(180deg); }
.crop-page .spoiler p { padding: 0 64px 20px 32px; font-family: var(--second-family); font-weight: 400; font-size: 18px; line-height: 1.35; }

/* Полезные ссылки (P-106): раздел онлайн-инструментов — отдельной плашкой, статьи — обычными карточками amssoft.ru.
   Обложки здесь нарисованы для демо; на сайте — обложки статей из CMS. */
.crop-page .tools-link { display: flex; align-items: center; gap: 24px; padding: 24px 28px; border-radius: var(--radius-card); background: var(--main-whitegray2); transition: background-color .2s ease; }
.crop-page .tools-link:hover { background: #d3e2e3; }
.crop-page .tools-link__icon { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--main-white); color: var(--color-blue); box-shadow: var(--shadow-card); }
.crop-page .tools-link__icon svg { width: 30px; height: 30px; }
.crop-page .tools-link__title { display: block; font-weight: 500; font-size: 22px; line-height: 1.2; }
.crop-page .tools-link__sub { display: block; margin-top: 4px; font-family: var(--second-family); font-weight: 400; font-size: 16px; line-height: 1.4; color: var(--main-darkgray); }
.crop-page .tools-link__btn { flex: none; margin-left: auto; }
.crop-page .tools-link:hover .tools-link__btn { color: var(--color-blue); }

.crop-page .articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 32px; }
.crop-page .article__link { display: flex; flex-direction: column; gap: 18px; height: 100%; }
.crop-page .article__cover { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--radius-card); overflow: hidden; background: var(--main-black); container-type: inline-size; }
.crop-page .article__photo { position: absolute; inset: 0 0 0 44%; clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%); }
.crop-page .article__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.crop-page .article__photo--right img { object-position: 0 50%; }
.crop-page .article__kicker { position: absolute; left: 7cqi; top: 7.5cqi; width: 50%; font-weight: 700; font-size: 5.6cqi; line-height: 1.12; text-transform: uppercase; color: var(--main-white); }
.crop-page .article__kicker em { font-style: normal; color: var(--color-orange); }
.crop-page .article__badge { position: absolute; left: 7cqi; bottom: 7cqi; padding: 1.4cqi 3cqi; border-radius: 2.4cqi; background: var(--color-orange); color: var(--main-white); font-weight: 700; font-size: 4.4cqi; line-height: 1.2; }
.crop-page .article__title { font-weight: 700; font-size: 20px; line-height: 1.3; transition: color .2s ease; }
.crop-page .article__link:hover .article__title { color: var(--color-blue); }
.crop-page .article__link:hover .article__photo img { transform: scale(1.05); }

/* ── Баннер и блоки: адаптив ───────────────────────────── */
@media (max-width: 1199px) {

  .crop-page .modes { --ph: 128px; --rw: 144px; }
  .crop-page .mode__ex { gap: 12px; }
  .crop-page .vs { --k: .1; }
  .crop-page .vs__col { padding: 28px 28px 32px; }

}
@media (max-width: 991px) {


  .crop-page .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .crop-page .steps::before { display: none; }
  .crop-page .step { display: grid; grid-template-columns: 56px 300px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 24px; align-items: start; text-align: left; }
  .crop-page .step__num { grid-row: 1 / 3; box-shadow: 0 0 0 6px var(--blue-ring); }
  .crop-page .step__shot { grid-row: 1 / 3; margin-top: 0; }
  .crop-page .step__title { margin-top: 6px; }
  .crop-page .step__text { max-width: none; }

  .crop-page .modes { --ph: 96px; --rw: 108px; --a: 36px; gap: 20px; }
  .crop-page .mode__ex { gap: 10px; padding: 0 12px; }
  .crop-page .mode__body { padding: 20px 22px 24px; }
  .crop-page .mode__title { font-size: 20px; gap: 12px; }
  .crop-page .mode__icon { width: 40px; height: 40px; }

  .crop-page .vs { --k: .12; grid-template-columns: minmax(0, 1fr); gap: 20px; }

}
@media (max-width: 767px) {


  .crop-page .content { padding: 64px 0 80px; }
  .crop-page .band { padding: 64px 0 calc(80px + var(--radius-media)); }
  .crop-page .block + .block { margin-top: 80px; }
  .crop-page .block__title { margin-bottom: 32px; }

  /* На мобильных все три шага идут один под другим, без горизонтальной прокрутки. */
  .crop-page .steps { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-auto-columns: auto; gap: 32px; margin: 0; padding: 0; overflow-x: visible; scroll-snap-type: none; scroll-padding: 0; }
  .crop-page .step { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; scroll-snap-align: none; }
  /* Статьи на мобильных — одна карточка на строку. */
  .crop-page .articles { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-auto-columns: auto; gap: 28px; margin: 28px 0 0; padding: 0; overflow-x: visible; scroll-snap-type: none; scroll-padding: 0; }
  .crop-page .articles > li { min-width: 0; scroll-snap-align: none; }
  .crop-page .step__num { box-shadow: 0 0 0 6px var(--blue-ring); }
  .crop-page .step__shot { margin-top: 22px; }
  .crop-page .step__title { margin-top: 20px; }
  .crop-page .step__text { max-width: 420px; }

  .crop-page .modes { --ph: 130px; --rw: 160px; --a: 40px; grid-template-columns: minmax(0, 1fr); }
  .crop-page .mode__ex { gap: 14px; }

}
@media (max-width: 575px) {

  .crop-page .content { padding: 56px 0 64px; }
  .crop-page .band { padding: 56px 0 calc(64px + var(--radius-media)); }
  .crop-page .block + .block { margin-top: 64px; }
  .crop-page .block__title { margin-bottom: 28px; }
  .crop-page .step__title { font-size: 21px; }
  .crop-page .step__text, .crop-page .mode__text, .crop-page .vs__text { font-size: 16px; }
  .crop-page .steps { gap: 28px; }

  /* Примеры тянутся по ширине экрана: два снимка и стрелка помещаются и на 320 px */
  .crop-page .modes { --ph: min(104px, 25vw); --rw: min(124px, 30vw); --a: 32px; gap: 16px; }
  .crop-page .mode__ex { gap: 8px; padding: 20px 12px; }
  .crop-page .mode__body { padding: 20px 20px 24px; }
  .crop-page .mode__title { font-size: 20px; gap: 12px; }
  .crop-page .mode__icon { width: 40px; height: 40px; }

  .crop-page .vs { --k: .085; --a: 32px; }
  .crop-page .vs__col { padding: 22px 16px 24px; }
  .crop-page .vs__title { font-size: 21px; }
  .crop-page .vs__scheme { gap: 8px; padding: 20px 8px; }
  .crop-page .vs__item figcaption { font-size: 14px; padding: 4px 10px; }
  .crop-page .vs__note { flex-direction: column; gap: 12px; padding: 20px; text-align: center; font-size: 16px; }

  .crop-page .spoiler { border-radius: 16px; }
  .crop-page .spoiler summary { padding: 16px 48px 16px 20px; font-size: 17px; }
  .crop-page .spoiler summary svg { right: 16px; }
  .crop-page .spoiler p { padding: 0 20px 16px; font-size: 16px; }

}
/* ── Баннер, попап, ссылки: адаптив ────────────────────── */
@media (max-width: 1199px) {

  .crop-page .fm-banner { grid-template-columns: minmax(0, 1fr) 360px; }
  .crop-page .fm-banner__body { padding: 40px 8px 44px 40px; }
  .crop-page .fm-banner__title { font-size: 30px; }
  .crop-page .fm-list { grid-template-columns: repeat(2, max-content); gap: 10px 20px; font-size: 15px; }
  .crop-page .fm-actions { column-gap: 24px; }
  .crop-page .fm-shot { right: -24px; font-size: 8.6px; }

}
@media (max-width: 991px) {

  .crop-page .fm-banner { grid-template-columns: minmax(0, 1fr); }
  /* Срез по нижнему краю режет и панель, и окно программы */
  .crop-page .fm-banner__media { order: -1; min-height: 0; height: 284px; clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%); }
  .crop-page .fm-banner__media::before { clip-path: none; }
  .crop-page .fm-shot { top: 28px; right: auto; left: 50%; font-size: 8.4px; transform: translateX(-44%); }
  .crop-page .fm-banner__body { padding: 28px 40px 40px; }

  .crop-page .fm-popup { width: min(720px, calc(100% - 32px)); }
  .crop-page .fm-popup__in { grid-template-columns: 260px minmax(0, 1fr); }
  .crop-page .fm-popup__media .fm-shot { left: 28px; font-size: 7px; transform: translateY(-50%); }
  .crop-page .fm-popup__body { padding: 40px 32px 32px; }
  .crop-page .fm-popup__title { font-size: 26px; }

  /* Статьи — лентой с прокруткой: третья карточка выглядывает и подсказывает жест */
  .crop-page .articles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 300px; gap: 20px; margin: 28px -15px 0; padding: 0 15px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 15px; }
  .crop-page .articles > li { scroll-snap-align: start; }
  .crop-page .article__title { font-size: 19px; }

}
@media (max-width: 767px) {

  .crop-page .fm-banner__media { height: 268px; }
  .crop-page .fm-shot { top: 24px; font-size: 7.8px; }
  .crop-page .fm-banner__body { padding: 24px 28px 32px; }
  .crop-page .fm-banner__title { margin-top: 18px; font-size: 26px; }
  .crop-page .fm-banner__desc { font-size: 17px; }
  .crop-page .fm-list { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 18px; }
  .crop-page .fm-actions { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 26px; }
  .crop-page .fm-actions__alt { justify-content: center; }

  .crop-page .fm-popup__in { grid-template-columns: minmax(0, 1fr); }
  .crop-page .fm-popup__media { height: 212px; }
  .crop-page .fm-popup__media .fm-shot { top: 22px; left: 50%; font-size: 6.4px; transform: translateX(-44%); }
  .crop-page .fm-popup__body { padding: 24px 24px 28px; }
  .crop-page .fm-popup__title { margin-top: 16px; font-size: 23px; }
  .crop-page .fm-popup__text { font-size: 16px; }
  .crop-page .fm-popup__later { display: block; margin: 14px auto 0; }

  .crop-page .tools-link { flex-wrap: wrap; gap: 16px 18px; padding: 22px; }
  .crop-page .tools-link__text { flex: 1 1 0; min-width: 0; }
  .crop-page .tools-link__btn { width: 100%; margin-left: 0; }

}
@media (max-width: 575px) {

  /* На телефоне баннер не длиннее экрана и не перебивает инструмент: картинка — полосой, окно уходит за край,
     пункты скрыты (их суть уже в описании), вместо них — строка о системах под кнопкой */
  .crop-page .fm-banner__media { height: 196px; }
  .crop-page .fm-shot { top: 16px; font-size: min(6.2px, 1.66vw); }
  .crop-page .fm-level { left: -2.6em; bottom: auto; top: 19.8em; }
  .crop-page .fm-banner__body { padding: 20px 20px 24px; }
  .crop-page .fm-brand { gap: 10px; }
  .crop-page .fm-brand__logo { width: 40px; height: 40px; border-radius: 12px; }
  .crop-page .fm-brand__logo img { width: 26px; height: 26px; }
  .crop-page .fm-brand__name { font-size: 17px; }
  .crop-page .fm-brand__sub { font-size: 14px; }
  .crop-page .fm-banner__title { margin-top: 14px; font-size: 22px; }
  .crop-page .fm-banner__desc { margin-top: 10px; font-size: 16px; }
  .crop-page .fm-banner .fm-list { display: none; }
  .crop-page .fm-banner .fm-note { display: block; }
  .crop-page .fm-actions { margin-top: 20px; }
  .crop-page .fm-actions__btn { padding: 5px 16px; font-size: 17px; }

  .crop-page .fm-popup { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .crop-page .fm-popup__media { height: min(212px, 56vw); }
  .crop-page .fm-popup__media .fm-shot { top: min(22px, 5vw); font-size: min(6.4px, 1.6vw); }
  .crop-page .fm-popup__body { padding: 20px 20px 24px; }
  .crop-page .fm-popup__title { font-size: 22px; }

  .crop-page .tools-link { align-items: flex-start; padding: 20px; }
  .crop-page .tools-link__icon { width: 48px; height: 48px; border-radius: 14px; }
  .crop-page .tools-link__icon svg { width: 26px; height: 26px; }
  .crop-page .tools-link__title { font-size: 18px; }
  .crop-page .tools-link__sub { font-size: 15px; }
  .crop-page .articles { gap: 24px; margin-top: 24px; }
  .crop-page .article__title { font-size: 18px; }

}
@media (max-width: 374px) {

  .crop-page .vs { --k: .07; }
  /* 320 px: «Посмотреть ФотоМАСТЕР» — в одну строку */
  .crop-page .fm-banner__body, .crop-page .fm-popup__body { padding: 18px 16px 22px; }
  .crop-page .fm-actions__btn { gap: 8px; padding: 5px 12px; font-size: 16px; }

}

/* На устройствах без мыши перетаскивать некуда — подсказку не показываем */
@media (hover: none) and (pointer: coarse) {

  .crop-page .drop__title { display: none; }
  .crop-page .drop__btn { margin-top: 24px; }
  /* Текстовые кнопки — зона касания 44 px, как у остальных элементов */
  .crop-page .link-btn, .crop-page .drop__sample, .crop-page .fm-actions__alt { min-height: 44px; }
  .crop-page .drop__sample { margin-top: 6px; }

}

@media (prefers-reduced-motion: reduce) {

  .crop-page *, .crop-page *::before, .crop-page *::after { transition: none !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }

}

/* P-147, P-148: до/после удаления объекта — две вертикальные карточки рядом, без перекрытия:
   в «После» видно место, где был прохожий. Один кадр, одинаковые границы */
.crop-page .fm-ba { position: relative; height: 33em; margin-left: -5em; }
.crop-page .fm-ba__card { position: absolute; top: 0; width: 19.5em; aspect-ratio: 718 / 1086; margin: 0; overflow: hidden; border: .6em solid var(--main-white); border-radius: 1.4em; background: var(--main-white); box-shadow: 0 2.4em 4.8em -1.6em rgba(2, 40, 90, .6); }
.crop-page .fm-ba__card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: .8em; }
.crop-page .fm-ba__card--before { left: 0; transform: rotate(-2.5deg); }
.crop-page .fm-ba__card--after { left: 21.5em; top: 2.4em; transform: rotate(2deg); }
.crop-page .fm-ba__mark { position: absolute; left: 0; top: 27%; width: 38%; height: 52%; border: .25em dashed #fff; box-shadow: 0 0 0 .15em rgba(31, 111, 235, .7); border-radius: 2.4em 2.4em 1.6em 1.6em; }
.crop-page .fm-ba__mark svg { position: absolute; right: -1.1em; top: -1.1em; width: 2.2em; height: 2.2em; padding: .5em; border-radius: 50%; background: var(--color-blue); color: var(--main-white); }
.crop-page .fm-ba__card figcaption { position: absolute; right: .8em; top: .8em; padding: .3em .9em; border-radius: 1em; background: rgba(20, 24, 30, .7); color: var(--main-white); font-family: var(--second-family); font-weight: 500; font-size: 1.3em; }
.crop-page .fm-ba__card--after figcaption { background: var(--color-blue); }
.crop-page .fm-shot .fm-level { z-index: 2; left: 9em; right: auto; top: 28.4em; bottom: auto; gap: .8em; }
.crop-page .fm-level > svg { width: 2em; height: 2em; color: var(--color-blue); }
.crop-page .fm-trial { flex-basis: 100%; margin: -4px 0 4px; font-size: 14px; color: inherit; opacity: .75; }
@media (max-width: 767px) {
 .crop-page .fm-trial { margin: -8px 0 0; text-align: center; } 
}

/* Исправления автономной версии для узких экранов и маленьких изображений. */
.crop-page .tool__view--edit, .crop-page .tool__view--result, .crop-page .stage, .crop-page .panel, .crop-page .area, .crop-page .fm-banner__body { min-width: 0; }
.crop-page .panel .btn:disabled { cursor: wait; opacity: .65; }
@media (max-width: 767px) {

  .crop-page .tool__view--edit, .crop-page .tool__view--result { width: 100%; }
  .crop-page .panel__actions > .btn:first-child { max-width: 100%; }

}
@media (max-width: 374px) {

  .crop-page .seg__opt span { gap: 5px; font-size: 12px; }
  .crop-page .seg__opt svg { width: 14px; height: 14px; }
  .crop-page .area { padding-left: 12px; padding-right: 12px; }
  .crop-page .area__head { gap: 8px; }
  .crop-page .area__reset { font-size: 13px; }
  .crop-page .field__box { padding-inline: 8px; }

}

/* Совместимость с общим /libs/style.css: эти правила работают только внутри инструмента. */
.crop-page > .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.crop-page { isolation: isolate; }
.crop-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.crop-page img { max-width: 100%; }
.crop-page .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.crop-page :focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.crop-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--font-family); text-decoration: none; }
.crop-page .btn::after { display: none; }
.crop-page .btn svg { width: 16px; height: 16px; flex: none; }
.crop-page .btn:hover { background: var(--orange-hover); }
.crop-page .btn.btn-white:hover { background: var(--main-white); color: var(--color-blue); }
.crop-page .btn.btn-grey:hover { background: var(--main-whitegray); color: var(--color-blue); }
.crop-page .btn.btn-green:hover { background: var(--green-buy-hover); color: var(--main-white); }
.crop-page .btn--block { display: flex; width: 100%; }
.crop-page .breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-family: var(--second-family); font-weight: 400; font-size: 14px; line-height: 1.6; }
.crop-page .breadcrumbs li { display: inline-flex; align-items: center; }
.crop-page .breadcrumbs li + li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 0 6px; border-right: 1.5px solid var(--main-gray); border-top: 1.5px solid var(--main-gray); transform: rotate(45deg); }
.crop-page .breadcrumbs a { color: var(--crumbs); text-decoration: underline; text-decoration-color: currentColor; transition: color .3s ease, text-decoration-color .3s ease; }
.crop-page .breadcrumbs a:hover { color: var(--crumbs-current); text-decoration-color: transparent; }
.crop-page .breadcrumbs [aria-current] { color: var(--crumbs-current); }
/* Удалить декоративную линию, рассчитанную на горизонтальные шаги, на телефонах. */
@media (max-width: 767px) {
  .crop-page .steps::before { display: none; }
  /* Данное правило должно быть ПОСЛЕ планшетной прокручиваемой ленты (max-width: 991px). */
  .crop-page .articles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 28px;
    width: 100%;
    max-width: 100%;
    margin: 28px 0 0;
    padding: 0;
    overflow-x: visible;
    scroll-snap-type: none;
    scroll-padding: 0;
  }
  .crop-page .articles > li { min-width: 0; scroll-snap-align: none; }
}
@media (max-width: 575px) { .crop-page .articles { gap: 24px; margin-top: 24px; } }

/* P-151: уведомление об ограничении скачиваний в попапе. */
.crop-page .limit-note { display: flex; gap: 8px; margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #FFF4E5; color: #8A4B00; font-size: 15px; line-height: 1.45; }
.crop-page .limit-note[hidden] { display: none; }
