/* =================================================================================================
   /p/<guid> customer preview page — concept-D (warm earth / the maker's hand).
   Depends on assets/site.css for the :root tokens (--clay, --paper, --ink, --espresso, fonts, steps).
   This file styles ONLY the preview-page sections; chrome (header/footer) comes from site.css.
   ================================================================================================= */

/* ---- Shared plain-page shell (invalid + trouble states) ---------------------------------------- */
.p-plain {
  padding: clamp(4.5rem, 12vw, 8rem) 0 var(--section-y);
  background: var(--paper);
}
.p-plain__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  color: var(--ink);
  margin-top: 0.7rem;
  line-height: 1.08;
}
.p-plain__body {
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: 1.6;
  max-width: var(--measure);
  margin-top: 1.1rem;
}
.p-plain__sig { margin-top: 1.8rem; }
.p-plain__links { margin-top: 1.4rem; }

/* ---- WAITING state ----------------------------------------------------------------------------- */
.p-wait {
  padding: clamp(5rem, 13vw, 9rem) 0 var(--section-y);
  background:
    radial-gradient(120% 90% at 50% -10%, var(--muslin) 0%, var(--paper) 60%);
  text-align: center;
}
/* ⚠️ THE MARK WAS CUT IN HALF ON A PHONE (owner, live run 07.08). The site header is
   `position: fixed` and on a narrow screen it becomes TWO STOREYS — the wordmark "Pet Story Mosaic"
   wraps, and the tagline wraps under it — so it stands about 110–120px tall, while the padding above
   reserves only clamp(5rem, 13vw, 9rem) = 80px at 390px wide. The difference is exactly the top of
   the circle.
   Owner's call (07.08): keep the tagline on mobile, make the room here. So this is deliberately the
   COSMETIC half of the fix — the two-storey header still eats the top of every other page, and the
   real fix (one-line header on phones) stays on the list. */
@media (max-width: 700px) { .p-wait { padding-top: 8.5rem; } }
.p-wait .wrap { position: relative; }
.p-wait__mark {
  width: 68px; height: 68px;
  margin: 0 auto 1.6rem;
  border-radius: var(--r-pill);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid; place-items: center;
  position: relative;
}
/* A slow "wet-brush" pulse — the maker is at work. Respects reduced-motion below. */
.p-wait__brush {
  width: 20px; height: 20px;
  border-radius: var(--r-pill);
  background: var(--clay);
  box-shadow: 0 0 0 0 rgba(179, 84, 46, .45);
  animation: p-wait-pulse 2.4s ease-in-out infinite;
}
@keyframes p-wait-pulse {
  0%   { transform: scale(0.82); box-shadow: 0 0 0 0 rgba(179,84,46,.45); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 16px rgba(179,84,46,0); }
  100% { transform: scale(0.82); box-shadow: 0 0 0 0 rgba(179,84,46,0); }
}
.p-wait__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  color: var(--ink);
  margin-top: 0.6rem;
  line-height: 1.1;
}
.p-wait__title em { font-style: italic; color: var(--clay-deep); }
.p-wait__body {
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: 1.62;
  max-width: 54ch;
  margin: 1.2rem auto 0;
}
.p-wait__body--soft { color: var(--ink-faint); font-size: var(--step--1); max-width: 52ch; }
.p-wait__sig { margin-top: 1.8rem; }
/* The sentence that introduces the door. It used to BE the door — a framed box with an underlined
   word inside it — and the frame was doing the job the control should have been doing. Now the
   button below carries the affordance, so the box is gone: two containers around one idea read as
   two ideas. Present, not shouted: the order is fine as it is. */
.p-wait__more {
  margin: 1.6rem auto 0; max-width: 52ch;
  color: var(--ink-soft); font-size: var(--step--1);
}
.p-wait__note {
  margin-top: 0.9rem;
  color: var(--ink-faint);
  font-size: var(--step--1);
}

/* ---- READY state: header band ------------------------------------------------------------------
   Kept deliberately SHORT. Everything above the portrait is height stolen from the one thing the
   customer came for; the review of 29.07 found the first screen carrying no image at all. */
.p-head {
  /* Top clears the fixed header (same clamp the order page uses); the SHORT part is what comes
     after — eyebrow + title + one line, instead of the old title + two paragraphs. */
  padding: clamp(6rem, 9vw, 7.5rem) 0 clamp(1rem, 2.5vw, 1.6rem);
  background: var(--paper);
  text-align: center;
}
.p-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  color: var(--ink);
  margin-top: 0.5rem;
  line-height: 1.08;
}
.p-head__lede {
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: 1.5;
  max-width: 46ch;
  margin: 0.8rem auto 0;
}
.p-head__lede strong { color: var(--ink); }

/* ---- READY state: the portrait stage ----------------------------------------------------------
   The hero. Sits directly under a two-line header and above every decision on the page. */
.p-stage { padding: 0 0 clamp(2rem, 5vw, 3.2rem); background: var(--paper); }

/* The old confirmation banner was a full-width espresso section between the title and the picture —
   one of the two blocks that pushed the portrait off the first screen. One line, same message. */
.p-stage__chosen {
  display: flex; align-items: center; justify-content: center; gap: 0.55em;
  margin: 0 0 0.9rem;
  color: var(--sage);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
}
.p-stage__chosen svg { width: 20px; height: 20px; flex: none; }
.p-stage__chosen strong { color: var(--ink); }
.p-stage__chosen span { color: var(--ink-soft); font-weight: 400; }

/* One-shot confirmation after a variant switch (the size survived) — shown once, then gone. */
.p-stage__flash {
  margin: 0 auto 0.9rem;
  max-width: 46rem;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--sage-soft, var(--line));
  border-radius: var(--r-md);
  padding: 0.7rem 1.1rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* .pm is the approved viewer component (assets/petmosaic.css) and stays untouched; this modifier
   only lifts it out of full-page mode and frames it. --p-aspect / --p-arn come from the descriptor,
   so the stage takes the portrait's OWN proportions instead of a fixed box that letterboxes it;
   --p-arn (width/height as a number) caps the width so a tall stage can't outgrow the screen. */
/* NOTE the doubled class. petmosaic.css is linked AFTER this file (it belongs to the viewer block),
   so a single `.pm--inline` LOSES the tie against `.pm` and `.pm { min-height: 100svh }` stayed in
   force. The consequence was not cosmetic: the grid then stretched the stage to the full viewport
   height, `aspect-ratio` computed the WIDTH from that height (898 * 1.5 = 1347px inside a 783px
   frame), and the visitor saw the middle crop of an oversized canvas — the portrait's left and right
   edges were simply outside the box. That is the "why is the dog opened stretched" report. */
.pm.pm--inline {
  min-height: 0;
  align-items: start;          /* never stretch the stage to the row height */
  grid-template-columns: 1fr;
  max-width: min(100%, calc(58svh * var(--p-arn, 1.5)));
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-frame);
}
.pm.pm--inline .pm__stage-wrap { min-height: 0; height: auto; aspect-ratio: var(--p-aspect, 3 / 2); }
/* ТРИ РЕЖИМА ВЬЮЕРА НА ТЕЛЕФОНЕ (пункт 25 очереди владельца, 01.09.2026).
   1. ПРЕВЬЮ (.is-inert) — мозаика видна, жесты выключены, палец скроллит статью. Это РЕШЕНИЕ,
      а не недоделка: «когда скроллишь и палец попадает на мозаику, начинает работать мозаика
      вместо скролла». Контролы спрятаны — они обещали бы взаимодействие, которого нет.
   2. РАБОТА В СТАТЬЕ (.is-live) — по «Tap to zoom in» жесты включаются ПРЯМО ЗДЕСЬ, появляются
      +/−/⌂/⛶ и явный выход; статья остаётся видна сверху и снизу. Рамка подсвечивается, чтобы
      было видно, что холст «взял» палец, и понятно, почему страница перестала скроллиться.
   3. ПОЛНЫЙ ЭКРАН — по ⛶ из режима 2; выход возвращает в режим 2, а не в 1. */
.pm.pm--inline.is-inert .pm__controls { display: none; }
.pm.pm--inline.is-live {
  border-color: var(--clay);
  box-shadow: var(--shadow-frame), 0 0 0 3px color-mix(in srgb, var(--clay) 34%, transparent);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .pm.pm--inline.is-live { box-shadow: var(--shadow-frame), 0 0 0 3px rgba(160,90,48,.34); }
}
/* Выход из режима 2. Показывается ТОЛЬКО в нём: в превью выходить неоткуда, а в полном экране
   его роль исполняет та же ⛶. */
.p-stage__done {
  position: absolute; z-index: 4; top: 0.8rem; right: 0.8rem;
  display: inline-flex; align-items: center; gap: 0.45em;
  background: rgba(43,32,24,.82); color: var(--cream);
  border: 1px solid rgba(251,246,236,.35); border-radius: var(--r-pill);
  padding: 0.5em 0.95em; font-family: var(--font-body); font-weight: 700; font-size: 0.85rem;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); cursor: pointer;
}
.p-stage__done svg {
  width: 15px; height: 15px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round;
}
.pm.pm--inline:not(.is-live) .p-stage__done { display: none; }
/* Полный экран: контролы обязаны быть на месте. Флоат при входе в full-page переносится ИЗ #pm
   внутрь элемента OSD, поэтому селекторы от .pm до него больше не достают — правило дублируется
   от самого флоата. Без этого владелец видел полный экран «без единого элемента». */
.pm__float.is-fs .pm__controls { display: flex; }

/* Sage, not clay (T1, 03.09). The same two words now appear twice on this page — here over the
   portrait and on the chosen thumbnail below — and in two different colours they read as two
   different statuses. Sage is already the page's "confirmed" colour (`.p-stage__chosen` uses it),
   while clay is the ACTION colour: every button on the page is clay, so a clay badge invited a tap
   on something that is not a control. */
.p-stage__badge {
  position: absolute; top: 0.8rem; left: 0.8rem; z-index: 3;
  background: var(--sage); color: var(--cream);
  font-family: var(--font-body); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.35em 0.7em; border-radius: var(--r-pill);
  box-shadow: 0 6px 14px -8px rgba(58,38,20,.7);
}
/* Touch only — unhidden by p-preview.js. A live deep-zoom filling the screen eats the page scroll,
   so on a phone the stage is a picture until the customer asks for the zoom. */
.p-stage__tap {
  position: absolute; z-index: 3; left: 50%; bottom: 1rem; transform: translateX(-50%);
  background: rgba(43,32,24,.82); color: var(--cream);
  border: 1px solid rgba(251,246,236,.35); border-radius: var(--r-pill);
  padding: 0.7em 1.4em; font-family: var(--font-body); font-weight: 700; font-size: 0.9rem;
  backdrop-filter: blur(3px); cursor: pointer;
}

.p-stage__hint {
  text-align: center;
  margin: 0.9rem auto 0;
  color: var(--ink-faint);
  font-size: var(--step--1);
  max-width: 52ch;
}

/* ---- Variant strip ------------------------------------------------------------------------------
   Switching is client-side (one viewer, new tile source), so comparing costs no page load — and the
   strip is what tells the customer there is more than one portrait at all. */
.p-strip { margin-top: clamp(1.4rem, 3vw, 2rem); }
.p-strip__lead {
  display: flex; align-items: baseline; justify-content: center; gap: 0.8rem; flex-wrap: wrap;
  margin: 0 0 0.8rem;
  color: var(--ink-soft); font-size: var(--step--1);
}
/* Said next to the strip on purpose: if switching version could change the price, comparing turns
   from "which is more like him" into shopping. */
.p-strip__same { color: var(--ink-faint); }

/* ONE row. A two-row grid reads as a catalogue and invites comparing everything with everything —
   the paralysis case. Beyond ~4 thumbs the row scrolls sideways instead of wrapping. */
.p-thumbs {
  display: flex; justify-content: center; flex-wrap: nowrap;
  /* 🔴 flex-start, а НЕ умолчательный stretch. У выбранного варианта фон заливной, и при stretch
     плита вытягивается до высоты САМОЙ ВЫСОКОЙ карточки в полосе — снизу повисает пустой зелёный
     хвост. Разной высота бывает в двух случаях: у вариантов разные пропорции портрета
     (`aspect-ratio` приходит из данных сборки: 1.5, 1.25, 1.0 — все встречаются в живых заказах) и
     когда подпись одного варианта переносится на строку больше. Пока все варианты заказа
     одинаковы, разницы не видно — поэтому дефект и не проявился на квадратном тестовом заказе. */
  align-items: flex-start;
  gap: clamp(0.7rem, 2vw, 1.1rem);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  /* Отступ сверху и по бокам — место для медальона-галочки, который вылезает за угол миниатюры.
     Без него он срезался бы краем: overflow-x:auto делает обрезающей и вертикальную ось. */
  padding: 10px 6px 0.6rem;
  -webkit-overflow-scrolling: touch;
}
.p-thumbs > * { scroll-snap-align: center; flex: none; }
/* 🔴 ПЕРЕДЕЛАНО 08.09.2026, ВТОРАЯ ИТЕРАЦИЯ ПО ЖАЛОБЕ ВЛАДЕЛЬЦА («рамка тёмно-зелёная всё равно
   воспринимается тоненькой»). Ошибка первой итерации была не в оттенке, а в НОСИТЕЛЕ: оба
   состояния рисовались рамкой, в двух цветах с почти одинаковой светлотой (см. `--sage-deep`).
   Хуже того — правило `.is-chosen.is-current` перекрашивало зелёный контур в оранжевый, а это
   САМОЕ ЧАСТОЕ состояние страницы: человек открывает её и смотрит именно на выбранный вариант.
   То есть владелец жаловался на состояние, в котором зелёного не было вовсе.
   Теперь состояния разведены по РАЗНЫМ носителям и не могут погасить друг друга:
     «смотрю сейчас»  = оранжевая обводка ВОКРУГ ФОТОГРАФИИ (переключается по тапу);
     «уходит в печать» = тёмно-зелёная ПЛИТА под всей карточкой + лента + медальон-галочка.
   Заливка вместо обводки — единственный способ конкурировать за внимание со сплошной кнопкой
   «Continue to size»: у контура ~1300 px² краски, у плиты ~4000, у кнопки ~12000. */
.p-thumb {
  background: transparent; border: 0; cursor: pointer;
  /* Нижний отступ 12px — не симметрия ради симметрии: у выбранного варианта плита заливная, и
     подпись, прижатая к её краю, читается как обрезанная (замечание владельца 08.09). Боковые
     6px держат ленту, которая растягивается на всю ширину плиты отрицательными полями. */
  padding: 6px 6px 12px;
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  font-family: var(--font-body); color: var(--ink-faint); font-size: var(--step--1);
  transition: background-color .2s;
}
.p-thumb.is-chosen { background: var(--sage-deep); color: var(--cream); }
.p-thumb.is-chosen .p-thumb__blurb { color: rgba(251,246,236,.78); }
.p-thumb__frame {
  /* Kept BELOW the source tile's 189px: the thumbnail is a whole photomosaic squeezed into a
     single DZI tile, so at 1:1 it reads as noise; shown at ~2/3 of its pixels the face resolves. */
  position: relative;                     /* медальон-галочка позиционируется от этой рамки */
  /* ⚠️ overflow ДОЛЖЕН быть visible: медальон вылезает за угол рамки, при hidden он срезался бы.
     Скругление картинки перенесено на сам <img> — иначе фотография вылезала бы за скруглённый
     угол рамки. */
  display: block; width: clamp(112px, 15vw, 148px);
  aspect-ratio: 3 / 2; overflow: visible;
  border-radius: var(--r-md);
  border: 3px solid transparent;
  box-shadow: var(--shadow-card);
  background: var(--espresso-2);
  transition: border-color .2s;
}
.p-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: calc(var(--r-md) - 3px);
}
/* ⚪ Подъёма при наведении здесь БОЛЬШЕ НЕТ, и это решение, а не потеря.
   Три причины: (1) у контейнера полосы `overflow-x: auto`, а по спецификации это делает
   обрезающей и вертикальную ось — поднятый на 3px элемент срезался краем сверху, что владелец и
   увидел; (2) половина покупателей на телефоне, где hover не существует вовсе; (3) для пожилых
   уезжающая из-под курсора цель — помеха, а не подсказка. Отзывчивость осталась цветом рамки. */
.p-thumb:hover .p-thumb__frame { border-color: var(--clay-soft); }
.p-thumb:focus-visible .p-thumb__frame { outline: 3px solid var(--clay); outline-offset: 2px; }

/* TWO DIFFERENT STATES, and they must not be confused — that confusion was the whole complaint (T1).
     .is-current = "this is the one you are LOOKING AT right now"  -> clay border, follows every tap
     .is-chosen  = "this is the one that goes to PRINT"            -> sage border + ring + a ribbon
   The customer is about to press "Continue to size": he must be able to tell what he is buying
   without reading anything. Owner 03.09: "тоненькая совсем рамочка, для пожилых людей совсем
   незаметно" — hence a 3px border, an outer ring, and a worded ribbon rather than a bare tick.
   Colour alone is never the signal: the ribbon carries the word, so it survives poor eyesight,
   colour blindness and a dim phone screen in a hospital lobby. */
.p-thumb.is-current .p-thumb__frame { border-color: var(--clay); }
.p-thumb.is-current { color: var(--ink); font-weight: 700; }
.p-thumb.is-chosen.is-current { color: var(--cream); }

/* Лента — НИЖНИЙ КРАЙ ПЛИТЫ, а не наклейка поверх морды питомца (была `position: absolute`
   внизу кадра и закрывала нижнюю треть фотографии). Отрицательные поля растягивают её на всю
   ширину плиты, скругление повторяет её низ. */
.p-thumb__chosen {
  display: block; align-self: stretch;
  margin: 0 -6px;
  padding: .42rem .3rem;
  border-radius: 0 0 12px 12px;
  background: var(--sage-deep); color: var(--cream);
  font-size: .76rem; line-height: 1.1; letter-spacing: .08em;
  text-transform: uppercase; text-align: center; font-weight: 700;
}

/* Медальон-галочка — ТРЕТИЙ канал сигнала. Первые два (цвет плиты и слово на ленте) уже есть;
   этот работает даже там, где цвет не читается: чёрно-белая печать, дальтонизм, тусклый экран
   телефона в больничном вестибюле. Кольцо цветом бумаги отделяет медальон от фотографии, не
   добавляя на страницу нового цвета. */
.p-thumb__frame::after {
  content: "";
  position: absolute; top: -9px; right: -9px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--sage-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbf6ec' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.5 5.5L20 7'/%3E%3C/svg%3E") center/16px 16px no-repeat;
  box-shadow: 0 0 0 3px var(--paper);
  opacity: 0; transform: scale(.7);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.p-thumb.is-chosen .p-thumb__frame::after { opacity: 1; transform: scale(1); }

/* D4: строка под именем варианта — чем он отличается от соседних. Намеренно тише имени
   и в две строки максимум: это подсказка при выборе, а не описание товара. */
.p-thumb__blurb {
  display: block;
  margin-top: .15rem;
  font-size: .74rem;
  line-height: 1.4;
  color: var(--ink-faint);
  max-width: 22ch;
}

/* The action block: exactly one primary control, always live, always pointing forward. */
.p-act { margin: clamp(1.4rem, 3vw, 2rem) 0 0; text-align: center; }
.p-choose { margin: 0; }
.p-choose.is-submitting .p-choose__btn { opacity: 0.6; }
.p-act__go { text-decoration: none; }
/* `.btn` sets display:inline-flex, and a class beats the user-agent rule for [hidden] — without
   this the "Continue to size" link stayed visible next to the POST button. */
.p-act [hidden] { display: none !important; }
/* Single-version case: the way to ask for another one, quiet and secondary by design. */
.p-act__ask {
  margin: 1.1rem auto 0; max-width: 52ch;
  color: var(--ink-faint); font-size: var(--step--1); line-height: 1.55;
}
/* ---- «Что поправить в этом варианте» (наблюдение владельца №6) ------------------------------
   Намеренно ТИШЕ кнопки выбора и тише строки «Continue to size»: главное действие страницы одно, и
   это выбор. Свёрнутый <details> занимает одну строку, поэтому не конкурирует за внимание с
   портретом; развёрнутый — обычная форма в колонке той же ширины, что и текст рядом. */
.p-act__note { margin: 1.2rem auto 0; max-width: 52ch; text-align: left; }
.p-act__note > summary {
  cursor: pointer; text-align: center;
  color: var(--ink-faint); font-size: var(--step--1);
  text-decoration: underline; text-underline-offset: 0.2em;
}
.p-act__note > summary::marker { content: ''; }        /* треугольник Safari/Chrome — лишний шум */
.p-act__note[open] > summary { margin-bottom: 0.8rem; }
.p-act__note-lede { margin: 0 0 0.6rem; color: var(--ink-faint); font-size: var(--step--1); line-height: 1.55; }
.p-act__note textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  padding: 0.7em 0.8em; border: 1.5px solid var(--rule, #d9cfbc); border-radius: 6px;
  background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: var(--step--1); line-height: 1.5;
}
.p-act__note .btn { margin-top: 0.7rem; }
.p-act__note-ok {
  margin: 1rem auto 0; max-width: 52ch;
  color: var(--ink); font-size: var(--step--1); line-height: 1.55;
}

/* One size up for the page's single primary action (the checkout stub uses it too). */
.btn--lg { padding: 1.2em 2.4em; font-size: var(--step-1); }

/* ---- Size step ----------------------------------------------------------------------------------
   The CARDS are the approved home-page block (.price-grid / .price-card* in site.css) — reused, not
   restyled. Only two things belong here: a centred section head (this page is centred, the home page
   is not) and the "picked" state, which the home page has no need for. */
.pricing--step { background: var(--muslin); }
.pricing--step .section-head { max-width: 46rem; margin-inline: auto; text-align: center; }
.pricing--step .section-head .lede { margin-inline: auto; }
.price-card.is-picked { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay), var(--shadow-frame); }
.price-card--feature.is-picked { box-shadow: 0 0 0 2px var(--clay-soft), var(--shadow-frame); }
.price-card .btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* ---- Checkout summary -------------------------------------------------------------------------- */
.p-checkout { margin-top: clamp(1.8rem, 4vw, 2.6rem); text-align: center; }
/* The portrait stays beside the price: a number on its own reads as a bill. */
.p-checkout__card {
  display: flex; align-items: center; gap: 1rem;
  width: fit-content; max-width: 100%;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0.8rem 1.2rem 0.8rem 0.8rem; box-shadow: var(--shadow-card);
  margin: 0 auto 1.3rem; text-align: left;
}
.p-checkout__thumb {
  width: 84px; height: 56px; object-fit: cover; display: block;
  border-radius: 6px; flex: none;
}
.p-checkout__sum { margin: 0; font-size: var(--step-0); color: var(--ink-soft); }
.p-checkout__sum strong { color: var(--ink); }
/* W1: the name and the size carry the weight here. A misspelt name is the one mistake this product
   cannot take back once the canvas is printed, and it was set in the same grey as "shipping
   included". */
.p-checkout__name { display: inline-block; font-family: var(--font-display, Georgia, serif);
  font-size: var(--step-2); line-height: 1.15; color: var(--ink); font-weight: 700; }
.p-checkout__size { font-size: var(--step-1); color: var(--ink); font-weight: 700; }
.p-checkout__namenote { display: inline-block; margin-top: 4px; font-size: .82em; color: var(--ink-soft); }
/* The other place someone wants back to the versions is right here, looking at the money. */
.p-checkout__ver { display: inline-block; margin-top: 0.4rem; font-size: var(--step--1); color: var(--ink-faint); }
.p-checkout__ver b { color: var(--ink-soft); font-weight: 700; }
/* The Stripe stub must LOOK like what it is: a fully clay button that does nothing on click reads
   as a broken site at the exact moment the customer is ready to pay. */
.p-checkout .btn[disabled] { opacity: 0.5; cursor: default; box-shadow: none; transform: none; }
/* was --clay-soft: pale orange on paper failed to read at this size */
.p-checkout__note { color: var(--ink-faint); font-size: var(--step--1); max-width: 48ch; margin: 1rem auto 0; }

/* ---- Tail --------------------------------------------------------------------------------------
   "Want changes?" belongs after the work, not above it. */
.p-tail { padding: clamp(2.2rem, 5vw, 3.4rem) 0 var(--section-y); background: var(--paper); text-align: center; }
.p-tail__body { color: var(--ink-soft); font-size: var(--step-0); line-height: 1.6; max-width: 52ch; margin: 0 auto; }
.p-tail__sig { margin-top: 1.2rem; }

/* ---- Responsive tweaks ------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .pm--inline { border-radius: var(--r-md); }
  .p-checkout__card { flex-direction: column; text-align: center; }
  .p-checkout__thumb { width: 132px; height: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .p-wait__brush { animation: none; }
  /* (правило про transform убрано 08.09.2026 вместе с самим hover-подъёмом) */
}

/* ---- The way back into the upload, and the strip of portraits (owner, live run 07.08) ---------- */
/* The button is centred because both hosting sections are centred prose; the strip is NOT — a list
   of rows reads down the left edge, and centring it would make two portraits look like a banner. */
.p-wait__cta { margin: 1.4rem 0 0; }
.p-tail__cta { margin: 1.2rem 0 0; }
.p-portraits {
  max-width: 34rem;
  margin: 2.2rem auto 0;
  text-align: left;
}

/* ---- F4b: the published FLAT variant on the stage --------------------------------------------
   A portrait the master finished by hand is one picture: it fills the same stage box, keeps its own
   proportions, and while it shows, the deep-zoom viewer underneath it — spinner and zoom chrome
   included — is hidden rather than left promising a close-up that does not exist. */
/* A version whose picture is not ready yet: a quiet empty frame, never a broken-image icon.
   Paired with the `p-thumb__none` span in p.php — see the comment there for why src="" is banned. */
.p-thumb__none { display: block; width: 100%; height: 100%; background: rgba(0,0,0,.05);
                 border-radius: inherit; }

.p-stage__flat { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2; }
.pm.is-flat .pm__stage,
.pm.is-flat .pm__spinner,
.pm.is-flat .pm__float,
.pm.is-flat .pm__poster { visibility: hidden; }
.pm.is-flat .p-stage__tap { display: none; }

/* ---- «Карандашик»: слова на странице портрета (V8, 08.09.2026) --------------------------------
   Спокойный блок на муслине между портретом и выбором размера. Намеренно НЕ кричит: это не шаг
   покупки, а приглашение, и стоять рядом с ценой оно должно тише цены.
   Сначала показываются сами слова (то, что увидит гость), и только под ними — карандашик. Формой
   вперёд этот блок читался бы как ещё одно обязательное поле анкеты. */
.p-words { padding: 3rem 0; background: var(--muslin); }
.p-words__box {
  max-width: 44rem; margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md, 14px);
  padding: 1.8rem 1.6rem;
}
.p-words__title {
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 600;
  color: var(--ink); margin: 0 0 .5rem;
}
.p-words__lede { color: var(--ink-soft); font-size: var(--step--1); margin: 0 0 1.2rem; max-width: 52ch; }

/* Слова показываются на «бумаге в бумаге» — так видно, что это цитата со страницы портрета,
   а не абзац этой страницы. Полоска слева вместо рамки: рамка спорила бы с рамкой блока. */
.p-words__current {
  border-left: 3px solid var(--sage-soft);
  padding: .1rem 0 .1rem 1rem;
  margin: 0 0 1.1rem;
}
.p-words__cap { color: var(--ink); margin: .3rem 0; }
.p-words__story { color: var(--ink-soft); font-size: var(--step--1); margin: .3rem 0; }
.p-words__mine { color: var(--ink-faint); font-size: var(--step--1); font-style: italic; margin: .6rem 0 .2rem; }

.p-words__pencil {
  cursor: pointer; color: var(--clay); font-size: var(--step--1);
  list-style: none; display: inline-block; padding: .2rem 0;
}
.p-words__pencil::-webkit-details-marker { display: none; }
.p-words__pencil:hover { color: var(--clay-deep); text-decoration: underline; }
.p-words__edit[open] .p-words__pencil { color: var(--ink-faint); }

.p-words__form { margin-top: 1rem; }
.p-words__label {
  display: block; color: var(--ink-faint); font-size: var(--step--1);
  margin: .9rem 0 .3rem;
}
.p-words__input, .p-words__area {
  width: 100%; box-sizing: border-box;
  font-family: var(--font-body); font-size: var(--step-0); color: var(--ink);
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .7rem;
}
.p-words__area { resize: vertical; min-height: 6rem; line-height: 1.5; }
.p-words__input:focus, .p-words__area:focus { outline: 2px solid var(--clay-soft); outline-offset: 1px; }
.p-words__hint { color: var(--ink-faint); font-size: var(--step--1); margin: .9rem 0 0; }
.p-words__act { margin-top: 1.1rem; }

@media (max-width: 620px) {
  .p-words { padding: 2.2rem 0; }
  .p-words__box { padding: 1.3rem 1.1rem; }
}
