/* deraid — дизайн-система веб-сервиса вражеских команд и героев.
   Один файл, без сборщиков и внешних ресурсов. Работает при CSP `style-src 'self'; img-src 'self'`:
   нет встроенных стилей, скриптов, внешних шрифтов. Описание — overlay_app/docs/web-design.md.

   Содержание: 1 токены · 2 основа · 3 шапка · 4 каркас страницы · 5 кнопки и формы · 6 метки и уведомления
   7 редкость, картинки, запасной вид · 8 герой, команда, бой · 9 сборка героя · 10 версии и разница
   11 таблицы и листание · 12 вход, привязка, ключи, выпуски · 13 пустые состояния, загрузка, ошибки
   14 телефон · 15 движение и печать */

/* ───────────── 1. Токены ─────────────
   Цвета выведены из значка приложения (macos/Icon/AppIcon.png):
   фон значка #0e1622 → #28434f, глаз #2f9fb3 → #5ddcd4 → #b0fcee, кристалл #d88931 → #f1b962 → #ffcd6c.
   Тёмные значения записаны дважды (системная настройка и явный выбор data-theme) — менять вместе. */
:root {
  color-scheme: light dark;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-xs: .8125rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-h3: 1rem; --fs-h2: 1.25rem; --fs-h1: 1.875rem;
  --lh: 1.45;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 6px; --r2: 10px; --r3: 14px; --r-pill: 999px;
  --w-page: 1240px; --w-narrow: 520px;
  --tap: 40px;

  /* шапка — тёмная в обеих темах, как фон значка */
  --hdr-bg: #0e1622; --hdr-bg-2: #1c313c; --hdr-text: #eef4f6; --hdr-mut: #a9bcc6; --hdr-line: #2a4350;
  --hdr-accent: #5ddcd4; --hdr-ok: #58e08c;

  /* светлая тема */
  --bg: #f1f4f6; --surface: #ffffff; --surface-2: #e8eef1; --surface-3: #dbe4e9;
  --line: #d0dae0; --line-strong: #71838f;
  --text: #13202a; --text-2: #4b5b67;
  --accent: #0a6770; --accent-bg: #0a6d76; --accent-bg-hover: #085860; --accent-on: #ffffff; --accent-soft: #d8f0ef;
  --gold: #855600; --gold-soft: #faedcf;
  --ok: #176b39; --ok-soft: #dbf2e2; --warn: #855000; --warn-soft: #fcebc8;
  --danger: #b0241c; --danger-bg: #b0241c; --danger-on: #ffffff; --danger-soft: #fbe2e0;
  --focus: #0a6770;
  --shadow: 0 1px 2px rgba(14, 22, 34, .06), 0 4px 14px rgba(14, 22, 34, .06);

  /* редкость: текст и рамка на поверхности карточки */
  --r-common: #56636e; --r-uncommon: #1b7340; --r-rare: #1560bd; --r-epic: #7733c4;
  --r-legendary: #8a5700; --r-mythical: #bd2222;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a121b; --surface: #131e29; --surface-2: #1a2835; --surface-3: #233545;
    --line: #293b4b; --line-strong: #6a8193;
    --text: #e6edf1; --text-2: #a3b5c1;
    --accent: #5ddcd4; --accent-bg: #5ddcd4; --accent-bg-hover: #8cece5; --accent-on: #04272a; --accent-soft: #11373c;
    --gold: #f1b962; --gold-soft: #382a0f;
    --ok: #62d68d; --ok-soft: #11341f; --warn: #f1b962; --warn-soft: #382a0f;
    --danger: #ff9289; --danger-bg: #e5564c; --danger-on: #1c0504; --danger-soft: #431a1a;
    --focus: #8cece5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .28);
    --r-common: #b3bec7; --r-uncommon: #62d68d; --r-rare: #6bb5ff; --r-epic: #c895ff;
    --r-legendary: #f5b84a; --r-mythical: #ff7a75;
  }
}
:root[data-theme="dark"] {
  --bg: #0a121b; --surface: #131e29; --surface-2: #1a2835; --surface-3: #233545;
  --line: #293b4b; --line-strong: #6a8193;
  --text: #e6edf1; --text-2: #a3b5c1;
  --accent: #5ddcd4; --accent-bg: #5ddcd4; --accent-bg-hover: #8cece5; --accent-on: #04272a; --accent-soft: #11373c;
  --gold: #f1b962; --gold-soft: #382a0f;
  --ok: #62d68d; --ok-soft: #11341f; --warn: #f1b962; --warn-soft: #382a0f;
  --danger: #ff9289; --danger-bg: #e5564c; --danger-on: #1c0504; --danger-soft: #431a1a;
  --focus: #8cece5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .28);
  --r-common: #b3bec7; --r-uncommon: #62d68d; --r-rare: #6bb5ff; --r-epic: #c895ff;
  --r-legendary: #f5b84a; --r-mythical: #ff7a75;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ───────────── 2. Основа ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--fs-md)/var(--lh) var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: var(--fs-h1); line-height: 1.2; letter-spacing: -.01em; font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: 1.25; font-weight: 700; }
h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 650; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: .93em; }
.num { font-variant-numeric: tabular-nums; }
.mut { color: var(--text-2); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* фокус с клавиатуры — один вид на всё */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r1); }
.hdr :focus-visible { outline-color: var(--hdr-accent); }

.skip {
  position: absolute; left: var(--s2); top: -60px; z-index: 20; padding: var(--s2) var(--s3);
  background: var(--accent-bg); color: var(--accent-on); border-radius: var(--r1); font-weight: 600;
}
.skip:focus { top: var(--s2); }

/* ───────────── 3. Шапка ───────────── */
.hdr {
  position: sticky; top: 0; z-index: 10; color: var(--hdr-text);
  background: linear-gradient(180deg, var(--hdr-bg-2), var(--hdr-bg)); border-bottom: 1px solid var(--hdr-line);
}
.hdr__in {
  max-width: var(--w-page); margin: 0 auto; padding: 0 var(--s4);
  display: flex; align-items: center; gap: var(--s4); min-height: 56px;
}
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: var(--hdr-text); font-weight: 700; font-size: var(--fs-lg); letter-spacing: .01em; }
.brand:hover { text-decoration: none; color: #fff; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.nav { display: flex; gap: 2px; align-self: stretch; min-width: 0; }
.nav a {
  display: inline-flex; align-items: center; padding: 0 var(--s3); color: var(--hdr-mut); font-weight: 600;
  border-bottom: 2px solid transparent; border-top: 2px solid transparent; white-space: nowrap;
}
.nav a:hover { color: var(--hdr-text); text-decoration: none; background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: var(--hdr-text); border-bottom-color: var(--hdr-accent); }
.hdr__tools { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.hdr__link {
  display: inline-flex; align-items: center; gap: var(--s1); min-height: 34px; padding: 0 var(--s3);
  color: var(--hdr-mut); border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.hdr__link:hover, .hdr__link[aria-current="page"] { color: var(--hdr-text); background: rgba(255, 255, 255, .08); text-decoration: none; }
.hdr__adm, .hdr__adm:hover, .hdr__adm[aria-current="page"] { color: #ffcd6c; }

/* уведомление «доступно обновление»: зелёная точка и мягкое свечение рамки */
.update {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 34px; padding: 0 var(--s3);
  border-radius: var(--r-pill); border: 1px solid rgba(88, 224, 140, .55); background: rgba(88, 224, 140, .12);
  color: #c9f7da; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  animation: update-glow 2.4s ease-in-out infinite;
}
.update:hover { text-decoration: none; background: rgba(88, 224, 140, .22); color: #fff; }
.update__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hdr-ok); flex: none; animation: update-dot 2.4s ease-in-out infinite; }
.update__ver { color: var(--hdr-ok); font-variant-numeric: tabular-nums; }
@keyframes update-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88, 224, 140, 0); }
  50% { box-shadow: 0 0 0 4px rgba(88, 224, 140, .22); }
}
@keyframes update-dot { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ───────────── 4. Каркас страницы ───────────── */
.page { width: 100%; max-width: var(--w-page); margin: 0 auto; padding: var(--s5) var(--s4) var(--s7); flex: 1; }
.page--narrow { max-width: var(--w-narrow); }
.page--mid { max-width: 860px; }
.foot { border-top: 1px solid var(--line); color: var(--text-2); font-size: var(--fs-sm); }
.foot__in { max-width: var(--w-page); margin: 0 auto; padding: var(--s3) var(--s4); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); justify-content: space-between; }

.crumbs { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s2); }
.crumbs li + li::before { content: "›"; margin-right: var(--s2); color: var(--line-strong); }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s4); }
.pagehead__sub { color: var(--text-2); margin-top: var(--s1); }
.pagehead__act { display: flex; flex-wrap: wrap; gap: var(--s2); }

.sec { margin-top: var(--s6); }
.sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s3); margin-bottom: var(--s3); }
.sec__head .count { color: var(--text-2); font-weight: 400; font-size: var(--fs-md); margin-left: var(--s1); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s4); box-shadow: var(--shadow); }
.card--flat { box-shadow: none; }
.card--pad0 { padding: 0; overflow: hidden; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); margin-bottom: var(--s3); }
.stack > * + * { margin-top: var(--s3); }
.stack--lg > * + * { margin-top: var(--s5); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.row--between { justify-content: space-between; }
.cols-2 > .sec, .cols-2 > div > .sec:first-child { margin-top: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.cols-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s5); align-items: start; }

/* вкладки раздела (соперник: герои / команды / бои; админка) — обычные ссылки */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: var(--s2) var(--s3); color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); border-radius: var(--r1) var(--r1) 0 0; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-weight: 400; color: var(--text-2); margin-left: 2px; }

/* пары «подпись — значение» */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s1) var(--s4); }
.kv dt { color: var(--text-2); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv--inline { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.kv--inline div { display: flex; gap: var(--s1); }

/* сводка числами */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s3); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s3) var(--s4); }
.tile__n { font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile__l { color: var(--text-2); font-size: var(--fs-sm); }

/* ───────────── 5. Кнопки и формы ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r1); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { background: var(--surface-3); }
.btn--primary { background: var(--accent-bg); border-color: var(--accent-bg); color: var(--accent-on); }
.btn--primary:hover { background: var(--accent-bg-hover); border-color: var(--accent-bg-hover); }
.btn--danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--danger-solid { background: var(--danger-bg); border-color: var(--danger-bg); color: var(--danger-on); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--sm { min-height: 30px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.btn--lg { min-height: 48px; padding: 0 var(--s5); font-size: var(--fs-lg); }
.btn--block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.input, .select {
  min-height: var(--tap); width: 100%; padding: 0 var(--s3); border-radius: var(--r1);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit;
}
.input::placeholder { color: var(--text-2); opacity: .8; }
.select {
  appearance: none; padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
                    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 50%, calc(100% - .8rem) 50%;
  background-size: .35rem .35rem; background-repeat: no-repeat;
}
.input:hover, .select:hover { border-color: var(--text-2); }
.input:focus-visible, .select:focus-visible { outline-offset: 0; border-color: var(--focus); }
.input:disabled, .select:disabled { background: var(--surface-2); color: var(--text-2); cursor: not-allowed; }
.input--mono { font-family: var(--mono); letter-spacing: .04em; }
.input--code { font-family: var(--mono); font-size: 22px; letter-spacing: .22em; text-align: center; text-transform: uppercase; min-height: 52px; }
.hint { font-size: var(--fs-sm); color: var(--text-2); }
.field--error .input, .field--error .select, .input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.err { font-size: var(--fs-sm); color: var(--danger); font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); }
.check input { width: 18px; height: 18px; accent-color: var(--accent-bg); }

/* фильтры: строка полей, на телефоне сворачивается в <details> */
.filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; }
.filters > .field { flex: 1 1 170px; }
.filters__act { display: flex; flex-wrap: wrap; gap: var(--s2); flex: 0 0 auto; }
.fold > summary { cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; gap: var(--s2); list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸"; color: var(--text-2); display: inline-block; width: 1em; }
.fold[open] > summary::before { content: "▾"; }
.fold--filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s2) var(--s4); }
.fold--filters[open] { padding-bottom: var(--s4); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 30px; padding: 0 var(--s3);
  border-radius: var(--r-pill); background: var(--accent-soft); color: var(--text); font-size: var(--fs-sm); font-weight: 600;
}
.chip a { color: var(--text-2); font-weight: 700; padding: 0 2px; }
.chip a:hover { color: var(--danger); text-decoration: none; }
.search { display: flex; gap: var(--s2); }
.search .input { flex: 1; min-width: 0; }

/* переключатель из нескольких вариантов (тема оформления): радио-кнопки без скриптов */
.seg { padding: 0; margin: 0; min-width: 0; display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r1); overflow: hidden; }
.seg label { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3); cursor: pointer; font-weight: 600; font-size: var(--fs-sm); }
.seg label + label { border-left: 1px solid var(--line-strong); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--accent-bg); color: var(--accent-on); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -3px; }

/* ───────────── 6. Метки и уведомления ───────────── */
.tag {
  display: inline-flex; align-items: center; gap: var(--s1); padding: 1px var(--s2); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 650; line-height: 1.5; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2); border: 1px solid transparent;
}
.tag--new { background: var(--ok-soft); color: var(--ok); }
.tag--chg { background: var(--warn-soft); color: var(--warn); }
.tag--same { background: var(--surface-2); color: var(--text-2); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--danger { background: var(--danger-soft); color: var(--danger); }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--line { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot--ok { background: var(--ok); } .dot--warn { background: var(--warn); } .dot--danger { background: var(--danger); }

.notice { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r2); border: 1px solid var(--line); background: var(--surface-2); border-left-width: 4px; }
.notice__t { font-weight: 700; }
.notice--info { border-color: var(--accent); background: var(--accent-soft); }
.notice--ok { border-color: var(--ok); background: var(--ok-soft); }
.notice--warn { border-color: var(--warn); background: var(--warn-soft); }
.notice--danger { border-color: var(--danger); background: var(--danger-soft); }

/* ───────────── 7. Редкость, картинки, запасной вид ─────────────
   Класс редкости задаёт только переменную --rar; красятся рамка картинки и подпись .rar.
   Редкость всегда продублирована словом — цвет не единственный носитель. */
.r-common { --rar: var(--r-common); } .r-uncommon { --rar: var(--r-uncommon); } .r-rare { --rar: var(--r-rare); }
.r-epic { --rar: var(--r-epic); } .r-legendary { --rar: var(--r-legendary); } .r-mythical { --rar: var(--r-mythical); }
.rar { color: var(--rar, var(--text-2)); font-weight: 650; }

.av {
  width: 44px; height: 44px; flex: none; border-radius: var(--r2); object-fit: cover; display: inline-flex;
  border: 1px solid var(--rar, var(--line-strong)); background: var(--surface-2);
}
.av--sm { width: 38px; height: 38px; border-radius: var(--r1); }
.av--lg { width: 72px; height: 72px; border-radius: var(--r3); }
.av--xl { width: 96px; height: 96px; border-radius: var(--r3); border-width: 2px; }
.ic { width: 20px; height: 20px; flex: none; object-fit: contain; vertical-align: -4px; display: inline-flex; }
.ic--md { width: 28px; height: 28px; vertical-align: middle; }
.ic--lg { width: 40px; height: 40px; }
.ic--xl { width: 56px; height: 56px; }

/* запасной вид: первые буквы названия на спокойной подложке; рамка редкости сохраняется */
.ph {
  align-items: center; justify-content: center; overflow: hidden; user-select: none;
  background: linear-gradient(145deg, var(--surface-3), var(--surface-2)); color: var(--text-2);
  font-weight: 700; font-size: 15px; letter-spacing: .02em; line-height: 1;
}
.av--sm.ph { font-size: 12px; } .av--lg.ph { font-size: 24px; } .av--xl.ph { font-size: 30px; }
.ic.ph { font-size: 9px; border-radius: 5px; } .ic--md.ph { font-size: 11px; border-radius: var(--r1); }
.ic--lg.ph, .ic--xl.ph { font-size: 14px; border-radius: var(--r1); }

.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; font-size: .92em; }
.stars__asc { color: var(--r-mythical); }
.stars__off { color: var(--line-strong); }

/* ───────────── 8. Герой, команда, бой ───────────── */
/* карточка героя в ленте */
.hero { display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: var(--s2); border-radius: var(--r2); color: var(--text); }
a.hero:hover { background: var(--surface-2); text-decoration: none; }
.hero__t { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hero__name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__meta { font-size: var(--fs-sm); color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0 var(--s2); align-items: baseline; }
.sets { display: flex; flex-wrap: wrap; gap: 2px var(--s2); align-items: center; font-size: var(--fs-xs); color: var(--text-2); }
.set { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.set__n { font-variant-numeric: tabular-nums; font-weight: 650; }

/* шапка страницы героя и соперника */
.herohead { display: flex; gap: var(--s4); align-items: center; }
.herohead__t { min-width: 0; }
.herohead__meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: center; margin-top: var(--s1); color: var(--text-2); }

/* строка команды: сведения слева, герои сеткой */
.teamrow { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: center; }
.teamrow + .teamrow { border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s3); }
.teamrow__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--fs-sm); }
.teamrow__when { font-weight: 650; font-size: var(--fs-md); color: var(--text); }
.teamrow__heroes { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: var(--s1) var(--s2); min-width: 0; }
.list > .card + .card { margin-top: var(--s3); }

/* выбор даты: «сборка на дату» */
.dateform { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-end; }
.dateform .input { width: auto; }
.subhead { margin: var(--s4) 0 var(--s2); color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-sm); }
.subhead:first-child { margin-top: 0; }
.subhead .count { font-weight: 400; }
/* история ников */
.nicks { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.nicks li { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; padding-bottom: var(--s2); border-bottom: 1px dashed var(--line); }
.nicks li > :last-child { margin-left: auto; }

/* плотный ряд аватаров (в таблицах боёв) */
.avs { display: inline-flex; gap: var(--s1); vertical-align: middle; }

/* журнал ходов боя */
.log { counter-reset: turn; }
.log li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.log__n { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.log__own { color: var(--accent); font-weight: 650; } .log__enemy { color: var(--danger); font-weight: 650; }

/* ───────────── 9. Сборка героя ───────────── */
.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.item { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--rar, var(--line-strong)); border-radius: var(--r2); padding: var(--s3); min-width: 0; }
.item--empty { border-style: dashed; border-top-style: dashed; color: var(--text-2); display: flex; align-items: center; justify-content: center; min-height: 96px; background: transparent; }
.item__head { display: flex; gap: var(--s3); align-items: center; }
.item__pic { width: 48px; height: 48px; flex: none; border-radius: var(--r1); border: 1px solid var(--rar, var(--line-strong)); background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; object-fit: contain; }
.item__pic img { width: 34px; height: 34px; object-fit: contain; }
.item__slot { font-weight: 650; }
.item__sub { font-size: var(--fs-sm); color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0 var(--s2); }
.item__main { margin-top: var(--s2); display: flex; justify-content: space-between; gap: var(--s2); font-weight: 700; padding: var(--s1) var(--s2); background: var(--surface-2); border-radius: var(--r1); }
.subs { margin-top: var(--s1); font-size: var(--fs-sm); }
.subs li { display: flex; justify-content: space-between; gap: var(--s2); padding: 2px var(--s2); }
.subs li + li { border-top: 1px dashed var(--line); }
.subs .v, .item__main .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.subs__asc { color: var(--gold); }

.setlist { display: flex; flex-wrap: wrap; gap: var(--s2); }
.setlist li { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3) var(--s1) var(--s2); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.setlist .part { color: var(--text-2); }

.statsum { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s1) var(--s4); }
.statsum div { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s1) 0; border-bottom: 1px dashed var(--line); }
.statsum dt { color: var(--text-2); }
.statsum dd { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* реликвия и камни */
.relic { display: flex; gap: var(--s3); align-items: center; }
.relic__name { font-weight: 650; }
.sockets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.stone { display: flex; align-items: center; gap: var(--s2); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r1); min-width: 0; }
.stone--empty { border-style: dashed; color: var(--text-2); }
.stone__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: var(--fs-sm); }
.stone__shape { font-size: var(--fs-xs); color: var(--text-2); }
/* форма гнезда — запасной вид камня */
.shape { width: 28px; height: 28px; flex: none; background: var(--gold); display: inline-block; }
.shape--circle { border-radius: 50%; }
.shape--square { border-radius: 4px; transform: scale(.86); }
.shape--triangle { clip-path: polygon(50% 6%, 96% 92%, 4% 92%); }
.shape--diamond { clip-path: polygon(50% 2%, 94% 50%, 50% 98%, 6% 50%); }
.shape--pentagon { clip-path: polygon(50% 3%, 97% 38%, 79% 95%, 21% 95%, 3% 38%); }
.shape--none { background: transparent; border: 2px dashed var(--line-strong); border-radius: 50%; }

/* навыки и уровни */
.skills { display: grid; gap: var(--s2); }
.skill { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.skill__t { min-width: 0; flex: 1; }
.skill__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lvl { display: inline-flex; gap: 3px; align-items: center; vertical-align: middle; }
.lvl i { width: 14px; height: 6px; border-radius: 2px; background: var(--surface-3); display: block; }
.lvl i.on { background: var(--accent-bg); }
.lvl--max i.on { background: var(--gold); }

/* таланты по веткам */
.trees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.tree { border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s3); min-width: 0; }
.tree--off { opacity: .6; }
.tree__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s2); }
.tree li { display: flex; gap: var(--s2); font-size: var(--fs-sm); padding: 2px 0; }
.tree .tier { color: var(--text-2); font-variant-numeric: tabular-nums; width: 1.2em; flex: none; }

/* ───────────── 10. Версии и разница ───────────── */
.versions { position: relative; }
.ver { position: relative; padding: 0 0 var(--s5) var(--s5); border-left: 2px solid var(--line); margin-left: var(--s2); }
.ver:last-child { padding-bottom: 0; border-left-color: transparent; }
.ver::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.ver--cur::before { background: var(--accent-bg); border-color: var(--accent-bg); }
.ver__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin-bottom: var(--s2); }
.ver__n { font-weight: 700; font-size: var(--fs-lg); }
.ver__dates { color: var(--text-2); font-size: var(--fs-sm); }

.diff { border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); overflow: hidden; }
.diff__row { display: grid; grid-template-columns: 28px 170px minmax(0, 1fr); gap: var(--s3); padding: var(--s2) var(--s3); align-items: baseline; border-left: 3px solid transparent; }
.diff__row + .diff__row { border-top: 1px solid var(--line); }
.diff__mark { font-family: var(--mono); font-weight: 700; text-align: center; border-radius: var(--r1); line-height: 1.5; }
.diff__what { font-weight: 650; }
.diff__row--add { border-left-color: var(--ok); } .diff__row--add .diff__mark { background: var(--ok-soft); color: var(--ok); }
.diff__row--del { border-left-color: var(--danger); } .diff__row--del .diff__mark { background: var(--danger-soft); color: var(--danger); }
.diff__row--chg { border-left-color: var(--warn); } .diff__row--chg .diff__mark { background: var(--warn-soft); color: var(--warn); }
.diff del { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--danger); }
.diff ins { text-decoration: none; font-weight: 650; background: var(--ok-soft); color: var(--text); padding: 0 3px; border-radius: 3px; }
.diff .arrow { color: var(--text-2); margin: 0 var(--s1); }
.diff__pair { display: block; }
.diff__pair + .diff__pair { margin-top: 2px; }
.diff__sum { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s2); }

/* ───────────── 11. Таблицы и листание ───────────── */
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: var(--s2) var(--s3); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.tbl thead th { font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); white-space: nowrap; background: var(--surface-2); }
.tbl thead th a { color: inherit; }
.tbl thead th[aria-sort] a::after { content: " ↓"; }
.tbl thead th[aria-sort="ascending"] a::after { content: " ↑"; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .act { text-align: right; white-space: nowrap; }
.tbl .act form { display: inline; }
.tbl__main { font-weight: 650; }
.tbl tr.is-off td { color: var(--text-2); }
.tbl tr.is-off .tbl__main { text-decoration: line-through; }
.cellhero { display: flex; align-items: center; gap: var(--s2); min-width: 0; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); flex-wrap: wrap; }
.pager__info { color: var(--text-2); font-size: var(--fs-sm); }
.more { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: var(--s3); border: 1px dashed var(--line-strong); border-radius: var(--r2); font-weight: 650; }
.more:hover { background: var(--accent-soft); text-decoration: none; border-style: solid; }

/* ───────────── 12. Вход, привязка, ключи, выпуски ───────────── */
.auth { text-align: center; margin: var(--s6) 0 var(--s4); }
.auth img { width: 72px; height: 72px; border-radius: 16px; box-shadow: var(--shadow); }
.auth h1 { margin-top: var(--s3); }
.form { display: grid; gap: var(--s4); }
.form__act { display: flex; flex-wrap: wrap; gap: var(--s3); }
.form__act .btn { flex: 1; }

/* код привязки: показываем то, что ввёл человек, крупно и разборчиво */
.code { font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: .2em; text-align: center; padding: var(--s3); background: var(--surface-2); border-radius: var(--r2); user-select: all; }

/* секрет, который показывается один раз */
.secret { border: 2px solid var(--gold); background: var(--gold-soft); border-radius: var(--r2); padding: var(--s4); }
.secret__v { display: block; width: 100%; margin: var(--s2) 0; padding: var(--s3); font-family: var(--mono); font-size: var(--fs-lg); letter-spacing: .04em; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r1); overflow-wrap: anywhere; user-select: all; }
.hash { font-family: var(--mono); font-size: var(--fs-sm); overflow-wrap: anywhere; user-select: all; background: var(--surface-2); padding: var(--s2) var(--s3); border-radius: var(--r1); display: block; }

/* скачивание */
.download { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s4) var(--s5); align-items: start; }
.download__icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.download__ver { font-size: var(--fs-h1); font-weight: 700; line-height: 1.2; }
.steps { counter-reset: step; display: grid; gap: var(--s3); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s3); }
.steps li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); }
pre.cmd { margin: var(--s1) 0 0; padding: var(--s2) var(--s3); background: var(--surface-2); border-radius: var(--r1); font-family: var(--mono); font-size: var(--fs-sm); overflow-x: auto; user-select: all; }

/* ───────────── 13. Пустые состояния, загрузка, ошибки ───────────── */
.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: var(--r2); }
.empty__t { color: var(--text); font-weight: 700; font-size: var(--fs-lg); margin-bottom: var(--s1); }
.empty .btn { margin-top: var(--s3); }
.empty__glyph { width: 48px; height: 48px; margin: 0 auto var(--s3); border-radius: 50%; border: 3px solid var(--line-strong); position: relative; opacity: .7; }
.empty__glyph::after { content: ""; position: absolute; inset: 14px; background: var(--line-strong); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.errpage { text-align: center; padding: var(--s7) var(--s4); }
.errpage__code { font-size: 64px; font-weight: 800; line-height: 1; color: var(--line-strong); font-variant-numeric: tabular-nums; }
.errpage h1 { margin: var(--s3) 0 var(--s2); }
.errpage .btn { margin-top: var(--s4); }

/* ожидание: полоса и «скелет» (страница обновляется сама заголовком Refresh, скриптов нет) */
.wait { display: flex; align-items: center; gap: var(--s3); }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent-bg); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { display: block; height: 14px; border-radius: var(--r1); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
.skel--av { width: 44px; height: 44px; border-radius: var(--r2); } .skel--w40 { width: 40%; } .skel--w60 { width: 60%; } .skel--w80 { width: 80%; }
@keyframes skel { to { background-position: -200% 0; } }

/* витрина компонентов и макетов (только для web-design, в сервис не переносится) */
.demo__t { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); font-weight: 700; margin-bottom: var(--s3); }

/* ───────────── 14. Телефон ───────────── */
@media (max-width: 900px) {
  .cols-side { grid-template-columns: minmax(0, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teamrow { grid-template-columns: minmax(0, 1fr); }
  .teamrow__meta { flex-direction: row; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; }
}
@media (max-width: 720px) {
  :root { --fs-h1: 22px; --fs-h2: 18px; --tap: 44px; }
  /* поля ввода 16px — иначе iOS увеличивает страницу при фокусе */
  .input, .select { font-size: 1rem; }
  .hdr__in { flex-wrap: wrap; gap: 0 var(--s2); padding: 0 var(--s3); }
  .brand { min-height: 48px; }
  .nav { order: 3; flex: 0 0 calc(100% + 2 * var(--s3)); margin: 0 calc(-1 * var(--s3)); padding: 0 var(--s2); overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--hdr-line); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { min-height: 42px; padding: 0 var(--s3); }
  .update__long, .hdr__link .long { display: none; }
  .page { padding: var(--s4) var(--s3) var(--s6); }
  .card { padding: var(--s3); }
  .cols-2, .cols-3, .trees { grid-template-columns: minmax(0, 1fr); }
  .items { gap: var(--s2); }
  .item { padding: var(--s2); }
  .item__head { gap: var(--s2); align-items: flex-start; }
  .item__pic { width: 36px; height: 36px; }
  .item__pic img, .item__pic .ic--md { width: 24px; height: 24px; }
  .subs li, .item__main { padding-left: var(--s1); padding-right: var(--s1); }
  .sockets { grid-template-columns: minmax(0, 1fr); }
  .teamrow__heroes { grid-template-columns: minmax(0, 1fr); }
  .herohead { align-items: flex-start; }
  .av--xl { width: 72px; height: 72px; }
  .av--xl.ph { font-size: 24px; }
  .diff__row { grid-template-columns: 28px minmax(0, 1fr); }
  .diff__row > :last-child { grid-column: 2; }
  .download { grid-template-columns: minmax(0, 1fr); }
  .download__icon { width: 72px; height: 72px; border-radius: 16px; }
  .form__act .btn { flex-basis: 100%; }
  .pagehead__act, .pagehead__act .btn { width: 100%; }
  .kv--stack { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv--stack dd { margin-bottom: var(--s2); }

  /* таблица → карточки: каждая строка — блок, подписи берутся из data-label */
  .tbl--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl--stack, .tbl--stack tbody, .tbl--stack tr, .tbl--stack td { display: block; width: 100%; }
  .tbl--stack tr { padding: var(--s3); border-bottom: 1px solid var(--line); }
  .tbl--stack tr:last-child { border-bottom: 0; }
  .tbl--stack td { border: 0; padding: 2px 0; display: flex; gap: var(--s3); justify-content: space-between; align-items: center; text-align: right; }
  .tbl--stack td::before { content: attr(data-label); color: var(--text-2); font-size: var(--fs-sm); text-align: left; flex: none; }
  .tbl--stack td.tbl__main, .tbl--stack td.tbl__lead { justify-content: flex-start; text-align: left; padding-bottom: var(--s1); }
  .tbl--stack td.tbl__main::before, .tbl--stack td.tbl__lead::before, .tbl--stack td.act::before { content: none; }
  .tbl--stack td.act { justify-content: flex-start; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s2); }
  .tbl--stack td:empty { display: none; }
  .tbl--stack .btn--sm { min-height: 36px; }
}

/* ───────────── 15. Движение и печать ───────────── */
@media (prefers-reduced-motion: reduce) {
  .update, .update__dot, .skel, .spin { animation: none; }
  .spin { border-top-color: var(--surface-3); border-right-color: var(--accent-bg); }
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .hdr, .foot, .filters, .pager, .more, .skip { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* Карточка героя при наведении на аватар и при фокусе — только CSS, без скриптов */
.hpop { position: relative; display: inline-flex; flex: none; }
.hpop:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r1); }
.hcard {
  display: none; position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: 300px;
  padding: var(--s3); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--r2); box-shadow: 0 10px 28px rgba(0, 0, 0, .28); text-align: left; white-space: normal;
  font-weight: 400; font-size: var(--fs-sm); line-height: 1.35; cursor: default;
}
.hpop:hover > .hcard, .hpop:focus > .hcard, .hpop:focus-within > .hcard, a:focus-visible .hpop > .hcard {
  display: flex; flex-direction: column; gap: var(--s2);
}
.hcard__head { display: flex; gap: var(--s3); align-items: center; }
.hcard__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hcard__t b { font-size: var(--fs-md, 1rem); }
.hcard__items { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.hcard__item { display: inline-flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid var(--rar, var(--line)); border-radius: var(--r1); background: var(--surface-2); }
.hcard__item .ic--md { width: 22px; height: 22px; }
.hcard__kv { line-height: 1.5; }
.hcard__stats { line-height: 1.45; }
/* у правого края — карточка открывается влево */
.avs > .hpop:nth-last-child(-n+2) > .hcard, td:last-child .hcard, .teamrow__heroes > :nth-child(4n) .hcard { left: auto; right: 0; }
/* на ширине ПК таблицы не прокручиваются — карточка не обрезается */
@media (min-width: 721px) { .scroll, .card--pad0 { overflow: visible; } }
@media (hover: none) { .hcard { display: none !important; } }

/* Журнал: пиктограммы режима и итога */
.kicon { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; font-size: 18px; line-height: 1; cursor: default; }
.oicon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; font-weight: 700; line-height: 1; cursor: default; }
.oicon--ok { background: var(--ok-soft); color: var(--ok); }
.oicon--danger { background: var(--danger-soft); color: var(--danger); }
.oicon--line { border: 1px solid var(--line-strong); color: var(--text-2); }

/* Карточка героя: всегда на экране — привязка к аватару с переворотом у краёв (CSS anchor positioning);
   без поддержки — как раньше, под аватаром */
@supports (anchor-name: --hp) {
  .hpop { anchor-name: --hp; anchor-scope: --hp; }
  .hcard {
    position: fixed; position-anchor: --hp; top: anchor(bottom); left: anchor(left); margin: 6px 0 0;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    max-height: calc(100vh - 16px); overflow: auto;
  }
  .avs > .hpop:nth-last-child(-n+2) > .hcard, td:last-child .hcard, .teamrow__heroes > :nth-child(4n) .hcard { left: anchor(left); right: auto; }
}
/* аватар под курсором — белая рамка */
.hpop:hover > .av, .hpop:focus-within > .av, a.hero:hover .hpop > .av { border-color: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.hcard__relic { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--s2); align-items: center; }
.hcard__relic > .ic { grid-row: span 2; }
.hcard__rn { min-width: 0; }
.hcard__stones { display: flex; gap: 4px; }
.hcard__stone { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; }
.hcard__stone .ic--md { width: 24px; height: 24px; }
.hcard__stone .shape { width: 18px; height: 18px; }
.hcard__stats { display: grid; grid-template-columns: max-content max-content; column-gap: var(--s4); row-gap: 1px; margin: 0; font-size: var(--fs-sm); }
.hcard__stats dt { color: var(--text-2); font-weight: 600; letter-spacing: .02em; }
.hcard__stats dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.hcard__av { position: relative; display: inline-flex; flex: none; }
/* как на аватаре в игре: «+N» белым с чёрной обводкой справа, благословение — в чёрном круге с золотой рамкой */
.hcard__emp { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); color: #fff; font-weight: 900; font-size: 17px; line-height: 1; letter-spacing: -.02em; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 4px #000; pointer-events: none; }
.hcard__bless, .hcard__bicon { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; background: #000; border: 2px solid #d9a52b; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); overflow: hidden; }
.hcard__bless { position: absolute; left: -5px; bottom: -5px; width: 28px; height: 28px; padding: 2px; }
.hcard__bicon { width: 24px; height: 24px; padding: 2px; }
.hcard__bless img, .hcard__bicon img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 50%; }
.hcard__aura { display: flex; align-items: center; gap: 6px; }
.hcard__aicon { width: 20px; height: 20px; object-fit: contain; flex: none; }
.hcard__bph { color: #f2c94c; font-weight: 800; font-size: 9px; line-height: 1; letter-spacing: -.02em; }
.hcard__bl { display: flex; align-items: center; gap: var(--s2); }

/* Страница боя: карточки всех героев на одном экране */
.battlecards { display: flex; flex-direction: column; gap: var(--s2); }
.battlecards__side { font-size: var(--fs-md); margin: var(--s2) 0 0; }
.battlecards__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
.hcard.hcard--static { display: flex; flex-direction: column; gap: var(--s2); position: static; width: auto; max-height: none; overflow: visible; box-shadow: none; margin: 0; }
.hcard--static .hcard__head .av--lg { width: 56px; height: 56px; }
.hcard--static .hcard__stats { grid-template-columns: max-content max-content max-content max-content; column-gap: var(--s3); }
@media (max-width: 1100px) { .battlecards__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
