/* Мультгерой — редактор "монтажный стол" (макет B). Поверх pay.css: те же пять красок, рамки 3 px, Montserrat Black.
   Телефон первичен: шапка с обложкой, карточка героя, плёнка листается вбок, кнопка запуска прилипает к низу.
   От 960 px: обложка | шапка и герой | купон запуска, плёнка во всю ширину. Повороты — только без reduced motion. */

.page-make main { padding-bottom: 0; }

.make {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40%;
  column-gap: 1rem;
  row-gap: clamp(1.5rem, 5vw, 2.25rem);
  padding-top: clamp(1.25rem, 4vw, 2.5rem);
  align-items: start;
}
.make > *, .launch > * { min-width: 0; }
.make > .hero-card, .make > .reel-sec, .launch > * { grid-column: 1 / -1; }
fieldset { min-inline-size: 0; }
/* Кнопка запуска прилипает к низу экрана на всю высоту формы: обёртка купона на телефоне не создаёт своего блока */
.launch { display: contents; }

.make h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }

/* ——— Шапка стола ——— */

.desk-head { align-self: center; display: grid; gap: 0.6rem; }
.desk-head .folio { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; font-size: 1rem; }
.desk-head h1 { font-size: clamp(2.3rem, 9vw, 4.2rem); letter-spacing: -0.035em; overflow-wrap: anywhere; }
.desk-head .lead { font-size: 1.0625rem; font-weight: 600; }
.save-state:empty { display: none; }
.save-state {
  font-family: var(--text); font-weight: 700; font-size: 0.875rem;
  border: 2px solid var(--ink); border-radius: 999px; padding: 0.05rem 0.6rem; background: var(--white);
}
.save-state[data-kind="ok"] { background: var(--green); }
.save-state[data-kind="bad"] { background: var(--white); border-color: var(--red); }

.nm { font-weight: inherit; }
.nm-empty { text-decoration: underline dashed 2px; text-underline-offset: 0.2em; }

/* ——— Обложка: кадр образца, надпись финала с именем ——— */

.poster { position: relative; justify-self: end; width: 100%; max-width: 15.5rem; }
.poster::before {
  content: ""; position: absolute; inset: 0; border-radius: calc(var(--radius) + 6px);
  background: var(--green); translate: 9px 9px;
}
.poster-frame {
  position: relative; overflow: hidden; aspect-ratio: 432 / 756;
  border: 5px solid var(--white); outline: var(--line) solid var(--ink); border-radius: var(--radius);
  background: var(--blue);
}
.poster-frame img { width: 100%; height: 100%; object-fit: cover; }
.poster-plate { position: absolute; inset: 0; background: var(--blue); }
.poster-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; gap: 0.1rem; padding: 0.55rem 0.6rem 0.65rem;
  background: var(--ink); color: var(--white); text-align: center;
  font-family: var(--display); font-weight: 900; line-height: 1.02; letter-spacing: -0.01em;
}
.pt-name { font-size: clamp(1rem, 4.6vw, 1.6rem); overflow-wrap: anywhere; }
.pt-phrase { font-size: clamp(0.7rem, 2.6vw, 0.95rem); }
.poster-sticker { top: -0.9rem; left: -0.6rem; background: var(--red); font-size: 0.95rem; padding: 0.4rem 0.8rem; }

/* ——— Карточка героя ——— */

.hero-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem;
  background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 1.6rem);
}
.hero-card h2 { margin-bottom: -0.3rem; }
.hero-card .field { margin-bottom: 0; }
.hero-note { font-size: 1rem; }
.hint { display: block; font-size: 1rem; color: var(--ink); }
.field .hint { font-weight: 400; }

.photo {
  position: relative;
  display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 0.9rem; align-items: center;
  border: var(--line) dashed var(--ink); border-radius: 14px; padding: 0.8rem;
  background: var(--white);
}
.photo[data-photo="1"] { border-style: solid; }
.photo:has(.photo-input[aria-invalid="true"]) { border-color: var(--red); }
.photo-thumb {
  position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  background: var(--blue); border: var(--line) solid var(--ink);
  display: grid; place-items: center;
}
.photo-thumb svg { width: 68%; }
.photo-preview[hidden] { display: none; }
.photo-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-body { display: grid; gap: 0.45rem; justify-items: start; }
.photo-status { font-weight: 700; display: flex; align-items: center; gap: 0.4rem; }
.photo[data-photo="1"] .photo-status::before {
  content: ""; width: 1.25rem; height: 1.25rem; flex: none; border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%2314213d' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
/* Поле файла скрыто, но остаётся в порядке фокуса: подпись-кнопка показывает его фокус */
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo-btn {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.45rem 1rem;
  font-family: var(--display); font-weight: 900; font-size: 1rem;
  background: var(--white); color: var(--ink); border: var(--line) solid var(--ink); border-radius: 12px; cursor: pointer;
  transition: translate 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.photo-btn:hover { translate: 0 -2px; }
.photo-input:focus-visible + .photo-btn { outline: 3px solid var(--blue); outline-offset: 2px; }
.photo-progress { width: 100%; height: 0.75rem; accent-color: var(--blue); }
.photo[data-state="uploading"] .photo-btn, .photo[data-state="checking"] .photo-btn { pointer-events: none; border-style: dashed; }

.hero-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1.25rem; align-items: end; }
.field-age { min-width: 9.5rem; flex: 1 1 9.5rem; }
.field select {
  font: inherit; color: var(--ink); width: 100%; min-height: 3.2rem;
  border: var(--line) solid var(--ink); border-radius: 12px; background: var(--white);
  padding: 0.6rem 0.95rem;
}
.field select:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red); }

.field-error {
  margin: -0.35rem 0 0; padding: 0.55rem 0.8rem; font-weight: 600;
  background: var(--white); border: var(--line) solid var(--red); border-radius: 12px;
}
.field-error[hidden] { display: none; }

/* ——— Фишки: radio под видом наклеек ——— */

.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips legend { padding: 0; margin-bottom: 0.4rem; }
.chips[aria-invalid="true"] .chip > span { border-color: var(--red); }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip > span, .chip-static {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.4rem 1rem;
  border: var(--line) solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink);
  font-weight: 700; font-size: 1rem; line-height: 1.25;
  transition: background-color 0.2s ease, rotate 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.chip input:checked + span { background: var(--green); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.chip:hover input:not(:checked) + span { background: var(--paper); }

/* ——— Плёнка ——— */

.reel-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.reel-head { display: grid; gap: 0.4rem; max-width: 40rem; }
.reel-head p { font-size: 1.0625rem; }

.film-wrap {
  --holes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Crect x='5' y='2' width='13' height='8' rx='2.5' fill='%23ffffff'/%3E%3C/svg%3E");
  position: relative;
  background: var(--ink); color: var(--white);
  margin-inline: calc(-1 * var(--gap));
  padding-block: 1.5rem;
  border-block: var(--line) solid var(--ink);
}
.film-wrap::before, .film-wrap::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: var(--holes) 6px 0 / 24px 12px repeat-x;
}
.film-wrap::before { top: 0.4rem; }
.film-wrap::after { bottom: 0.4rem; }
.film-note {
  margin: 0.4rem var(--gap) 0.9rem; color: var(--white); font-weight: 700; font-size: 1rem; max-width: 46ch;
}
.film {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(70vw, 19rem);
  gap: 0.75rem; margin: 0; padding: 0 var(--gap) 0.6rem; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gap);
  scrollbar-color: var(--white) var(--ink);
}
.film:focus-visible { outline-color: var(--white); outline-offset: -3px; }
.cell {
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--white); color: var(--ink);
  border-radius: 14px; padding: 0.6rem 0.6rem 0.85rem;
}
.shot {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border: var(--line) solid var(--ink); border-radius: 10px; background: var(--blue);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot .shot-no {
  position: absolute; top: 0.4rem; left: 0.4rem;
  display: grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 0.4rem;
  font-family: var(--display); font-weight: 900; font-size: 1.15rem;
  background: var(--white); border: var(--line) solid var(--ink); border-radius: 999px;
}
.shot-plate { display: grid; place-items: center; }
.shot-plate .shot-no {
  position: static; background: none; border: 0; padding: 0; height: auto;
  font-size: clamp(4.5rem, 22vw, 6.5rem); line-height: 1; letter-spacing: -0.04em;
}
/* На красном и зелёном номер чернилами, на синем и чернильном — белым */
.plate-red { background: var(--red); color: var(--ink); }
.plate-green { background: var(--green); color: var(--ink); }
.plate-blue { background: var(--blue); color: var(--white); }
.plate-ink { background: var(--ink); color: var(--white); border-color: var(--ink); outline: 3px solid var(--white); outline-offset: -6px; }
.cell-meta { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1rem; }
.time {
  font-family: var(--display); font-weight: 900; font-size: 0.95rem; font-variant-numeric: tabular-nums;
  background: var(--ink); color: var(--white); border-radius: 999px; padding: 0.1rem 0.55rem;
}
.cell h3 { font-size: 1.2rem; line-height: 1.1; }
.cell-tag {
  align-self: start; font-weight: 700; font-size: 1rem; line-height: 1.25;
  background: var(--green); border: 2px solid var(--ink); border-radius: 10px; padding: 0.2rem 0.55rem;
}
.cell-text {
  font-size: 1rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Реплика рассказчика под сценой */
.say {
  position: relative; margin: 0.15rem 0 0; padding: 0.6rem; border: 2px solid var(--ink); border-radius: 12px;
  display: grid; gap: 0.45rem; background: var(--white);
}
.say-label { padding: 0; font-family: var(--display); font-weight: 900; font-size: 1rem; color: var(--blue); }
fieldset.say > legend { float: left; width: 100%; margin-bottom: 0.1rem; }
.say-text { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.say .chip { display: flex; }
.say .chip > span { display: block; border-radius: 10px; border-width: 2px; font-size: 1rem; font-weight: 600; padding: 0.45rem 0.7rem; width: 100%; }
.say-one { padding-right: 3.6rem; }
.say-one .play { position: absolute; right: 0.5rem; bottom: 0.5rem; }
.say .play { justify-self: start; }

.play {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none;
  border: var(--line) solid var(--ink); border-radius: 50%; background: var(--blue); color: var(--white); cursor: pointer;
}
.play[hidden] { display: none; }
.play svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.play .i-stop { display: none; }
.play[aria-pressed="true"] { background: var(--red); color: var(--ink); }
.play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-stop { display: block; }

/* ——— Дорожка музыки ——— */

.lane {
  margin: 0; padding: 0.9rem 1rem 1rem;
  background: var(--blue); color: var(--white);
  border: var(--line) solid var(--ink); border-radius: var(--radius);
}
.lane-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.lane-head { display: flex; align-items: center; gap: 0.9rem; flex: 1 1 100%; }
.lane-name { font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.wave { flex: 1; height: 1.5rem; min-width: 4rem; fill: var(--white); }
.lane-chips { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; }
.lane-pick { display: inline-flex; align-items: center; gap: 0.35rem; }
.lane .chip input:focus-visible + span, .lane .play:focus-visible { outline-color: var(--white); }
.lane .play { background: var(--white); color: var(--ink); }
.lane .play[aria-pressed="true"] { background: var(--red); }
.lane[aria-invalid="true"] { border-color: var(--red); }

/* ——— Купон запуска ——— */

.make-coupon {
  position: relative; display: grid; gap: 0.9rem;
  background: var(--paper); color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: var(--radius);
  outline: 3px dashed var(--yellow); outline-offset: 7px;
  padding: clamp(1.1rem, 4vw, 1.6rem);
  margin: 10px;
}
.make-coupon .field, .make-coupon .check { margin-bottom: 0; }
.make-coupon .field-error { margin-top: -0.4rem; }

.paybar {
  position: sticky; bottom: 0; z-index: 5;
  margin-inline: calc(-1 * var(--gap));
  padding: 0.7rem var(--gap) calc(0.7rem + env(safe-area-inset-bottom));
  background: var(--white); border-top: var(--line) solid var(--ink);
}
.paybar .pay { margin-top: 0; font-size: 1.05rem; padding-inline: 0.8rem; }
/* editor.js: пока кнопка висит у низа экрана, строку под ней прячем, чтобы полоса была низкой */
.paybar.is-stuck .pay-note { display: none; }
.paybar-end { display: block; height: 1px; grid-column: 1 / -1; }
.paybar .pay-note { margin-top: 0.45rem; font-size: 1rem; text-align: center; }

.alert {
  margin-top: clamp(1.25rem, 4vw, 2rem);
  display: grid; gap: 0.35rem; justify-items: start;
  background: var(--white); border: var(--line) solid var(--red); border-radius: 14px; padding: 0.9rem 1.1rem;
}
.alert a { font-weight: 700; }

.page-make .foot { margin-top: 0; }

/* ——— Широкий экран: стол в три колонки ——— */

@media (min-width: 960px) {
  .make {
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr) minmax(19rem, 22rem);
    grid-template-areas:
      "poster head launch"
      "poster hero launch"
      "reel reel reel";
    column-gap: clamp(1.75rem, 3vw, 2.75rem);
    row-gap: 1.5rem;
    padding-top: 2.75rem;
  }
  .desk-head { grid-area: head; align-self: end; }
  .poster { grid-area: poster; justify-self: start; max-width: none; margin-top: 0.75rem; }
  .make > .hero-card { grid-area: hero; }
  .make > .reel-sec { grid-area: reel; margin-top: 1.5rem; padding-bottom: clamp(3rem, 6vw, 4.5rem); }
  .launch { grid-area: launch; display: grid; gap: 1.25rem; align-content: start; }
  .launch > * { grid-column: auto; }
  .paybar { position: static; margin: 0 10px; padding: 0; background: none; border: 0; }
  .paybar .pay-note { text-align: left; }
  .desk-head h1 { font-size: clamp(2.8rem, 4.6vw, 4.2rem); }
  .pt-name { font-size: 1.55rem; }
  .pt-phrase { font-size: 0.9rem; }

  .film-wrap { margin-inline: 0; border-radius: var(--radius); padding-block: 1.6rem 1.4rem; }
  .film-note { margin-inline: 1rem; }
  .film { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; padding: 0 0.75rem 0.4rem; gap: 0.6rem; }
  .shot { aspect-ratio: 4 / 5; }
  .shot-plate .shot-no { font-size: 4.25rem; }
  .paybar.is-stuck .pay-note { display: block; }
  .paybar-end { display: none; }
  .cell h3 { font-size: 1.1rem; }
  .lane-head { flex: 0 0 auto; }
  .wave { width: 9rem; flex: none; }
  .paybar .pay { font-size: 1.15rem; }
}

/* Повороты — наклейки и выбранные фишки — только когда движение не мешает */
@media (prefers-reduced-motion: no-preference) {
  .poster-frame, .poster::before { rotate: 2deg; }
  .poster-sticker { rotate: -6deg; }
  .chip input:checked + span { rotate: -2deg; }
  .say .chip input:checked + span { rotate: -0.6deg; }
  .photo[data-state="checking"] .photo-thumb { animation: blink 1.1s ease-in-out infinite; }
}
@keyframes blink { 50% { opacity: 0.55; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ——— Экран заказа (макет assembly.html): выбор героя, сборка, готово ———
   Тот же стол и та же плёнка, только ячейки заполняются кадрами ребёнка. Ждущая ячейка — пустое окно с пунктиром,
   рисуемая — кремовая с карандашом, готовая — кадр, оживлённая — клип. Жёлтое — только главные кнопки после оплаты. */

.asm { padding-block: clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 8vw, 5rem); }
.asm-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 1.75rem); }
.asm h1:focus { outline: none; }
.asm-head { display: grid; gap: 0.55rem; max-width: 48rem; }
.asm .folio { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; font-size: 1rem; font-weight: 700; }
.asm-head h1, .done-head h1 { font-size: clamp(2.3rem, 9vw, 4.2rem); letter-spacing: -0.035em; overflow-wrap: anywhere; }
.asm-head .lead { font-size: 1.0625rem; font-weight: 600; max-width: 52ch; }
.stage-chip {
  font-weight: 700; font-size: 0.875rem; line-height: 1.4;
  border: 2px solid var(--ink); border-radius: 999px; padding: 0.05rem 0.6rem; background: var(--green);
}
.status-bad { border-color: var(--red); }

.mail-note {
  max-width: 48rem; font-size: 1rem;
  background: var(--paper); border: 2px dashed var(--ink); border-radius: 12px; padding: 0.8rem 1rem;
}

/* ——— Герои: три карточки-radio ——— */

.heroes {
  border: 0; margin: 0; padding: 0; list-style: none; min-inline-size: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.6rem, 2.5vw, 1.4rem);
  max-width: 46rem;
}
.hero-opt { position: relative; display: block; cursor: pointer; }
.hero-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
/* Приводка под выбранным: красная форма сдвинута, как под кадрами */
.hero-opt::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  background: var(--red); translate: 8px 8px; opacity: 0;
}
.hero-opt:has(input:checked)::before { opacity: 1; }
.hero-body {
  position: relative; display: grid; gap: 0.45rem; height: 100%;
  padding: clamp(0.35rem, 1.5vw, 0.65rem) clamp(0.35rem, 1.5vw, 0.65rem) 0.55rem;
  background: var(--white); border: var(--line) solid var(--ink); border-radius: 14px;
  transition: background-color 0.2s ease, rotate 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-pic {
  position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 3 / 4;
  border: var(--line) solid var(--ink); border-radius: 10px; background: var(--paper);
}
.hero-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.hero-name {
  display: flex; align-items: center; justify-content: center; gap: 0.35rem; min-height: 1.6rem;
  font-family: var(--display); font-weight: 900; font-size: clamp(0.9rem, 3.4vw, 1.15rem); line-height: 1.1; text-align: center;
}
.hero-mark { display: none; place-items: center; width: 1.5rem; height: 1.5rem; flex: none; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); }
.hero-mark .i-check { width: 0.95rem; height: 0.95rem; }
.hero-opt input:checked + .hero-body { background: var(--green); }
.hero-opt input:checked + .hero-body .hero-mark { display: inline-grid; }
.hero-opt input:focus-visible + .hero-body { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero-opt:hover input:not(:checked) + .hero-body { background: var(--paper); }
.hero-wait { cursor: default; }
.hero-pic-wait .i-pencil, .shot-draw .i-pencil { width: 42%; }

.pick { display: grid; gap: 1rem; max-width: 46rem; }
.pick .field-error { margin: 0; }
.pick-actions .pay { margin-top: 0.25rem; max-width: 30rem; }
.pick[aria-busy="true"] .pay { border-style: dashed; pointer-events: none; }
.reroll { display: grid; gap: 0.45rem; justify-items: start; max-width: 46rem; }
.reroll .pay { width: auto; margin-top: 0; min-height: 3.2rem; font-size: 1.05rem; }
.reroll .pay-note { margin: 0; font-size: 1rem; max-width: 46ch; }

/* ——— Сборка: этапы, строка "сейчас", плёнка, дорожки ——— */

.run { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.track {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  font-family: var(--display); font-weight: 900; font-size: 0.95rem; line-height: 1.1;
}
.track li {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.4rem; padding: 0.3rem 0.85rem;
  border: var(--line) solid var(--ink); border-radius: 999px; background: var(--white);
}
.track .ok { background: var(--green); }
.track .now { background: var(--blue); color: var(--white); }
.track .todo { border-style: dashed; }
.i-check { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.now-line { font-family: var(--display); font-weight: 900; font-size: clamp(1.25rem, 4.6vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }

.film-run { padding-block: 1.6rem 1.4rem; }
.film-run .film { grid-auto-columns: min(46vw, 13rem); padding-top: 0.2rem; }
.run-cell { gap: 0.4rem; transition: translate 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.run-cell .shot { aspect-ratio: 3 / 4; }
.shot video { width: 100%; height: 100%; object-fit: cover; }
.run-cell h3 { font-size: 1.05rem; }
.run-cell .cell-meta { font-size: 0.95rem; }
.cell-status { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.run-cell[aria-busy="true"] { outline: 3px solid var(--green); outline-offset: 3px; }
.run-cell[aria-busy="true"] .cell-status { color: var(--blue); }

/* Ждущая ячейка — пустое окно плёнки: белое, пунктир, крупный номер */
.shot-wait { background: var(--white); color: var(--ink); border-style: dashed; outline: 0; }
.shot-draw { display: grid; place-items: center; background: var(--paper); }
.cell-badge {
  position: absolute; right: 0.4rem; bottom: 0.4rem;
  font-family: var(--display); font-weight: 900; font-size: 0.875rem; line-height: 1.2;
  border: 2px solid var(--ink); border-radius: 999px; padding: 0.15rem 0.55rem; background: var(--green); color: var(--ink);
}
.badge-move { background: var(--blue); color: var(--white); }
.badge-live { background: var(--red); color: var(--ink); }

.run-lanes { display: grid; gap: 0.6rem; }
.lane-run { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.75rem 1rem; }
.lane-run .lane-name { font-size: 1.1rem; overflow-wrap: anywhere; }
.lane-run .wave { flex: 1 1 4rem; min-width: 3rem; max-width: 16rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.2; }
.wave .on { fill: currentColor; stroke: none; }
.lane-state { font-weight: 700; margin-left: auto; }
.lane-ready { background: var(--green); color: var(--ink); }

/* ——— Готово: ролик крупно, под ним скачать и поделиться ——— */

.asm-done { grid-template-areas: "head" "player" "actions"; gap: clamp(1.5rem, 5vw, 2.25rem); }
.done-head { grid-area: head; display: grid; gap: 0.75rem; justify-items: start; }
.done-player { grid-area: player; position: relative; justify-self: center; width: min(78vw, 20rem); }
.done-player::before {
  content: ""; position: absolute; inset: 0; border-radius: calc(var(--radius) + 6px);
  background: var(--red); translate: 10px 10px;
}
.player-frame {
  position: relative; overflow: hidden; aspect-ratio: 432 / 756;
  border: 6px solid var(--white); outline: var(--line) solid var(--ink); border-radius: var(--radius);
  background: var(--ink);
}
.player-frame video { width: 100%; height: 100%; object-fit: contain; background: var(--ink); }
.player-sticker { top: -0.9rem; left: -0.7rem; background: var(--green); font-size: 1rem; }
.final-title {
  display: grid; gap: 0.15rem; padding: 0.65rem 1rem 0.75rem; border-radius: 12px;
  background: var(--ink); color: var(--white);
  font-family: var(--display); font-weight: 900; line-height: 1.05; letter-spacing: -0.01em;
}
.final-title .pt-name { font-size: clamp(1.35rem, 6vw, 2rem); overflow-wrap: anywhere; }
.final-title .pt-phrase { font-size: clamp(0.95rem, 3.4vw, 1.15rem); }
.done-actions { grid-area: actions; display: grid; gap: 1rem; justify-items: start; max-width: 34rem; }
.done-actions .lead { font-size: 1.0625rem; }
.done-actions .pay { margin-top: 0; }
.done-actions .again { width: auto; min-height: 3.2rem; font-size: 1.05rem; }
.share { display: grid; gap: 0.45rem; width: 100%; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.share-row input {
  flex: 1 1 14rem; min-width: 0; min-height: 3.2rem; font: inherit; font-size: 1rem; color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: 12px; background: var(--white); padding: 0.6rem 0.9rem;
}
.share-row input:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.share-copy { width: auto; margin-top: 0; min-height: 3.2rem; font-size: 1.05rem; }
.share-copy[hidden] { display: none; }
.share-done:empty { display: none; }
.share-done { font-weight: 700; }
.watch { padding-block: clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 8vw, 5rem); }

@media (min-width: 960px) {
  .film-run .film { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); }
  .run-cell .shot { aspect-ratio: 3 / 4; }
  .asm-done {
    grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
    grid-template-areas: "player head" "player actions";
    column-gap: clamp(3rem, 6vw, 5rem); row-gap: 1.25rem; align-content: center;
  }
  .done-head { align-self: end; }
  .done-actions { align-self: start; }
  .done-player { width: 100%; justify-self: start; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-opt input:checked + .hero-body { rotate: -2deg; }
  .done-player::before, .player-frame { rotate: 1.5deg; }
  .player-sticker { rotate: -6deg; }
  .run-cell[aria-busy="true"] { translate: 0 -4px; }
  .shot-draw .i-pencil, .hero-pic-wait .i-pencil { animation: scribble 1.2s ease-in-out infinite; transform-origin: 20% 80%; }
  .badge-move { animation: blink 1.1s ease-in-out infinite; }
  .run-cell.is-new .shot { animation: pop 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
}
@keyframes scribble { 0%, 100% { rotate: -8deg; translate: -6% 0; } 50% { rotate: 6deg; translate: 6% -4%; } }
@keyframes pop { from { scale: 0.92; } to { scale: 1; } }
