/* ==========================================================================
   NFC Lipa — экран верификации
   Дизайн-токены из design.md (Stripi). UX-правила: ui-ux-pro-max.
   ========================================================================== */

:root {
  /* Brand & accent */
  --primary: #533afd;
  --primary-deep: #4434d4;
  --primary-press: #2e2b8c;
  --primary-soft: #665efd;
  --primary-subdued: #b9b9f9;
  --brand-dark-900: #1c1e54;
  --ruby: #ea2261;
  --magenta: #f96bee;
  --lemon: #f5e9d4;

  /* Gradient mesh — RGB-каналы (без альфы), переопределяются темой партнёра.
     applyTheme() в script.js ставит --mesh-1..4 из theme.mesh[]. */
  --mesh-1: 102 94 253;  /* primary-soft */
  --mesh-2: 83 58 253;   /* primary */
  --mesh-3: 249 107 238; /* magenta */
  --mesh-4: 234 34 97;   /* ruby */

  /* Surface */
  --canvas: #ffffff;
  --canvas-soft: #f6f9fc;
  --canvas-cream: #f5e9d4;
  --hairline: #e3e8ee;
  --hairline-input: #a8c3de;

  /* Text */
  --ink: #0d253d;
  --ink-secondary: #273951;
  --ink-mute: #64748d;
  --on-primary: #ffffff;
  --on-primary-muted: rgba(255, 255, 255, 0.85);
  --on-primary-line: rgba(255, 255, 255, 0.22);

  /* Чип «подлинность» / бейдж — переопределяются темой (в т.ч. тёмной) */
  --chip-bg: var(--primary-subdued);
  --chip-fg: var(--primary-deep);

  /* Верхний световой блик mesh (RGB-триплет + альфа), темизируется */
  --mesh-glow: 245 233 212;
  --mesh-glow-a: 0.9;

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 9999px;

  /* Spacing (8pt) */
  --s-xxs: 2px;
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-xxl: 32px;
  --s-huge: 64px;

  /* Elevation */
  --shadow-1: rgba(0, 55, 112, 0.08) 0 1px 3px;
  --shadow-2: rgba(0, 55, 112, 0.08) 0 8px 24px, rgba(0, 55, 112, 0.04) 0 2px 6px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* display:flex/inline-flex на .result и .btn перебивает браузерный
   [hidden]{display:none}, поэтому форсируем скрытие явно. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", "SF Pro Display", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------------------
   Gradient mesh — атмосферный фон на верхней трети
   -------------------------------------------------------------------------- */
.mesh {
  position: fixed;
  inset: 0 0 auto 0;
  height: 46vh;
  min-height: 320px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 12% 8%, rgb(var(--mesh-glow) / var(--mesh-glow-a)) 0%, rgb(var(--mesh-glow) / 0) 60%),
    radial-gradient(55% 75% at 32% 4%, rgb(var(--mesh-3) / 0.32) 0%, rgb(var(--mesh-3) / 0) 55%),
    radial-gradient(60% 85% at 58% 0%, rgb(var(--mesh-1) / 0.42) 0%, rgb(var(--mesh-1) / 0) 58%),
    radial-gradient(60% 90% at 82% 6%, rgb(var(--mesh-2) / 0.34) 0%, rgb(var(--mesh-2) / 0) 60%),
    radial-gradient(50% 70% at 98% 0%, rgb(var(--mesh-4) / 0.28) 0%, rgb(var(--mesh-4) / 0) 55%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  min-height: 100dvh;
  /* верхний отступ тянется по высоте экрана, но не разрастается */
  padding: clamp(16px, 4vh, 48px) var(--s-xl) clamp(24px, 4vh, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Brand / logo slot */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-md);
}

.brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--logo-padding, var(--s-md) var(--s-xl));
  background: var(--logo-bg, var(--canvas));
  border-radius: var(--r-lg);
  box-shadow: var(--logo-shadow, var(--shadow-1));
}

.brand__logo img {
  display: block;
  max-height: 40px;
  max-width: 200px;
  width: auto;
}

.brand__name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.4px;
  color: var(--ink);
}

.brand__eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* --------------------------------------------------------------------------
   Verify block
   -------------------------------------------------------------------------- */
.verify {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3.5vh, 32px);
  padding: clamp(16px, 3vh, 32px) 0;
}

/* Emblem (центральный индикатор) */
.emblem {
  position: relative;
  width: clamp(96px, 16vh, 132px);
  height: clamp(96px, 16vh, 132px);
  flex: none;
  display: grid;
  place-items: center;
}

.emblem__pulse {
  position: absolute;
  width: 82%;
  height: 82%;
  border-radius: var(--r-pill);
  background: var(--primary);
  opacity: 0.18;
  animation: pulse 2s var(--ease-out) infinite;
}

.emblem__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.emblem__track {
  fill: none;
  stroke: var(--hairline);
  stroke-width: 6;
}

.emblem__progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.6s var(--ease-out), stroke 0.4s ease;
}

/* Вращение во время проверки */
.emblem[data-state="checking"] .emblem__ring {
  animation: spin 1.4s linear infinite;
}

.emblem[data-state="checking"] .emblem__progress {
  stroke-dasharray: 90 339.292;
  stroke-dashoffset: 0;
}

/* Result icons (по умолчанию скрыты) */
.emblem__icon {
  position: absolute;
  width: 42%;
  height: 42%;
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out);
}

.emblem__icon--check { stroke: var(--primary); }
.emblem__icon--cross { stroke: var(--ruby); }

.emblem__pulse,
.emblem__progress { will-change: transform, stroke-dashoffset; }

/* Состояние: подлинный */
.emblem[data-state="authentic"] .emblem__progress {
  stroke: var(--primary);
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
}
.emblem[data-state="authentic"] .emblem__icon--check {
  opacity: 1;
  transform: scale(1);
}
.emblem[data-state="authentic"] .emblem__pulse { animation: none; opacity: 0.14; }

/* Состояние: не подлинный */
.emblem[data-state="invalid"] .emblem__progress {
  stroke: var(--ruby);
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
}
.emblem[data-state="invalid"] .emblem__track { stroke: #f7d7e1; }
.emblem[data-state="invalid"] .emblem__icon--cross {
  opacity: 1;
  transform: scale(1);
}
.emblem[data-state="invalid"] .emblem__pulse { background: var(--ruby); animation: none; opacity: 0.12; }

/* --------------------------------------------------------------------------
   Checking state
   -------------------------------------------------------------------------- */
.checking__title {
  margin: 0 0 var(--s-sm);
  font-size: clamp(24px, 4.5vh, 32px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.64px;
}

.checking__subtitle {
  margin: 0 0 clamp(20px, 3.5vh, 32px);
  font-size: 16px;
  color: var(--ink-mute);
}

/* Полоска прогресса — компактная замена крутящемуся кольцу */
.progress {
  width: 100%;
  max-width: 340px;
  height: 6px;
  margin: 0 auto clamp(20px, 3.5vh, 32px);
  background: var(--hairline);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.5s var(--ease-out);
  will-change: width;
}

.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
  text-align: left;
  width: 100%;
  max-width: 340px;
}

.step {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  padding: clamp(10px, 1.6vh, 14px) var(--s-lg);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), border-color 0.3s ease;
}

.step.is-visible { opacity: 1; transform: translateY(0); }
.step.is-active { border-color: var(--primary-subdued); }
.step.is-done { border-color: var(--hairline); }

.step__indicator {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.step__spinner {
  width: 24px;
  height: 24px;
  transform: rotate(-90deg);
}
.step__spinner circle {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 42 56.5;
  opacity: 0;
}
.step.is-active .step__spinner { animation: spin 0.9s linear infinite; }
.step.is-active .step__spinner circle { opacity: 1; }

.step__done {
  position: absolute;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s var(--ease-out), transform 0.3s var(--ease-out);
}
.step.is-done .step__done { opacity: 1; transform: scale(1); }
.step.is-done .step__spinner circle { opacity: 0; }

.step__label {
  font-size: 15px;
  color: var(--ink-secondary);
}
.step.is-done .step__label { color: var(--ink); }

/* --------------------------------------------------------------------------
   Result state
   -------------------------------------------------------------------------- */
.result {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 920px;
  gap: clamp(16px, 2vh, 24px);
}

/* Дочерние блоки анимируются раздельно с небольшим стаггером */
.result .verify-banner,
.result .card {
  opacity: 0;
  transform: translateY(18px);
}

.result.is-shown .verify-banner {
  animation: fadeSlideUp 0.55s var(--ease-out) 0.05s forwards;
}

.result.is-shown .card {
  animation: fadeSlideUp 0.55s var(--ease-out) 0.22s forwards;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Негативный результат — товар скрыт, блок уже */
.result.is-invalid {
  max-width: 620px;
}

/* Контейнер фокусируется программно только для скринридеров —
   видимое кольцо вокруг всего блока не нужно. */
.result:focus {
  outline: none;
}

/* fade-out экрана проверки перед переходом */
.checking {
  transition: opacity 0.4s var(--ease-in);
}
.checking.is-fade-out {
  opacity: 0;
}

/* Универсальная карточка-контейнер */
.card {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}

/* --------------------------------------------------------------------------
   Баннер подтверждения (горизонтальный, активный цвет)
   -------------------------------------------------------------------------- */
.verify-banner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  width: 100%;
  padding: clamp(14px, 1.6vw, 22px) clamp(16px, 2vw, 28px);
  border-radius: var(--r-lg);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-2);
  text-align: left;
}

.verify-banner .emblem {
  flex: none;
  width: clamp(52px, 6vw, 68px);
  height: clamp(52px, 6vw, 68px);
  margin: 0;
}

.verify-banner__text {
  flex: 1 1 auto;
  min-width: 0;
}

/* Эмблема на активном баннере — штрихи цветом контента поверх primary */
.verify-banner .emblem__track { stroke: var(--on-primary-line); }
.verify-banner .emblem__pulse { background: var(--on-primary); opacity: 0.16; }
.verify-banner .emblem[data-state="authentic"] .emblem__progress { stroke: var(--on-primary); }
.verify-banner .emblem[data-state="authentic"] .emblem__icon--check { stroke: var(--on-primary); }

.verify-banner .result__title {
  color: var(--on-primary);
  margin-bottom: var(--s-xs);
  font-size: clamp(24px, 3vw, 30px);
}
.verify-banner .result__message {
  color: var(--on-primary-muted);
  margin-bottom: 0;
  max-width: 46ch;
  font-size: 13px;
}

/* Метаданные проверки — компактный кластер справа */
.verify-banner__meta {
  flex: none;
  display: flex;
  gap: clamp(20px, 2vw, 32px);
  margin: 0;
  padding-left: clamp(20px, 2vw, 32px);
  border-left: 1px solid var(--on-primary-line);
}
.verify-banner__meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-xs);
}
.verify-banner__meta dt {
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--on-primary-muted);
  white-space: nowrap;
}
.verify-banner__meta dd {
  margin: 0;
  font-size: 15px;
  color: var(--on-primary);
  white-space: nowrap;
}

/* Негативный результат — баннер не «активный», светлый вид с ruby-крестом */
.verify-banner--invalid {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.verify-banner--invalid .emblem__track { stroke: #f7d7e1; }
.verify-banner--invalid .result__title { color: var(--ink); }
.verify-banner--invalid .result__message { color: var(--ink-mute); }
.verify-banner--invalid .verify-banner__meta { border-left-color: var(--hairline); }
.verify-banner--invalid .verify-banner__meta dt { color: var(--ink-mute); }
.verify-banner--invalid .verify-banner__meta dd { color: var(--ink); }

.verify-banner--invalid {
  flex-wrap: wrap;
}
.verify-banner--invalid .verify-banner__meta {
  flex-basis: 100%;
  padding-left: 0;
  padding-top: var(--s-md);
  border-left: none;
  border-top: 1px solid var(--hairline);
  justify-content: space-between;
}

/* Метка подлинности внутри карточки товара */
.product__verified {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  align-self: flex-start;
  margin-bottom: var(--s-lg);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.product__verified svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Блок товара (десктоп): изображение + информация в две колонки
   -------------------------------------------------------------------------- */
.product {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(24px, 3.5vw, 48px);
  padding: clamp(24px, 3vw, 40px);
  text-align: left;
}

.product__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product__media-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-md);
  color: var(--ink-mute);
  font-size: 13px;
  letter-spacing: -0.2px;
}
.product__media-ph svg {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: var(--hairline-input);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.product__category {
  margin: 0 0 var(--s-sm);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.product__name {
  margin: 0 0 var(--s-md);
  font-size: 32px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.64px;
  color: var(--ink);
}
.product__desc {
  margin: 0 0 var(--s-xl);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.product__attrs {
  width: 100%;
  margin: 0 0 var(--s-xl);
}
.product__attr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-lg);
  padding: var(--s-md) 0;
  border-bottom: 1px solid var(--hairline);
}
.product__attr:last-child { border-bottom: none; }
.product__attr dt {
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: -0.2px;
}
.product__attr dd {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  text-align: right;
}

.product__cta {
  margin-top: auto;
}

.result__title {
  margin: 0 0 var(--s-md);
  font-size: clamp(26px, 5vh, 36px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.8px;
}

.result__message {
  margin: 0 0 clamp(16px, 2.5vh, 24px);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-mute);
}

.tnum {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Закрепление владения (прогрессивное раскрытие)
   -------------------------------------------------------------------------- */
.claim {
  padding: clamp(24px, 3vw, 40px);
  text-align: left;
}

/* Состояние 1: анонс */
.claim__teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 32px);
}
.claim__teaser-text { min-width: 0; }
.claim__title {
  margin: 0 0 var(--s-sm);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.claim__subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 52ch;
}
.claim__open { flex: none; }

/* Состояние 2: форма */
.claim__form-wrap {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideUp 0.35s var(--ease-out) forwards;
}
.claim__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-md);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-xs);
}
.field--wide { grid-column: 1 / -1; }
.field__label {
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: -0.2px;
}
.field__input {
  min-height: 44px;
  padding: var(--s-sm) var(--s-md);
  font-family: inherit;
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline-input);
  border-radius: var(--r-md);
  transition: border-color 0.2s ease;
}
.field__input:focus {
  outline: none;
  border-color: var(--primary);
}
.field--error .field__input { border-color: var(--ruby); }

.claim__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--s-sm);
  margin-top: var(--s-lg);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
.claim__consent--error {
  color: var(--ruby);
}
.claim__consent--error input {
  outline: 2px solid var(--ruby);
  outline-offset: 1px;
  border-radius: 2px;
}
.claim__consent input {
  margin: 0;
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--primary);
}

.claim__actions {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  margin-top: var(--s-xl);
}

/* Состояние 3: закреплено */
.claim__done {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideUp 0.35s var(--ease-out) forwards;
}
.claim__done:focus { outline: none; }

/* Строка-сводка «Текущий владелец» */
.claim__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--s-xs) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  border-radius: var(--r-sm);
  transition: opacity 0.15s ease;
}
.claim__summary:hover { opacity: 0.8; }
.claim__summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.claim__summary-left {
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
  min-width: 0;
}
.claim__summary-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.claim__summary-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.claim__summary-right {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  flex-shrink: 0;
  margin-left: var(--s-md);
  color: var(--ink-mute);
}
.claim__summary-date { font-size: 13px; }
.claim__summary-chevron {
  font-size: 15px;
  transition: transform 0.25s var(--ease-out);
  flex-shrink: 0;
}
.claim__summary--open .claim__summary-chevron {
  transform: rotate(180deg);
}

/* История владения (раскрывающаяся часть) */
.claim__history {
  border-top: 1px solid var(--hairline);
  margin-top: var(--s-lg);
  padding-top: var(--s-lg);
}
.claim__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.claim__badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.claim__done-title {
  margin: 0 0 var(--s-xs);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.claim__done-note {
  margin: 0 0 var(--s-md);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 600px;
}

/* Анимация выхода при переключении состояний claim */
@keyframes fadeSlideDown {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(8px); }
}
.claim__teaser.claim--exiting,
.claim__form-wrap.claim--exiting,
.claim__done.claim--exiting {
  animation: fadeSlideDown 0.18s var(--ease-out) forwards;
  pointer-events: none;
}

/* Таблица владельцев (компактный вид) */
.claim__owners-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  animation: fadeSlideUp 0.45s var(--ease-out) forwards;
}
.claim__owners-table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  font-size: 16px;
}
.claim__owners-table thead th {
  padding: var(--s-sm) var(--s-md);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  white-space: nowrap;
  background: var(--canvas-soft);
}
.claim__owners-table tbody td {
  padding: 10px var(--s-md);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  vertical-align: middle;
  white-space: nowrap;
}
.claim__owners-table tbody tr:last-child td {
  border-bottom: none;
}
.claim__owner-row--current {
  font-weight: 400;
}
.claim__owner-row--past {
  opacity: 0.55;
}
.claim__owner-row--past td {
  color: var(--ink-mute);
}
.claim__owner-cell {
  white-space: normal;
}
.claim__owner-name {
  display: block;
}
.claim__owner-date {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 300;
  color: var(--ink-mute);
}
.claim__status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.claim__status--current {
  background: var(--chip-bg);
  color: var(--chip-fg);
}
.claim__status--past {
  background: var(--canvas-soft);
  color: var(--ink-mute);
}

/* Зона кнопки «Добавить нового владельца» */
.claim__new-owner-area {
  margin-top: var(--s-lg);
}

/* --------------------------------------------------------------------------
   Рекомендации партнёра (слайдер Swiper)
   -------------------------------------------------------------------------- */
.recommend {
  padding: clamp(24px, 3vw, 40px);
  text-align: left;
}
.recommend__title {
  margin: 0 0 var(--s-lg);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.recommend__swiper {
  position: relative;
  overflow: hidden;
  /* отступы дают подъёму карточки и её тени место в зоне padding,
     иначе overflow:hidden обрезает верх/бока при hover */
  padding: 10px 10px 48px;
}

/* Карточка товара (слайд) */
.rec-card {
  display: flex;
  flex-direction: column;
  height: auto;
  text-decoration: none;
  color: inherit;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.rec-card:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--hairline);
  transform: translateY(-4px);
}
.rec-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--canvas-soft);
  display: grid;
  place-items: center;
}
.rec-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rec-card__media-ph svg {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: var(--hairline-input);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rec-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-xs);
  padding: var(--s-md) var(--s-lg) var(--s-lg);
}
.rec-card__category {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.rec-card__name {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rec-card__price {
  margin-top: var(--s-xs);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

/* Навигация (стрелки) */
.recommend__nav {
  position: absolute;
  top: 38%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--canvas);
  color: var(--ink-secondary);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.recommend__nav:hover { background: var(--canvas-soft); }
.recommend__nav:active { transform: translateY(1px); }
.recommend__nav .bi { font-size: 18px; line-height: 1; }
.recommend__nav--prev { left: 0; }
.recommend__nav--next { right: 0; }
.recommend__nav.swiper-button-disabled {
  opacity: 0.4;
  cursor: default;
  /* pointer-events: none убран намеренно: с ним клик "проваливается"
     сквозь кнопку на <a href="#"> слайд под ней и прокручивает страницу наверх */
}

/* Тема пагинации под токены Stripi */
.recommend .swiper-pagination-bullet {
  background: var(--ruby);
  opacity: 1;
}
.recommend .swiper-pagination-bullet-active { background: var(--primary); }

/* --------------------------------------------------------------------------
   Button (pill)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--s-md) var(--s-xl);
  border: none;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  gap: var(--s-sm);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn--primary:hover { background: var(--primary-deep); }
.btn--primary:active { background: var(--primary-press); transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--hairline);
}
.btn--ghost:hover { background: var(--canvas-soft); }
.btn--ghost:active { background: var(--canvas-soft); transform: translateY(1px); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot {
  margin-top: auto;
  padding-top: var(--s-xl);
}
.foot p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: -0.2px;
}
.foot strong { color: var(--ink-secondary); font-weight: 500; }

/* --------------------------------------------------------------------------
   Accessibility: focus rings
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--primary-soft);
  outline-offset: 2px;
  border-radius: var(--r-md);
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
/* база элементов rotate(-90deg) + 360deg = бесшовный цикл */
@keyframes spin {
  to { transform: rotate(270deg); }
}

@keyframes pulse {
  0% { transform: scale(0.85); opacity: 0.22; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Reduced motion — отключаем непрерывные анимации, оставляем смену состояний
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .emblem__pulse { animation: none; opacity: 0.16; }
  .emblem[data-state="checking"] .emblem__ring { animation: none; }
  .step__spinner { animation: none !important; }
  .step { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Small phones
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
  .page { padding-left: var(--s-lg); padding-right: var(--s-lg); }
}

/* --------------------------------------------------------------------------
   Очень низкие вьюпорты (ландшафт) — убираем лишний воздух.
   Контент остаётся по центру; если не помещается — страница прокручивается
   без обрезки (body выступает скролл-контейнером).
   -------------------------------------------------------------------------- */
@media (max-height: 560px) {
  .brand__eyebrow { display: none; }
}

/* --------------------------------------------------------------------------
   Адаптив экрана результата — планшет/крупный телефон
   Карточка товара из двух колонок в один столбец.
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .product {
    grid-template-columns: 1fr;
    gap: var(--s-xl);
  }
  /* ниже, чем 4/5, чтобы изображение не съедало высоту экрана */
  .product__media {
    aspect-ratio: 16 / 10;
  }
}

/* --------------------------------------------------------------------------
   Адаптив экрана результата — телефоны
   Баннер переносит мета на отдельную строку; типографика компактнее.
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  .verify-banner {
    flex-wrap: wrap;
  }
  .verify-banner__meta {
    flex-basis: 100%;
    padding-left: 0;
    padding-top: var(--s-md);
    border-left: none;
    border-top: 1px solid var(--on-primary-line);
    justify-content: space-between;
  }
  .verify-banner--invalid .verify-banner__meta {
    border-top-color: var(--hairline);
  }

  .product__name { font-size: 26px; }
  .product__desc { font-size: 15px; }

  .product__cta { width: 100%; }

  .claim__teaser {
    flex-direction: column;
    align-items: flex-start;
  }
  .claim__grid { grid-template-columns: 1fr; }
  .claim__open,
  .claim__submit,
  .claim__add-owner { width: 100%; }
  .claim__owners-table { font-size: 13px; }
  .claim__owners-table tbody td { padding: 8px var(--s-sm); }

  /* На тач-экранах листаем свайпом — стрелки прячем */
  .recommend__nav { display: none; }
}

/* ==========================================================================
   Предпросмотр (?preview=, только с сессией админки/партнёра):
   водяной знак «ОБРАЗЕЦ» поверх всего + тонкая панель состояний сверху.
   Цвета фиксированные — не зависят от темы партнёра.
   ========================================================================== */
.pv-mark {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
.pv-mark span {
  transform: rotate(-30deg);
  font-size: clamp(64px, 18vw, 220px);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(234, 34, 97, 0.14);
  white-space: nowrap;
  user-select: none;
}

body.is-preview:has(.pv-bar) { padding-top: 48px; }
.pv-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 16px;
  overflow-x: auto;
  background: #0d253d;
  color: #ffffff;
  font: 400 12px/1.2 "Inter", system-ui, sans-serif;
}
.pv-bar__label {
  flex: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ff9cbc;
}
.pv-bar__states { display: flex; gap: 4px; flex: none; }
.pv-bar__btn,
.pv-bar__select {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.pv-bar__btn[aria-pressed="true"] { background: #ffffff; color: #0d253d; }
.pv-bar__btn:focus-visible,
.pv-bar__select:focus-visible { outline: 2px solid #ff9cbc; outline-offset: 2px; }
.pv-bar__select { flex: none; max-width: 220px; }
.pv-bar__select option { color: #0d253d; }
