/* Мини-аппка LOOKISM — вид «премиальной мобильной файтинг-гачи».

   29.09.2026, менеджер выбрал стандарт жанра и назвал планку: Mortal
   Kombat Mobile и Honkai: Star Rail. Отсюда всё ниже: тёмная сталь
   панелей, тёплое металлическое золото для ранга и валют, у каждой игры
   свой цвет, крупные узкие заголовки, боевой экран как HUD файтинга.

   Вид СВОЙ и одинаковый у всех: тема Telegram (светлая/тёмная) на него
   больше не влияет — решение менеджера. Поэтому переменных --tg-theme-*
   здесь нет вовсе. */

:root {
  color-scheme: dark;

  --bg:      #090b12;
  --s1:      #10131c;      /* низ панели */
  --s2:      #171b27;      /* верх панели */
  --s3:      #1e2433;      /* кнопка, гнездо */
  --s4:      #283046;      /* кнопка нажатая / поднятая */
  --line:    rgba(150, 168, 214, .13);
  --line-2:  rgba(150, 168, 214, .22);
  --track:   rgba(150, 168, 214, .10);
  --raise:   rgba(150, 168, 214, .06);

  --fg:      #eef1f8;
  --fg-2:    #c4cad9;
  --dim:     #8f97ad;
  --faint:   #626a80;

  --gold:    #e2bd78;
  --gold-2:  #b48a42;
  --gold-bg: rgba(226, 189, 120, .12);
  --gold-ln: rgba(226, 189, 120, .34);

  --mine:    #3ddc97;
  --enemy:   #ff4d5e;
  --mana:    #5b8cff;
  --warn:    #ffb547;

  /* Цвет игры. На главной — фирменный малиновый LOOKISM; внутри игры
     его перекрывает body[data-play]. */
  --accent:  #dc2a48;
  --acc-2:   #9e1530;
  --on-acc:  #ffffff;

  --radius:  14px;
  --radius-s: 10px;
  --navh:    66px;

  --font:    "Sofia Sans", system-ui, -apple-system, "Segoe UI", Roboto,
             "Helvetica Neue", sans-serif;
  --display: "Sofia Sans Extra Condensed", "Sofia Sans", "Arial Narrow",
             system-ui, sans-serif;
  --ease:    cubic-bezier(.16, 1, .3, 1);
  --ease-s:  cubic-bezier(.22, 1, .36, 1);
}

/* У каждой игры свой свет: кнопки, активная вкладка, подсветка фона. */
body[data-play="battle"] { --accent: #ff8a3d; --acc-2: #d9621f; --on-acc: #1c0b02; }
body[data-play="cards"]  { --accent: #dc2a48; --acc-2: #9e1530; --on-acc: #ffffff; }
body[data-play="baki"]   { --accent: #8b52ee; --acc-2: #5a2fb8; --on-acc: #ffffff; }
body[data-play="naruto"] { --accent: #f7a400; --acc-2: #c27a00; --on-acc: #1a1000; }
body[data-play="roll"]   { --accent: #34c9ec; --acc-2: #127fae; --on-acc: #04141c; }
body[data-play="mafia"]  { --accent: #3fd49b; --acc-2: #15906a; --on-acc: #03170f; }

* { box-sizing: border-box; }

/* Атрибут hidden скрывает элемент правилом display:none из БРАУЗЕРНОГО
   стиля, а любое авторское правило его перебивает. У .boot и .nav стоит
   display:flex — и hidden на них не делал ровным счётом ничего.
   Заставка висела поверх готового приложения, а игрок видел вечное
   «рисую…». Правило ниже возвращает hidden обещанное поведение. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}

body {
  padding: 0 14px calc(var(--navh) + 22px + env(safe-area-inset-bottom));
  max-width: 620px;
  margin: 0 auto;
  min-height: 100vh;
  /* Прозрачный: иначе body красит свой фон поверх слоя света (::before),
     и свет виден только по краям колонки на широком экране. */
  background: transparent;
}

/* Свет сверху — в цвет открытой игры. Неподвижный слой: ни анимации,
   ни размытия, на слабом телефоне стоит ноль. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #121827 0%, #0c1019 240px, var(--bg) 560px);
}

::selection { background: rgba(226, 189, 120, .35); color: #fff; }
input, select, textarea { caret-color: var(--gold); }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px;
}
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-width: thin; scrollbar-color: var(--s4) var(--bg); }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb {
    background: var(--s4); border-radius: 10px; border: 2px solid var(--bg);
  }
}
a { color: var(--gold); text-underline-offset: 3px; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; }

/* Иконки — один нарисованный набор (app.js, ICONS), одна толщина. */
.ico {
  width: 1em; height: 1em; flex: none; display: inline-block;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.14em;
}

/* ── заставка ─────────────────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; z-index: 40;
  background: linear-gradient(180deg, #121827 0%, var(--bg) 70%);
}
.boot-emb {
  width: 64px; height: 64px; display: grid; place-items: center;
  color: var(--gold); font-size: 34px;
  border: 1.5px solid var(--gold-ln); border-radius: 18px;
  background: linear-gradient(180deg, #1c2130, #10131b);
  box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .9),
              inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: emb-in .7s var(--ease) both;
}
.boot-mark {
  font: 900 44px/1 var(--display); letter-spacing: .16em;
  color: var(--fg); padding-left: .16em;
  animation: mark-in .8s var(--ease) .05s both;
}
@keyframes emb-in { from { opacity: 0; transform: scale(.7) rotate(-8deg); } }
@keyframes mark-in { from { opacity: 0; letter-spacing: .42em; } }
.boot-sub {
  color: var(--dim); font-size: 13px; min-height: 19px;
  animation: fade .4s ease .3s both;
}
.boot.is-err .boot-sub { color: var(--enemy); max-width: 300px;
  text-align: center; line-height: 1.5; }
/* Полоска под логотипом: видно, что приложение живо, а не подвисло. */
.boot-bar {
  width: 148px; height: 3px; border-radius: 3px;
  background: var(--track); overflow: hidden;
}
.boot-bar i {
  display: block; width: 38%; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: sweep 1.1s ease-in-out infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(380%); }
}
.boot.is-err .boot-bar { display: none; }

/* ── шапка ────────────────────────────────────────────────────────── */
.top {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 16px 0 14px;
}
.ava {
  position: relative; overflow: hidden;
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font: 800 22px/1 var(--display); color: var(--gold);
  background: radial-gradient(circle at 50% 30%, #262d40, #121620);
  box-shadow: 0 0 0 1.5px var(--gold-ln), 0 0 0 4px rgba(9, 11, 18, 1),
              0 0 0 5px rgba(226, 189, 120, .14),
              0 10px 22px -12px rgba(0, 0, 0, .9);
}
.ava img { position: absolute; inset: 0; width: 100%; height: 100%;
           object-fit: cover; }
/* Внутри игры вместо лица — значок раздела в цвете игры. */
body.in-game .ava {
  width: 30px; height: 44px; flex-basis: 30px; border-radius: 0;
  color: var(--accent); font-size: 28px;
  background: none; box-shadow: none;
}
.who { min-width: 0; flex: 1; }
.who-name {
  font-size: 18px; font-weight: 750; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.in-game .who-name {
  font: 850 26px/1 var(--display); text-transform: uppercase;
  letter-spacing: .02em;
}
.who-tag {
  color: var(--dim); font-size: 12.5px; margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.in-game .who-tag::before {
  content: ''; width: 6px; height: 6px; flex: none; border-radius: 1px;
  background: var(--accent); transform: rotate(45deg);
}
/* Кошелёк игры и титулы — отдельной строкой под шапкой. */
.badges {
  display: flex; gap: 6px; flex-wrap: wrap; order: 5; flex-basis: 100%;
}
.badges:empty { display: none; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 650; padding: 5px 10px; border-radius: 999px;
  background: var(--gold-bg); color: var(--gold);
  border: 1px solid var(--gold-ln); white-space: nowrap;
}
.coin {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #1a1f2d, #12151f);
  border: 1px solid var(--line-2);
  font: 800 16px/1.2 var(--display); letter-spacing: .02em; color: var(--fg);
}
.coin i { font-style: normal; font-size: 13px; line-height: 1; }
.coin.gold { color: var(--gold); border-color: var(--gold-ln); }

/* Кнопка «назад» появляется только внутри игры. */
.back {
  flex: 0 0 38px; width: 38px; height: 38px; margin-right: -3px;
  border-radius: 12px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--s3), var(--s1));
  color: var(--fg); font-size: 20px; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .15s var(--ease), background .15s;
}
.back:active { transform: scale(.9); background: var(--s4); }

/* Переключатель языка в шапке. Виден всегда — и на главной, и внутри
   любого раздела. */
.lang-b {
  flex: 0 0 auto; height: 32px; padding: 0 11px 0 9px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--s3), var(--s1));
  color: var(--fg-2); font: 800 14px/1 var(--display); letter-spacing: .08em;
  cursor: pointer; transition: transform .15s var(--ease);
}
.lang-b .ico { font-size: 15px; color: var(--gold); }
.lang-b:active { transform: scale(.94); }
.lang-b.busy { opacity: .5; }

/* На домашнем экране нижней навигации нет — незачем держать под неё поле. */
body.at-home { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

/* ── экран ────────────────────────────────────────────────────────── */
/* Направление сдвига берётся из порядка вкладок: уходишь вправо по
   навигации — экран приезжает справа. Переход подсказывает, где ты. */
#view.in-r { animation: slide-r .38s var(--ease) both; }
#view.in-l { animation: slide-l .38s var(--ease) both; }
#view.in-z { animation: zoom-in .42s var(--ease) both; }
@keyframes slide-r { from { opacity: 0; transform: translateX(26px); } }
@keyframes slide-l { from { opacity: 0; transform: translateX(-26px); } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.965) translateY(8px); } }

/* Карточки появляются лесенкой — глаз читает сверху вниз. Задержку
   ставит JS через --i. Класс fresh — только на смену раздела. */
body.at-home #view.fresh .card {
  animation: card-in .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
}

/* ── главная: лобби ───────────────────────────────────────────────── */
.lobby-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin: 4px 2px 10px;
}
.lobby-t {
  font: 850 15px/1 var(--display); letter-spacing: .14em;
  text-transform: uppercase; color: var(--fg-2);
}
.lobby-n { font-size: 12px; color: var(--dim); }

/* Идущий бой — первое, что игрок должен увидеть. */
.live {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--gold-ln);
  background: linear-gradient(100deg, rgba(226, 189, 120, .22), rgba(226, 189, 120, .04) 70%),
              var(--s1);
  color: var(--fg); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .95);
}
#view.fresh .live { animation: card-in .5s var(--ease) both; }
.live:active { transform: scale(.985); }
.live-i {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px; color: #1b1408;
  background: linear-gradient(180deg, #f3d494, var(--gold) 55%, var(--gold-2));
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .8);
}
.live-b { flex: 1; min-width: 0; }
.live-t {
  display: block; font: 850 20px/1.05 var(--display);
  text-transform: uppercase; letter-spacing: .03em;
}
.live-s { display: block; font-size: 12.5px; color: var(--fg-2); margin-top: 2px; }
.live-go { font-size: 20px; color: var(--fg-2); }

/* Игры — баннеры, как события в лобби гачи: свет игры слева, её персонаж
   справа. Арт — живая карта игрока, а не картинка-заглушка. */
.games { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.game {
  --g: var(--accent); --g2: var(--acc-2);
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 13px; width: 100%;
  min-height: 94px; padding: 14px 14px 14px 14px;
  border-radius: 16px; border: 1px solid var(--line-2);
  background:
    linear-gradient(100deg, rgba(0, 0, 0, 0) 0%, rgba(9, 11, 18, .55) 100%),
    linear-gradient(180deg, var(--s2), var(--s1));
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 16px 30px -22px rgba(0, 0, 0, .95),
              inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .2s var(--ease), border-color .2s;
}
#view.fresh .game {
  animation: game-in .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes game-in { from { opacity: 0; transform: translateX(-18px); } }
.game[data-game="battle"] { --g: #ff8a3d; --g2: #d9621f; --gon: #1c0b02; }
.game[data-game="cards"]  { --g: #e5334f; --g2: #9e1530; --gon: #ffffff; }
.game[data-game="baki"]   { --g: #8b52ee; --g2: #5a2fb8; --gon: #ffffff; }
.game[data-game="roll"]   { --g: #34c9ec; --g2: #127fae; --gon: #04141c; }
.game[data-game="mafia"]  { --g: #3fd49b; --g2: #15906a; --gon: #03170f; }
/* Свет игры — слева, под значком. */
.game::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--g) 0%, transparent 58%);
  opacity: .24;
}
/* Кромка цвета игры снизу — тонкая, как на плашке события. */
.game::after {
  content: ''; position: absolute; left: 14px; right: 40%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--g), transparent);
}
.game:active { transform: scale(.982); }
.game-art {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(56%, 230px); z-index: -1;
  overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .5) 30%, #000 72%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .5) 30%, #000 72%);
}
/* Баки — не карта в рамке, а широкий кадр: лицо в центре, без увеличения,
   и места под него больше. */
.game[data-game="baki"] .game-art { width: min(66%, 300px); }
.game[data-game="baki"] .game-img {
  object-position: 50% 40%;
  transform: translateX(12%) scale(2); transform-origin: 52% 43%;
}
/* Затемнение под текстом: название и подпись заходят на арт, а светлые
   участки манги съедали белый текст. */
.game-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12, 15, 24, .92) 0%,
                              rgba(12, 15, 24, .45) 42%, transparent 72%);
}
/* Арт карты с нарисованной рамкой: увеличиваем и берём полосу на уровне
   лица, чтобы рамка ушла за край и остался персонаж. */
.game-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 24%;
  transform: scale(1.5); transform-origin: 50% 28%;
  opacity: 0; transition: opacity .6s ease;
}
.game-img.on { opacity: .9; }
.game-i {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; font-size: 27px; color: var(--gon, #fff);
  background: linear-gradient(160deg, var(--g), var(--g2));
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.game-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.game-n {
  font: 900 27px/.95 var(--display); letter-spacing: .015em;
  text-transform: uppercase; color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-a {
  font-size: 12px; color: var(--fg-2); line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-s {
  align-self: flex-start; max-width: 100%;
  margin-top: 3px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1.25;
  color: var(--gold); background: rgba(9, 11, 18, .72);
  border: 1px solid var(--gold-ln);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-go {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px; color: var(--fg);
  background: rgba(9, 11, 18, .72); box-shadow: inset 0 0 0 1px var(--line-2);
}
.game.idle .game-i { filter: saturate(.35) brightness(.8); }
.game.idle .game-s { color: var(--dim); border-color: var(--line-2); }
.game.idle .game-img.on { opacity: .45; filter: saturate(.4); }
/* Бой идёт — горит метка. */
.game.hot { border-color: rgba(255, 77, 94, .5); }
.game-live {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 6px;
  font: 850 12px/1 var(--display); letter-spacing: .14em; color: #fff;
  background: #e5283f;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .8);
}
.game-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* Экран «Ещё»: разделы плитками по три. */
.tiles {
  display: grid; gap: 10px; margin-bottom: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  min-height: 104px; padding: 16px 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--line); cursor: pointer;
  background: linear-gradient(180deg, var(--s2), var(--s1));
  color: inherit; font: inherit; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .18s var(--ease), border-color .18s;
}
#view.fresh .tile {
  animation: card-in .45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.tile:active { transform: scale(.95); border-color: var(--accent); }
.tile-i {
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center; font-size: 23px; color: var(--accent);
  background: linear-gradient(180deg, var(--s3), #151a26);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.tile-n { font-size: 13px; font-weight: 750; line-height: 1.2; }
.tile-a { font-size: 11px; line-height: 1.3; color: var(--dim); }
@media (max-width: 339px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── нижняя навигация ─────────────────────────────────────────────── */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  padding: 0 max(8px, calc((100vw - 620px) / 2)) env(safe-area-inset-bottom);
  background: linear-gradient(180deg, rgba(16, 19, 28, .97), #0a0c13);
  box-shadow: 0 -14px 30px -18px rgba(0, 0, 0, .95);
}
/* Золотая кромка сверху — тоньше волоса, гаснет к краям. */
.nav::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-ln) 30%,
                              var(--gold-ln) 70%, transparent);
}
.nav-row { position: relative; display: flex; flex: 1; }
/* Бегунок: один на всю панель, скользит под активную вкладку. */
.nav-ind {
  position: absolute; top: 0; left: 0; height: 100%;
  width: calc(100% / var(--nn, 5));
  transform: translateX(calc(var(--ni, 0) * 100%));
  transition: transform .42s var(--ease);
  pointer-events: none;
}
.nav-ind::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 34px; height: 3px;
  margin-left: -17px; border-radius: 0 0 3px 3px; background: var(--accent);
}
.nav-ind::after {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 60%;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 16%, transparent), transparent);
}
.nav-b {
  position: relative; flex: 1; min-width: 0; border: 0; background: transparent;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 11px 2px 9px; min-height: var(--navh);
  color: var(--dim); font: inherit;
  transition: color .2s;
}
.nav-b.is-on { color: var(--fg); }
.nav-b.is-on .nav-i { color: var(--accent); }
.nav-b.pop .nav-i { animation: nav-pop .45s var(--ease-s) both; }
@keyframes nav-pop {
  0%   { transform: translateY(3px) scale(.86); }
  100% { transform: translateY(0) scale(1); }
}
.nav-b:active .nav-i { transform: scale(.86); }
.nav-i { font-size: 23px; line-height: 1; display: grid; place-items: center;
         transition: transform .15s; }
.nav-t {
  font: 800 12.5px/1.2 var(--display); letter-spacing: .07em;
  text-transform: uppercase;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── панели ───────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045),
              0 18px 34px -28px rgba(0, 0, 0, .95);
}
/* Золотые насечки по верхним углам — подпись «панели» этого мира. */
.card::before, .card::after {
  content: ''; position: absolute; top: -1px; width: 14px; height: 14px;
  pointer-events: none; border-top: 1.5px solid var(--gold-ln);
}
.card::before { left: -1px; border-left: 1.5px solid var(--gold-ln);
                border-top-left-radius: var(--radius); }
.card::after { right: -1px; border-right: 1.5px solid var(--gold-ln);
               border-top-right-radius: var(--radius); }
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.card-title {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  font: 850 21px/1.05 var(--display); letter-spacing: .03em;
  text-transform: uppercase;
}
.card-title::before {
  content: ''; width: 7px; height: 7px; flex: none; border-radius: 1.5px;
  background: var(--accent); transform: rotate(45deg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.card-note { color: var(--dim); font-size: 12px; text-align: right; }

.hero { font: 850 26px/1.08 var(--display); letter-spacing: .02em;
        text-transform: uppercase; }
.hero-sub { color: var(--dim); font-size: 13px; margin-top: 4px; }

/* сетка статов */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border-radius: 12px; overflow: hidden;
  margin-top: 14px; border: 1px solid var(--line);
}
.card-head + .grid { margin-top: 0; }
.cell {
  position: relative; background: #121620; padding: 12px 6px 11px;
  text-align: center;
}
.cell-v {
  font: 850 25px/1.05 var(--display); letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell-k {
  color: var(--dim); font-size: 10.5px; margin-top: 4px; font-weight: 650;
  letter-spacing: .08em; text-transform: uppercase;
}
.cell-v.gold { color: var(--gold); }

/* Изменившееся после действия число подсвечивается: зелёным вверх,
   красным вниз. Игрок видит, что именно сдвинулось. */
.cell.up   { animation: bump-up 1s var(--ease) both; }
.cell.down { animation: bump-dn 1s var(--ease) both; }
@keyframes bump-up {
  0%   { background: rgba(61, 220, 151, .28); }
  100% { background: #121620; }
}
@keyframes bump-dn {
  0%   { background: rgba(255, 77, 94, .26); }
  100% { background: #121620; }
}
.cell.up .cell-v, .cell.down .cell-v { animation: num-pop .6s var(--ease-s) both; }
@keyframes num-pop { 0% { transform: scale(1.14); } }
.delta {
  position: absolute; right: 7px; top: 5px;
  font: 850 13px/1 var(--display); letter-spacing: .02em;
  animation: float-up 1.4s var(--ease) both; pointer-events: none;
}
.delta.up   { color: var(--mine); }
.delta.down { color: var(--enemy); }
@keyframes float-up {
  0%   { opacity: 0; transform: translateY(6px); }
  18%  { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px); }
}

/* ── кнопки ───────────────────────────────────────────────────────── */
/* Кнопка — литая плашка: светлее сверху, с кромкой света по верху.
   Главная — в цвет игры. Недоступная — плоская и тусклая, без кромки:
   её видно как «не сейчас», а не как «такая же, но бледная». */
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #232a3c, #171c29);
  color: var(--fg);
  border-radius: 12px; padding: 12px 13px; min-height: 50px; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07),
              0 8px 16px -12px rgba(0, 0, 0, .9);
  transition: transform .14s var(--ease), filter .15s, background .15s;
}
.act:active { transform: translateY(1px) scale(.985); filter: brightness(1.15); }
.act[disabled] {
  cursor: default; color: var(--dim); background: #141824;
  border-color: var(--line); box-shadow: none; filter: none; transform: none;
}
.act[disabled] .act-i { filter: grayscale(1); opacity: .6; }
.act-i { font-size: 19px; line-height: 1; flex: none; display: grid;
         place-items: center; min-width: 22px; }
.act-sub {
  display: block; font-size: 11.5px; font-weight: 500; color: var(--dim);
  margin-top: 2px;
}
.act.wide { grid-column: 1 / -1; }
.act.primary {
  background: linear-gradient(180deg, var(--accent), var(--acc-2));
  color: var(--on-acc); border-color: transparent;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3),
              0 10px 20px -10px rgba(0, 0, 0, .8);
}
.act.primary .act-sub { color: var(--on-acc); opacity: .8; }
.act.busy { pointer-events: none; }
.act.busy::after, .zone-go.busy::after, .pack-b-q.busy::after,
.sc-buy.busy::after, .fmove.busy::after, .perk-b.busy::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .16), transparent 80%);
  animation: busy 1s linear infinite;
}
@keyframes busy { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.act.busy .act-i { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  .act:not([disabled]):hover, .zone-go:hover, .tier-b:hover,
  .pack-b-q:not([disabled]):hover, .fmove:not(.off):hover {
    filter: brightness(1.12);
  }
  .game:hover, .tile:hover { border-color: rgba(226, 189, 120, .4); }
}

/* Успешное действие — короткая волна по кнопке. */
.act.done { animation: act-done .9s var(--ease) both; }
@keyframes act-done {
  0%   { box-shadow: 0 0 0 0 rgba(61, 220, 151, .7); }
  100% { box-shadow: 0 0 0 16px rgba(61, 220, 151, 0); }
}

/* ── карта города ─────────────────────────────────────────────────── */
.map {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px;
  margin-top: 4px;
}
.d {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line);
  background: #131722; color: var(--faint);
  display: grid; place-items: center; cursor: default;
  font: 800 14px/1 var(--display);
  position: relative; transition: transform .12s;
  padding: 0;
}
.d.mine  { background: rgba(61, 220, 151, .2);
           border-color: rgba(61, 220, 151, .7); color: var(--fg); }
.d.enemy { background: rgba(255, 77, 94, .16);
           border-color: rgba(255, 77, 94, .5); color: var(--fg); }
.d.can   { cursor: pointer; border-color: var(--gold); color: var(--gold);
           animation: breathe 2.6s ease-in-out infinite; }
.d.can:active { transform: scale(.9); }
.d.sel   { background: var(--gold); color: #17130a; border-color: var(--gold);
           animation: none; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .8); }

/* Доступные цели тихо «дышат» — на сетке из 32 клеток иначе не видно,
   куда можно ткнуть. */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 189, 120, .35); }
  50%      { box-shadow: 0 0 0 3px rgba(226, 189, 120, .18); }
}

/* Захваченный район: вспышка и переворот в свой цвет. */
.d.won { animation: capture 1s var(--ease-s) both; }
@keyframes capture {
  0%   { transform: rotateY(0) scale(1); background: var(--gold); }
  40%  { transform: rotateY(90deg) scale(1.16); background: var(--gold); }
  60%  { background: rgba(61, 220, 151, .2); }
  100% { transform: rotateY(0) scale(1); background: rgba(61, 220, 151, .2); }
}
.d.lost { animation: shake .5s ease both; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-2px); }
  80%      { transform: translateX(2px); }
}

.legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px;
  font-size: 12px; color: var(--dim);
}
.lg { display: flex; align-items: center; gap: 6px; }
.lg-s {
  width: 11px; height: 11px; border-radius: 3px;
  border: 1px solid var(--line-2); background: #131722;
}
.lg-s.mine  { background: var(--mine); border-color: var(--mine); }
.lg-s.enemy { background: var(--enemy); border-color: var(--enemy); }
.lg-s.can   { background: transparent; border-color: var(--gold); }

/* ── чипы-фильтры ─────────────────────────────────────────────────── */
.tiers {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px;
  scrollbar-width: none;
}
.tiers::-webkit-scrollbar { display: none; }

/* 03.09.2026, менеджер: «не листается с ПК в кампании». Колесо мыши
   крутит страницу вниз, а не вбок — на ПК чипы просто переносятся. */
@media (hover: hover) and (pointer: fine) {
  .tiers { flex-wrap: wrap; overflow-x: visible; }
}
.tier-b {
  flex: 0 0 auto; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #1c2130, #141824);
  color: var(--fg-2); border-radius: 999px; padding: 7px 14px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: transform .14s var(--ease), background .2s;
}
.tier-b:active { transform: scale(.95); }
.tier-b.is-on {
  background: linear-gradient(180deg, var(--accent), var(--acc-2));
  color: var(--on-acc); border-color: transparent;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* ── коллекция карт ───────────────────────────────────────────────── */
/* Плотность сетки выбирает игрок; число колонок ставит JS через --cols. */
.coll {
  display: grid; gap: 10px;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
}
.coll[style*="--cols:4"] { gap: 7px; }
.coll[style*="--cols:4"] .cc-n { font-size: 10.5px; }
.coll[style*="--cols:4"] .cc-t { font-size: 9.5px; }
.coll[style*="--cols:4"] .cc-tier { display: none; }
.coll[style*="--cols:3"] .cc-n { font-size: 11.5px; }
.coll[style*="--cols:3"] .cc-t { font-size: 10px; }
.coll[style*="--cols:3"] .cc-tier { display: none; }

/* ── панель управления коллекцией ─────────────────────────────────── */
.tools { display: flex; gap: 7px; align-items: center; margin-bottom: 10px; }
.search, .sortsel, .duel-in {
  flex: 1; min-width: 0; border: 1px solid var(--line-2);
  background: #121620; color: var(--fg);
  border-radius: 12px; padding: 11px 13px; font: inherit; font-size: 14px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35);
  transition: border-color .15s, box-shadow .15s;
}
.search::placeholder, .duel-in::placeholder { color: var(--dim); }
.search:focus, .sortsel:focus, .duel-in:focus {
  outline: none; border-color: var(--gold);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35), 0 0 0 3px rgba(226, 189, 120, .14);
}
.sortsel {
  padding: 10px 36px 10px 12px; font-size: 13.5px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background: #121620 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2bd78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
}
.sortsel option { background: #151a26; color: var(--fg); }
.dens {
  display: flex; gap: 2px; flex: 0 0 auto; padding: 3px;
  border-radius: 12px; background: #121620; border: 1px solid var(--line-2);
}
.dens button {
  width: 32px; height: 34px; border-radius: 9px; cursor: pointer;
  border: 0; background: transparent;
  display: grid; place-items: center; padding: 0;
  transition: background .2s;
}
.dens button.on { background: linear-gradient(180deg, var(--accent), var(--acc-2)); }
/* Иконка — сами колонки: три полоски = три в ряд. */
.dens i {
  display: grid; gap: 2px; width: 15px;
  grid-template-columns: repeat(var(--n), 1fr);
}
.dens i b { height: 12px; border-radius: 1px; background: var(--dim);
            display: block; }
.dens button.on i b { background: var(--on-acc); }

/* ── режим выбора бойца ───────────────────────────────────────────── */
.picking {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, #f0cf8e, var(--gold));
  color: #17130a;
  border-radius: 12px; padding: 10px 13px; margin-bottom: 11px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 700;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .9);
}
.picking button {
  margin-left: auto; border: 0; background: rgba(0, 0, 0, .16);
  color: #17130a; border-radius: 8px; padding: 6px 12px;
  font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}

/* Карта — это арт. Рамка тира — кольцо снаружи, а высокие тиры светятся:
   цвет — единственное, что видно на плитке размером с ноготь. */
.cc {
  position: relative; min-width: 0; padding: 0; border: 0;
  /* Арты 1080×1791: родная пропорция, ничего не режем. */
  aspect-ratio: 1080 / 1791; border-radius: 12px; overflow: hidden;
  background: #121620;
  box-shadow: 0 0 0 1.5px var(--tier-c, var(--line-2)),
              0 12px 22px -14px rgba(0, 0, 0, .95);
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .2s;
  font: inherit; color: var(--fg); text-align: left; display: block;
}
/* В режиме выбора карта, которая уже в отряде, помечена. */
.cc.in-team { box-shadow: 0 0 0 2px var(--mine), 0 12px 22px -14px rgba(0, 0, 0, .95); }
.cc.in-team .cc-tier { display: none; }
.cc.in-team::after {
  content: ''; position: absolute; top: 7px; left: 7px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--mine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304160e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
/* Лесенка по 26 мс: карты въезжают волной, а не мигают разом. */
#view.fresh .cc {
  animation: cc-in .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}
.cc:active { transform: scale(.955); }
@keyframes cc-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@media (hover: hover) and (pointer: fine) {
  .cc:hover { transform: translateY(-3px);
    box-shadow: 0 0 0 1.5px var(--tier-c, var(--line-2)),
                0 16px 26px -14px var(--tier-c, #000); }
}

.cc-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 22%;
  opacity: 0; transition: opacity .45s ease;
}
.cc-img.on { opacity: 1; }
/* Пока арт грузится — заглушка в цвет тира, а не белая дыра. */
.cc-fall {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 900 34px/1 var(--display); opacity: .5;
  color: var(--tier-c, var(--dim));
  background: radial-gradient(90% 60% at 50% 35%, rgba(255, 255, 255, .06), transparent),
              #131722;
}
/* Тёмная подложка снизу: без неё имя тонет в светлых участках арта. */
.cc-veil {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58%;
  background: linear-gradient(to top,
    rgba(6, 8, 13, .96) 10%, rgba(6, 8, 13, .6) 50%, transparent);
}
.cc-info { position: absolute; left: 9px; right: 9px; bottom: 8px; }
.cc-n {
  font-size: 13px; font-weight: 800; line-height: 1.2; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.cc-t {
  font-size: 10.5px; margin-top: 3px; color: rgba(255, 255, 255, .74);
  font-weight: 600;
}
.cc-tier {
  position: absolute; top: 7px; left: 7px;
  font: 850 10.5px/1 var(--display); letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 7px 3px; border-radius: 6px;
  background: rgba(6, 8, 13, .8); color: var(--tier-c, #fff);
  box-shadow: inset 0 0 0 1px var(--tier-c, var(--line-2));
}
/* Слияние — золотой жетон. (Раньше второе правило ниже по файлу красило
   текст тем же золотом, что и фон, и жетон был пустым золотым пятном.) */
.cc-m {
  position: absolute; top: 7px; right: 7px;
  font: 900 12px/1 var(--display); letter-spacing: .02em;
  padding: 4px 6px 3px; border-radius: 6px;
  background: linear-gradient(180deg, #f3d494, var(--gold));
  color: #1b1408; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .9);
}

/* Только что поставленная в отряд карта — короткая вспышка золотом. */
.cc.taken, .slot.taken { animation: taken .9s var(--ease) both; }
@keyframes taken {
  0%   { box-shadow: 0 0 0 0 rgba(226, 189, 120, .8); }
  100% { box-shadow: 0 0 0 16px rgba(226, 189, 120, 0); }
}
.cc-s {
  display: flex; gap: 10px; margin-top: 8px;
  font-size: 11.5px; color: var(--dim);
}
.cc-s b { color: var(--fg); font-weight: 700; }

.more {
  width: 100%; margin-top: 12px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #1c2130, #141824);
  color: var(--fg); border-radius: 12px;
  padding: 13px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.more:active { transform: scale(.985); }

/* ── отряд ────────────────────────────────────────────────────────── */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.slot {
  position: relative; overflow: hidden; padding: 0; min-width: 0;
  aspect-ratio: 1080 / 1791; border-radius: 12px; cursor: pointer;
  border: 1.5px dashed var(--line-2);
  background: radial-gradient(80% 50% at 50% 40%, rgba(255, 255, 255, .04), transparent),
              #10131b;
  display: grid; place-items: center;
  font: inherit; color: var(--fg); text-align: left;
  transition: transform .18s var(--ease);
}
.slot:active { transform: scale(.955); }
.slot.full {
  border: 0; display: block;
  box-shadow: 0 0 0 1.5px var(--tier-c, var(--line-2)),
              0 14px 26px -14px var(--tier-c, #000);
}
#view.fresh .slot.full { animation: slot-in .6s var(--ease) both; }
#view.fresh .slot.full:nth-child(2) { animation-delay: .07s; }
#view.fresh .slot.full:nth-child(3) { animation-delay: .14s; }
@keyframes slot-in { from { opacity: 0; transform: translateY(16px) rotateX(18deg); } }
/* Блик по карте: проходит один раз при появлении — как фольга. */
.slot.full::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 50%,
                              transparent 65%);
  transform: translateX(-120%);
}
#view.fresh .slot.full::after { animation: foil 1.2s ease .35s both; }
@keyframes foil { to { transform: translateX(120%); } }
.slot-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; transition: opacity .45s ease;
}
.slot-img.on { opacity: 1; }
.slot-veil {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56%;
  background: linear-gradient(to top,
    rgba(6, 8, 13, .96) 12%, rgba(6, 8, 13, .55) 52%, transparent);
}
.slot-b { position: absolute; left: 8px; right: 8px; bottom: 7px; }
.slot-n {
  font-size: 12.5px; font-weight: 800; line-height: 1.2; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.slot-m { font-size: 10px; margin-top: 2px; color: rgba(255, 255, 255, .76); }
.slot-t {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font: 850 10px/1 var(--display); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 6px 3px; border-radius: 6px; color: #fff;
  background: rgba(6, 8, 13, .8); box-shadow: inset 0 0 0 1px var(--tier-c, #444);
}
.slot-x {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  font: 900 11.5px/1 var(--display); padding: 4px 6px 3px;
  border-radius: 6px; background: linear-gradient(180deg, #f3d494, var(--gold));
  color: #1b1408;
}
.slot-e {
  color: var(--dim); font-size: 12px; text-align: center; line-height: 1.5;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.slot-e .ico { font-size: 26px; color: var(--gold); }

/* ── живой бой (старый вертикальный список) ───────────────────────── */
.fight-side { margin-bottom: 12px; }
.fight-side:last-child { margin-bottom: 0; }
.fight-k {
  font: 800 13px/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 8px;
}
.fu { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.fu:last-child { margin-bottom: 0; }
.fu.dead { opacity: .38; }
.fu-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px;
  background: var(--line-2);
}
.fu.act .fu-dot { background: var(--gold);
  box-shadow: 0 0 0 3px rgba(226, 189, 120, .25); }
.fu-n {
  flex: 1; min-width: 0; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fu.act .fu-n { font-weight: 700; }
.fu-hp {
  width: 84px; flex: 0 0 84px; height: 6px; border-radius: 3px;
  background: var(--track); overflow: hidden;
}
.fu-hp i { display: block; height: 100%; background: var(--mine); }
.fu.foe .fu-hp i { background: var(--enemy); }
.fu-v { width: 40px; text-align: right; font-size: 11.5px; color: var(--dim); }

.turn-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font: 850 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 11px 5px; border-radius: 8px;
  background: linear-gradient(180deg, #f3d494, var(--gold) 55%, var(--gold-2));
  color: #1b1408;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .75);
}
.turn-tag.wait {
  background: #1a1f2d; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-2);
}
/* Твой ход — метка дышит, чтобы её нельзя было не заметить. */
.turn-tag:not(.wait) { animation: my-turn 1.8s ease-in-out infinite; }
@keyframes my-turn {
  50% { filter: brightness(1.22); }
}

/* ── шторка с карточкой ───────────────────────────────────────────── */
.sheet-bg, .picker-bg {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 4, 8, .72);
  animation: fade .22s ease both;
}
@keyframes fade { from { opacity: 0; } }
.sheet, .picker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-width: 620px; margin: 0 auto;
  background: linear-gradient(180deg, #161a26, var(--bg) 280px);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .95),
              inset 0 1px 0 rgba(226, 189, 120, .3);
  padding: 8px 16px calc(22px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  animation: up .42s var(--ease) both;
}
@keyframes up { from { transform: translateY(100%); } }
.sheet-grip {
  width: 42px; height: 4px; border-radius: 2px; background: var(--line-2);
  margin: 6px auto 16px;
}
/* Крупный арт вверху карточки — ради него всё и затевалось: в боте
   персонаж виден только именем. Родная пропорция, вписан целиком. */
.sheet-art {
  position: relative; margin: 0 auto 16px;
  height: min(52vh, 460px); aspect-ratio: 1080 / 1791; max-width: 100%;
  overflow: hidden; border-radius: 14px; background: #10131b;
  box-shadow: 0 0 0 1.5px var(--tier-c, var(--gold-ln)),
              0 24px 50px -22px var(--tier-c, #000);
  cursor: zoom-in;
  animation: art-rise .6s var(--ease) .05s both;
}
@keyframes art-rise { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.sheet-art img {
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .5s ease;
}
.sheet-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .2) 50%, transparent 65%);
  transform: translateX(-120%); animation: foil 1.4s ease .5s both;
}
.sheet-zoom {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: rgba(6, 8, 13, .78); color: #fff; pointer-events: none;
}
.sheet-art img.on { opacity: 1; }

.sheet h3, .picker-head h3 {
  margin: 0 0 4px; font: 900 30px/1.02 var(--display); letter-spacing: .02em;
  text-transform: uppercase;
}
.sheet-sub { color: var(--dim); font-size: 13px; margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
      margin-bottom: 16px; }
.kv-i {
  background: linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px 9px;
}
.kv-k { font-size: 10.5px; color: var(--dim); font-weight: 700;
        letter-spacing: .08em; text-transform: uppercase; }
.kv-v { font: 850 21px/1.1 var(--display); margin-top: 3px;
        letter-spacing: .01em; }
.ab {
  background: linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
}
.ab-h { display: flex; align-items: baseline; gap: 8px; }
.ab-n { font-size: 14.5px; font-weight: 800; flex: 1; }
.ab-c {
  font-size: 11px; font-weight: 800; color: #cfe0ff; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(91, 140, 255, .18); border: 1px solid rgba(91, 140, 255, .4);
}
.ab-d { font-size: 13px; color: var(--fg-2); margin-top: 6px; line-height: 1.5; }
.ab.passive { border-style: dashed; }
.ab-p {
  font-size: 10px; color: var(--dim); font-weight: 700; margin-left: 7px;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ── родословная ──────────────────────────────────────────────────── */
.perks { display: flex; flex-direction: column; gap: 9px; }
.perk {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
  background: #121620;
}
.perk.done { border-color: rgba(61, 220, 151, .45);
             background: linear-gradient(180deg, rgba(61, 220, 151, .08), #121620); }
.perk-h { display: flex; align-items: baseline; gap: 8px; }
.perk-n { flex: 1; font-size: 14px; font-weight: 750; }
.perk-c { font-size: 11.5px; color: var(--dim); }
.perk-d { font-size: 12.5px; color: var(--fg-2); line-height: 1.45; }
.perk-d b { color: var(--gold); }
.perk-b {
  position: relative; overflow: hidden;
  margin-top: 10px; width: 100%; border: 0; border-radius: 10px;
  padding: 10px; font: inherit; font-size: 13.5px; font-weight: 800;
  background: linear-gradient(180deg, var(--accent), var(--acc-2));
  color: var(--on-acc); cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 16px -10px rgba(0, 0, 0, .75);
  transition: transform .14s var(--ease);
}
.perk-b:active { transform: scale(.98); }
.perk-b.off { background: #171b27; color: var(--dim); cursor: default;
              box-shadow: inset 0 0 0 1px var(--line); }

/* ── кампания: путь из зон ────────────────────────────────────────── */
/* Зоны — точки на пути, как карта кампании в мобильном файтинге:
   пройденные золотые, текущая горит цветом игры, закрытые под замком.
   Линия пути идёт через все узлы. */
.zones { position: relative; display: flex; flex-direction: column; gap: 0; }
.zone {
  position: relative;
  display: grid; align-items: center; gap: 2px 12px;
  grid-template-columns: 34px 1fr auto;
  padding: 10px 0 12px; font-size: 14px;
}
/* Отрезок пути к следующему узлу. */
.zone::before {
  content: ''; position: absolute; left: 16px; top: 36px; bottom: -8px;
  width: 2px; border-radius: 2px; background: var(--line-2);
}
.zone:last-child::before { display: none; }
.zone.done::before { background: linear-gradient(180deg, var(--gold), var(--gold-2)); }
.zone-m {
  position: relative; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px;
  background: #151a26; color: var(--faint);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.zone.done .zone-m {
  color: #1b1408; background: linear-gradient(180deg, #f3d494, var(--gold));
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .8);
}
.zone.cur .zone-m {
  color: var(--on-acc); background: linear-gradient(180deg, var(--accent), var(--acc-2));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent),
              0 8px 16px -8px rgba(0, 0, 0, .75);
  animation: node 2s ease-in-out infinite;
}
@keyframes node {
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 10%, transparent),
                    0 8px 16px -8px rgba(0, 0, 0, .75); }
}
.zone.lock { opacity: .55; }
.zone-n {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 750;
}
.zone.done .zone-n { color: var(--fg-2); font-weight: 650; }
.zone.cur .zone-n { font: 850 19px/1.1 var(--display); letter-spacing: .02em;
                    text-transform: uppercase; }
.zone-p {
  font: 800 15px/1 var(--display); color: var(--dim); letter-spacing: .03em;
}
.zone.done .zone-p { color: var(--gold); }
/* Бои зоны — отметками: видно, сколько осталось, без чтения цифр. */
.zone-pips { grid-column: 2 / -1; display: flex; gap: 4px; margin-top: 4px; }
.zone-pips i {
  flex: 1; max-width: 44px; height: 5px; border-radius: 3px;
  background: var(--track);
}
.zone-pips i.on { background: var(--gold); }
.zone.cur .zone-pips i.on { background: var(--accent); }
.zone.cur .zone-pips i.next {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  animation: blink 1.4s ease-in-out infinite;
}
.zone-bar { grid-column: 2 / -1; height: 5px; margin-top: 5px; }

/* ── полоски / списки ─────────────────────────────────────────────── */
.bars { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bar-name { width: 92px; flex: 0 0 92px; color: var(--fg-2); font-weight: 650;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track {
  flex: 1; height: 8px; border-radius: 4px;
  background: #0d1018; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6), 0 0 0 1px var(--line);
}
.bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--acc-2), var(--accent));
  transform-origin: left; animation: bar-grow .9s var(--ease) both;
}
@keyframes bar-grow { from { transform: scaleX(0); } }
.bar-num { width: 46px; text-align: right; font: 800 15px/1 var(--display); color: var(--fg); }

.rank { display: flex; flex-direction: column; gap: 2px; }
.rank-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 6px; border-radius: 10px; font-size: 14px;
}
.rank-row + .rank-row { border-top: 1px solid var(--line); border-radius: 0; }
.rank-n {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  display: grid; place-items: center;
  font: 850 15px/1 var(--display); color: var(--dim);
  background: #141824; box-shadow: inset 0 0 0 1px var(--line);
}
.rank-row:nth-child(1) .rank-n { color: #1b1408;
  background: linear-gradient(180deg, #f6dca0, #d1a458); box-shadow: none; }
.rank-row:nth-child(2) .rank-n { color: #10141c;
  background: linear-gradient(180deg, #e8edf5, #9aa6b8); box-shadow: none; }
.rank-row:nth-child(3) .rank-n { color: #1a0f06;
  background: linear-gradient(180deg, #e0a36a, #9c6130); box-shadow: none; }
.rank-name {
  flex: 1; min-width: 0; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-sub { display: block; font-size: 11.5px; color: var(--dim); font-weight: 500; }
.rank-v { font: 800 16px/1 var(--display); color: var(--fg-2); letter-spacing: .02em; }
.rank-v.win  { color: var(--mine); }
.rank-v.loss { color: var(--enemy); }

/* ── пусто / подсказки ────────────────────────────────────────────── */
.empty { text-align: center; padding: 26px 16px 22px; color: var(--dim); }
.empty-mark {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px; color: var(--gold);
  background: radial-gradient(circle at 50% 30%, #222839, #121620);
  box-shadow: inset 0 0 0 1.5px var(--gold-ln), 0 12px 24px -14px rgba(0, 0, 0, .9);
}
.empty-txt { font-size: 14px; line-height: 1.55; color: var(--fg-2);
             max-width: 36ch; margin: 0 auto; }

.hint {
  font-size: 12.5px; color: var(--dim); line-height: 1.55;
  margin-top: 12px;
}

/* ── тост ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--navh) + 14px + env(safe-area-inset-bottom));
  z-index: 80; max-width: 596px; margin: 0 auto;
  display: flex; gap: 11px; align-items: flex-start;
  background: linear-gradient(180deg, #1d2231, #141824);
  border: 1px solid var(--line-2);
  border-radius: 14px; padding: 12px 15px 12px 12px;
  font-size: 14px; line-height: 1.45;
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .95),
              inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: pop .45s var(--ease-s) both;
  max-height: 46vh; overflow-y: auto;
}
body.at-home .toast { bottom: calc(18px + env(safe-area-inset-bottom)); }
body.fighting .toast {
  top: calc(10px + env(safe-area-inset-top)); bottom: auto;
  animation-name: pop-down;
}
@keyframes pop-down { from { opacity: 0; transform: translateY(-18px) scale(.97); } }
.toast { cursor: pointer; }
.toast-i {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, #ff5a6e, #c31f3a);
}
.toast.ok .toast-i { background: linear-gradient(180deg, #4fe3a5, #1c9e69); color: #03170f; }
.toast-t { flex: 1; min-width: 0; padding-top: 2px; }
.toast.out { animation: pop-out .22s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(12px); } }

/* ── список-строка ────────────────────────────────────────────────── */
/* Один скелет на постройки, уников, достижения, прилавок и стычки:
   значок в гнезде слева, название с подписью, значение справа. */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.rows .row:first-child { border-top: 0; padding-top: 2px; }
.row-i {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 17px; line-height: 1;
  background: #141824; box-shadow: inset 0 0 0 1px var(--line);
  /* 30.08.2026: слот узкий, а внутрь клали по три ⭐ — эмодзи вылезали
     на соседнюю колонку. Обрезаем, чтобы значок не наехал на название. */
  overflow: hidden;
}

/* Мутатор дня — правило, по которому идёт бой. Стоит НАД списком. */
.mutator {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 12px; margin: 0 0 10px;
  border-radius: 12px;
  background: linear-gradient(100deg, rgba(226, 189, 120, .16), rgba(226, 189, 120, .04));
  border: 1px solid var(--gold-ln);
}
.mut-i { font-size: 20px; line-height: 1.1; }
.mut-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mut-n { font: 850 16px/1.1 var(--display); letter-spacing: .04em;
         text-transform: uppercase; color: var(--gold); }
.mut-d { font-size: 12.5px; color: var(--fg-2); line-height: 1.4; }
.row-b { flex: 1; min-width: 0; }
.row-n {
  display: block; font-size: 14px; font-weight: 700; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-s {
  display: block; color: var(--dim); font-size: 11.5px; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-v {
  flex: 0 0 auto; font: 850 17px/1 var(--display); color: var(--gold);
  letter-spacing: .02em; text-align: right;
}
.row.off .row-n, .row.off .row-i { opacity: .5; }
.row.off .row-v { color: var(--dim); }
.row.done .row-v { color: var(--mine); }
.row.done .row-i { box-shadow: inset 0 0 0 1px rgba(61, 220, 151, .5);
                   background: rgba(61, 220, 151, .1); }
.row.top .row-i { box-shadow: inset 0 0 0 1px var(--gold-ln); background: var(--gold-bg); }
.row.me { background: linear-gradient(90deg, var(--gold-bg), transparent 70%);
          margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.row.me .row-n { color: var(--gold); }

/* ── плашки ───────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  font-size: 11.5px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  background: #141824; border: 1px solid var(--line-2);
  color: var(--fg-2); white-space: nowrap;
}
.chip.on {
  color: var(--gold); border-color: var(--gold-ln); background: var(--gold-bg);
}
.chip.bad { color: #ff8a95; border-color: rgba(255, 77, 94, .4);
            background: rgba(255, 77, 94, .08); }

/* ── скелет загрузки ──────────────────────────────────────────────── */
.skel-h, .skel-r {
  height: 13px; border-radius: 7px; margin-bottom: 11px;
  background: linear-gradient(90deg, #151a26 25%, #222939 37%, #151a26 63%);
  background-size: 400% 100%;
  animation: skel 1.3s ease infinite;
}
.skel-h { height: 20px; width: 44%; margin-bottom: 18px; }
.skel-r:nth-child(3) { width: 88%; }
.skel-r:nth-child(4) { width: 72%; }
.skel-r:nth-child(5) { width: 80%; }
@keyframes skel { from { background-position: 100% 0; }
                  to   { background-position: 0 0; } }

/* Полоска в рейтинге и в списке фракций: своя строка выделяется. */
.rank-row.me { background: linear-gradient(90deg, var(--gold-bg), transparent 75%);
               border-radius: 10px; }
.rank-row.me .rank-name, .bar-row.me .bar-name { color: var(--gold); }
.bar-row.me .bar-fill { background: linear-gradient(90deg, var(--gold-2), #f3d494); }

/* ── шторка выбора бойца ──────────────────────────────────────────── */
/* Живёт поверх отряда: замена бойца — одно действие, а не путешествие. */
.picker-bg { z-index: 62; }
.picker { z-index: 63; padding-left: 14px; padding-right: 14px; }
.picker-head {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px;
}
.picker-head h3 { font-size: 24px; }
.picker-head .sheet-sub { margin: 0; }
.picker-x {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px;
  border: 1px solid var(--line-2); background: #151a26; color: var(--fg-2);
  font: inherit; font-size: 15px; cursor: pointer;
}
.picker .tiers { margin-bottom: 10px; }
.picker .coll { margin-bottom: 4px; }

/* ── арт во весь экран ────────────────────────────────────────────── */
.artview {
  position: fixed; inset: 0; z-index: 70; cursor: zoom-out;
  background: radial-gradient(70% 50% at 50% 45%, #1a1f2e, rgba(4, 5, 9, .97));
  display: grid; place-items: center; padding: 16px;
  animation: fade .2s ease both;
}
.artview-i {
  max-width: 100%; max-height: 86vh; object-fit: contain;
  border-radius: 12px; opacity: 0; transform: scale(.94);
  transition: opacity .35s ease, transform .5s var(--ease);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .95);
}
.artview-i.on { opacity: 1; transform: none; }
.artview-n {
  position: absolute; left: 0; right: 0; bottom: 22px; text-align: center;
  color: #fff; font: 900 24px/1.1 var(--display); letter-spacing: .04em;
  text-transform: uppercase; text-shadow: 0 2px 8px rgba(0, 0, 0, .95);
}
.artview-x {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .5); color: #fff; font: inherit; font-size: 16px;
}

/* ── что выпало из набора: крутка ─────────────────────────────────── */
/* Главный момент гачи. Карта лежит рубашкой вверх, под ней вспыхивает
   свет её тира, и она переворачивается артом к игроку. Тап — сразу
   показать всё. */
.drop {
  position: fixed; inset: 0; z-index: 68; cursor: pointer;
  background: radial-gradient(80% 55% at 50% 45%, #171b29, rgba(4, 5, 9, .97));
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 20px;
  padding: calc(20px + env(safe-area-inset-top)) 16px
           calc(24px + env(safe-area-inset-bottom));
  animation: fade .25s ease both; overflow-y: auto; overscroll-behavior: contain;
}
/* Центр «по-безопасному»: десять карт выше экрана не должны уезжать
   вверх за край, где до них не долистать. */
.drop > :first-child { margin-top: auto; }
.drop > :last-child { margin-bottom: auto; }
/* Лучи за картами — медленно крутятся, пока экран открыт. */
.drop::before {
  content: ''; position: fixed; left: 50%; top: 45%;
  width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax;
  background: repeating-conic-gradient(from 0deg,
    rgba(226, 189, 120, .07) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 45%);
          mask-image: radial-gradient(circle, #000 0%, transparent 45%);
  animation: rays 24s linear infinite; pointer-events: none;
}
@keyframes rays { to { transform: rotate(360deg); } }
.drop-h {
  position: relative;
  font: 900 34px/1 var(--display); letter-spacing: .06em; color: #fff;
  text-transform: uppercase; text-align: center;
  text-shadow: 0 4px 18px rgba(0, 0, 0, .9);
  animation: mark-in .7s var(--ease) both;
}
.drop-l {
  position: relative;
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  animation: fade .3s ease both;
}
.drop-w { display: flex; flex-direction: column; align-items: center; gap: 9px;
          width: min(42vw, 196px); perspective: 1100px; }
.drop-l.many { gap: 10px; }
.drop-l.many .drop-w { width: min(28vw, 150px); }
/* Карта сдаётся рубашкой вверх и переворачивается. Прозрачность здесь
   НЕЛЬЗЯ: opacity < 1 сплющивает 3D, и сквозь рубашку проступает
   зеркальная лицевая сторона. */
.drop-c {
  position: relative; width: 100%;
  aspect-ratio: 1080 / 1791;
  transform-style: preserve-3d;
  animation: drop-flip .9s var(--ease) both;
}
@keyframes drop-flip {
  0%   { transform: translateY(46px) rotateY(180deg) scale(.82); }
  30%  { transform: translateY(0) rotateY(180deg) scale(1); }
  100% { transform: rotateY(0) scale(1); }
}
.drop-cap {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center; animation: card-in .5s var(--ease) both;
}
.drop-f, .drop-bk {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.drop-f {
  background: #10131b;
  box-shadow: 0 0 0 2px var(--tier-c, #555),
              0 22px 50px -16px var(--tier-c, #000);
}
/* Рубашка карты: золотой ромб на тёмной стали. */
.drop-bk {
  transform: rotateY(180deg);
  display: grid; place-items: center;
  color: var(--gold); font-size: 40px;
  background:
    radial-gradient(60% 40% at 50% 50%, rgba(226, 189, 120, .18), transparent 70%),
    linear-gradient(160deg, #1e2434, #0d1017);
  box-shadow: 0 0 0 2px var(--gold-ln), inset 0 0 0 7px #0d1017,
              inset 0 0 0 8px var(--gold-ln);
}
/* Вспышка тира за картой в момент переворота. */
.drop-c::before {
  content: ''; position: absolute; inset: -30%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--tier-c, #888), transparent);
  opacity: 0; transform: translateZ(-1px);
  animation: burst 1.1s ease-out both;
  animation-delay: var(--bd, .45s);
}
/* Тап во время крутки — открыть всё сразу. */
.drop.skip .drop-c, .drop.skip .drop-x, .drop.skip .drop-cap { animation: none; }
.drop.skip .drop-c::before { animation: none; opacity: .22; }
@keyframes burst {
  0% { opacity: 0; transform: scale(.4); }
  35% { opacity: .75; }
  100% { opacity: .22; transform: scale(1.1); }
}
.drop-i {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .35s ease;
}
.drop-i.on { opacity: 1; }
.drop-n {
  color: #fff; font: 900 19px/1.05 var(--display); letter-spacing: .02em;
  text-transform: uppercase; text-shadow: 0 2px 8px rgba(0, 0, 0, .95);
}
.drop-l.many .drop-n { font-size: 15px; }
.drop-m {
  color: #1b1408; font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #f3d494, var(--gold));
}
.drop-t {
  font: 850 12px/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
  color: var(--tier-c);
}
/* Высокий тир: вспышка ярче и шире, держится дольше. */
.drop-w.hi .drop-c::before { animation-name: burst-hi; animation-duration: 1.4s; }
@keyframes burst-hi {
  0% { opacity: 0; transform: scale(.4); }
  30% { opacity: .95; transform: scale(1.35); }
  100% { opacity: .38; transform: scale(1.25); }
}
/* И экран моргает светом — один раз, в момент первого переворота. */
.drop.hi::after {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 45%, rgba(255, 255, 255, .5), transparent 70%);
  opacity: 0; animation: flash .9s ease-out var(--fd, .75s) both;
}
@keyframes flash { 25% { opacity: 1; } 100% { opacity: 0; } }
.drop.skip::after { animation: none; }
.drop-x {
  position: relative;
  border: 0; border-radius: 12px; padding: 13px 34px;
  background: linear-gradient(180deg, #f3d494, var(--gold) 55%, var(--gold-2));
  color: #1b1408; font: 900 18px/1 var(--display); letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 12px 24px -12px rgba(0, 0, 0, .9);
  animation: card-in .5s var(--ease) both; animation-delay: .8s;
}
/* Итог боя поверх экрана — тот же слой, что у выпадения из набора. */
.drop.win .drop-h { color: var(--gold); font-size: 56px;
  animation: slam .7s var(--ease-s) both; }
.drop.lose .drop-h { color: #ff7d8a; font-size: 50px;
  animation: slam .7s var(--ease-s) both; }
.drop.lose::before { background: repeating-conic-gradient(from 0deg,
    rgba(255, 77, 94, .06) 0deg 6deg, transparent 6deg 18deg); }
@keyframes slam {
  0% { opacity: 0; transform: scale(1.8); letter-spacing: .3em; }
  100% { opacity: 1; transform: scale(1); }
}
.drop-sum { position: relative; color: var(--fg-2); font-size: 14px; text-align: center;
            animation: fade .4s ease .3s both; }
.drop-rs {
  position: relative;
  display: flex; flex-direction: column; gap: 6px; max-width: 340px;
  text-align: center;
}
.drop-r {
  color: var(--gold); font-size: 13.5px; font-weight: 700; line-height: 1.4;
  padding: 6px 12px; border-radius: 10px; background: rgba(226, 189, 120, .08);
  border: 1px solid rgba(226, 189, 120, .2);
  animation: card-in .45s var(--ease) both;
  animation-delay: calc(.35s + var(--i, 0) * 70ms);
}

/* ── боевой экран ─────────────────────────────────────────────────── */
/* HUD файтинга: две стороны смотрят друг на друга, ты слева, враг справа,
   полосы HP как на табло. Полная доска открывается по тапу. */
.fight-top {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px;
  flex-wrap: wrap;
}
.turn-left {
  font: 850 15px/1 var(--display); letter-spacing: .04em; color: var(--fg-2);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 9px 4px;
  display: inline-flex; align-items: center; gap: 5px;
}
.turn-left.hot {
  color: #fff; background: #e5283f; border-color: transparent;
  animation: pulse 1s ease infinite;
}
@keyframes pulse { 50% { opacity: .55; } }
.fturn {
  margin-left: auto; font: 800 14px/1 var(--display); letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
}

.fteam { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fvs {
  text-align: center; font: 900 20px/1 var(--display); letter-spacing: .2em;
  color: var(--gold); margin: 10px 0;
}
/* Кто дерётся СЕЙЧАС — словами над доской. */
.fnow {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 11px; background: #121620;
  font-size: 13px; font-weight: 700;
}
.fnow-s { min-width: 0; overflow: hidden; text-overflow: ellipsis;
          white-space: nowrap; max-width: 42%; }
.fnow-s.mine { color: var(--mine); text-align: right; }
.fnow-s.foe { color: var(--enemy); text-align: left; }
.fnow-vs { flex: 0 0 auto; font-size: 12px; }

/* Запасные приглушены — активный сам бросается в глаза. */
.fp:not(.on):not(.dead) { opacity: .6; }
.fp { position: relative; min-width: 0; text-align: center; }
.fp.dead { opacity: .35; filter: grayscale(1); }
.fp-a {
  position: relative; aspect-ratio: 1; border-radius: 12px;
  overflow: hidden; background: #10131b;
  box-shadow: 0 0 0 1.5px var(--tier-c, var(--line-2));
}
.fp.on .fp-a {
  box-shadow: 0 0 0 2px var(--mine), 0 10px 18px -8px rgba(0, 0, 0, .8);
}
.fp.foe.on .fp-a {
  box-shadow: 0 0 0 2px var(--enemy), 0 10px 18px -8px rgba(0, 0, 0, .8);
}
.fp-i {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  opacity: 0; transition: opacity .35s ease;
}
.fp-i.on { opacity: 1; }
.fp-mark {
  position: absolute; top: 4px; left: 5px; z-index: 2;
  color: var(--gold); font-size: 13px; line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.fp-x {
  position: absolute; inset: 0; display: grid; place-items: center;
  z-index: 2; font-size: 26px; color: var(--enemy);
  background: rgba(6, 8, 13, .6);
}
.fp-n {
  font-size: 11px; font-weight: 750; margin-top: 5px; line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fp.on .fp-n { color: var(--fg); }
/* Число HP — прямо НА полоске. Под зелёным — «призрак» прошлого значения:
   он догоняет с задержкой, и видно, СКОЛЬКО сняли за ход. */
.fp-bar {
  position: relative; height: 14px; border-radius: 4px;
  background: #0b0e15; overflow: hidden; margin: 4px 0 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.fp-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%; display: block;
  background: linear-gradient(180deg, #5cf0b0, #1fae70);
  transform-origin: left center; transform: scaleX(var(--w, 1));
  transition: transform .5s var(--ease);
}
.fp-bar i.gh {
  background: rgba(255, 255, 255, .2); transition: transform .9s ease .45s;
}
.fp-bar b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 850 11px/1 var(--display); letter-spacing: .04em; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .95);
}
.fp.foe .fp-bar i:not(.gh) { background: linear-gradient(180deg, #ff7482, #d42b3f); }
.fp-bar.mana { height: 5px; margin-top: 3px; border-radius: 3px; }
/* 14.10.2026 — уровень на портрете и «сколько маны придёт» под полоской. */
.fp-lv {
  position: absolute; left: 3px; bottom: 3px; z-index: 3;
  padding: 1px 4px; border-radius: 6px;
  font: 800 9.5px/1.3 var(--display); letter-spacing: .02em; color: #fff;
  background: rgba(6, 8, 13, .82); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
  white-space: nowrap; pointer-events: none;
}
.fp-lv em { font-style: normal; color: #ffd700; margin-left: 2px; }
.fd-face .fp-lv {
  left: 50%; bottom: -7px; transform: translateX(-50%);
  padding: 1px 3px; font-size: 8.5px;
}
.fp-mn {
  display: flex; justify-content: space-between; gap: 6px; margin-top: 2px;
  font: 700 10.5px/1.2 var(--display); color: #9db6ff; white-space: nowrap;
}
.fp-mn span { overflow: hidden; text-overflow: ellipsis; }
.fp-mn b { color: #7affc4; font-weight: 850; }
.fp-mn b.full { color: var(--faint); }
.fp-mn b.none { color: var(--faint); }
.fd-side.foe .fp-mn { flex-direction: row-reverse; }
.fp-bar.mana i { background: linear-gradient(90deg, #3f6fe8, #7aa4ff); }

/* Полная доска не прилипает: 330 пикселей, едущих за экраном, и были той
   самой «игрой на 80% экрана». Прилипает полоса поединка. */
.fboard { margin-top: 12px; }

/* ── полоса поединка ──────────────────────────────────────────────── */
.fstrip {
  position: sticky; top: 0; z-index: 5; cursor: pointer;
  margin: 0 -16px; padding: 10px 16px 8px;
  background: linear-gradient(180deg, #1a1f2d, #121620);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 20px -14px rgba(0, 0, 0, .9);
}
.fd { display: flex; align-items: center; gap: 8px; }
.fd-side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; }
.fd-side.foe { flex-direction: row-reverse; text-align: right; }
.fd-face {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: #10131b;
  box-shadow: 0 0 0 2px var(--mine), 0 8px 16px -8px rgba(0, 0, 0, .8);
}
.fd-side.foe .fd-face {
  box-shadow: 0 0 0 2px var(--enemy), 0 8px 16px -8px rgba(0, 0, 0, .8);
}
.fd-face .fp-i { object-position: 50% 16%; }
.fd-meta { flex: 1; min-width: 0; }
.fd-vs {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font: 900 15px/1 var(--display); letter-spacing: .04em; color: #1b1408;
  background: linear-gradient(180deg, #f3d494, var(--gold-2));
  box-shadow: 0 0 0 3px #121620, 0 0 0 4px var(--gold-ln),
              0 8px 16px -6px rgba(0, 0, 0, .9);
}
.fd-n {
  font: 850 clamp(13px, 4vw, 16px)/1.05 var(--display); letter-spacing: .01em;
  text-transform: uppercase; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fd-side.mine .fd-n { color: var(--mine); }
.fd-side.foe .fd-n { color: #ff7d8a; }
.fd-side .fp-bar { height: 16px; }
.fd-side .fp-bar.mana { height: 5px; }
/* Арта нет (или ещё грузится) — буква бойца, а не пустая рамка. */
.fd-fall {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 900 22px/1 var(--display); color: var(--faint);
}
.fd-face .fp-i { border-radius: 12px; }
.fd-side.foe .fp-bar i:not(.gh) { background: linear-gradient(180deg, #ff7482, #d42b3f); }
.fd-side.foe .fp-bar.mana i { background: linear-gradient(90deg, #7aa4ff, #3f6fe8); }
/* Полоса врага убывает справа налево — стороны смотрят друг на друга. */
.fd-side.foe .fp-bar i { left: auto; right: 0; transform-origin: right center; }
.fd-effs { display: flex; align-items: flex-start; gap: 10px; margin-top: 7px; }
.fd-effs .fp-es { flex: 1 1 0; min-width: 0; margin-top: 0; align-items: flex-start; }
.fd-effs .fp-es.foe { justify-content: flex-end; }
/* Удар: портрет вздрагивает, над ним всплывает снятое. */
.fd-face.hit { animation: hit .5s ease both; }
@keyframes hit {
  0% { transform: translateX(0); filter: brightness(2.2) saturate(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); filter: none; }
  60% { transform: translateX(-2px); }
  100% { transform: none; }
}
.dmg {
  position: absolute; left: 50%; top: 2px; z-index: 6; pointer-events: none;
  font: 900 18px/1 var(--display); letter-spacing: .02em; color: #ffd7dc;
  text-shadow: 0 2px 0 #7a0f1d, 0 3px 10px rgba(0, 0, 0, .9);
  white-space: nowrap; transform: translateX(-50%);
  animation: dmg 1.3s var(--ease) both;
}
.dmg.heal { color: #b9ffd9; text-shadow: 0 2px 0 #0b5a37, 0 3px 10px rgba(0, 0, 0, .9); }
@keyframes dmg {
  0%   { opacity: 0; transform: translate(-50%, 8px) scale(.6); }
  20%  { opacity: 1; transform: translate(-50%, -6px) scale(1.15); }
  70%  { opacity: 1; transform: translate(-50%, -14px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -26px) scale(.95); }
}

/* Скамейка — столбики: цвет чей, заливка снизу = сколько ХП. */
.fd-bench {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 7px;
}
.fd-dots { display: flex; gap: 4px; }
.fd-dot {
  position: relative; width: 16px; height: 9px; border-radius: 3px;
  background: #0b0e15; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.fd-dot i {
  position: absolute; left: 0; right: 0; bottom: 0; display: block;
  background: var(--mine);
}
.fd-dot.foe i { background: var(--enemy); }
.fd-dot.on { box-shadow: 0 0 0 1.5px var(--gold); }
.fd-dot.dead { opacity: .3; }
.fd-dot.dead i { display: none; }
.fd-more {
  color: var(--dim); font: 800 11px/1 var(--display); letter-spacing: .12em;
  text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px;
}
.fp-es { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-start;
         margin-top: 4px; }
.fp .fp-es { justify-content: center; }
.fp-e {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  background: rgba(150, 168, 214, .1); border: 1px solid var(--line-2);
  color: var(--fg-2);
}

/* Итог прошлого хода — две строки, остальное по тапу. */
.fsum {
  position: relative;
  font-size: 13px; color: var(--fg-2); line-height: 1.5;
  margin: 12px 0 0; padding: 9px 11px; border-radius: 10px;
  background: #10131b; border: 1px solid var(--line);
  white-space: pre-line; cursor: pointer;
}
/* Обрезка — на строке внутри, а не на рамке с отступами: иначе третья
   строка проступала наполовину сквозь нижний отступ. */
.fsum > span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.fsum.open > span { -webkit-line-clamp: unset; display: block; }

/* ── кнопки хода ──────────────────────────────────────────────────── */
.fmoves { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
/* min-height 48px — меньше палец не берёт уверенно. Менеджер: «кнопки,
   на которые хуй нажмёшь». */
.fmove {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 11px; width: 100%;
  min-height: 48px;
  padding: 9px 12px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, #212839, #171c29);
  border: 1px solid var(--line-2);
  color: inherit; font: inherit; text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .14s var(--ease), filter .15s;
}
/* Обычная атака — то, что жмут чаще всего: она горит цветом игры. */
.fmove.attack {
  background: linear-gradient(180deg, var(--accent), var(--acc-2));
  border-color: transparent; color: var(--on-acc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -12px rgba(0, 0, 0, .8);
}
.fmove.attack .fmove-s { color: var(--on-acc); opacity: .82; }
.fmove.attack .fmove-i { background: rgba(0, 0, 0, .18); box-shadow: none; }
.fmove:active { transform: translateY(1px) scale(.985); filter: brightness(1.12); }
.fmove.off {
  cursor: default; background: #131722; box-shadow: none; filter: none;
  transform: none; border-style: dashed;
}
.fmove.off .fmove-n { color: var(--dim); }
.fmove.off .fmove-i { filter: grayscale(1); opacity: .55; }
.fmove.counter { border-color: var(--gold-ln);
  background: linear-gradient(180deg, rgba(226, 189, 120, .14), #171c29); }
.fmove.ability { border-color: rgba(91, 140, 255, .32); }
.fmove-i {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 18px; line-height: 1;
  background: #0f121a; box-shadow: inset 0 0 0 1px var(--line);
}
.fmove-b { flex: 1; min-width: 0; }
.fmove-n {
  display: block; font-size: 14px; font-weight: 800; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fmove-n b {
  font-weight: 800; font-size: 11.5px; color: #cfe0ff;
  padding: 1px 6px; border-radius: 999px; margin-left: 3px;
  background: rgba(91, 140, 255, .2);
}
.fmove.attack .fmove-n b { color: var(--on-acc); background: rgba(0, 0, 0, .2); }
.fmove-n i { color: var(--dim); font-style: normal; }
.fmove-s { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }

.fgive { margin-top: 14px; }
.fgive summary, .flog-d summary {
  cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--dim);
  padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 6px;
}
.fgive summary::-webkit-details-marker, .flog-d summary::-webkit-details-marker { display: none; }
.fgive summary::before, .flog-d summary::before {
  content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(-45deg);
  transition: transform .2s var(--ease);
}
.fgive[open] summary::before, .flog-d[open] summary::before { transform: rotate(45deg); }

.flog-d { margin-top: 12px; }
.flog { display: flex; flex-direction: column; gap: 6px; margin-top: 6px;
        padding-left: 4px; border-left: 1px solid var(--line); }
.flog-l {
  font-size: 12px; color: var(--dim); line-height: 1.45;
  padding-left: 12px; position: relative;
}
.flog-l::before {
  content: ''; position: absolute; left: -3px; top: 7px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-2);
}
.flog-l:first-child { color: var(--fg); }
.flog-l:first-child::before { background: var(--gold); }

/* Кнопка «в бой» — вторичная литая плашка. */
.zone-go {
  position: relative; overflow: hidden;
  grid-column: 2 / -1; margin-top: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #232a3c, #171c29);
  color: var(--fg); border-radius: 10px; padding: 9px 14px; min-height: 40px;
  font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .14s var(--ease), filter .15s;
}
.zone-go:active { transform: translateY(1px) scale(.97); }
.zone.cur .zone-go {
  background: linear-gradient(180deg, var(--accent), var(--acc-2));
  color: var(--on-acc); border-color: transparent;
  font: 900 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -12px rgba(0, 0, 0, .8);
}
.zone.lock .zone-go { display: none; }
.zone-go.re {
  justify-self: start; min-height: 32px; padding: 5px 12px;
  font-size: 12.5px; color: var(--fg-2);
}
.zone-go[disabled], .zone-go.off { color: var(--dim); background: #141824;
                                   box-shadow: none; cursor: default; }

/* ── Магазин Карточек ─────────────────────────────────────────────── */
.shop {
  display: grid; gap: 10px;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
}
.sc { min-width: 0; }
.sc.sold { opacity: .5; }
.sc-a {
  position: relative; aspect-ratio: 1080 / 1791; border-radius: 12px;
  overflow: hidden; background: #10131b;
  box-shadow: 0 0 0 1.5px var(--tier-c, var(--line-2)),
              0 12px 22px -14px rgba(0, 0, 0, .95);
}
.sc-info { position: absolute; left: 8px; right: 8px; bottom: 7px; }
.sc-sold {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  background: rgba(6, 8, 13, .66); color: #fff;
  font: 900 18px/1 var(--display); letter-spacing: .12em; text-transform: uppercase;
}
.sc-buy {
  position: relative; overflow: hidden;
  width: 100%; margin-top: 6px; padding: 9px 6px; border-radius: 10px;
  border: 1px solid var(--gold-ln);
  background: linear-gradient(180deg, rgba(226, 189, 120, .2), rgba(226, 189, 120, .06));
  color: var(--gold); font: 850 16px/1 var(--display); letter-spacing: .03em;
  cursor: pointer; transition: transform .14s var(--ease);
}
.sc-buy:active { transform: scale(.96); }
.sc-buy.off { color: var(--dim); cursor: default; background: #141824;
              border-color: var(--line); }
.sc-buy s { color: var(--dim); font-weight: 600; font-size: 12px; }
.sc.poor .sc-a { filter: saturate(.7); }
.sale {
  margin-top: 12px; padding: 9px 12px; border-radius: 10px;
  background: linear-gradient(100deg, rgba(255, 138, 61, .22), rgba(255, 61, 90, .12));
  color: #ffc49a; border: 1px solid rgba(255, 138, 61, .4);
  font-size: 13px; font-weight: 800;
}

/* Кнопки обучения у наставника — три стадии подряд. */
.trains { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.trains .perk-b { width: 100%; }

/* Плашка «бот отстал от кода страницы». */
.stale {
  margin: 0 0 12px; padding: 11px 13px; border-radius: 12px;
  background: rgba(255, 77, 94, .12); color: #ffb3bb;
  border: 1px solid rgba(255, 77, 94, .38);
  font-size: 12.5px; line-height: 1.5;
}

/* ── Ролл ─────────────────────────────────────────────────────────── */
.rolls { display: flex; flex-direction: column; gap: 8px; }
.rollc {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid var(--line-2);
  animation: roll-in .55s var(--ease-s) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes roll-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
.rollc-m {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 18px; line-height: 1;
  background: #0f121a; box-shadow: inset 0 0 0 1px var(--line-2);
}
.rollc-b { flex: 1; min-width: 0; }
.rollc-n { display: block; font-size: 14.5px; font-weight: 800; }
.rollc-d { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }

/* ── Башня: что за этаж впереди ───────────────────────────────────── */
.tw-next {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 9px;
}
.tw-h { font: 850 18px/1.1 var(--display); letter-spacing: .03em;
        text-transform: uppercase; }
.tw-foes, .tw-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-team { font-size: 12px; color: var(--dim); }
.tw-rew { font-size: 12px; color: var(--gold); font-weight: 700; }
.tw-next .zone-go { grid-column: auto; margin: 2px 0 0; }

/* ── Второй шаг техники и скопированные ───────────────────────────── */
.fpick-h {
  padding: 2px 2px 6px; font: 850 17px/1.1 var(--display); letter-spacing: .04em;
  text-transform: uppercase; color: var(--gold);
}
.fmove.pick { border-color: var(--gold-ln); }
.fmove.back { opacity: .85; }
.fcop { margin-top: 9px; }
.fcop > summary {
  cursor: pointer; list-style: none; padding: 10px 12px;
  border: 1px solid rgba(91, 140, 255, .3); border-radius: 12px;
  background: linear-gradient(180deg, rgba(91, 140, 255, .12), #141824);
  font-size: 13.5px; font-weight: 800;
}
.fcop > summary::-webkit-details-marker { display: none; }
.fcop[open] > summary { margin-bottom: 8px; }

/* ── Дуэль ────────────────────────────────────────────────────────── */
.duel-call { display: flex; gap: 8px; align-items: stretch; }
.duel-call .act { flex: 0 0 auto; margin: 0; }
.duel-who { font: 850 22px/1.1 var(--display); letter-spacing: .03em;
            text-transform: uppercase; margin-bottom: 10px; }

/* Взведённая кнопка: следующее нажатие сработает по-настоящему. */
.zone-go.armed {
  background: linear-gradient(180deg, #ff5a6e, #c31f3a); color: #fff;
  border-color: transparent; animation: pulse 1s ease infinite;
}

/* Плашка «связи нет» — ждать сеть, а не перезапускать бота. */
.stale.offl {
  background: #141824; color: var(--fg-2);
  border-color: var(--line-2);
}

/* ── «Что нового» ─────────────────────────────────────────────────── */
/* Свёрнуто в одну строку: заголовок последнего обновления и дата.
   Раньше записи разворачивались простынёй прямо на главной. */
.news {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); cursor: pointer; text-align: left;
  background: linear-gradient(180deg, var(--s2), var(--s1));
  color: inherit; font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}
#view.fresh .news { animation: card-in .5s var(--ease) .25s both; }
.news.fresh { border-color: var(--gold-ln); }
.news-ic {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px; color: var(--gold);
  background: #141824; box-shadow: inset 0 0 0 1px var(--gold-ln);
}
.news-b { flex: 1; min-width: 0; }
.news-k {
  display: flex; align-items: center; gap: 7px;
  font: 850 12.5px/1 var(--display); letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim);
}
.news-new {
  padding: 2px 6px 1px; border-radius: 4px; background: #e5283f; color: #fff;
  letter-spacing: .1em;
}
.news-t {
  display: block; margin-top: 4px; font-size: 14px; font-weight: 750;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.news.fresh .news-t { color: var(--gold); }
.news-go { flex: none; font-size: 18px; color: var(--dim); }
.news-e { padding: 10px 0; }
.news-e + .news-e { border-top: 1px solid var(--line); }
.news-h {
  display: flex; gap: 8px; align-items: baseline; justify-content: space-between;
  font-size: 14px; font-weight: 800; margin-bottom: 6px;
}
.news-e.new .news-h { color: var(--gold); }
.news-d { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--dim); }
.news-l { font-size: 13px; line-height: 1.55; color: var(--fg-2); margin-top: 3px; }

/* ── Реферальная ссылка ───────────────────────────────────────────── */
.ref-link {
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
  padding: 10px 12px; margin-bottom: 10px;
  border: 1px dashed var(--gold-ln); border-radius: 12px; background: #121620;
  cursor: pointer;
}
.ref-link code {
  font-size: 12px; word-break: break-all; min-width: 0; line-height: 1.35;
  color: var(--fg-2);
}
.ref-copy {
  flex: 0 0 auto; font: 850 13px/1 var(--display); color: var(--gold);
  text-transform: uppercase; letter-spacing: .1em;
}

/* ── Сетка турнира ───────────────────────────────────── */
.trn-match {
  margin: 8px 0 4px; padding: 10px 11px; border-radius: 12px;
  border: 1px solid var(--line-2); background: #121620;
}
.br-lab { font: 850 13px/1 var(--display); letter-spacing: .12em;
          text-transform: uppercase; color: var(--dim); margin: 12px 0 6px; }
/* Сетка на 32 человека шире любого телефона — катаем её в своей коробке. */
.br-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (hover: hover) and (pointer: fine) {
  .br-wrap { scrollbar-width: thin; padding-bottom: 2px; }
  .br-wrap::-webkit-scrollbar { height: 8px; }
  .br-wrap::-webkit-scrollbar-thumb {
    background: var(--s4); border-radius: 4px;
  }
}
.br-cols { display: flex; gap: 22px; padding-bottom: 6px; align-items: stretch; }
.br-col { flex: 0 0 auto; min-width: 150px; display: flex;
          flex-direction: column; }
.br-ct { font: 800 12px/1 var(--display); color: var(--dim);
         margin-bottom: 7px; letter-spacing: .12em; text-transform: uppercase; }

/* Колонка раздаёт матчам РАВНЫЕ доли высоты: матч второго раунда встаёт
   ровно между двумя, которые в него ведут. */
.br-list { flex: 1; display: flex; flex-direction: column;
           justify-content: space-around; gap: 4px; }
.br-cell { flex: 1 1 0; display: flex; align-items: center;
           position: relative; min-height: 48px; }
.br-m {
  border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden;
  background: #121620; width: 100%;
}
.br-m.done { border-color: var(--gold-ln); }
.br-p {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px; font-size: 12px; line-height: 1.3;
}
.br-nm { flex: 1; min-width: 0;
         overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-w { color: var(--gold); font-weight: 800; }
.br-p + .br-p { border-top: 1px solid var(--line); }
.br-p.win { font-weight: 800; background: rgba(226, 189, 120, .06); }
.br-p.lost { color: var(--dim); }
.br-p.bye { color: var(--dim); font-style: italic; }
.br-p.me .br-nm { color: var(--gold); font-weight: 800; }

/* Скобка к следующему раунду — только у колонок paired, где линия
   говорит правду. */
.br-col.paired .br-cell::after {
  content: ''; position: absolute; right: -11px; top: 50%;
  width: 11px; height: 1px; background: var(--line-2);
}
.br-col.paired .br-cell:nth-child(odd)::before {
  content: ''; position: absolute; right: -11px; top: 50%;
  width: 1px; height: 100%; background: var(--line-2);
}

/* ── Драфт: пик-бан ───────────────────────────────────────────────── */
.draft-turn { margin-bottom: 10px; }
.draft-grid {
  display: grid; gap: 6px; margin: 10px 0;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
}
.draft-cell {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 8px 9px; border: 1px solid var(--line-2); border-radius: 10px;
  background: linear-gradient(180deg, #1c2130, #141824);
  color: var(--fg); font: inherit;
  text-align: left; cursor: pointer; min-width: 0;
  transition: transform .14s var(--ease);
}
.draft-cell:disabled { cursor: default; }
.draft-cell:not(:disabled):active { transform: scale(.96); }
.draft-num { font: 850 13px/1 var(--display); color: var(--dim); }
.draft-nm {
  font-size: 12px; font-weight: 750; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.draft-mk { position: absolute; top: 6px; right: 7px; font-size: 12px; }
/* Забаненный слот читается как выбывший, а не просто «серый». */
.draft-cell.banned { opacity: .4; background: #10131b; }
.draft-cell.banned .draft-nm { text-decoration: line-through; }
.draft-cell.p-host {
  border-color: #4a86ff; background: linear-gradient(180deg, rgba(74, 134, 255, .22), #141824);
}
.draft-cell.p-guest {
  border-color: #ff9a3c; background: linear-gradient(180deg, rgba(255, 154, 60, .22), #141824);
}
.tier-btn { min-width: 0; }
.hint.warn { color: #ff8a95; font-weight: 700; }

/* ── Наборы пачками (×1/×3/×5/×10) и гены ─────────────────────────── */
.packs { display: flex; flex-direction: column; gap: 10px; }
.pack {
  border: 1px solid var(--line-2); border-radius: 13px; padding: 11px 12px;
  background: #121620;
}
.pack.poor { background: #0f121a; border-color: var(--line); }
.pack.poor .pack-i, .pack.poor .pack-n { opacity: .6; }
.pack-h { display: flex; gap: 11px; align-items: center; }
.pack-i {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px; line-height: 1;
  background: linear-gradient(180deg, #232a3c, #171c29);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.pack-b { flex: 1; min-width: 0; }
.pack-n { display: block; font-size: 14.5px; font-weight: 800; }
.pack-s { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.pack-q { display: flex; gap: 6px; margin-top: 10px; }
.pack-b-q {
  position: relative; overflow: hidden;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 4px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #232a3c, #171c29); color: var(--fg);
  font: 900 18px/1 var(--display); letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .14s var(--ease);
}
.pack-b-q i { font: 700 10.5px/1.2 var(--font); font-style: normal; color: var(--gold); }
.pack-b-q:active { transform: scale(.95); }
.pack-b-q.off, .pack-b-q[disabled] {
  cursor: default; background: #10131b; box-shadow: none; color: var(--faint);
}
.pack-b-q.off i, .pack-b-q[disabled] i { color: var(--faint); }

/* ── Тировые наборы плитками с обложкой (07.10.2026) ──────────────────
   Менеджер: «переработать визуал наборов, чтобы они отображались с
   картинками». Обложка квадратная (Packs/<Игра>BuyPack, 1254×1254), в
   две колонки на телефоне. Под ней — что внутри и кнопки покупки. */
.tpks {
  display: grid; gap: 14px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 560px) {
  .tpks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tpk { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tpk-art {
  position: relative; aspect-ratio: 1 / 1; border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--tier-c, #6b7280), #0c0f16 78%);
  box-shadow: 0 0 0 1.5px var(--tier-c, var(--line-2)),
              0 14px 26px -16px rgba(0, 0, 0, .95);
  transition: filter .2s, box-shadow .2s;
}
.tpk-art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .35s var(--ease);
}
/* Заглушка: видна, когда картинки нет или она не загрузилась. */
.tpk-fall {
  position: absolute; inset: 0; padding: 12px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; text-align: center;
}
.tpk-fi { font-size: 34px; line-height: 1; }
.tpk-fn {
  font: 900 21px/1.05 var(--display); letter-spacing: .03em;
  text-transform: uppercase; color: var(--fg);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}
.tpk.poor .tpk-art { filter: saturate(.55) brightness(.78); }
.tpk.wait .tpk-art { filter: saturate(.45) brightness(.7); }
.tpk.ready .tpk-art {
  box-shadow: 0 0 0 2px var(--gold), 0 0 24px -6px var(--gold),
              0 14px 26px -16px rgba(0, 0, 0, .95);
}
.tpk-d {
  font-size: 11.5px; line-height: 1.3; color: var(--dim); text-align: center;
}
/* Кнопки — по низу плитки: описание в две строки у соседа не сдвигает
   ряд кнопок (плитки одного ряда грид тянет до общей высоты). */
.tpk-q {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto;
}
.tpk-q .pack-b-q { padding: 7px 3px; font-size: 16px; }
.tpk-q .pack-b-q i { font-size: 10px; }
.tpk-open {
  position: relative; overflow: hidden; cursor: pointer;
  border: 0; border-radius: 11px; padding: 12px 6px; margin-top: auto;
  background: linear-gradient(180deg, var(--accent), var(--acc-2));
  color: var(--on-acc);
  font: 850 17px/1 var(--display); letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3),
              0 10px 20px -10px rgba(0, 0, 0, .8);
  transition: transform .14s var(--ease), filter .15s;
}
.tpk-open:active { transform: scale(.96); }
.tpk-open[disabled] {
  cursor: default; background: #141824; color: var(--dim);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 700 12px/1.2 var(--font); letter-spacing: 0; text-transform: none;
}
.tpk-open.busy { pointer-events: none; }
.tpk-open.busy::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .2), transparent 80%);
  animation: busy 1s linear infinite;
}
.tpk-gl {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); text-align: center;
  margin-bottom: -3px;
}
.tpk-gen { display: flex; gap: 5px; }
.tpk-g {
  flex: 1; min-width: 0; padding: 7px 0; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-2); background: #141824; color: var(--dim);
  font: 850 15px/1 var(--display);
}
.tpk-g.on {
  color: var(--fg); border-color: var(--tier-c, var(--gold));
  background: linear-gradient(180deg, #232a3c, #171c29);
  box-shadow: inset 0 0 0 1px var(--tier-c, var(--gold));
}
@media (hover: hover) and (pointer: fine) {
  .tpk:hover .tpk-art img { transform: scale(1.035); }
  .tpk-open:not([disabled]):hover, .tpk-g:hover { filter: brightness(1.12); }
}
.genes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gene {
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid var(--line-2); background: #141824; color: var(--dim);
}
.gene b { color: var(--fg); font-weight: 800; }

/* Кнопки слота билда: «Надеть» и крестик рядом. */
.build-btns { display: flex; gap: 6px; }
.build-btns .zone-go { margin-top: 0; }
.build-btns .zone-go.off { padding: 7px 11px; }

/* Множитель покупки: ряд ×1 … ×100 над списком товаров. */
.qty { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.qty-b {
  flex: 1 1 auto; min-width: 46px;
  padding: 8px 4px; border-radius: 10px;
  border: 1px solid var(--line-2); background: #141824;
  color: var(--dim); font: 850 16px/1 var(--display); letter-spacing: .03em;
  cursor: pointer;
}
.qty-b.on {
  border-color: var(--gold); color: #1b1408;
  background: linear-gradient(180deg, #f3d494, var(--gold));
}

/* «Бой идёт» — дорога обратно в свёрнутый бой. Не поломка, а
   приглашение вернуться — поэтому цветом игры. */
.inbat {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 0 12px; padding: 11px 12px;
  border-radius: 12px; cursor: pointer;
  font: 850 16px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  color: var(--on-acc);
  background: linear-gradient(180deg, var(--accent), var(--acc-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 20px -12px rgba(0, 0, 0, .8);
  animation: card-in .45s var(--ease) both;
}
#app > .inbat { margin-top: 12px; }
.inbat .ico { font-size: 17px; }
.inbat:active { filter: brightness(.92); }

/* Ползунок доли (взнос в казну клана). */
.slider { margin: 2px 0 10px; }
.slider input[type="range"] {
  width: 100%; height: 28px; margin: 0;
  background: transparent; -webkit-appearance: none; appearance: none;
}
.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px; background: #0b0e15;
  box-shadow: 0 0 0 1px var(--line-2);
}
.slider input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 3px; background: #0b0e15;
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px;
  border-radius: 50%; border: 3px solid #121620;
  background: var(--gold); cursor: pointer;
  box-shadow: 0 0 0 1px var(--gold-ln), 0 4px 10px -2px rgba(0, 0, 0, .8);
}
.slider input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%; border: 3px solid #121620;
  background: var(--gold); cursor: pointer;
}
.slider-v {
  margin-top: 2px; font-size: 12px; color: var(--dim); text-align: center;
}
.slider-v b { color: var(--gold); font: 850 17px/1 var(--display); }

/* ── Лента донатных наборов ──────────────────────────────────────────
   05.09.2026, менеджер: «сверху лента, в которой будут картинки
   наборов, если нажмут — все подробности и возможность покупки». */
.pstrip {
  display: flex; gap: 11px; overflow-x: auto; padding: 2px 2px 8px;
  margin: 0 -2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pstrip::-webkit-scrollbar { display: none; }
.pcard {
  flex: 0 0 auto; width: 150px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 7px;
  padding: 0; border: 0; background: none; color: var(--fg);
  font: inherit; text-align: left; cursor: pointer;
  transition: transform .16s var(--ease);
}
.pcard:active { transform: scale(.96); }
.pcard-img {
  display: block; width: 100%; aspect-ratio: 3 / 4;
  border-radius: 12px; overflow: hidden;
  background: #10131b;
  box-shadow: 0 0 0 1.5px var(--gold-ln), 0 14px 24px -14px rgba(0, 0, 0, .95);
}
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-n {
  font-size: 12.5px; font-weight: 750; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-p { font: 850 16px/1 var(--display); color: var(--gold); letter-spacing: .03em; }

/* Обложка в шторке подробностей: пропорция та же, что у плитки. */
.pack-art {
  margin: 0 auto 16px; max-width: 320px; width: 100%;
  aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  background: #10131b;
  box-shadow: 0 0 0 1.5px var(--gold-ln), 0 24px 44px -20px rgba(0, 0, 0, .95);
  animation: art-rise .6s var(--ease) both;
}
.pack-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pack-desc {
  white-space: pre-line; font-size: 13.5px; line-height: 1.5;
  color: var(--fg-2); margin-bottom: 16px;
}

/* ── Предложение наборов после серии поражений ───────────────────────
   «лента будет убрана, если он нажмёт на любое место кроме ленты». */
.poffer-bg {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(3, 4, 8, .6);
  display: flex; align-items: flex-end;
  animation: fade .22s ease both;
}
.poffer {
  width: 100%; max-width: 620px; margin: 0 auto;
  background: linear-gradient(180deg, #171b28, var(--bg));
  border-radius: 20px 20px 0 0;
  box-shadow: inset 0 1px 0 rgba(226, 189, 120, .3), 0 -20px 40px -20px rgba(0, 0, 0, .9);
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  animation: up .42s var(--ease) both;
}
.poffer-h { font: 900 24px/1.05 var(--display); letter-spacing: .03em;
            text-transform: uppercase; margin-bottom: 4px; }
.poffer-s { font-size: 12.5px; color: var(--dim); margin-bottom: 12px; }

/* Одноразовый набор, который уже куплен: гасим, но не прячем. */
.pcard.mine { opacity: .55; }
.pcard.mine .pcard-p { color: var(--dim); }

/* Модификаторы следующего боя зоны — узнать о них надо ДО входа. */
.zone-mods {
  grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 7px;
}
.zone-mods .chip { font-size: 11px; }

/* Тише для тех, кому движение мешает: остаются только смены цвета. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important; transition: none !important;
  }
  .drop-c { transform: none; }
}

/* Наруто (29.09.2026): строки печатей и Переноса Разума над кнопками хода
   и паспорт техники (ранг · стихия · печати) в карточке. */
.fstat { margin: 8px 0 2px; padding: 8px 10px; border-radius: 10px;
         background: color-mix(in srgb, var(--accent) 12%, transparent);
         border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
         font-size: 12.5px; line-height: 1.35; }
.fstat-l + .fstat-l { margin-top: 3px; }
.ab-j { font-size: 12px; opacity: .8; margin: 2px 0 4px; }

/* ── Статы и техники бойца в бою (02.10.2026) ─────────────────────────
   Лицо бойца в полосе поединка и портреты доски открывают шторку. Значок
   книжки в углу лица — чтобы было видно, что по нему можно нажать. */
.fd-face, .fp[data-unit] { cursor: pointer; }
.fd-info {
  position: absolute; right: -6px; bottom: -6px; z-index: 3;
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold);
  background: #0c0f17; box-shadow: 0 0 0 1.5px var(--gold-ln);
}
.fd-side.foe .fd-info { right: auto; left: -6px; }
.fd-info .ico { width: 11px; height: 11px; }
.fb-hint { grid-column: 1 / -1; text-align: center; margin-top: 6px; }
.us-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.us-row { flex: 1 1 0; min-width: 0; display: flex; gap: 6px; }
.us-row.foe { justify-content: flex-end; }
.us-vs { flex: none; font: 900 12px/1 var(--display); color: var(--dim);
         letter-spacing: .06em; }
.us-t {
  position: relative; flex: none; width: 42px; height: 42px; padding: 0;
  border: 0; border-radius: 10px; overflow: hidden; background: #10131b;
  box-shadow: 0 0 0 1.5px var(--tier-c, var(--line-2));
  opacity: .5; cursor: pointer; transition: opacity .2s ease;
}
.us-t.on { opacity: 1; box-shadow: 0 0 0 2px var(--mine); }
.us-t.f.on { box-shadow: 0 0 0 2px var(--enemy); }
.us-t.dead { filter: grayscale(1); }
.us-t .fd-fall { font-size: 16px; }
.us-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.us-face {
  position: relative; flex: none; width: 64px; height: 64px;
  border-radius: 14px; overflow: hidden; background: #10131b;
  box-shadow: 0 0 0 2px var(--mine), 0 10px 20px -10px var(--tier-c, #000);
}
.us-head.foe .us-face {
  box-shadow: 0 0 0 2px var(--enemy), 0 10px 20px -10px var(--tier-c, #000);
}
.us-id { min-width: 0; }
.us-head h3 { font-size: 24px; overflow-wrap: anywhere; }
.us-head .sheet-sub { margin-bottom: 0; }
.usheet .kv-v { font-size: 17px; overflow-wrap: anywhere; }
.kv-v.up { color: #7be3a0; }
.kv-v.down { color: #ff8a96; }
.kv-v i { font-style: normal; font-size: 11px; margin-left: 3px;
          vertical-align: 2px; }
.us-effs { margin: 6px 0 16px; }
/* Ярлыки (цена, лимит, «мало маны») не должны сжимать имя техники в
   столбик: не влезли рядом — уходят строкой ниже. */
.usheet .ab-h { flex-wrap: wrap; row-gap: 6px; }
.usheet .ab-n { flex: 1 1 55%; min-width: 0; overflow-wrap: anywhere; }
/* Пометка «🚫 Нельзя скопировать» — с новой строки, как в боте. */
.usheet .ab-d { white-space: pre-line; }
.ab.off { opacity: .6; }
.ab-c.warn {
  color: #ffd2d7; background: rgba(255, 80, 100, .14);
  border-color: rgba(255, 80, 100, .45);
}

/* ── Цена доната: ⭐ и под ней ₽ (02.10.2026) ─────────────────────────
   Менеджер: цифры доната не должны переноситься на следующую строку.
   Каждая строка цены — nowrap; лоты валют — сеткой, а не в один ряд из
   пяти сжатых кнопок, где «5 000 000» ломалась на три строки. */
.price { display: inline-flex; flex-direction: column; align-items: flex-end;
         gap: 2px; white-space: nowrap; line-height: 1.05; }
.price-s { font: 850 15px/1 var(--display); color: var(--gold);
           letter-spacing: .02em; white-space: nowrap; }
.price-r { font: 700 11px/1.1 var(--font); color: var(--dim);
           white-space: nowrap; }
.price s { font-weight: 600; opacity: .7; }
.pricebtn { white-space: nowrap; }
.pricebtn .price { align-items: center; }
.perk-b.pricebtn { display: inline-flex; align-items: center; gap: 8px;
                   justify-content: center; }
.pack-q.lots { display: grid; gap: 6px;
               grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.pack-q.lots .pack-b-q { padding: 8px 6px; gap: 5px; }
.pack-q.lots .price { align-items: center; }
.lot-n { font: 900 15px/1 var(--display); white-space: nowrap;
         letter-spacing: .01em; }
.pcard-p .price { align-items: center; }
.sheet-sub .price { align-items: flex-start; }
.rubhint .tglink { color: var(--accent); font-weight: 700; cursor: pointer;
                   text-decoration: underline; }

/* ── Наруто: клоны и спутники на поле (03.10.2026) ────────────────────
   Арт — хозяина (сервер отдаёт «boruto_bronze__clone1» → арт Боруто),
   а чтобы не спутать с самой картой: у клона синяя дымка и «Clone N»,
   спутники — маленькими карточками под отрядом. */
.fp-a.clone .fp-i { filter: saturate(.8) hue-rotate(-10deg) brightness(.95); }
.fp-a.clone::after { content: ""; position: absolute; inset: 0;
  background: rgba(70, 140, 255, .22); border-radius: inherit;
  pointer-events: none; }
.fp-tag { position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
  z-index: 2; padding: 1px 6px; border-radius: 6px; white-space: nowrap;
  font: 800 9.5px/1.4 var(--font); color: #ffe08a;
  background: rgba(10, 12, 20, .78); }
.fpets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin: 6px 0 2px; }
.fpet { width: 58px; display: flex; flex-direction: column; gap: 3px;
  align-items: stretch; }
.fpet-a { position: relative; height: 58px; border-radius: 9px;
  overflow: hidden; background: #141824;
  box-shadow: inset 0 0 0 1px var(--line-2); }
.fpet-a .fp-i { width: 100%; height: 100%; object-fit: cover;
  object-position: top; }
.fpet-a::after { content: ""; position: absolute; inset: 0;
  background: rgba(200, 170, 90, .18); pointer-events: none; }
.fpet.mass .fpet-a::after, .fpet.beast .fpet-a::after,
.fpet.illusory .fpet-a::after { background: rgba(70, 140, 255, .22); }
.fpet.puppet .fpet-a::after { background: rgba(160, 110, 220, .22); }
/* Имя — до двух строк («Shadow clones», «Illusory clones»), место под
   две строки у всех: полоски ХП стоят вровень. */
.fpet-n { font: 800 9.5px/1.15 var(--font); text-align: center;
  color: var(--fg-2); min-height: 2.3em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow-wrap: anywhere; }
.fd-pets { display: flex; justify-content: space-between; gap: 8px;
  margin-top: 6px; }
.fd-pl { display: flex; gap: 4px; flex-wrap: wrap; }
.fd-pl.foe { justify-content: flex-end; }
.fd-pet { position: relative; width: 26px; height: 26px; border-radius: 7px;
  overflow: hidden; background: #141824;
  box-shadow: inset 0 0 0 1px var(--line-2); }
.fd-pet .fp-i { width: 100%; height: 100%; object-fit: cover;
  object-position: top; }
.fd-pet i { position: absolute; left: 0; bottom: 0; height: 3px;
  background: var(--mine, #3ddc97); }
.fd-pet b { position: absolute; left: 0; right: 0; bottom: 0;
  font: 800 8px/1.2 var(--font); text-align: center; color: #ffe08a;
  background: rgba(10, 12, 20, .8); }

/* Стопка одинаковых (03.10.2026): звери ×2, клоны ×300 — одна карточка,
   позади веером ещё две, число — золотой плашкой. */
.fpet.stack { padding: 8px 8px 0 0; width: 66px; }
.fpet.stack .fpet-a {
  box-shadow: inset 0 0 0 1px var(--line-2),
    4px -4px 0 -1px #262c3f, 4px -4px 0 0 rgba(240, 190, 70, .35),
    8px -8px 0 -2px #1b2030, 8px -8px 0 -1px rgba(240, 190, 70, .2); }
.fpet-cnt { position: absolute; left: 50%; bottom: 5px; z-index: 2;
  transform: translateX(-50%); padding: 1px 7px; border-radius: 999px;
  white-space: nowrap; font: 900 12.5px/1.35 var(--font); color: #2a1a02;
  background: linear-gradient(180deg, #fff0b8, #f2b93b);
  box-shadow: 0 0 0 1.5px rgba(10, 12, 20, .9), 0 2px 6px rgba(0, 0, 0, .5); }
.fd-pet.stack {
  box-shadow: inset 0 0 0 1px var(--line-2), 3px -3px 0 -1px #262c3f; }
.fd-pet.stack b { border-radius: 0 0 6px 6px;
  font: 900 8.5px/1.25 var(--font); color: #2a1a02;
  background: linear-gradient(180deg, #fff0b8, #f2b93b); }

/* 17.10.2026 — раскладка силы в «Войсках»: подписи бонусов длинные («Бонусы уников (Сет Элиты, True UI, симбиоз Ямадзаки)») — переносим, а не режем многоточием. */
.pb .row-n { white-space: normal; overflow: visible; }
