/* /achievements-update/ — .menu-reel и .rd-body из ../hud-update/hud-update.css,
   хиро (.dt-hero) из ../discord-tag/discord-tag.css. Здесь: четыре уникальные
   карточки сразу под заголовком, витрина, главы с иконками и шаги. */
html[lang="ru"] [data-lang-only="en"],
html[lang="en"] [data-lang-only="ru"] { display: none; }

/* ---------- уникальные: карточки вместо полосы-иллюстрации ---------- */
.ua-uniq { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.ua-uniq__label { margin: 0 0 16px; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.ua-uniq__label strong { font-weight: 500; color: var(--fg-4); }
.ua-grid { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }

.ua-card {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start;
  padding: 16px; border: 1px solid var(--bg-4); border-radius: 16px; background: var(--bg-1);
  animation: ua-in .7s cubic-bezier(.2, .8, .2, 1) backwards;
}
.ua-card:nth-child(2) { animation-delay: .06s; }
.ua-card:nth-child(3) { animation-delay: .12s; }
.ua-card:nth-child(4) { animation-delay: .18s; }
@keyframes ua-in { from { opacity: 0; transform: translateY(12px); } }

/* Подложка трофея: нейтральная поверхность + мягкое свечение цвета трофея.
   Пастельные --*-1 в тёмной теме превращаются в густой navy/коричневый —
   поэтому берём яркий --*-4 с малой долей поверх --bg-2, одинаково в обеих темах. */
.ua-card--unfair, .ua-showcase__items .is-unfair { --glow: var(--fg-2); }
.ua-card--kind, .ua-showcase__items .is-kind { --glow: var(--blue-4); }
.ua-card--money, .ua-showcase__items .is-money { --glow: var(--amber-4); }
.ua-card--adam, .ua-showcase__items .is-adam { --glow: var(--yellow-4); }
.ua-card__art {
  background: var(--bg-2);
  background: radial-gradient(closest-side, color-mix(in oklab, var(--glow) 22%, transparent), transparent) var(--bg-2);
}
.ua-card__art { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 8%; border-radius: 12px; overflow: hidden; }
.ua-card__art img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }

.ua-card__name { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--fg-4); }
.ua-card__how { margin: 10px 0 0; font-size: 15px; line-height: 1.45; font-weight: 500; color: var(--fg-4); }
.ua-card__note { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--fg-3); }

@media (hover: hover) {
  .ua-card:hover .ua-card__art img { transform: scale(1.06) rotate(-2deg); }
}

@media (min-width: 720px) {
  .ua-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .ua-card { grid-template-columns: 128px 1fr; }
}
@media (min-width: 768px) { .ua-uniq { padding: 0 24px; } }
@media (min-width: 1100px) {
  .ua-grid { grid-template-columns: repeat(4, 1fr); }
  .ua-card { grid-template-columns: 1fr; gap: 0; padding: 12px 12px 20px; }
  .ua-card__art { aspect-ratio: 4 / 3; margin-bottom: 16px; padding: 7% 0; }
  .ua-card__body { padding: 0 8px; }
}

/* ---------- витрина профиля ---------- */
.ua-showcase {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  aspect-ratio: auto; padding: 32px 20px; background: var(--bg-2);
}
.ua-showcase__caption { font-size: 13px; color: var(--fg-2); }
.ua-showcase__items { display: flex; justify-content: center; gap: 24px; width: 100%; margin: 0; padding: 0; list-style: none; }
.ua-showcase__items li { width: 26%; max-width: 168px; text-align: center; }
.ua-showcase__items img {
  display: block; width: 100%; height: auto; aspect-ratio: 1;
  box-sizing: border-box; padding: 10%; object-fit: contain;
  border-radius: 14px; border: 1px solid var(--bg-4);
  /* рамка витрины сама на --bg-2, так что ячейка — на --bg-1 */
  background: var(--bg-1);
  background: radial-gradient(closest-side, color-mix(in oklab, var(--glow) 22%, transparent), transparent) var(--bg-1);
}
.ua-showcase__items span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--fg-3); }

/* ---------- главы: строка иконок, по клику — список с условиями ---------- */
.ua-chapters { display: grid; gap: 12px; margin-top: 24px; }
.ua-chapter { border: 1px solid var(--bg-4); border-radius: 14px; background: var(--bg-1); }
.ua-chapter > summary {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 16px; cursor: pointer; list-style: none; border-radius: 14px;
}
.ua-chapter > summary::-webkit-details-marker { display: none; }
.ua-chapter > summary:focus-visible { outline: 2px solid var(--purple-4); outline-offset: 2px; }
.ua-chapter__name { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--fg-4); }
.ua-chapter__count { font-size: 14px; line-height: 20px; color: var(--fg-2); }
.ua-chapter__icons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ua-chapter__icons img { display: block; width: 44px; height: 44px; border-radius: 10px; }
.ua-chapter__icons img { background: var(--bg-2); background: color-mix(in oklab, var(--glow) 12%, var(--bg-2)); }
.ua-chapter--journey { --glow: var(--amber-4); }
.ua-chapter--survival { --glow: var(--green-4); }
.ua-chapter--combat { --glow: var(--red-4); }
.ua-chapter--together { --glow: var(--purple-4); }
.ua-chapter__more { grid-column: 1 / -1; margin-top: 10px; font-size: 14px; line-height: 20px; color: var(--fg-2); }
.ua-chapter__more::after { content: ' ↓'; }
.ua-chapter[open] .ua-chapter__more::after { content: ' ↑'; }

.ua-list { margin: 0; padding: 4px 16px 16px; list-style: none; }
.ua-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--bg-3); }
.ua-list img { width: 40px; height: 40px; }
.ua-list b { display: block; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--fg-4); }
.ua-list span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--fg-3); }
.ua-list .ua-list__req { display: block; padding: 12px 0 0; border-top: 1px solid var(--bg-3); font-size: 13px; line-height: 1.5; color: var(--fg-2); }

/* ---------- шаги ---------- */
.ua-steps { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: ua-step; }
.ua-steps li {
  position: relative; padding-left: 40px; font-size: 16px; line-height: 1.45; color: var(--fg-3);
  counter-increment: ua-step;
}
.ua-steps li + li { margin-top: 16px; }
.ua-steps li::before {
  content: counter(ua-step); position: absolute; left: 0; top: -1px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font-size: 13px; font-weight: 500; color: var(--fg-4); background: var(--bg-3);
}
.ua-steps strong { font-weight: 500; color: var(--fg-4); }
.ua-fine { margin: 20px 0 0; font-size: 14px; line-height: 1.5; color: var(--fg-2); }

@media (max-width: 767px) {
  .ua-showcase { gap: 14px; padding: 24px 12px; }
  .ua-showcase__items { gap: 12px; }
  .ua-showcase__items li { width: 30%; }
  .ua-showcase__items span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ua-card { animation: none; }
  .ua-card__art img { transition: none; }
}

.dt-hero + .rd-body { padding-top: 56px; }
@media (max-width: 479px) {
  .ua-card { grid-template-columns: 88px 1fr; gap: 14px; padding: 14px; }
  .ua-card__name { font-size: 18px; line-height: 24px; }
}

/* ---------- фон хиро: линии из hero-lines.js ---------- */
.dt-hero[data-hero-lines] { position: relative; overflow: hidden; isolation: isolate; padding-bottom: 48px; }
/* по высоте не больше ~viewBox: на телефоне хиро высокий, и slice раздул бы штрихи вдвое */
.hero-lines {
  position: absolute; top: 0; left: 0; z-index: -1;
  width: 100%; height: min(100%, 960px); pointer-events: none;
  /* к низу линии гаснут: под хиро обычная страница, обрыв по краю смотрелся бы как баг */
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, #000 70%, transparent);
  animation: hero-lines-in 1s ease backwards;
}
@keyframes hero-lines-in { from { opacity: 0; } }
