/* Отклик на действие (план движения): бирка заказа, кадр вещи с макетом, счётчик, мини-сцена, прогон принта,
   маршрутный лист, шов на первом экране, бросок файла. Только transform и opacity, кроме масок раскрытия;
   один раз, без петель. Без движения (reduced motion) всё стоит сразу на месте. */

/* ---------- цифра счётчика перекатывается ---------- */
.roll { display: inline-block; }
.roll.is-roll { animation: roll var(--dur-state) var(--ease-out); }
@keyframes roll { from { transform: translateY(-70%); opacity: 0; } }

/* ---------- кадр вещи с макетом: квадрат, вещь, поверх макет ---------- */
.ps { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--paper); }
.ps > .gm { position: absolute; inset: 0; width: auto; height: auto; }
.ps .shot { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ps .art { position: absolute; display: grid; place-items: center; cursor: default; overflow: hidden; }
.ps .art__body { position: absolute; inset: 0; display: grid; place-items: center; }

/* ---------- бирка заказа ---------- */
.otag {
  position: fixed;
  z-index: 75;
  display: grid;
  gap: 8px;
  color: var(--ink);
  pointer-events: auto;
  touch-action: pan-x;
}
.otag[hidden] { display: none; }
.otag__card {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 12px 12px 12px 22px;
  background: var(--paper);
  box-shadow: 0 0 0 .5px rgba(11, 11, 11, .14), 0 18px 40px -18px rgba(11, 11, 11, .45);
  /* срезанные углы слева, как у навесного ярлыка */
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}
.otag__hole {
  position: absolute;
  left: 8px; top: 50%;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(11, 11, 11, .35);
}
.otag__pic { width: 88px; }
.otag__info { display: grid; gap: 3px; min-width: 0; }
.otag__no, .otag__data, .otag__file {
  font: 400 var(--fs-d) / 1.35 var(--mono);
  font-stretch: 87.5%;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--mute);
  overflow-wrap: anywhere;
}
.otag__file { text-transform: none; color: var(--ink); }
.otag__name { font: 600 18px / 1.15 var(--font); }
.otag__x { width: 44px; height: 44px; margin: -10px -10px 0 0; background: transparent; }
.otag__act { display: flex; gap: 8px; align-items: stretch; }
.otag__act .btn { flex: 1 1 auto; }
.otag__more {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 0 14px;
  font: 500 15px / 1.15 var(--font);
  background: var(--glass-solid, #F3F3F1);
  box-shadow: var(--glass-lift);
  text-align: center;
}
.otag.is-in { animation: tagIn var(--dur-big) var(--ease-big) both; }
@keyframes tagIn { from { transform: translateY(14px); opacity: 0; } }
.otag.is-gone { opacity: 0; transition: opacity var(--dur-state); }
.otag.is-fly { transition: transform .45s var(--ease-big), opacity .45s var(--ease-big); transform-origin: 50% 50%; }
@media (max-width: 1023px) {
  .otag__act { flex-wrap: wrap; }
  .otag__act > * { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .otag.is-in { animation: none; }
}

/* ---------- строки корзины — те же бирки ---------- */
.ci { grid-template-columns: 80px minmax(0, 1fr) auto; }
.ci__media { width: 80px; height: auto; background: none; }
.ci__media .ps { box-shadow: inset 0 0 0 .5px rgba(11, 11, 11, .1); }
.ci__no, .ci__data, .ci__file {
  font: 400 var(--fs-d) / 1.35 var(--mono);
  font-stretch: 87.5%;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--mute);
  overflow-wrap: anywhere;
}
.ci__file { text-transform: none; color: var(--ink); }
.ci__sum { font-weight: 500; font-size: var(--fs-m); margin-top: 4px; }
/* узкий телефон: количество под данными, чтобы бирка не дробилась на слоги */
@media (max-width: 359px) {
  .ci { grid-template-columns: 64px minmax(0, 1fr); }
  .ci__media { width: 64px; }
  .ci__act { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }
}

/* ---------- мини-сцена в шторке конструктора (телефон) ---------- */
.pv__minibar { position: sticky; top: 0; height: 0; z-index: 6; }
.pv__mini {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter));
  height: 140px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 12px var(--gutter);
  background: var(--paper);
  box-shadow: 0 1px 0 var(--tone-2), 0 14px 24px -20px rgba(11, 11, 11, .5);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-16px);
  transition: opacity var(--dur-state) var(--ease-out), transform var(--dur-state) var(--ease-out), visibility 0s linear var(--dur-state);
}
.pv.is-mini .pv__mini { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-state) var(--ease-out), transform var(--dur-state) var(--ease-out), visibility 0s; }
.pv__mini__g { width: 116px; background: var(--paper); }
.pv__mini__g > div.gm { position: absolute; inset: 0; width: auto; height: auto; }
.pv__mini__txt { display: grid; gap: 4px; min-width: 0; }
.pv__mini__txt b { font: 600 16px / 1.2 var(--font); }
.pv__mini__txt span {
  font: 400 var(--fs-d) / 1.35 var(--mono);
  font-stretch: 87.5%;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--mute);
}
.pv__mini__up { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1024px) { .pv__minibar { display: none; } }
@media (prefers-reduced-motion: reduce) { .pv__mini { transition: none; transform: none; } }

/* ---------- маршрутный лист заявки ---------- */
.ord__id { display: grid; gap: 4px; }
.route { display: grid; border-top: 1px solid var(--tone-2); }
.route__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--tone-2);
  color: var(--mute);
}
.route__row.is-done { color: var(--ink); }
.route__n { font: 400 var(--fs-d) / 1 var(--mono); color: var(--mute); }
.route__t { display: grid; gap: 2px; font-size: var(--fs-s); line-height: var(--lh-s); }
.route__t small { font: 400 var(--fs-d) / 1.35 var(--mono); font-stretch: 87.5%; letter-spacing: .02em; text-transform: uppercase; color: var(--mute); }
.route__stamp {
  justify-self: end;
  padding: 5px 8px 4px;
  box-shadow: inset 0 0 0 1.5px var(--sig);
  color: var(--sig-ink);          /* штамп: коралловая рамка, текст темнее для контраста */
  font: 500 var(--fs-d) / 1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.route__stamp.is-new { animation: stamp .2s var(--ease-out) both; }
@keyframes stamp { from { transform: rotate(-4deg) scale(1.35); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.route__empty { justify-self: end; width: 64px; height: 22px; box-shadow: inset 0 0 0 1px var(--tone-2); }
@media (prefers-reduced-motion: reduce) { .route__stamp.is-new { animation: none; } }

/* ---------- шов на первом экране: слева бланк, справа тот же бланк с принтом ---------- */
.hero__stage { container-type: size; }
.seam {
  position: relative;
  width: min(100cqw, 100cqh);
  aspect-ratio: 1;
  margin: auto;
}
.seam__a, .seam__b { position: absolute; inset: 0; }
.seam__a > .gm, .seam__b > .gm { position: absolute; inset: 0; width: auto; height: auto; max-width: none; }
.seam__b { clip-path: inset(0 0 0 var(--seam, 50%)); pointer-events: none; }
.seam__art { position: absolute; inset: 0; z-index: 1; }
.seam__art .shot { position: absolute; inset: 0; }
.seam__art .art { position: absolute; display: grid; place-items: center; overflow: hidden; }
.seam__art .art__body { position: absolute; inset: 0; display: grid; place-items: center; }
.seam.on-light .seam__art .art--asis .art__img { mix-blend-mode: multiply; }
.seam__h {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--seam, 50%);
  z-index: 3;
  width: 44px;
  margin-left: -22px;
  display: grid;
  place-items: center;
  cursor: ew-resize;
  touch-action: pan-y;          /* вертикальная прокрутка страницы свободна */
}
.seam__h::before {
  content: "";
  position: absolute;
  top: 6%; bottom: 6%;
  left: 50%;
  width: 1px;
  background: rgba(11, 11, 11, .45);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .6);
}
.seam__h i {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--glass-bg, rgba(255, 255, 255, .85));
  box-shadow: var(--glass-lift);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  transition: transform var(--dur-press) var(--ease-out);
}
.seam__h svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.seam.is-drag .seam__h i { transform: scale(1.08); }
.seam__h:focus-visible { outline: none; }
.seam__h:focus-visible i { outline: 2px solid var(--ink); outline-offset: 3px; }
.seam.is-intro .seam__b { transition: clip-path .7s var(--ease-big); }
.seam.is-intro .seam__h { transition: left .7s var(--ease-big); }
.seam__l, .seam__r {
  position: absolute;
  bottom: 2%;
  z-index: 2;
  font: 400 var(--fs-d) / 1 var(--mono);
  font-stretch: 87.5%;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--mute);
  pointer-events: none;
}
.seam__l { left: 4%; }
.seam__r { right: 4%; }
@media (prefers-reduced-transparency: reduce) { .seam__h i { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; } }

/* ---------- бросок файла на вещь (компьютер) ---------- */
.seam__drop {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--sig);
  background: rgba(232, 115, 74, .06);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-state) var(--ease-out), background var(--dur-state);
}
.seam__drop span { padding: 8px 12px; background: var(--paper); font: 500 var(--fs-s) / 1.2 var(--font); text-align: center; box-shadow: 0 1px 3px rgba(11, 11, 11, .12); }
html.is-dragfile .seam__drop { opacity: .7; }
.hero.is-over .seam__drop { opacity: 1; background: rgba(232, 115, 74, .12); }
.pv__box.is-over { outline: 1.5px dashed var(--sig); outline-offset: -6px; }
html.is-dragfile .pv.is-open .zone__empty { box-shadow: inset 0 0 0 1.5px var(--sig); }

/* строки приёмки файла появляются по одной, с реальным результатом каждой проверки */
.pt__checks.is-in li { animation: checkIn var(--dur-state) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 140ms); }
@keyframes checkIn { from { opacity: 0; transform: translateY(4px); } }
.pt__intake { padding-top: 4px; }
