/* ==========================================================================
   Бюро порч — ритуальная канцелярия
   Палитра: угольно-фиолетовый фон, потускневшее золото, багровый акцент
   ========================================================================== */

:root {
  --ink-900: #07050b;
  --ink-800: #0b0810;
  --ink-700: #120d1b;
  --ink-600: #1a1327;
  --ink-500: #241a34;

  --gold-400: #e0c37c;
  --gold-300: #c8a24a;
  --gold-200: #a2823a;
  --gold-dim:  rgba(200, 162, 74, 0.28);

  --blood-400: #b5384a;
  --blood-300: #8e2434;

  --text: #e8e0d3;
  --text-dim: #b0a695;
  --text-faint: #7d7466;

  --line: rgba(200, 162, 74, 0.20);
  --line-strong: rgba(200, 162, 74, 0.42);

  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --shell: 68rem;
  --r-sm: 4px;
  --r-md: 8px;
  --tap: 44px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 420ms;
}

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

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

body.page {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink-800);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Атмосфера: градиент, виньетка, шум ---------------------------------- */

.page__veil,
.page__noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.page__veil {
  background:
    radial-gradient(58rem 40rem at 50% -12%, rgba(96, 52, 128, 0.34), transparent 62%),
    radial-gradient(42rem 34rem at 88% 8%, rgba(142, 36, 52, 0.16), transparent 60%),
    radial-gradient(50rem 44rem at 6% 92%, rgba(60, 40, 96, 0.22), transparent 64%),
    linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 100%);
}

/* виньетка + мелкий шум одним слоем */
.page__noise {
  background-image:
    radial-gradient(120% 90% at 50% 45%, transparent 46%, rgba(0, 0, 0, 0.62) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: soft-light;
}

/* --- Служебное ------------------------------------------------------------ */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: var(--ink-600);
  color: var(--gold-400);
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

[hidden] { display: none !important; }

/* --- Каркас --------------------------------------------------------------- */

.main { position: relative; z-index: 1; }

.screen {
  display: none;
  min-height: 100svh;
  padding: 5rem 1.25rem 3rem;
}
.screen.is-active {
  display: flex;
  align-items: center;
  animation: screen-in var(--dur) var(--ease) both;
}
.screen--catalog.is-active { align-items: flex-start; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
}
.shell--narrow { max-width: 40rem; }

.screen--title .shell,
.screen--ritual .shell { text-align: center; }

/* --- Верхняя панель ------------------------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  background: rgba(11, 8, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap);
  padding: 0 0.85rem 0 0.6rem;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.topbar__back:hover { color: var(--gold-400); border-color: var(--line); }

.topbar__mark { margin-left: auto; color: var(--gold-300); }

.topbar__title {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Типографика ---------------------------------------------------------- */

.eyebrow,
.caption {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.display {
  margin: 0.9rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 13vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-400);
  text-shadow: 0 0 42px rgba(200, 162, 74, 0.22);
}

.title {
  margin: 0.5rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 6vw, 2.6rem);
  letter-spacing: 0.07em;
  color: var(--gold-400);
}

.lede {
  margin: 1.25rem auto 2rem;
  max-width: 34rem;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.disclaimer {
  margin: 2.75rem 0 0;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.section-head { margin-bottom: 1.75rem; }
.section-head__note {
  margin: 0.6rem 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* --- Сигил на титуле ------------------------------------------------------ */

.sigil {
  width: min(62vw, 15rem);
  margin: 0 auto 1.5rem;
  color: var(--gold-300);
  filter: drop-shadow(0 0 26px rgba(200, 162, 74, 0.2));
}
.sigil__svg { display: block; width: 100%; height: auto; }

.sigil__ring { fill: none; stroke: currentColor; }
.sigil__ring--outer { stroke-width: 1; opacity: 0.4; }
.sigil__ring--inner { stroke-width: 0.6; opacity: 0.25; stroke-dasharray: 3 7; }

.sigil__star {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linejoin: round;
  opacity: 0.65;
  transform-origin: 100px 100px;
  animation: slow-spin 90s linear infinite;
}

.sigil__runes {
  fill: var(--gold-200);
  font-size: 13px;
  font-family: var(--serif);
  opacity: 0.7;
}

@keyframes slow-spin { to { transform: rotate(360deg); } }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0.7rem 1.6rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--gold-400);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease),
              color 200ms var(--ease), transform 160ms var(--ease);
}
.btn:hover {
  border-color: var(--gold-300);
  background: rgba(200, 162, 74, 0.09);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(180deg, rgba(200, 162, 74, 0.16), rgba(142, 36, 52, 0.16));
  border-color: var(--gold-300);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 12px 40px -18px rgba(200, 162, 74, 0.65);
}
.btn--primary:hover {
  background: linear-gradient(180deg, rgba(200, 162, 74, 0.26), rgba(142, 36, 52, 0.24));
  color: #f3e6c6;
}

.btn--lg { padding: 0.95rem 2.4rem; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--ghost { color: var(--text-dim); border-color: var(--line); }
.btn--ghost:hover { color: var(--gold-400); }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn[disabled]:hover { background: transparent; border-color: var(--line-strong); }

/* --- Лента последних обрядов --------------------------------------------- */

.ticker { margin-top: 3rem; }
.ticker__title { margin-bottom: 0.75rem; }

.ticker__viewport {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.ticker__track {
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  width: max-content;
  animation: ticker-run 42s linear infinite;
}
.ticker__viewport:hover .ticker__track { animation-play-state: paused; }

.ticker__item {
  font-size: 0.82rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.ticker__item b { color: var(--gold-300); font-weight: 400; font-family: var(--serif); }

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

/* --- Каталог -------------------------------------------------------------- */

.catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  min-height: 100%;
  padding: 1.15rem 1.15rem 1rem;
  text-align: left;
  background: linear-gradient(180deg, rgba(26, 19, 39, 0.9), rgba(11, 8, 16, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease),
              box-shadow 200ms var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card.is-selected {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 1px var(--gold-dim), 0 18px 46px -24px rgba(200, 162, 74, 0.8);
}
.card.is-selected::after {
  content: "✷";
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  color: var(--gold-400);
  font-size: 1rem;
  animation: seal-pop 320ms var(--ease) both;
}

@keyframes seal-pop {
  from { opacity: 0; transform: scale(0.4) rotate(-40deg); }
  to   { opacity: 1; transform: none; }
}

.card__top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card__glyph {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--gold-300);
  background: rgba(200, 162, 74, 0.05);
}

.card__name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text);
}

.card__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.card__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.severity { display: flex; flex-direction: column; gap: 0.3rem; }
.severity__pips { display: flex; align-items: center; gap: 0.3rem; }

/* ромб-«руна» тяжести: залитый — уровень набран, контурный — нет */
.severity__pip {
  width: 0.62rem;
  height: 0.62rem;
  transform: rotate(45deg);
  border: 1px solid rgba(200, 162, 74, 0.32);
  background: transparent;
}
.severity__pip.is-on {
  border-color: var(--blood-400);
  background: var(--blood-400);
  box-shadow: 0 0 8px rgba(181, 56, 74, 0.55);
}

.severity__label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.price { text-align: right; }
.price__value {
  display: block;
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--gold-400);
}
.price__label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.sticky-cta {
  position: sticky;
  bottom: 0;
  margin-top: 1.5rem;
  padding: 1.5rem 0 1.25rem;
  background: linear-gradient(180deg, transparent, var(--ink-900) 30%);
  text-align: center;
}
.sticky-cta .btn { width: 100%; max-width: 24rem; }

/* --- Уведомления ---------------------------------------------------------- */

.notice {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}
.notice--muted { color: var(--text-dim); background: rgba(26, 19, 39, 0.7); }
.notice--error {
  color: #f0c3c9;
  border-color: rgba(181, 56, 74, 0.55);
  background: rgba(142, 36, 52, 0.18);
}

/* --- Выбранная порча в форме --------------------------------------------- */

.chosen {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold-300);
  border-radius: var(--r-md);
  background: rgba(26, 19, 39, 0.7);
}
.chosen__glyph { font-family: var(--serif); font-size: 1.5rem; color: var(--gold-300); }
.chosen__name { font-family: var(--serif); font-size: 1.05rem; }
.chosen__price { margin-left: auto; font-size: 0.8rem; color: var(--text-faint); white-space: nowrap; }

/* --- Форма ---------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 1.5rem; }

.field { display: flex; flex-direction: column; gap: 0.45rem; }

.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.field__label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0;
}
.field__req { color: var(--blood-400); }

.field__input {
  width: 100%;
  min-height: var(--tap);
  padding: 0.7rem 0.9rem;
  background: rgba(7, 5, 11, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.05rem;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.field__input::placeholder { color: var(--text-faint); font-family: var(--sans); font-size: 0.95rem; }
.field__input:hover { border-color: var(--line-strong); }
.field__input:focus { outline: none; border-color: var(--gold-300); background: rgba(7, 5, 11, 0.95); }
.field__input:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }
.field__input.is-invalid { border-color: var(--blood-400); }

.field__hint { margin: 0; font-size: 0.76rem; color: var(--text-faint); }
.field__error { margin: 0; font-size: 0.8rem; color: #f0a5ae; }

.radios { display: grid; gap: 0.6rem; }

.radio,
.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--tap);
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(7, 5, 11, 0.55);
  cursor: pointer;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.radio:hover,
.check:hover { border-color: var(--line-strong); }

.radio input,
.check input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}

.radio__box,
.check__box {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.4);
}
.radio__box { border-radius: 50%; }
.check__box { border-radius: 3px; }

.radio__box::after,
.check__box::after {
  content: "";
  opacity: 0;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  transform: scale(0.4);
}
.radio__box::after {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--gold-400);
}
.check__box::after {
  content: "✓";
  color: var(--gold-400);
  font-size: 0.8rem;
  line-height: 1;
}

.radio input:checked ~ .radio__box::after,
.check input:checked ~ .check__box::after { opacity: 1; transform: none; }

.radio:has(input:checked),
.check:has(input:checked) {
  border-color: var(--gold-300);
  background: rgba(200, 162, 74, 0.07);
}

.radio:has(input:focus-visible),
.check:has(input:focus-visible) {
  outline: 2px solid var(--gold-400);
  outline-offset: 2px;
}

.radio__text { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.radio__text b { font-family: var(--serif); font-weight: 400; font-size: 1rem; }
.radio__text small { font-size: 0.74rem; color: var(--text-faint); }

.check { align-items: flex-start; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.check__box { margin-top: 0.15rem; }
.check__text { font-size: 0.92rem; color: var(--text-dim); }

.form__foot {
  margin: -0.75rem 0 0;
  font-size: 0.72rem;
  color: var(--text-faint);
  text-align: center;
}

/* --- Ритуал --------------------------------------------------------------- */

.ritual { display: flex; flex-direction: column; align-items: center; gap: 2rem; }

.ritual__stage {
  position: relative;
  width: min(70vw, 18rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--gold-300);
}

.ritual__svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.ritual__ring { fill: none; stroke: currentColor; transform-origin: 120px 120px; }
.ritual__ring--a {
  stroke-width: 0.8;
  opacity: 0.35;
  stroke-dasharray: 10 14;
  animation: slow-spin 24s linear infinite;
}
.ritual__ring--b {
  stroke-width: 0.6;
  opacity: 0.25;
  stroke-dasharray: 2 9;
  animation: slow-spin 16s linear infinite reverse;
}

.ritual__star {
  fill: rgba(200, 162, 74, 0.04);
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  opacity: 0.85;
  transform-origin: 120px 120px;
  animation: slow-spin 12s linear infinite;
  filter: drop-shadow(0 0 12px rgba(200, 162, 74, 0.4));
}

.ritual__glyphs {
  fill: var(--gold-200);
  font-family: var(--serif);
  font-size: 14px;
  text-anchor: middle;
  opacity: 0.75;
  animation: glyph-pulse 3.4s ease-in-out infinite;
}

@keyframes glyph-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}

.ritual__core {
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 195, 124, 0.55), rgba(142, 36, 52, 0.28) 55%, transparent 72%);
  animation: core-breathe 2.6s ease-in-out infinite;
}

@keyframes core-breathe {
  0%, 100% { transform: scale(0.86); opacity: 0.7; }
  50%      { transform: scale(1.1);  opacity: 1; }
}

.ritual__status {
  margin: 0;
  min-height: 3rem;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  letter-spacing: 0.05em;
  color: var(--text);
  animation: status-in 400ms var(--ease) both;
}

@keyframes status-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.progress {
  width: min(100%, 24rem);
  height: 2px;
  background: rgba(200, 162, 74, 0.14);
  overflow: hidden;
}
.progress__bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blood-300), var(--gold-400));
  transition: width 320ms linear;
}

/* --- Сертификат ----------------------------------------------------------- */

/* Карточка масштабируется от собственной ширины (cqi), поэтому содержимое
   всегда укладывается в пропорцию 3:4 — от 320px до десктопа. */
.cert {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 27rem;
  margin: 0 auto;
  padding: 4cqi;
  overflow: hidden;
  border-radius: var(--r-sm);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(96, 52, 128, 0.28), transparent 70%),
    linear-gradient(170deg, #17101f 0%, #0a0710 60%, #100a17 100%);
  box-shadow:
    0 0 0 1px rgba(200, 162, 74, 0.35),
    0 40px 90px -40px rgba(0, 0, 0, 0.9),
    inset 0 0 80px rgba(0, 0, 0, 0.6);
  animation: cert-in 620ms var(--ease) both;
}

@keyframes cert-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* двойная орнаментальная рамка */
.cert__frame {
  position: absolute;
  inset: 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  pointer-events: none;
}
.cert__frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(200, 162, 74, 0.16);
}
.cert__frame::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  background:
    repeating-linear-gradient(90deg, var(--gold-dim) 0 6px, transparent 6px 12px) top    / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--gold-dim) 0 6px, transparent 6px 12px) bottom / 100% 1px no-repeat;
}

.cert__watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(200, 162, 74, 0.07);
  pointer-events: none;
}
.cert__watermark svg { width: 78%; height: auto; }

.cert__body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2cqi 1.5cqi;
}

.cert__head { margin-bottom: 3cqi; }
.cert__org { font-size: 2.6cqi; letter-spacing: 0.18em; color: var(--gold-200); }
.cert__kind {
  margin: 1.4cqi 0 0;
  font-family: var(--serif);
  font-size: 3.4cqi;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cert__label { font-size: 2.4cqi; letter-spacing: 0.22em; }

.cert__target {
  margin: 1.4cqi 0 0;
  font-family: var(--serif);
  font-size: 8.6cqi;
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--gold-400);
  text-shadow: 0 0 30px rgba(200, 162, 74, 0.28);
  overflow-wrap: anywhere;
}

/* margin-top: auto здесь и у .cert__rows делит свободное место пополам,
   центрируя блок с названием порчи */
.cert__glyph {
  margin: auto 0 0;
  font-family: var(--serif);
  font-size: 6.4cqi;
  line-height: 1;
  color: var(--blood-400);
}

.cert__curse {
  margin: 2cqi 0 0;
  font-family: var(--serif);
  font-size: 5cqi;
  line-height: 1.25;
  letter-spacing: 0.05em;
  color: var(--text);
}

.cert__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 1.6cqi 0 0;
  font-size: 3cqi;
  line-height: 1.45;
  color: var(--text-faint);
}

.cert__rows {
  width: 100%;
  margin: auto 0 0;
  padding: 3cqi 0 0;
  display: grid;
  gap: 1cqi;
}
.cert__row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 3.2cqi;
}
.cert__row dt {
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 2.5cqi;
  white-space: nowrap;
}
.cert__row dd {
  margin: 0 0 0 auto;
  font-family: var(--serif);
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
}

.cert__foot {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3cqi;
  margin-top: 3cqi;
  padding-top: 3cqi;
  border-top: 1px solid var(--line);
}

.cert__sign { display: flex; flex-direction: column; align-items: flex-start; gap: 1cqi; text-align: left; }
.cert__signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: 4.6cqi;
  color: var(--gold-400);
  transform: rotate(-3deg);
}
.cert__signline { font-size: 2.3cqi; letter-spacing: 0.14em; }

.cert__seal {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18cqi;
  height: 18cqi;
  color: var(--blood-400);
}
.cert__seal-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.65;
}
.cert__seal-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed currentColor;
  border-radius: 50%;
  opacity: 0.45;
}
.cert__seal-star {
  position: absolute;
  font-size: 6cqi;
  opacity: 0.28;
}
.cert__seal-code {
  position: relative;
  font-family: var(--serif);
  font-size: 2.9cqi;
  letter-spacing: 0.04em;
  color: #e2a3ad;
}

/* --- Действия под сертификатом ------------------------------------------- */

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 1.75rem;
}
.actions .btn { width: 100%; }
.actions--single { margin-top: 1rem; }

/* --- Тост ----------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 40;
  transform: translate(-50%, 12px);
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: rgba(18, 13, 27, 0.96);
  color: var(--gold-400);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

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

@media (min-width: 34rem) {
  .screen { padding: 6rem 2rem 4rem; }
  .actions { grid-template-columns: 1fr 1fr; }
  .actions--single { grid-template-columns: 1fr; }
  .radios { grid-template-columns: repeat(3, 1fr); }
  .radio { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.5rem; }
  .radio__text { flex-direction: column; gap: 0.1rem; }
}

@media (min-width: 48rem) {
  .catalog { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .sticky-cta { background: linear-gradient(180deg, transparent, var(--ink-900) 45%); }
}

@media (min-width: 64rem) {
  .catalog { grid-template-columns: repeat(3, 1fr); }
}

/* --- Уважение к настройкам движения --------------------------------------- */

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