/* ==========================================================================
   Rose Stylist — чистый CSS, без библиотек. Mobile first.
   ========================================================================== */

:root {
  /* Холст — тёплая слоновая кость: товар на белой карточке читается как в бутике,
     а розовый работает акцентом, а не заливкой всего экрана. */
  --blush:      #FAF6F3;
  --blush-deep: #F4E7EC;
  --paper:      #FFFFFF;

  --fuchsia:    #C42A63;   /* приглушённая роза вместо неонового пурпура */
  --fuchsia-dk: #9E1F4C;
  --fuchsia-05: rgba(196, 42, 99, .06);
  --fuchsia-12: rgba(196, 42, 99, .12);

  --gold:       #B8912F;
  --gold-soft:  #E3D3A8;

  --graphite:   #211E22;
  --ink-soft:   #6E6670;
  --ink-faint:  #7C757F;   /* 4.6:1 на белом — мелкие подписи остаются читаемыми */

  /* Границы нейтральные: золото раньше стояло на каждом элементе и шумело */
  --line:       rgba(33, 30, 34, .10);
  --line-soft:  rgba(33, 30, 34, .06);

  --radius:     18px;
  --radius-sm:  10px;
  --radius-lg:  26px;

  --shadow-sm:  0 1px 2px rgba(40, 20, 30, .05), 0 2px 8px rgba(40, 20, 30, .04);
  --shadow-md:  0 4px 12px rgba(40, 20, 30, .06), 0 12px 28px rgba(40, 20, 30, .07);
  --shadow-lg:  0 8px 20px rgba(40, 20, 30, .08), 0 28px 56px rgba(40, 20, 30, .12);

  /* Шаг сетки 4/8 — чтобы отступы не были случайными */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  --shell:      1180px;
  --ease:       cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--graphite);
  background:
    radial-gradient(1200px 640px at 8% -10%, #FFFFFF 0%, rgba(255,255,255,0) 58%),
    radial-gradient(880px 520px at 98% 2%, var(--blush-deep) 0%, rgba(244,231,236,0) 62%),
    var(--blush);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}


img, canvas, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 20px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fuchsia);
}

.section-title { font-size: clamp(1.6rem, 5.4vw, 2.4rem); }
.section-sub { margin: 8px 0 0; color: var(--ink-soft); font-size: .93rem; }

/* ---------------------------------- Кнопки ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), color .25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn__icon { width: 19px; height: 19px; }

/* Главное действие — розовое: золотой градиент спорил с фото товаров */
.btn--gold {
  background: var(--fuchsia);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(196, 42, 99, .24);
}
.btn--gold:hover {
  background: var(--fuchsia-dk);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(196, 42, 99, .3);
}

.btn--fuchsia {
  background: var(--fuchsia);
  color: #fff;
  box-shadow: 0 10px 22px rgba(196, 42, 99, .3);
}
.btn--fuchsia:hover { background: var(--fuchsia-dk); transform: translateY(-2px); }

.btn--ghost {
  background: rgba(255, 255, 255, .7);
  border-color: var(--gold-soft);
  color: var(--graphite);
}
.btn--ghost:hover { border-color: var(--gold); background: #fff; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--fuchsia);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------------------------------- Шапка -------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 243, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding-block: 10px;
}

.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.logo__mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--fuchsia);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.logo__mark svg { width: 26px; height: 26px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.logo__text em {
  font-style: normal;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.header__nav { display: flex; align-items: center; gap: 10px; }
.header__cta { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--graphite);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}
.chip__icon { width: 15px; height: 15px; color: #D8B9C6; transition: color .2s var(--ease); }
.chip__count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--blush-deep);
  font-size: .76rem;
  text-align: center;
}
.chip:hover { border-color: var(--fuchsia); }
.chip[aria-pressed="true"] { background: var(--fuchsia); border-color: var(--fuchsia); color: #fff; }
.chip[aria-pressed="true"] .chip__icon { color: #fff; }
.chip[aria-pressed="true"] .chip__count { background: rgba(255,255,255,.24); }
.chip.is-pulsing .chip__icon { animation: pulse .5s var(--ease); color: var(--fuchsia); }

@keyframes pulse {
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ------------------------------ Блок 1: hero ----------------------------- */

.hero { padding: 44px 0 56px; }
.hero__inner { max-width: 760px; text-align: center; }

.hero__title { font-size: clamp(2rem, 8.6vw, 3.6rem); }
.hero__title i { font-style: italic; color: var(--fuchsia); }

.hero__lead {
  margin: 18px auto 30px;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* Дроп-зона */
.dropzone {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 34px 22px 26px;
  border: 2px dashed rgba(196, 42, 99, .45);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(250, 244, 246, .9));
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.dropzone:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--fuchsia); }
.dropzone.is-dragover {
  border-color: var(--fuchsia);
  border-style: solid;
  transform: scale(1.015);
  box-shadow: var(--shadow-lg);
}
.dropzone__glow {
  position: absolute;
  inset: -40% -10% auto;
  height: 220px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(196, 42, 99, .18), transparent);
  filter: blur(6px);
}

.dropzone__camera {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--fuchsia);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(196, 42, 99, .16);
}
.dropzone__camera svg { width: 38px; height: 38px; }

.dropzone__title {
  margin: 0 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.32rem;
}
.dropzone__hint { margin: 0 0 18px; font-size: .84rem; color: var(--ink-soft); }

.gender {
  margin: 0 auto 18px;
  max-width: 420px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
}
.gender__label {
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.gender__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gender__btn {
  padding: 12px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--graphite);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.gender__btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.gender__btn[aria-pressed="true"] {
  background: var(--fuchsia);
  border-color: var(--fuchsia);
  color: #fff;
}
.gender__hint {
  margin: 10px 0 0;
  font-size: .74rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Выбор магазинов: недоступные — приглушены */
.shops .gender__btn { font-size: .84rem; padding: 11px 8px; }
.gender__btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  text-decoration: line-through;
}
.gender__btn:disabled:hover { transform: none; border-color: var(--gold-soft); }

.card__shop {
  position: absolute;
  right: 10px; top: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.badge--gender {
  background: #fff;
  border: 1px solid var(--gold);
  color: #8A6D12;
}

.dropzone__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 0;
  font-size: .76rem;
  color: var(--ink-soft);
}
.dropzone__privacy svg { width: 15px; height: 15px; color: var(--gold); flex: 0 0 auto; }

.hero__error {
  margin: 16px 0 0;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--fuchsia);
  color: var(--fuchsia-dk);
  font-size: .87rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  color: var(--fuchsia);
}
.hero__stats span {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ------------------------------ Лоадер (AI) ------------------------------ */

.analyzer { padding: 30px 0 70px; }
.analyzer__inner {
  max-width: 520px;
  padding: 34px 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-md);
}

.analyzer__spinner { display: flex; justify-content: center; gap: 9px; margin-bottom: 22px; }
.analyzer__spinner span {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--fuchsia);
  animation: bounce 1.1s infinite var(--ease);
}
.analyzer__spinner span:nth-child(2) { background: var(--gold); animation-delay: .16s; }
.analyzer__spinner span:nth-child(3) { background: var(--blush-deep); animation-delay: .32s; }

@keyframes bounce {
  0%, 70%, 100% { transform: translateY(0); opacity: .55; }
  35%           { transform: translateY(-13px); opacity: 1; }
}

/* Бегущий текст статуса: каждая новая фраза «влетает» справа */
.analyzer__ticker {
  overflow: hidden;
  margin-bottom: 20px;
}
.analyzer__status {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.05rem, 4.4vw, 1.28rem);
  min-height: 1.6em;
  animation: slide-in .45s var(--ease) both;
}
.analyzer__status.is-done { color: var(--fuchsia); }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(38px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Бегущая строка брендов */
.analyzer__marquee {
  overflow: hidden;
  margin-top: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.analyzer__marquee-row {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: marquee 14s linear infinite;
}
.analyzer__marquee-row span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.analyzer__track {
  height: 6px;
  border-radius: 999px;
  background: var(--blush-deep);
  overflow: hidden;
}
.analyzer__bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--fuchsia));
  transition: width .35s linear;
}
.analyzer__note {
  margin: 16px 0 0;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------------------------- Блок 2: результаты -------------------------- */

.results { padding: 8px 0 72px; }

.profile {
  display: flex;
  align-items: flex-start;     /* аватар прижат к левому верхнему углу секции */
  gap: 18px;
  padding: 20px 18px;
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #fff, rgba(244, 231, 236, .55));
  box-shadow: var(--shadow-md);
}

.profile__avatar {
  flex: 0 0 auto;
  margin: 0;
  width: 96px;
  text-align: center;
  animation: pop-in .5s var(--ease) both;
}
.profile__avatar-frame { position: relative; }
.profile__avatar canvas {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--blush-deep);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-md);
  object-fit: cover;
}
.profile__badge {
  position: absolute;
  right: -2px; bottom: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--fuchsia);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  box-shadow: var(--shadow-sm);
}
.profile__caption {
  margin: 10px 0 0;
  font-size: .7rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}

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

.profile__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.profile__meta .eyebrow { margin-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge--ai {
  background: var(--fuchsia);
  color: #fff;
  box-shadow: 0 4px 12px rgba(196, 42, 99, .3);
}
.badge--local {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.badge--pending {
  background: rgba(184, 145, 47, .14);
  border: 1px solid var(--gold);
  color: #8A6D12;
  animation: badge-breathe 1.4s var(--ease) infinite;
}

@keyframes badge-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

.profile__summary {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
  font-size: .95rem;
  font-style: italic;
  line-height: 1.55;
}
.profile__summary[hidden] { display: none; }
.profile__title { font-size: clamp(1.5rem, 6vw, 2.1rem); }
.profile__text { margin: 12px 0 0; color: var(--ink-soft); font-size: .95rem; }

.palette { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.palette__item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 58px; }
.palette__swatch {
  width: 36px; height: 36px;
  border-radius: 12px;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}
.palette__label { font-size: .64rem; letter-spacing: .04em; color: var(--ink-soft); text-align: center; }

.profile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.results__head { margin-bottom: 20px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: .74rem;
  color: var(--ink-soft);
}
.legend li { display: flex; align-items: center; gap: 6px; }

.dot {
  width: 10px; height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(40, 20, 30, .16);
}
.dot--warm    { background: linear-gradient(135deg, #F6D98B, #D4AF37); }
.dot--cool    { background: linear-gradient(135deg, #CFE3F5, #7FA6C9); }
.dot--neutral { background: linear-gradient(135deg, #F7DCE4, #C9A7B4); }

/* ------------------------------- Сетка карточек --------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* мобильные: две колонки */
  gap: var(--space-3);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  animation: rise .5s var(--ease) both;
}
/* Подъём вместо масштабирования: карточка не наезжает на соседей */
.card:hover, .card:focus-within {
  transform: translateY(-4px);
  z-index: 5;
  border-color: rgba(196, 42, 99, .3);
  box-shadow: var(--shadow-lg);
}

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

.card__stripe { display: none; }

/* Квадрат — единый формат для фото из разных магазинов */
.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}
/* Фото товара из магазина — показываем целиком, без обрезки */
.card__img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transition: transform .6s var(--ease), opacity .25s var(--ease);
}
.card:hover .card__img { transform: scale(1.04); }

/* Плейсхолдер, если фото товара не загрузилось */
.card__fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 14px;
  text-align: center;
  background: linear-gradient(135deg, var(--blush-deep), var(--gold-soft));
}
.card__fallback.is-hidden { opacity: 0; pointer-events: none; }
.card__fallback.is-visible { opacity: 1; }
.card__fallback span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .96);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}

.card__credit {
  position: absolute;
  left: 10px; top: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--fuchsia);
  color: #fff;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .02em;
  pointer-events: none;
}

.card__free {
  position: absolute;
  top: 8px; right: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: #3A2E07;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: var(--shadow-sm);
}

.card__save {
  position: absolute;
  inset: auto 8px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: none;
  border-radius: 999px;
  background: var(--fuchsia);
  color: #fff;
  font: inherit;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(196, 42, 99, .34);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .28s var(--ease), transform .28s var(--ease), background-color .2s var(--ease);
}
.card__save svg { width: 16px; height: 16px; }
.card:hover .card__save,
.card:focus-within .card__save { opacity: 1; transform: translateY(0); }
.card__save:hover { background: var(--fuchsia-dk); }
.card__save.is-saved { background: #fff; color: var(--fuchsia); box-shadow: 0 10px 20px rgba(40, 20, 30, .18); }

/* На тач-устройствах hover недоступен — показываем кнопку сразу */
@media (hover: none) {
  .card__save { opacity: 1; transform: none; }
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 7px;
  padding: var(--space-3);
}

/* Мелкие аукционные подписи: «🔥 Топ подбор» / «⭐ Совпадает на 92%» */
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.card__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}
.card__tag svg { width: 11px; height: 11px; flex: 0 0 auto; }
.card__tag--hot {
  background: var(--fuchsia-12);
  color: var(--fuchsia-dk);
}
.card__tag--match {
  background: rgba(33, 30, 34, .05);
  color: var(--ink-soft);
}

.card__brandline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.card__brand {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__dot { margin-left: auto; }
.card__cat {
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* Название — главная строка карточки, поэтому крупнее и на серифе */
.card__name {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -.005em;
}
.card__name a { color: inherit; text-decoration: none; }
.card__name a:hover { color: var(--fuchsia); }

.card__reason {
  margin: 0;
  font-size: .74rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  margin-top: auto;                     /* цена всегда прижата к низу карточки */
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
}
.card__price {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.card__price--free { color: var(--fuchsia); font-size: .9rem; }
.card__price-old {
  font-size: .76rem;
  font-weight: 500;
  color: var(--ink-faint);
  text-decoration-color: var(--ink-faint);
}
.card__meta { font-size: .66rem; color: var(--ink-faint); }

/* Артикул и переход в магазин */
.card__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  margin-top: 8px;
}
.card__art {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-faint);
  font: inherit;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.card__art:hover { border-color: var(--ink-faint); color: var(--graphite); }
.card__art-val { user-select: all; }
.card__art.is-copied {
  border-color: var(--fuchsia);
  color: var(--fuchsia);
  background: var(--fuchsia-05);
}
.card__buy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--fuchsia-05);
  font-size: .7rem;
  font-weight: 700;
  color: var(--fuchsia);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.card__buy:hover { background: var(--fuchsia); color: #fff; }
.card__meta b { color: var(--ink-soft); font-weight: 600; }

.empty {
  margin: 30px auto 0;
  max-width: 46ch;
  padding: 20px;
  text-align: center;
  color: var(--ink-soft);
  background: #fff;
  border: 1px dashed var(--gold-soft);
  border-radius: var(--radius);
}

/* ------------------------------ Модальное окно ---------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(70, 30, 50, .42);
  backdrop-filter: blur(4px);
  animation: fade .25s var(--ease) both;
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 30px 24px 24px;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #fff, var(--blush) 85%);
  box-shadow: var(--shadow-lg);
  animation: modal-pop .35s var(--ease) both;
}

.modal__emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--fuchsia-12);
  color: var(--fuchsia);
  animation: sparkle 1.8s var(--ease) infinite;
}
.modal__emoji svg { width: 26px; height: 26px; }
.modal__title {
  margin: 14px 0 8px;
  font-size: 1.3rem;
  line-height: 1.25;
}
.modal__text { margin: 0 0 20px; font-size: .87rem; color: var(--ink-soft); }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

.modal__x {
  position: absolute;
  top: 10px; right: 10px;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.modal__x svg { width: 18px; height: 18px; }
.modal__x:hover { background: #fff; color: var(--fuchsia); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(16px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  45%      { transform: scale(1.18) rotate(9deg); }
}

/* ---------------------------------- Футер -------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(244, 231, 236, .5), rgba(255, 255, 255, .9));
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-block: 34px;
  text-align: center;
}
.footer__brand { display: flex; flex-direction: column; gap: 3px; }
.footer__brand strong { font-family: "Playfair Display", Georgia, serif; font-size: 1.28rem; }
.footer__brand span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }

.socials { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; }
.socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  color: var(--fuchsia);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.socials svg { width: 21px; height: 21px; }
.socials a:hover { transform: translateY(-3px); background: var(--fuchsia); color: #fff; border-color: var(--fuchsia); }

.footer__legal { margin: 0; font-size: .74rem; color: var(--ink-soft); }

/* ------------------------------- Адаптив --------------------------------- */

/* На узких экранах кнопка загрузки — во всю ширину */
@media (max-width: 599px) {
  .dropzone #pickBtn {
    width: 100%;
    padding: 17px 20px;
    font-size: 1rem;
  }
  .dropzone #pickBtn .btn__icon { width: 22px; height: 22px; }
  .profile__actions .btn { flex: 1 1 100%; }
}

@media (min-width: 600px) {
  .shell { padding-inline: 28px; }
  .hero { padding: 60px 0 70px; }
  .dropzone { padding: 46px 34px 32px; }
  .grid { gap: var(--space-4); }
  .hero__stats { gap: 14px 46px; }

  .card__body { gap: var(--space-2); padding: var(--space-4) var(--space-4) 18px; }
  .card__tag { font-size: .66rem; }
  .card__brand { font-size: .7rem; }
  .card__cat { font-size: .6rem; }
  .card__name { font-size: 1.05rem; }
  .card__reason { font-size: .79rem; line-height: 1.55; }
  .card__price { font-size: 1.24rem; }
  .card__price--free { font-size: .95rem; }
  .card__meta { font-size: .68rem; text-align: right; }
  .card__save { inset: auto 12px 12px; padding: 11px 16px; font-size: .84rem; gap: 8px; }
  .card__free { top: 10px; right: 10px; padding: 5px 11px; font-size: .68rem; }
}

@media (min-width: 900px) {
  .header__cta { display: inline-flex; }
  .hero { padding: 78px 0 84px; }
  .profile { gap: 30px; padding: 28px 32px; }
  .profile__avatar { width: 150px; }
  .profile__avatar canvas { width: 150px; height: 150px; }
  .profile__badge { right: 2px; bottom: 6px; padding: 4px 10px; font-size: .66rem; }
  .profile__caption { font-size: .78rem; }
  .palette__item { width: 68px; }
  .palette__swatch { width: 40px; height: 40px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1160px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover { transform: none; }
}
