/* public/css/styles.css — дизайн-система «Клубных Дуэлей» (шаг 19 + редизайн Фаза 1).
   ДВЕ ОСИ оформления, независимые друг от друга:
     • РЕЖИМ  — html[data-mode=light|dark]  (переключатель ☀/☾, theme.js). Дефолт — СВЕТЛЫЙ «combats classic».
     • ВАРИАНТ — html[data-theme=a|b|d]      (сборка сеттинга из /api/config, app.js). Меняет только акценты.
   Компоненты стилизуются ТОЛЬКО через переменные ниже — новые цвета в разметку не хардкодим.
   Пользовательские строки кладутся в разметку только через textContent (см. ui.js). */

/* === СВЕТЛАЯ ТЕМА «combats classic» (по умолчанию) === */
/* База + вариант A (Тени Восточной Империи): багрянец/бронза на тёплом беже. */
:root {
  color-scheme: light;
  --bg:        #d7cfbe;   /* тёплый серо-бежевый фон страницы */
  --bg-2:      #e7dfce;   /* светлее — для градиента и полей ввода */
  --panel:     #f1ead8;   /* кремовая панель */
  --panel-2:   #e8dfc9;   /* верх градиента панели */
  --border:    #b6a884;   /* песочная рамка */
  --text:      #2c2620;   /* тёмная тушь */
  --muted:     #6f6551;   /* приглушённый коричнево-серый */
  --accent:    #8f2d3b;   /* багрянец (тёмный — читается на креме) */
  --accent-2:  #986c15;   /* бронза-золото */
  --accent-ink:#fff5f2;   /* текст на акценте */
  --danger:    #b23636;
  --success:   #2f7d4f;
  --info:      #375f96;
  --radius:    9px;
  --radius-sm: 6px;
  --gap:       14px;
  --shadow:    0 2px 6px rgba(60,45,30,.18);
  --maxw:      480px;
  /* combats-classic (ре-скин Фаза 0): тёмная шапка, бордовый заголовок, синяя ссылка, золочёная
     рамка, Могущество-зелёный, фон нижнего чата/«кто в сети», цвета ников, редкость предметов.
     Тёмные значения — в блоке [data-mode="dark"] ниже (вариант A). Компоненты используют эти
     переменные вместо хардкода — тема light/dark переключается автоматически. */
  --top-a:#2b2a33;  --top-b:#17161d;  --top-ink:#d8d2c4;  --top-ink-dim:#9a9384; /* каменная шапка */
  --panel-head:#e5d8b6;  --head:#8b1a1a;                    /* заголовок панели + бордовый текст */
  --link:#14509c;  --link-hover:#0a3a78;  --might:#2e7d32;  /* синяя ссылка + Могущество */
  --gold-1:#f0d576;  --gold-2:#c99a2e;  --gold-edge:#8a6a16;/* золочёная рамка/кнопка */
  --chat-bg:#faf6ec;  --online-bg:#f6ecec;  --online-edge:#d8bcbc; /* нижний чат / «кто в сети» */
  --nick:#2f6a2f;  --nick-alt:#7a2f7a;  --sys-dim:#8a8272;  /* ники в чате / системные строки */
  --rare:#1c56a8;  --epic:#7a2f7a;                          /* редкость предметов */
  /* Образ-силуэт (§26): тёмная портретная подложка + серая фигура + светлый контур (как эталонные
     «Женские/Мужские Образы»). Нейтральны к варианту — индивидуальность даёт деталь в цвете --accent. */
  --fig-bg:    #1b1710;   /* тёмная подложка портрета */
  --fig-body:  #8b9099;   /* серая фигура */
  --fig-body-2:#6f747d;   /* волосы/тень (чуть темнее) */
  --fig-outline:#cdd2da;  /* светлый контур */
  /* Аутентичный «combats»-шрифт: системный без вебфонтов (CSP-безопасно). */
  --font:      Tahoma, Verdana, "Segoe UI", system-ui, -apple-system, sans-serif;
  /* Фоновая текстура (§6): верхний световой ореол + узор варианта. На CSS-градиентах —
     без внешних файлов (CSP-ок); цвет узора через color-mix от --text → сам светлеет на
     тёмной теме и темнеет на светлой. Вариант A — тонкая косая штриховка (парча). */
  --texture:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-2), transparent 60%),
    repeating-linear-gradient( 45deg, color-mix(in srgb, var(--text) 3.5%, transparent) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--text) 3.5%, transparent) 0 1px, transparent 1px 12px);
}
:root[data-theme="b"] { /* Медные Небеса — стимпанк (медь/латунь); узор — тонкая сетка «клёпаных» пластин */
  --accent:#a85a1f; --accent-2:#8a6b12; --info:#2f7a82; --border:#b8a276;
  --texture:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-2), transparent 60%),
    repeating-linear-gradient( 0deg, color-mix(in srgb, var(--text) 4%, transparent) 0 1px, transparent 1px 15px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--text) 4%, transparent) 0 1px, transparent 1px 15px);
}
:root[data-theme="d"] { /* Пепельные Города — постапокалипсис (мох/олива); узор — горизонтальные полосы-наносы */
  --accent:#5c7d2a; --accent-2:#8a6f1c; --info:#4a7a54; --border:#a9ab88;
  --texture:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-2), transparent 60%),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--text) 3%, transparent) 0 2px, transparent 2px 8px);
}

/* === ТЁМНАЯ ТЕМА «DreamsCity» === */
/* База + вариант A. data-mode всегда проставляется theme.js; эти правила активны при dark. */
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg:#14121a; --bg-2:#1c1926; --panel:#211d2c; --panel-2:#2a2536; --border:#3a3350;
  --text:#ece9f5; --muted:#a49fbb; --accent:#c8324b; --accent-2:#e3b23c; --accent-ink:#fff5f5;
  --danger:#d64545; --success:#3fae6b; --info:#5b8dd6;
  --shadow:0 3px 10px rgba(0,0,0,.5);
  --fig-bg:#0f0d15; --fig-body:#9a9fb0; --fig-body-2:#7b8090; --fig-outline:#d7dbe6; /* образ в тёмной теме */
  /* combats-classic → DreamsCity (тёмные значения токенов ре-скина, вариант A) */
  --top-a:#0f0e16; --top-b:#08070d; --top-ink:#c9c2dc; --top-ink-dim:#6f6788;
  --panel-head:#2a2338; --head:#d06a6a;
  --link:#6fa8ff; --link-hover:#9cc3ff; --might:#66c76a;
  --gold-1:#d8bb5a; --gold-2:#a07d1f; --gold-edge:#6a5210;
  --chat-bg:#17131f; --online-bg:#241a24; --online-edge:#4a3550;
  --nick:#77c777; --nick-alt:#c98ac9; --sys-dim:#6f6788;
  --rare:#6fa8ff; --epic:#c98ac9;
}
:root[data-mode="dark"][data-theme="b"] { /* Медные Небеса — тёмный */
  --bg:#171310; --bg-2:#201a14; --panel:#241d16; --panel-2:#2e2419; --border:#4a3a26;
  --text:#f2e9dc; --muted:#b7a488; --accent:#c8792e; --accent-2:#d8b24a; --accent-ink:#fff7ec;
  --info:#57a0a8;
}
:root[data-mode="dark"][data-theme="d"] { /* Пепельные Города — тёмный */
  --bg:#121412; --bg-2:#191d19; --panel:#1d211c; --panel-2:#262b24; --border:#3a4438;
  --text:#e7ece4; --muted:#95a08e; --accent:#7fae3f; --accent-2:#c9a24a; --accent-ink:#f6ffe9;
  --info:#6f9f6a;
}

/* ============================================================================
   ЭТАЛОН «Камень + Золото» (ПЕРЕНОС_ЭТАЛОНА_30_ШАГОВ, шаг 2) — токены --et-*.
   Источник истины: _ui_project/index.html (Вариант 6, утверждён 2026-07-13).
   Блок АДДИТИВНЫЙ: сам по себе ничего не красит — компоненты подключаются к нему
   по шагам 3+ (шапка/подвал → каркас → кукла → панорама → экраны). Эталон — единый
   скин (без light/dark оси): значения не зависят от data-mode/data-theme.
   ============================================================================ */
:root {
  /* --- камень (шапка/подвал): полосы-плиты + световые пятна, канты, тиснение --- */
  --et-stone:
    radial-gradient(140px 40px at 12% 30%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(180px 50px at 55% 70%, rgba(0,0,0,.14),     transparent 60%),
    radial-gradient(120px 36px at 85% 25%, rgba(255,255,255,.08), transparent 60%),
    repeating-linear-gradient(97deg, #7d7d7d 0 26px, #747474 26px 54px, #828282 54px 92px),
    #7a7a7a;
  --et-stone-edge-top: #9c9c9c;      /* верхний кант каменной полосы */
  --et-stone-edge-bot: #4c4c4c;      /* нижний кант */
  --et-stone-shadow: inset 0 2px 3px rgba(255,255,255,.25), inset 0 -3px 5px rgba(0,0,0,.35);
  --et-stone-ink: #23262c;           /* тиснёный текст на камне */
  --et-stone-ink-glow: 0 1px 0 rgba(255,255,255,.4);
  /* кнопка-плита на камне (ряд «Инвентарь…») */
  --et-plate-1:#a6a6a6; --et-plate-2:#8b8b8b; --et-plate-edge:#5f5f5f;
  --et-plate-1-h:#b3b3b3; --et-plate-2-h:#979797;
  /* тёмная плита с золотом (кнопка-название города, стиль В4) */
  --et-dark-1:#4a4038; --et-dark-2:#2b241d; --et-dark-edge:#5c4a2e;
  --et-dark-1-h:#5a4e42; --et-dark-2-h:#352c22;

  /* --- золото логотипа/акцентов (Georgia, Вариант 4) --- */
  --et-gold-hi:#f6e2a4; --et-gold-mid:#c9962f; --et-gold-lo:#8a5f14;
  --et-gold-ink:#f0d488; --et-gold-ink-dim:#e6d1a0; --et-gold-ink-hover:#ffe9ad;
  --et-clock:#ffd76a;                /* часы в подвале (Courier) */

  /* --- поверхности --- */
  --et-page:#c9c9c9;                 /* фон страницы за рабочей зоной */
  --et-work:#dedede;                 /* рабочая зона (за колонками) */
  --et-paper:#efefef;                /* светлая «бумага» контента */
  --et-paper-edge:#b5b5b5;
  --et-ink:#1c1c1c;                  /* основной текст на бумаге */
  --et-ink-dim:#555;

  /* --- типографика: Georgia для заголовков/меню/имён, Arial для тела --- */
  --et-font-display: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --et-font-body: Arial, Helvetica, 'Segoe UI', sans-serif;

  /* --- смысловые цвета контента --- */
  --et-head:#8d1f1f;                 /* бордовый заголовок/титул */
  --et-link:#20509e; --et-link-2:#1e2833;
  --et-win:#1d7a1d; --et-loss:#c22222; --et-draw:#777777;

  /* --- кукла (папердолл): размеры и палитра --- */
  --et-doll-w:300px;                 /* ширина колонки куклы */
  --et-slot:58px;                    /* сторона слота; сетка 5×58=290 */
  --et-doll-h:290px;                 /* высота ряда куклы (низ = слоты пояса/ботинок) */
  --et-slot-1:#d3d3d3; --et-slot-2:#bdbdbd; --et-slot-edge:#6f6f6f; --et-slot-ico:#7d7d7d;
  --et-portrait-bg:#0d0d0d; --et-portrait-edge:#555;
  --et-hp-1:#7ee65a; --et-hp-2:#2f9a1d;      /* полоса HP */
  --et-mp-1:#59a7e8; --et-mp-2:#2565b8;      /* полоса маны */
  --et-stam-1:#46c8d0; --et-stam-2:#2a86c4;  /* полоса выносливости (Ф3): голубой — отличим от зелёной HP и синей XP */
  --et-bars-edge:#3c3c3c;

  /* --- панорама города (правая колонка) --- */
  --et-pano-w:375px; --et-pano-h:255px;      /* +50% от 250×170; якорь — правый верх */
  --et-sky-1:#233a52; --et-sky-2:#0e1620;    /* ночное небо */
  --et-sil:#060a10;                          /* силуэты зданий */
  --et-window:#ffd76a;                       /* тёплые окна */
  --et-panocap-1:#9e9e9e; --et-panocap-2:#7f7f7f; --et-panocap-edge:#565656;

  /* --- чат внизу --- */
  --et-chat-bg:#f6f0f0; --et-chat-tabs:#dddddd; --et-chat-edge:#aaaaaa;
  --et-nick-1:#8d1f1f; --et-nick-2:#20509e; --et-nick-3:#7a1fa0; --et-chat-time:#2f9a1d;

  /* --- геометрия каркаса --- */
  --et-gap:10px;
  --et-content-x: calc(12px + var(--et-doll-w) + var(--et-gap)); /* 322px: смещение меню/вкладок */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image: var(--texture);       /* §6: узор варианта, адаптивен к теме (см. --texture) */
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
}

/* --- Каркас/загрузка --- */
.app { min-height: 100dvh; }
.boot { max-width: var(--maxw); margin: 0 auto; padding: 22vh 24px; text-align: center; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }

/* --- Векторные иконки (§5): единый штрих currentColor, размер в em наследует шрифт --- */
.icon { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -.15em; flex: none; }

/* --- Раскладка экранов --- */
.screen { max-width: var(--maxw); margin: 0 auto; padding: 16px 14px 40px; }
.screen--auth { padding-top: 8vh; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.row > * { flex: 1 1 auto; }

/* --- Панель --- */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel + .panel { margin-top: var(--gap); }
.panel__title {
  margin: 0; padding: 10px 15px;
  font-size: 1.04rem; font-weight: 700; letter-spacing: .2px;
  border-bottom: 1px solid var(--border);
  color: var(--head);                    /* combats: бордовый заголовок панели */
  background: linear-gradient(180deg, var(--panel-head), var(--panel-2));
}
/* combats-заголовок — без круглой метки (был модерн-«дот»); плотный тан-хедер задаёт узнавание. */
.panel__title::before { content: none; }
.panel__body { padding: 16px 18px; }

/* --- Кнопки --- */
.btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600;
  padding: 11px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; color: var(--accent-ink);
  background: var(--accent); transition: filter .15s, transform .05s, background .15s;
  min-height: 44px; /* удобная тач-цель */
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,.05); filter: none; }
/* СТ-13: «самоцветные» CTA-кнопки по всей игре — рубин (danger) и золото (primary), объём огранённого камня. */
.btn--danger, .btn--primary {
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -3px 5px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.5);
}
.btn--danger  { background: linear-gradient(160deg, #ff6a7d 0%, #c11a35 45%, #6f0016 100%); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.55); }
.btn--primary { background: linear-gradient(160deg, #ffe08a 0%, #cf9a22 45%, #7d5600 100%); color: #241600; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn--danger:active, .btn--primary:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4); }

/* --- Поля ввода --- */
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; margin-bottom: 6px; font-size: .9rem; color: var(--muted); }
.field__input {
  width: 100%; padding: 12px 13px; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  min-height: 44px;
}
.field__input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field__input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.field__input--error { border-color: var(--danger); }
.field__error { min-height: 1.1em; margin-top: 4px; font-size: .82rem; color: var(--danger); }

/* --- Формы аутентификации --- */
.auth-form { margin-top: 6px; }
.auth-form .btn[type="submit"] { width: 100%; margin-top: 4px; }
.auth-alt { margin-top: 16px; text-align: center; }
.auth-alt .btn { min-height: auto; padding: 4px 8px; }

/* --- Вкладки --- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs__item {
  appearance: none; cursor: pointer; font: inherit; white-space: nowrap;
  padding: 10px 14px; background: transparent; color: var(--muted);
  border: none; border-bottom: 2px solid transparent; min-height: 44px;
}
.tabs__item.is-active { color: var(--text); border-bottom-color: var(--accent); }

/* --- Список --- */
.list { list-style: none; margin: 0; padding: 0; }
.list__item { padding: 12px 4px; border-bottom: 1px solid var(--border); }
.list__item:last-child { border-bottom: none; }

/* --- Полоса HP --- */
.hpbar { position: relative; height: 20px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.hpbar__fill { height: 100%; background: linear-gradient(90deg, var(--danger), var(--accent)); transition: width .3s ease; }
.hpbar__label { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.6); }

/* СТ-6 (просьба заказчика): цветовой ТОН полосы HP по остатку — ≥80% приятный зелёный, <80% мягкий
   жёлтый (не кислотный), <30% ТЁМНЫЙ красный (не ярко-красный). Тон-класс (hpTone из ui.js) вешается на
   заливку: .hpbar__fill (ui.hpBar — бой/анкета/зрители/группа) и .charp__bar i (панель персонажа, слева).
   Действует и в бою, и после боя. Спецификация 0,2,x перебивает базовый градиент независимо от порядка файлов. */
:root { --hp-ok: #3f9a4a; --hp-warn: #c8a63a; --hp-low: #9a3838; }
:root[data-mode="dark"] { --hp-ok: #55b85f; --hp-warn: #d9bb4f; --hp-low: #bd5656; }
.hpbar__fill.hpt-ok,   .charp__bar i.hpt-ok   { background: var(--hp-ok); }
.hpbar__fill.hpt-warn, .charp__bar i.hpt-warn { background: var(--hp-warn); }
.hpbar__fill.hpt-low,  .charp__bar i.hpt-low  { background: var(--hp-low); }

/* --- Карточка предмета (тултип) --- */
.card { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; max-width: 280px; }
.card__title { font-weight: 700; margin-bottom: 4px; }
.card__slot { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.card__stat { display: flex; justify-content: space-between; font-size: .85rem; }
.card__stat-v { color: var(--accent-2); font-weight: 600; }
.card__req { margin-top: 8px; font-size: .8rem; color: var(--danger); }
.card__desc { margin-top: 8px; font-size: .82rem; color: var(--muted); font-style: italic; }
.card--rare .card__title { color: var(--info); }
.card--epic .card__title { color: var(--accent); }
.card--legendary .card__title { color: var(--accent-2); }

/* --- Модальные окна --- */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(2px); animation: fade .15s ease; }
.modal { width: 100%; max-width: 440px; max-height: 88dvh; overflow: auto; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal__title { margin: 0; font-size: 1.05rem; }
.modal__x { min-height: auto; padding: 4px 10px; }
.modal__body { padding: 16px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } }

/* --- Коды восстановления --- */
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.codes__item { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .5px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px; text-align: center; }

/* --- Тосты --- */
.toasts { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; gap: 8px; padding: 12px; pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; max-width: min(92vw, 440px);
  padding: 11px 15px; border-radius: 10px; color: #fff; box-shadow: var(--shadow);
  background: var(--info); animation: toast-in .2s ease; }
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--out { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* --- Паспорт: мета, чипы, распределение статов --- */
.profile__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.profile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: var(--accent-ink); background: var(--accent); }
.profile__free { margin: 6px 0 10px; font-weight: 600; }

/* Полоса опыта */
.xpbar { position: relative; height: 22px; margin: 10px 0; border-radius: 9px;
  background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.xpbar__fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .35s ease; }
.xpbar__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  line-height: 1; font-size: .68rem; font-weight: 700;
  color: var(--text); text-shadow: 0 1px 2px rgba(0,0,0,.6); }

.stat-alloc__head { margin-bottom: 8px; font-size: .85rem; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-of-type { border-bottom: none; }
.stat-row.is-pending .stat-row__val { color: var(--accent-2); font-weight: 700; }
.stat-row__name { font-weight: 600; }
.stat-row__val { min-width: 68px; text-align: right; font-variant-numeric: tabular-nums; }
.stat-row__btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 800; line-height: 1;
  width: 38px; height: 38px; border-radius: 8px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border);
}
.stat-row__btn:hover:not(:disabled) { border-color: var(--accent-2); color: var(--accent-2); }
.stat-row__btn:disabled { opacity: .4; cursor: default; }
.stat-alloc__apply { flex: 2 1 auto; }

/* --- Образы бойца (полноростовые силуэты по полу, §26) --- */
.avatar-svg { display: block; border-radius: 8px; }
.fig-bg { fill: var(--fig-bg); }
.fig-body { fill: var(--fig-body); }
.fig-hair { fill: var(--fig-body-2); }
.fig-line { stroke: var(--fig-outline); stroke-width: 2; stroke-linejoin: round; fill: none; }
.fig-accent { fill: var(--accent); }
.fig-accent-stroke { stroke: var(--accent); fill: none; }
.fig-img { /* своя картинка вместо силуэта — вписывается в подложку */ }
/* Круглые бюст-портреты НПЦ (cityart.js npcPortrait) — светлая заливка, отдельно от образов игрока. */
.av-bg { fill: var(--bg-2); }
.av-body { fill: var(--panel-2); }
.av-head { fill: color-mix(in srgb, var(--muted) 55%, var(--panel-2)); }
.av-accent { fill: var(--accent); }
.av-accent-stroke { stroke: var(--accent-2); }
/* Сетка выбора образа: портретные ячейки (образ 3:5). */
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 14px; }
.avatar-cell { cursor: pointer; padding: 4px; border-radius: 10px; background: var(--bg-2); border: 2px solid var(--border); display: grid; place-items: center; }
.avatar-cell .avatar-svg { width: 100%; height: auto; }
.avatar-cell.is-selected { border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.avatar-cell:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
/* СТ-65: галерея VIP-образов игроков под стандартными образами — только просмотр, подпись «Принадлежит игроку <ник>». */
.vip-gallery { margin: 6px 0 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.vip-gallery__title { margin-bottom: 2px; }
.vip-gallery__hint { margin: 0 0 8px; font-size: .85rem; }
.vip-gallery__grid { margin: 0; }
.vip-gallery__cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.avatar-cell--vip { cursor: zoom-in; border-color: var(--accent-2); width: 100%; }
.vip-gallery__own { font-size: .78rem; line-height: 1.2; text-align: center; max-width: 100%; }
.vip-gallery__nick { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent-2); cursor: pointer; text-decoration: underline dotted; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.vip-gallery__nick:hover, .vip-gallery__nick:focus-visible { text-decoration-style: solid; outline: none; }
/* §57: крупное живое превью выбранного портрета над сеткой образов (combats-стиль). */
.create__preview { display: flex; justify-content: center; margin: 2px 0 12px; }
/* Переключатель пола образа (сегмент из двух кнопок). */
.gender-seg { display: inline-flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.gender-seg__btn { font: inherit; cursor: pointer; padding: 7px 16px; border: 0; background: var(--panel-2); color: var(--text); }
.gender-seg__btn + .gender-seg__btn { border-left: 1px solid var(--border); }
.gender-seg__btn.is-active { background: var(--accent); color: var(--accent-ink); }
.gender-seg__btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }

/* Показ выпавшего города */
.city-reveal { text-align: center; padding: 8px 0; }
.city-reveal__name { font-size: 1.35rem; font-weight: 800; color: var(--accent-2); margin-bottom: 6px; }

/* Образ в паспорте */
.profile__avatar { flex: 0 0 auto; }
/* СТ-45: аватарка в чужой анкете кликабельна — крупный просмотр образа. */
.profile__avatar--zoom { cursor: zoom-in; }

/* --- Инвентарь: сумка --- */
/* (Шаг 28 ре-скина: старая кукла .doll/.doll-slot и сетка .inv__grid удалены — надетое
   рисует папердолл каркаса .edoll (layout.css) + список .worn, экран инвентаря одноколонный.) */
.bag { display: flex; flex-direction: column; gap: 8px; }
.bag__row { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.bag__row:last-child { border-bottom: none; }
.bag__summary { display: flex; justify-content: flex-start; gap: 8px; cursor: pointer; padding: 6px 0; align-items: center; }
.bag__icon { flex: none; width: 18px; height: 18px; color: var(--muted); }   /* combats (Фаза 6): тип предмета */
.bag__summary .bag__dur { margin-left: auto; }                                /* прочность — к правому краю */
.bag__name { font-weight: 600; }
.bag__dur { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.bag__dur.is-broken { color: var(--danger); font-weight: 700; }
.bag__details > .card { margin: 6px 0; }
.bag__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bag__btn { min-height: auto; padding: 6px 12px; font-size: .82rem; }
/* СТ-85: «Собственность» — заголовок объекта, под ним кнопки сеткой 2 в ряд одной ширины, небольшие отступы,
   слегка скруглённые; «Подарить» (и одиночные кнопки) — во всю ширину. */
.prop__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.prop__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.prop__acts .btn { width: 100%; min-height: auto; padding: 6px 10px; font-size: .82rem; border-radius: 6px; white-space: normal; }
.prop__acts .prop__btn--wide { grid-column: 1 / -1; }
/* СТ-85: услуги лазарета — блок абонемента и кнопки услуг одной высоты */
.hosp__pass { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; }
.hosp__pass p { margin: 4px 0; }
.hosp__svc { border-radius: 6px; }

/* §56: сравнение предмета из сумки с надетым (▲/▼) — combats-стиль «текущее → новое». */
.inv-cmp { margin: 6px 0 2px; padding: 6px 8px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--panel) 55%, var(--bg)); border: 1px solid var(--border); }
.inv-cmp__title { font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 4px; }
.inv-cmp__row { display: flex; align-items: center; gap: 8px; font-size: .84rem; padding: 1px 0; }
.inv-cmp__label { flex: 0 0 auto; min-width: 84px; color: var(--muted); }
.inv-cmp__vals { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.inv-cmp__cur, .inv-cmp__sep { color: var(--muted); }
.inv-cmp__new { color: var(--text); font-weight: 700; }
.inv-cmp__arrow { flex: 0 0 auto; font-weight: 800; font-size: .9rem; }
.inv-cmp__arrow.is-up { color: var(--success); }
.inv-cmp__arrow.is-down { color: var(--danger); }
.inv-cmp__arrow.is-same { color: var(--muted); }

/* Поиск/дев-форма: поле и кнопка на одной горизонтали.
   .field содержит подпись сверху + слот ошибки снизу; в инлайн-форме ошибка не нужна —
   скрываем её, чтобы низ поля совпал с низом кнопки (align-items:flex-end выравнивает по вводу). */
.find-form { display: flex; gap: 8px; align-items: flex-end; }
.find-form .field { flex: 1 1 auto; margin-bottom: 0; }
.find-form .field__error { display: none; }
.find-form .btn { white-space: nowrap; flex: 0 0 auto; }

/* --- Футер (название сеттинга + переключатель языка) --- */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem;
}
.footer__title { opacity: .85; }
.footer__langs { display: flex; gap: 6px; }
.footer__lang {
  appearance: none; cursor: pointer; font: inherit; font-weight: 700; font-size: .78rem;
  padding: 5px 9px; border-radius: 6px; color: var(--muted);
  background: transparent; border: 1px solid var(--border);
}
.footer__lang:hover { color: var(--text); }
.footer__lang.is-active { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.footer__lang:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
/* Тумблер темы ☀/☾ (редизайн Фаза 1, §2) */
.footer__theme {
  appearance: none; cursor: pointer; font-size: 1rem; line-height: 1;
  width: 30px; height: 28px; display: inline-grid; place-items: center;
  border-radius: 6px; color: var(--accent-2);
  background: transparent; border: 1px solid var(--border);
}
.footer__theme:hover { color: var(--text); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.footer__theme:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* --- Планшет/десктоп --- */
@media (min-width: 720px) {
  :root { --maxw: 560px; }
}

/* --- Чипы: варианты --- */
.chip--muted { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.chip--danger { background: var(--danger); color: #fff; }
.chip--warn { background: var(--accent-2); color: #241a05; }

/* --- Бой (редизайн combats): арена + лог в две колонки на широком экране --- */
.screen--fight { max-width: 980px; }
@media (min-width: 900px) {
  .screen--fight {
    display: grid; gap: var(--gap); align-items: start;
    grid-template-columns: minmax(0, 1fr) 344px;
    grid-template-areas: 'hint hint' 'arena log' 'controls log';
  }
  .fight__trainhint { grid-area: hint; margin-bottom: 0; }
  .fight__panel--arena { grid-area: arena; }
  .fight__panel--controls { grid-area: controls; }
  .fight__panel--log { grid-area: log; position: sticky; top: 12px; }
  .fight__panel--log .fight__log { max-height: 64vh; }
  .screen--fight .fight__panel { margin-top: 0; }
  /* СТ-64 (заказчик 2026-08-20, заменяет СТ-13): бой v3 — лог раундов СВОИМ окном 300px СПРАВА от
     окна управления (из нижнего чата вынесен); шапка раунд/таймер/vs — над обеими колонками. */
  /* СТ-64.1 (скриншот заказчика с линиями): доли ширины листа — 17% пусто · 30% шапка+управление ·
     2% зазор · 27% лог (от самого верха, вровень с шапкой) · 24% пусто. На узком центре пустые доли
     схлопываются, окна держат минимумы 300/260px. */
  /* СТ-64.2: лог расширен вправо до 34% (полоски зон «Вы | нанёс удар ; поставил блок» ≈ 600px
     влезают без горизонтального ползунка); пустая строка hint больше не даёт фантомный зазор (row-gap 0). */
  .screen--fight.screen--fight2 {
    /* СТ-64.3: правый край лога — под второй «а» вкладки «Барахолка» на экране заказчика ≈ 84% листа. */
    grid-template-columns: minmax(0, 17fr) minmax(300px, 30fr) minmax(0, 2fr) minmax(260px, 36fr) minmax(0, 15fr); /* СТ-64.5: лог +1% (≈2 буквы) */
    /* СТ-64.4 (2026-08-21, «окна прыгают»): лог спанит строки шапки и управления, а растёт с каждым
       раундом — спанящий элемент распределял излишек высоты по ОБЕИМ строкам, строка шапки росла и
       сдвигала «Атаку/Защиту» вниз на каждом раунде. Четвёртая строка 1fr забирает весь излишек
       (спец. 12.5: спан через flexible-трек кормит только его) — строки шапки/управления теперь
       ровно по своему содержимому и не зависят от лога. */
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas: 'hint hint hint hint hint' '. head . log .' '. controls . log .' '. . . log .';
    column-gap: 0; row-gap: 0;
  }
  .screen--fight2 .fight__panel--head { grid-area: head; }
  .screen--fight2 .fight__panel--log { align-self: start; }
  /* СТ-64.2: шапка «Раунд/таймер» и окно «Ход боя» — вровень с полосой HP левой колонки (там: отступ
     грида 10 + строка имени ~20 + 5 = 35px от верха; центр: 10 + 1 + 12 + 2 = 25px → доводим отступом).
     Управление — сразу под шапкой: зазор как между окном раунда и строкой имён (~18px до линии). */
  .screen--fight.screen--fight2 .fight__panel--head { margin-top: 8px; }
  .screen--fight.screen--fight2 .fight__panel--log { margin-top: 10px; }
  .screen--fight.screen--fight2 .fight__panel--controls { margin-top: 6px; }
  /* СТ-64.6 («окно прыгает от выбранной комбинации»): у шапки и управления стояли max-width 620px +
     margin-inline:auto (СТ-63 «как Банк»). Для грид-элемента auto-маржи = ширина ПО СОДЕРЖИМОМУ:
     жирный активный пункт «удар в живот»/«блок живота и пояса» делал окно шире, другие — уже.
     Маржи снимаем → элемент растягивается на всю ячейку, ширина постоянна. */
  .screen--fight.screen--fight2 .fight__panel--head,
  .screen--fight.screen--fight2 .fight__panel--controls { max-width: none; margin-inline: 0; justify-self: stretch; }
  .screen--fight2 .fight__panel--head .fight__status { text-align: center; margin-top: 4px; }
}

/* верхняя панель — статус-бар раунда/таймера */
.fight__topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
  padding: 7px 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border);
}
.fight__round { font-weight: 800; letter-spacing: .3px; }
.fight__timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--accent-2); min-width: 92px; text-align: right; }

/* карточки бойцов: портрет + имя/уровень + полоса HP; соперник сверху, вы снизу --- */
.fight__hp { display: flex; flex-direction: column; gap: 8px; }
.fight__fighter {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); border-left: 4px solid var(--danger);
}
.fight__fighter.is-you { order: 2; border-left-color: var(--info); }
.fight__fbody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fight__fname { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fight__who { font-weight: 800; }
.fight__flvl { font-weight: 700; }
.fight__ko { background: var(--danger); color: #fff; }
.fight__portrait { flex: 0 0 auto; }
.fight__portrait.is-ko { filter: grayscale(1); opacity: .55; }
.fight__portrait-blank {
  width: 60px; height: 60px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.5rem; color: var(--muted);
  background: color-mix(in srgb, var(--border) 30%, var(--panel)); border: 1px solid var(--border);
}
.fight__vs { display: grid; place-items: center; height: 0; margin: 3px 0; }
.fight__vs-badge {
  font-weight: 900; font-size: .74rem; letter-spacing: 1.5px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 2px 12px;
}

/* --- Бой: зрители (декоративная «толпа» над ареной, §47). Чистый CSS — два ряда голов-точек. --- */
.fight__crowd {
  height: 22px; margin-bottom: 8px; border-radius: 6px 6px 3px 3px;
  border: 1px solid var(--border); border-bottom: none; pointer-events: none;
  background:
    radial-gradient(circle at 7px 15px, color-mix(in srgb, var(--muted) 66%, transparent) 3.2px, transparent 3.8px) 0 0/14px 22px repeat-x,
    radial-gradient(circle at 14px 19px, color-mix(in srgb, var(--muted) 40%, transparent) 2.6px, transparent 3.1px) 7px 0/14px 22px repeat-x,
    linear-gradient(var(--panel-2), var(--panel));
}

/* --- Бой: заголовки секций управления --- */
.fight__section-title { margin: 14px 0 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }

/* --- Бой: силуэт-цель (combats). Клик по зоне ставит удар. Красная — удар, синие — что закрывает блок --- */
.fight__zones { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sil { width: 172px; max-width: 64%; height: auto; display: block; }
.sil.is-disabled { opacity: .5; }
.sil__body :is(circle, rect) { fill: color-mix(in srgb, var(--border) 55%, var(--panel)); stroke: var(--border); stroke-width: 1; }
.sil__zone { cursor: pointer; }
.sil.is-disabled .sil__zone { cursor: default; }
.sil__hit { fill: transparent; stroke: color-mix(in srgb, var(--border) 70%, transparent); stroke-width: 1; transition: fill .12s, stroke .12s; }
.sil__zone:hover .sil__hit { fill: color-mix(in srgb, var(--text) 9%, transparent); }
.sil.is-disabled .sil__zone:hover .sil__hit { fill: transparent; }
.sil__zone.is-block .sil__hit { fill: color-mix(in srgb, var(--info) 26%, transparent); stroke: var(--info); }
.sil__zone.is-attack .sil__hit { fill: color-mix(in srgb, var(--danger) 34%, transparent); stroke: var(--danger); stroke-width: 2; }
.sil__label { fill: var(--text); font-size: 11px; font-weight: 700; pointer-events: none; }
.sil__zone.is-attack .sil__label { fill: var(--danger); }
.sil__zone:focus-visible { outline: none; }
.sil__zone:focus-visible .sil__hit { stroke: var(--accent-2); stroke-width: 2; }
.fight__legend { display: flex; gap: 16px; font-size: .78rem; }
.fight__legend-atk { color: var(--danger); font-weight: 700; }
.fight__legend-blk { color: var(--info); font-weight: 700; }

/* --- Бой: выбор зоны кнопкой (фаза дистанции §107) --- */
.zone-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; min-height: 52px; border-radius: var(--radius-sm);
  color: var(--text); background: var(--bg-2); border: 2px solid var(--border);
  transition: border-color .12s, background .12s, transform .05s;
}
.zone-btn:active { transform: translateY(1px); }
.zone-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.zone-btn.is-block { border-color: color-mix(in srgb, var(--info) 65%, var(--border)); background: color-mix(in srgb, var(--info) 12%, var(--bg-2)); }
.zone-btn.is-attack { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--bg-2)); color: var(--accent-ink); }
.zone-btn:disabled { opacity: .6; cursor: default; }
.zone-btn__tag { font-size: 1rem; }

/* --- Бой: выбор блока (пары смежных зон) --- */
.fight__blocks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.block-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem;
  padding: 11px 10px; min-height: 46px; border-radius: var(--radius-sm);
  color: var(--text); background: var(--panel-2); border: 2px solid var(--border);
}
.block-btn.is-active { border-color: var(--info); background: color-mix(in srgb, var(--info) 20%, var(--panel-2)); }
.block-btn:disabled { opacity: .6; cursor: default; }
.block-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.fight__submit { flex: 2 1 auto; }
.fight__status { margin-top: 10px; min-height: 1.2em; font-weight: 600; }

/* --- Бой: лог (шаг 36) — консольная лента с чередованием строк --- */
.fight__log { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; padding: 2px; }
/* Палитра классов .log-* (§48 редизайна) вынесена в отдельный public/css/log.css (подключён после
   этого файла). Здесь оставлен только контейнер .fight__log выше. */

/* --- Бой: экран итога --- */
.fight__result:empty { display: none; }
.fight__result-head { font-size: 1.5rem; font-weight: 900; text-align: center; padding: 8px 0; letter-spacing: .5px; }
.fight__result-head.is-win { color: var(--success); }
.fight__result-head.is-loss { color: var(--danger); }
.fight__result-head.is-draw { color: var(--muted); }
/* СТ-12: панель итога боя — контент по центру, кнопки вдвое меньше обычных (краска «самоцветов» — глобальная). */
.fight__result-panel .panel__body { text-align: center; }
.fight__result-panel .row { justify-content: center; margin-top: 4px; }
.fight__result-panel .row > * { flex: 0 0 auto; }
.fight__result-panel .btn { min-height: 22px; padding: 5px 14px; font-size: .8rem; letter-spacing: .4px; }
/* СТ-14: коробка итога. Ширину задаёт ТОЛЬКО ряд кнопок (Реванш…В город) — остальные строки
   не расширяют её (width:0 + min-width:100%), так плита «Раунд N» встаёт ровно от левого края
   «Реванша» до правого края «В город». */
.fight__result-box { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.fight__result-box > :not(.row) { width: 0; min-width: 100%; box-sizing: border-box; }
.fight__result-box .fight__result-head { padding: 2px 0; }
.fight__result-box .fight__result-reward { margin: 0; }
/* «Раунд N» — плита светлого металла: объём как у кнопок-самоцветов, но это не кнопка. */
.fight__result-round {
  padding: 8px 14px; font-size: .92rem; font-weight: 900; letter-spacing: .4px; /* СТ-14.1: плита выше на ~20% (рост по вертикали), шрифт +15% и жирнее */
  color: #333; background: linear-gradient(160deg, #f4f4f4 0%, #c9c9c9 45%, #8f8f8f 100%);
  border: 1px solid rgba(0,0,0,.6); border-radius: 2px; /* как у кнопок скина на экране боя */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 5px rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.4);
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
/* Бой окончен — верхняя строка «Раунд N / таймер» прячется (раунд переехал плитой в итог). */
.screen--fight.is-over .fight__topbar { display: none; }

/* --- «Дом»: входящие вызовы и история боёв --- */
.challenge-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.challenge-row:last-child { border-bottom: none; }
.challenge-row__from { font-weight: 600; }
.challenge-row__btn { min-height: auto; padding: 6px 14px; flex: 0 0 auto; }
.hist-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.hist-row:last-child { border-bottom: none; }
.hist-row__res { font-weight: 800; }
.hist-row--win .hist-row__res { color: var(--success); }
.hist-row--loss .hist-row__res { color: var(--danger); }
.hist-row--draw .hist-row__res { color: var(--muted); }
.hist-row__opp { font-weight: 600; }
.hist-row__rounds { white-space: nowrap; }

/* --- Бой: анимации попадания/уклонения и всплывающий урон (шаг 39) --- */
.fight__fighter { position: relative; }
@keyframes fx-hit {
  0% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } 100% { transform: translateX(0); }
}
.fight__fighter.is-hit { animation: fx-hit .38s ease; }
.fight__fighter.is-hit .hpbar { box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 70%, transparent); }
@keyframes fx-dodge { 0% { opacity: 1; } 50% { opacity: .5; } 100% { opacity: 1; } }
.fight__fighter.is-dodge { animation: fx-dodge .5s ease; }
@keyframes fx-pop { 0% { opacity: 0; transform: translateY(2px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
.fight__pop {
  position: absolute; right: 10px; top: 0; font-weight: 800; font-size: 1.05rem; color: var(--danger);
  text-shadow: 0 1px 2px rgba(0,0,0,.65); pointer-events: none; animation: fx-pop 1s ease forwards;
}
@keyframes fx-logIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fight__log .log-line { animation: fx-logIn .25s ease; }
.fight__result-head { animation: fx-logIn .3s ease; }

/* --- Доска боёв / арена (шаг 40) --- */
.arena__list { display: flex; flex-direction: column; }
.arena__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.arena__row:last-child { border-bottom: none; }
.arena__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arena__from { font-weight: 700; }
.arena__form { display: flex; gap: 10px; }
.arena__form .field { flex: 1 1 0; margin-bottom: 0; }
.arena__create .row { flex-wrap: wrap; gap: 8px; }
.arena__lbl { margin: 10px 0 4px; font-size: .82rem; }

/* --- Бой: выбор цели (групповые/хаотичные, шаги 41–42) --- */
.fight__targets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.target-btn { padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.target-btn.is-active { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 20%, var(--bg-2)); color: var(--accent-ink); }
.target-btn:disabled { opacity: .6; cursor: default; }
.target-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.fight__team { font-size: .7rem; }
.fight__fighter.is-foe .fight__who { color: var(--danger); }

/* --- Травма / травмпункт (шаги 44–45) --- */
.injury-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* --- Тренировка с манекеном: подсказка на экране боя (шаг 46) --- */
/* СТ-14.2: плашка тренировки — текст по центру, плита в стиле «Раунд N»; цвет прежний светло-жёлтый,
   поверхность «алькантара» (матовая замша: два слоя микроточек + мягкий диагональный ворс поверх базы). */
.fight__trainhint {
  margin-bottom: var(--gap); padding: 10px 14px; border-radius: 2px;
  text-align: center;
  background:
    radial-gradient(rgba(0,0,0,.05) 1px, transparent 1.2px) 0 0 / 3px 3px,
    radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.2px) 1.5px 1.5px / 3px 3px,
    linear-gradient(160deg, rgba(255,255,255,.28), rgba(0,0,0,.06) 60%, transparent),
    color-mix(in srgb, var(--accent-2) 14%, var(--panel));
  border: 1px solid rgba(0,0,0,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 5px rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.4);
  color: var(--text); font-size: .88rem; line-height: 1.4; text-shadow: 0 1px 0 rgba(255,255,255,.4);
}

/* --- Общие чипы-варианты (шаги 47–52) --- */
.chip--sm { font-size: .72rem; padding: 1px 6px; }
/* combats: чип-кнопка с именем игрока → анкета (переиспользуемо) */
.chip--link { appearance: none; cursor: pointer; font: inherit; font-weight: 700; line-height: 1.1; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); transition: border-color .12s, color .12s; }
.chip--link:hover { border-color: var(--accent); color: var(--accent); }
.chip--link:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.chip--drop { background: color-mix(in srgb, var(--accent-2) 22%, var(--panel)); border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border)); color: var(--accent-2); }
.chip--out { opacity: .5; text-decoration: line-through; }

/* --- Окраины / PvE-мобы (шаг 47) --- */
.mob-list, .spec-list, .tourn-list { display: flex; flex-direction: column; gap: 10px; }
.mob-row { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); }
.mob-row--boss { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.mob-row__main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mob-row__name { font-weight: 700; }
.mob-row__flavor { margin: 4px 0 8px; font-size: .86rem; }
.mob-row__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mob-row__btn { margin-left: auto; }

/* --- Режим зрителя (шаг 50) --- */
.spec-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); }
.spec-row__main { display: flex; align-items: center; gap: 8px; }
.spec-row__vs { font-weight: 700; }
.spec-row__foot { display: flex; align-items: center; gap: 10px; }
.spec-row__btn { margin-left: auto; }
.spec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--gap); }
.spec-status { font-weight: 700; color: var(--accent-2); }
.spec-status--end { color: var(--success); }
.spec-hp { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--gap); }
/* combats: карточка бойца-зрителя (в тон экрану боя) */
.spec-fighter { padding: 9px 11px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); border-left: 3px solid var(--accent-2); }
.spec-fighter__name { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 700; }
.spec-fighter.is-down { opacity: .5; }
.flog { max-height: 260px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); font-size: .85rem; line-height: 1.5; display: flex; flex-direction: column; gap: 2px; }
.flog__line { padding: 3px 6px; border-radius: 5px; }
.flog__line:nth-child(even) { background: color-mix(in srgb, var(--border) 20%, transparent); }

/* §37 экран заявки на зарезервированный ник блогера */
.screen--nick .nick__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nick__name { font-size: 1.3rem; font-weight: 800; }
.nick__chan { word-break: break-all; }
.nick__code { margin: 10px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px dashed var(--accent); }
.nick__codeval { display: inline-block; margin: 4px 0; font-size: 1.15rem; font-weight: 800; letter-spacing: 1px; color: var(--accent-2); font-family: ui-monospace, Menlo, Consolas, monospace; }

/* --- Рейтинг / лидерборд (шаг 51) --- */
.lb__me { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb__controls { margin-bottom: 10px; }
.lb__lbl { margin: 8px 0 4px; font-size: .8rem; }
.lb__brackets { flex-wrap: wrap; }
.lb__brbtn { padding: 4px 8px; font-size: .8rem; }
.lb__table { display: flex; flex-direction: column; }
.lb__row { display: grid; grid-template-columns: 42px 1fr 44px 66px 62px; gap: 6px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.lb__row--head { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lb__row.is-me { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: var(--radius-sm); }
.lb__rank { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.lb__row--top .lb__rank { font-size: 1.15rem; }
.lb__row--top { background: color-mix(in srgb, var(--accent-2) 9%, transparent); border-radius: var(--radius-sm); }
.lb__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__name.linklike { color: var(--accent-2); }
.lb__rating { font-weight: 700; color: var(--accent-2); text-align: right; }
.lb__lvl, .lb__wl { text-align: right; color: var(--muted); font-size: .85rem; }
.lb__pager { justify-content: center; align-items: center; gap: 12px; margin-top: 10px; }

/* --- Турниры (шаг 52) --- */
.tourn-row { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); }
.tourn-row__main { display: flex; align-items: center; gap: 8px; }
.tourn-row__name { font-weight: 700; }
.tourn-row__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.tourn-row__btn { margin-left: auto; }
.tourn-players { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.br-round { margin-bottom: 12px; }
.br-round__title { font-size: .82rem; margin-bottom: 6px; }
.br-match { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); margin-bottom: 6px; }
.br-side { flex: 1; padding: 2px 4px; }
.br-side--won { font-weight: 800; color: var(--success); }
.br-side--bye { color: var(--muted); font-style: italic; }
/* combats: боец в сетке кликабелен, но сохраняет свой цвет (в т.ч. зелёный победитель) */
.br-side--link { appearance: none; background: none; border: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.br-side--link:hover { text-decoration: underline; }
.br-side--link:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 3px; }
.br-vs { flex: 0 0 auto; }

/* --- Чекбокс-строка «закрыть от зрителей» (шаг 50) --- */
.arena__checkrow { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: .9rem; cursor: pointer; }
.arena__check, .arena__checkrow input { width: 16px; height: 16px; accent-color: var(--accent); }

/* --- Уважение к настройке «меньше движения» (ре-скин Фаза 7: полное гашение) --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;    /* спиннер/бесконечные — не крутятся вечно */
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* Банк (шаг 60) */
.bank__bar { align-items: center; gap: 8px; flex-wrap: wrap; }
.bank__title { margin: 0; }
.bank__content { display: flex; flex-direction: column; gap: 10px; }
.bank__locked { color: var(--danger); font-weight: 600; }
.bank__log { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.bank__logrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 5px 4px; border-bottom: 1px solid var(--border); font-size: .85rem; }
.bank__logkind { min-width: 100px; text-transform: uppercase; font-size: .74rem; color: var(--muted); }
.bank__logamt { font-variant-numeric: tabular-nums; color: var(--accent-2); font-weight: 600; }
.bank__logfee { font-size: .78rem; }

/* Чат (шаг 61) */
.chat__bar { align-items: center; justify-content: space-between; gap: 8px; }
.chat__title { margin: 0; }
.chat__body { display: flex; flex-direction: column; gap: 8px; }
.chat__feed { display: flex; flex-direction: column; gap: 3px; height: 46vh; min-height: 220px; overflow-y: auto; padding: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.chat__msg { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; line-height: 1.35; }
.chat__time { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chat__author { font-weight: 700; color: var(--accent); }
.chat__author.is-mine { color: var(--accent-2); }
.chat__text { flex: 1 1 60%; overflow-wrap: anywhere; }
.chat__flag { padding: 0 6px; line-height: 1; opacity: .6; }
.chat__flag:hover { opacity: 1; }
.chat__compose { display: flex; gap: 6px; }
.chat__input { flex: 1 1 auto; padding: 8px 10px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.chat__cityhead, .chat__convohead, .chat__dmhead { align-items: center; gap: 8px; }
.chat__cityname, .chat__convoname { font-weight: 700; }
.chat__small { padding: 4px 10px; font-size: .82rem; }
.chat__dialogs { display: flex; flex-direction: column; gap: 4px; }
.chat__dialog { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; color: var(--text); }
.chat__dialog:hover { border-color: var(--accent); }
.chat__dialogname { font-weight: 700; }
.chat__dialoglast { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.chat__ignrow { align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }

/* Почта (шаг 63) */
.mail__bar { align-items: center; gap: 8px; flex-wrap: wrap; }
.mail__title { margin: 0; margin-right: auto; }
.mail__list { display: flex; flex-direction: column; gap: 2px; }
.mail__row { display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 6px; background: transparent; border: none; border-bottom: 1px solid var(--border); cursor: pointer; color: var(--text); width: 100%; }
.mail__row:hover { background: var(--panel-2); }
.mail__row.is-unread .mail__subj { font-weight: 700; }
.mail__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
.mail__clip { flex: 0 0 auto; }
.mail__subj { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__who { font-size: .8rem; white-space: nowrap; }
.mail__date { font-size: .74rem; white-space: nowrap; }
.mail__vsubj { margin: 0 0 4px; }
.mail__vbody { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.mail__attach { padding: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 8px; }
.mail__textarea { width: 100%; resize: vertical; font-family: inherit; }

/* Модерация (шаг 62) */
.mod__bar { align-items: center; gap: 8px; flex-wrap: wrap; }
.mod__title { margin: 0; margin-right: auto; }
.mod__queue { display: flex; flex-direction: column; gap: 10px; }
.mod__report { padding: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 6px; }
.mod__rhead { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mod__rtarget { font-weight: 700; }
.mod__rbody { overflow-wrap: anywhere; font-style: italic; }

/* Фракции (шаги 64–67) */
.faction__bar { align-items: center; gap: 8px; flex-wrap: wrap; }
.faction__title { margin: 0; margin-right: auto; }
.faction__credo { font-style: italic; color: var(--accent-2); margin: 2px 0 8px; }
.faction__warn { color: var(--danger); }
.faction__steps { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.faction__step { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.faction__step.is-done { color: var(--muted); }
.faction__step.is-current { font-weight: 700; }
.faction__stepmark { width: 1.2em; text-align: center; color: var(--accent-2); }
.faction__joinrow, .faction__rosterrow, .faction__rankrow { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.faction__jname { font-weight: 700; }
.faction__jbtn { margin-left: auto; }
.faction__rname { font-weight: 600; }
.faction__rname.is-mine { color: var(--accent-2); }
.faction__enemy { font-size: .72rem; text-transform: uppercase; color: var(--danger); border: 1px solid var(--danger); border-radius: 6px; padding: 0 5px; }
.faction__rosterrow .muted { margin-left: auto; }
.faction__ranks { display: flex; flex-direction: column; }
.faction__rankrow { justify-content: space-between; }

/* Война фракций (шаг 68): полосы влияния/очков + итог недели */
.faction__warhead { align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.faction__warlast { margin: 8px 0 2px; font-size: .88rem; }
.faction__warmine { color: var(--accent); font-weight: 700; margin: 2px 0; }
.warbar { margin: 8px 0; }
.warbar__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.warbar__name { font-weight: 600; }
.warbar__sub { font-size: .78rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.warbar__track { height: 12px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.warbar__fill { display: block; height: 100%; min-width: 2px; background: var(--accent); transition: width .3s ease; }
.warbar.is-mine .warbar__name { color: var(--accent-2); }
.warbar.is-enemy .warbar__name::after { content: ' ⚔'; color: var(--danger); }

/* Магазин фракции и офицеры (шаг 69) */
.faction__shoprow { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.faction__shoprow.is-locked { opacity: .72; }
.faction__shopinfo { flex: 1 1 60%; min-width: 0; }
.faction__shopname { font-weight: 600; }
.faction__shopwhy { color: var(--danger); font-size: .78rem; }
.faction__shopbuy { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.faction__officer { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.faction__officer-rank { font-weight: 700; color: var(--accent); min-width: 2.2em; }
.faction__officer-name { font-weight: 600; }
.faction__officer-rep { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Кланы (шаги 70–71) */
.linklike { background: none; border: none; color: var(--accent-2); cursor: pointer; padding: 0; font: inherit; text-align: left; }
.linklike:hover { text-decoration: underline; }
.linklike:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 3px; }
.clan__inviterow, .clan__mrow, .clan__toprow, .friend__row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.clan__invname, .clan__mname, .clan__topname { font-weight: 600; }
.clan__mrole { font-size: .72rem; text-transform: uppercase; color: var(--accent); min-width: 3.6em; }
.clan__mactions, .clan__toprow .muted:last-child { margin-left: auto; }
.clan__mbtn { padding: 3px 8px; font-size: .8rem; }
.clan__toprank { font-weight: 700; color: var(--accent); min-width: 2.2em; }

/* Друзья (шаг 72) */
.friend__name { font-weight: 600; }
.friend__act { padding: 3px 8px; font-size: .8rem; }
.friend__row .row { margin-left: auto; }
.friend__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.friend__dot.is-online { background: #4caf6a; box-shadow: 0 0 5px #4caf6a; }
.chip--online { border: 1px solid #4caf6a; color: #4caf6a; }
.profile__quick { flex-wrap: wrap; gap: 6px; }

/* Колокольчик уведомлений (шаг 73) */
/* СТ-15: колокольчик компактный — помещается в верхнюю тёмную полосу шапки, не наезжает
   на золотую плиту города и края соседних окон. */
.bell { position: fixed; top: 3px; right: 6px; z-index: 40; }
.bell__btn { position: relative; background: var(--panel-2); border: 1px solid var(--border); border-radius: 50%; width: 24px; height: 24px; cursor: pointer; display: grid; place-items: center; }
.bell__btn.has-unread { border-color: var(--accent); }
.bell__icon { font-size: .8rem; line-height: 1; }
.bell__badge { position: absolute; top: -4px; right: -5px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--danger); color: #fff; font-size: .58rem; font-weight: 700; display: grid; place-items: center; }
.notify__row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 9px 4px; cursor: pointer; color: var(--text); font: inherit; }
.notify__row.is-unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.notify__dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; flex: 0 0 auto; }
.notify__dot.is-unread { background: var(--accent); }
.notify__text { flex: 1; }

/* ===== Города / здания / магазин (шаги 54–59) ===== */
.city__hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: var(--gap); border: 1px solid var(--border); }
.city-pano { display: block; width: 100%; height: 120px; }
.city__hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); }
.city__name { margin: 0; font-size: 1.3rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.city__bar { align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.city__flavor { margin: 4px 2px 10px; }

.chip--money { background: var(--panel-2); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
/* §14: премиум-валюта — выделяем акцентной рамкой, чтобы отличать от мягкой (money). */
.chip--premium { background: var(--panel-2); border: 1px solid var(--accent); color: var(--accent); font-variant-numeric: tabular-nums; }
.chip--perk { background: var(--panel-2); border: 1px solid var(--accent); color: var(--accent); }
.chip--home { background: var(--panel-2); border: 1px solid var(--accent-2); }
.chip--away { background: var(--panel-2); border: 1px solid var(--border); }

/* ЭТАЛОН (.blds/.bld): здания — плоские светлые карточки, имя синим Georgia + NPC серым снизу. */
.city__buildings { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 7px; }
.bldg { display: block; padding: 7px 9px; text-align: left; font: inherit;
  background: linear-gradient(#e9e9e9, #d2d2d2); border: 1px solid #8a8a8a; border-radius: 0;
  color: var(--text); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.bldg:hover { background: linear-gradient(#f4f4f4, #dcdcdc); }
.bldg__icon { display: inline; font-size: 12px; line-height: 1; margin-right: 4px; }
.bldg__name { display: inline; font: 700 12px var(--et-font-display); color: var(--et-link); }
.bldg__npc { display: block; font-size: 10px; color: #666; margin-top: 2px; }

/* combats-хаб: две колонки на широком экране */
.city__grid { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 820px) { .city__grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.city__col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.city__col .panel { margin-top: 0; }
.city__who { display: flex; flex-wrap: wrap; gap: 6px; }
.city__who-chip {
  appearance: none; cursor: pointer; font: inherit; font-weight: 700; line-height: 1.1;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  transition: border-color .12s, color .12s;
}
.city__who-chip:hover { border-color: var(--accent); color: var(--accent); }
.city__who-chip:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.city__others { display: flex; flex-direction: column; gap: 8px; }
.city__other { padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.city__other-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.city__other-name { font-weight: 600; }

/* Здание + НПЦ */
.bldg__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bldg__bigicon { font-size: 2.4rem; line-height: 1; }
.bldg__title { margin: 0; }
.bldg__flavor { margin: 8px 0; }
.bldg__action { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.npc { display: flex; gap: 12px; align-items: flex-start; padding: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.npc__face { flex: 0 0 auto; }
.npc-portrait { border-radius: 50%; }
.npc__name { font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.npc__line { margin: 2px 0; font-style: italic; }

/* Магазин */
.shop__bar { align-items: center; justify-content: space-between; gap: 8px; }
.shop__title { margin: 0; }
.shop__content { display: flex; flex-direction: column; gap: 4px; }
.shop__row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--border); border-radius: 6px; transition: background .12s; }
.shop__row:hover { background: color-mix(in srgb, var(--border) 16%, transparent); }
.shop__row--jrnl { grid-template-columns: auto 1fr auto auto; }
.shop__info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.shop__slot { flex: 0 0 auto; }
.shop__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop__lvl { font-size: .8rem; }
.shop__price { font-variant-numeric: tabular-nums; color: var(--accent-2); white-space: nowrap; }
.shop__jkind { font-size: .78rem; color: var(--muted); text-transform: uppercase; }
.shop__btn { padding: 5px 10px; }

/* ===== Квесты (шаги 74–76) ===== */
.quest { padding: 10px; margin-bottom: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.quest--ready { border-color: #4caf6a; }
.quest--done { opacity: .62; }
.quest--locked_level, .quest--locked_prereq { opacity: .6; }
.quest__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.quest__title { font-weight: 700; }
.quest__desc { margin: 2px 0 6px; font-size: .88rem; }
.quest__objs { display: flex; flex-direction: column; gap: 3px; margin: 4px 0; }
.quest__obj { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.quest__obj.is-done { color: #4caf6a; }
.quest__obj-mark { width: 1.1em; text-align: center; flex: 0 0 auto; }
.quest__obj-text { flex: 1; }
.quest__obj-prog { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.quest__reward { margin: 4px 0 6px; font-size: .84rem; color: var(--accent-2); }
.quest__chest { align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* ===== Достижения (шаг 77) ===== */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 10px; align-items: flex-start; padding: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ach.is-locked { opacity: .55; }
.ach.is-unlocked.ach--rare { border-color: var(--accent-2); }
.ach.is-unlocked.ach--legend { border-color: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 30%, transparent); }
.ach__icon { font-size: 1.8rem; line-height: 1; flex: 0 0 auto; }
.ach__body { flex: 1; min-width: 0; }
.ach__title { font-weight: 700; }
.ach__desc { font-size: .82rem; margin: 2px 0; }
.ach__prog { font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Значки достижений в паспорте */
.ach-badges__label { font-size: .82rem; }
.ach-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ach-badges.is-link { cursor: pointer; }
.ach-chip { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); border: 1px solid var(--border); font-size: .95rem; }
.ach-chip--rare { border-color: var(--accent-2); }
.ach-chip--legend { border-color: var(--accent); box-shadow: 0 0 5px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ============================ Фаза 6, шаги 78–83 ============================ */

/* --- Размер шрифта (§81): масштаб корневого rem --- */
html[data-fontscale="sm"] { font-size: 87.5%; }
html[data-fontscale="md"] { font-size: 100%; }
html[data-fontscale="lg"] { font-size: 112.5%; }

/* --- Рамки паспорта (§78/§83): цвет/сияние через --frame-c, темозависимо --- */
.frame--plain    { --frame-c: var(--border);   --frame-glow: 0px; }
.frame--bronze   { --frame-c: #b08d57;         --frame-glow: 0px; }
.frame--iron     { --frame-c: #8a8f98;         --frame-glow: 0px; }
.frame--silver   { --frame-c: #c8ccd4;         --frame-glow: 4px; }
.frame--gold     { --frame-c: var(--accent-2); --frame-glow: 5px; }
.frame--champion { --frame-c: var(--accent);   --frame-glow: 7px; }
.frame--warlord  { --frame-c: #d5563f;         --frame-glow: 6px; }
.frame--crown    { --frame-c: #ffd868;         --frame-glow: 8px; }
.frame--ember    { --frame-c: #e8703a;         --frame-glow: 6px; }
.frame--royal    { --frame-c: #8b6cff;         --frame-glow: 7px; }
.frame--vigil    { --frame-c: #5b8dd6;         --frame-glow: 5px; }
.frame--aurora   { --frame-c: #63e6c3;         --frame-glow: 9px; }
/* §27 Три слоя образа: подложка (мат по --frame-c) → образ (svg) → рамка (граница+свечение). */
.profile__avatar .avatar-svg,
.avatar-frame .avatar-svg {
  border-radius: 9px;
  border: 2px solid var(--frame-c, var(--border));               /* рамка */
  box-shadow: 0 0 var(--frame-glow, 0px) color-mix(in srgb, var(--frame-c, transparent) 65%, transparent);
}
.profile__avatar,
.avatar-frame {
  display: inline-flex;
  padding: 3px;                                                   /* подложка-мат */
  border-radius: 12px;
  background: color-mix(in srgb, var(--frame-c, var(--border)) 22%, var(--panel));
}

/* --- Цвет ника (§78/§83) — наследуемое --nick-c --- */
.nick--default { --nick-c: var(--text); }
.nick--gold    { --nick-c: var(--accent-2); }
.nick--emerald { --nick-c: #46c281; }
.nick--shadow  { --nick-c: #a394ff; }
.nick--crimson { --nick-c: #e0556a; }
.nick--azure   { --nick-c: #5fa8e0; }
.nick--violet  { --nick-c: #b07ff0; }
.panel[class*="nick--"] .panel__title,
.cosm-preview__name,
.cosm-swatch-nick,
.settings__cos-sw-nick { color: var(--nick-c, var(--text)); }
.cosm-preview__name { font-weight: 700; font-size: 1.05rem; }

/* Косметический титул-чип */
.cosm-title { border-color: var(--accent-2); color: var(--accent-2); }
.cosm-title--legend { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 5px color-mix(in srgb, var(--accent) 30%, transparent); }
.cosm-title--rare { border-color: var(--accent-2); }

/* --- Предпросмотр внешности (общий) --- */
.cosm-preview { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.cosm-preview__meta { display: flex; flex-direction: column; gap: 4px; }

/* Ярлыки честной витрины (§32): что даёт вид, а что — мощь. */
.shop-tags { flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.fairplay { display: inline-flex; align-items: center; gap: 5px;
  background: color-mix(in srgb, var(--success) 15%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--border)); color: var(--success); }
.fairplay .icon { width: 1em; height: 1em; }

/* ===== Фаза 8 «Патчи: магия и стрелковое» (шаги 98–109). Показ только при включённых флагах. ===== */
/* Полоса маны (§102) — как hpbar, но сине-фиолетовая. */
.manabar { position: relative; height: 14px; margin-top: 4px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.manabar__fill { height: 100%; background: linear-gradient(90deg, #3a5bd0, #7f5bd0); transition: width .3s ease; }
.manabar__label { position: absolute; inset: 0; display: grid; place-items: center; font-size: .68rem; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.6); }

/* Экран магии (§102) */
.magic__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.magic__head .manabar { flex: 1 1 160px; }
.magic__section-title { margin: 14px 0 6px; font-weight: 700; color: var(--muted); }
.magic__slots { display: flex; gap: 8px; flex-wrap: wrap; }
.magic__slot { flex: 1 1 120px; min-height: 60px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--bg-2); display: flex; flex-direction: column; gap: 4px; }
.magic__slot.is-filled { border-style: solid; border-color: color-mix(in srgb, #7f5bd0 60%, var(--border)); }
.magic__slot-n { font-size: .72rem; color: var(--muted); }
.magic__slot-name { font-weight: 700; }
.magic__slot-clear { align-self: flex-start; padding: 2px 8px; }
.magic__list, .magic__schools { display: flex; flex-direction: column; gap: 8px; }
.magic__spell, .magic__school-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; }
.magic__spell.is-known { border-color: color-mix(in srgb, #7f5bd0 45%, var(--border)); }
.magic__spell-head, .magic__school-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.magic__spell-name { font-weight: 700; }
.magic__spell-ic { font-size: 1.1rem; }
.magic__spell-meta { font-size: .8rem; }

/* Бой: переключатель Удар/Заклинание и панель заклинаний (§102); манёвр дистанции (§107) */
.fight__modes { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-btn { flex: 1 1 auto; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.mode-btn.is-active { border-color: #7f5bd0; background: color-mix(in srgb, #7f5bd0 22%, var(--bg-2)); color: var(--accent-ink); }
.mode-btn:disabled { opacity: .6; cursor: default; }
.mode-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.fight__spells { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.spell-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; cursor: pointer; }
.spell-btn.is-active { border-color: #7f5bd0; background: color-mix(in srgb, #7f5bd0 22%, var(--bg-2)); color: var(--accent-ink); }
.spell-btn:disabled { opacity: .6; cursor: default; }
.spell-btn__name { font-weight: 700; }
.spell-btn__cost { font-size: .74rem; color: var(--muted); }

/* Бой: фаза дистанции (§107) */
.fight__distance-banner { padding: 8px 10px; margin-bottom: 8px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--info) 12%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--info) 40%, var(--border)); font-size: .88rem; }

/* Экран стрелкового (§107) */
/* === СТ-25: Окраины — таймер готовности бота НАД куклой + предупреждение о наградах/травмах === */
.mob-card__timer {
  align-self: center; margin-bottom: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
}
.mob-card__timer.is-cooling { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border)); }
.outskirts__warn { margin-top: 6px; font-size: .85rem; color: var(--accent-2); }

/* === СТ-22: магазин приёмов (экран «Приёмы») — карточки партий по образцу .ranged__item === */
.tech__party { margin-top: 14px; }
.tech__party.is-locked { opacity: .55; }
.tech__party-title { margin: 0 0 6px; font-weight: 700; color: var(--muted); }
.tech__item { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; }
.tech__item + .tech__item { margin-top: 8px; }
.tech__item.is-owned { border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border)); }
/* Ряды внутри карточки компактные: гасим глобальные .row { margin-top:12px } и flex:1 у детей. */
.tech__item .row { margin-top: 2px; gap: 8px; align-items: center; }
.tech__item .row > * { flex: 0 0 auto; }
.tech__item-head { flex-wrap: wrap; }
.tech__ic { font-size: 1.1rem; }
.tech__name { font-weight: 700; }
.tech__item-desc { font-size: .85rem; }

.ranged__ammo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; font-weight: 600; }
.ranged__section-title { margin: 12px 0 6px; font-weight: 700; color: var(--muted); }
.ranged__list { display: flex; flex-direction: column; gap: 8px; }
.ranged__item { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; }
.ranged__item.is-equipped { border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border)); }
.ranged__item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ranged__item-name { font-weight: 700; }
.ranged__item-ic { font-size: 1.1rem; }
.ranged__item-meta { font-size: .8rem; }

/* Лог: сегменты магии/стрелкового (§101/§106) */
/* .log-magic/.log-heal/.log-buff/.log-debuff/.log-ranged — перенесены в public/css/log.css (§48). */

/* --- Витрина косметики (§78) --- */
.cosm-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 8px; background: var(--panel-2); }
.cosm-card.is-locked { opacity: .82; }
.cosm-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cosm-card__name { font-weight: 600; }
.cosm-card__how { font-size: .82rem; }
.cosm-card__actions { margin-top: 8px; }
.cosm-swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--panel); border: 3px solid var(--frame-c, var(--border)); box-shadow: 0 0 var(--frame-glow, 0px) color-mix(in srgb, var(--frame-c, transparent) 60%, transparent); flex: 0 0 auto; }
.cosm-swatch-nick { font-weight: 700; }
.cosm-tier--common { color: var(--muted); }
.cosm-tier--rare { color: var(--accent-2); }
.cosm-tier--legend { color: var(--accent); }

/* --- Календарь входа (§79) --- */
.cal__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.cal__cell { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; background: var(--panel-2); display: flex; flex-direction: column; gap: 2px; min-height: 68px; }
.cal__cell--claimed { opacity: .55; }
.cal__cell--next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal__daynum { font-weight: 700; font-size: .8rem; color: var(--muted); }
.cal__rew { font-size: .82rem; }
.cal__rew--cos { color: var(--accent-2); }
.cal__check { position: absolute; top: 6px; right: 8px; color: var(--success); font-weight: 700; }
.cal__action { margin-top: 6px; }
@media (min-width: 460px) { .cal__grid { grid-template-columns: repeat(7, 1fr); } }

/* --- Настройки (§81) + редактор внешности (§83) --- */
.settings__preview { margin-bottom: 6px; }
.settings__field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.settings__field-label { font-weight: 600; font-size: .9rem; }
/* СТ-41: таймер смены образа — заметная строка + компактный ряд кнопок докупки часов. */
.settings__appcd-timer { font-weight: 700; color: var(--accent-2); margin: 2px 0; font-variant-numeric: tabular-nums; }
.settings__appcd-btns { flex-wrap: wrap; gap: 6px; }
.settings__appcd-btns > .btn { flex: 0 0 auto; }
.settings__opts { display: flex; gap: 6px; flex-wrap: wrap; }
.settings__avatars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.settings__avatar { padding: 4px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); cursor: pointer; display: grid; place-items: center; }
.settings__avatar .avatar-svg { width: 100%; height: auto; }
.settings__avatar.is-active { border-color: var(--accent); box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent); }
.settings__cosrow { display: flex; gap: 6px; flex-wrap: wrap; }
.settings__cos { padding: 4px 8px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.settings__cos.is-active { border-color: var(--accent); }
.settings__cos-sw { width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 3px solid var(--frame-c, var(--border)); box-shadow: 0 0 var(--frame-glow, 0px) color-mix(in srgb, var(--frame-c, transparent) 60%, transparent); }
.settings__cos-sw-nick { font-weight: 700; }
.settings__cos-lbl { font-size: .85rem; }
.settings__subhead { margin: 12px 0 6px; font-size: .95rem; }
.settings__pwform { display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.settings__sessions { display: flex; flex-direction: column; gap: 8px; }
.settings__sess { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); }
.settings__sess-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings__sess-ua { font-size: .85rem; word-break: break-word; }
.settings__sess-time { font-size: .78rem; }

/* --- Онбординг новичка (§80) --- */
.panel--ftue { border-color: var(--accent-2); }
.ftue__prog { font-weight: 600; margin: 4px 0 8px; }
.ftue__list { display: flex; flex-direction: column; gap: 6px; }
.ftue__item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.ftue__item.is-done .ftue__text { color: var(--muted); text-decoration: line-through; }
.ftue__mark { width: 22px; text-align: center; }
.ftue__text { flex: 1; }
.ftue__go { margin-left: auto; }

/* ===== Фаза 7 «Защита игроков» (шаги 84–97) ===== */
.captcha__q { font-weight: 600; margin: 6px 0; }
.twofa__qr { display: block; width: 200px; height: 200px; max-width: 100%; background: #fff; padding: 6px; border-radius: 8px; margin: 8px auto; }
.twofa__secret { word-break: break-all; font-family: monospace; font-size: 0.85em; }
.chip--danger { background: color-mix(in srgb, var(--danger, #c0392b) 22%, transparent); color: var(--danger, #c0392b); }
/* Резервные коды (перевыпуск/восстановление) — если не заданы ранее */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 8px 0; }
.codes__item { font-family: monospace; padding: 4px 6px; background: var(--panel-2, rgba(127,127,127,0.1)); border-radius: 6px; text-align: center; }
/* Админ-консоль */
.screen--admin .admin__list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.admin__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: 0.9em; }
.admin__row.is-reversed { opacity: 0.55; }
.admin__cell { overflow-wrap: anywhere; }
.admin__cell.muted { color: var(--muted); }
.admin__req { padding: 8px 4px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.admin__reqcols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin__reqcols h4 { margin: 0 0 4px; font-size: 0.85em; color: var(--muted); }
@media (max-width: 560px) { .admin__reqcols { grid-template-columns: 1fr; } }
/* §113/§116: статус-сетка, карточка игрока, кнопка-строка, селект роли */
.admin__status { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 8px; }
.admin__stat { display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.admin__stat-k { font-size: 0.78em; }
.admin__stat-v { font-size: 1.15em; font-weight: 600; overflow-wrap: anywhere; }
.admin__card { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--border); }
.admin__row--btn { width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); cursor: pointer; color: inherit; }
.admin__row--btn:hover { background: var(--surface-2, rgba(127,127,127,0.08)); }
.admin__sel { max-width: 160px; }

/* §117 PWA: баннер установки + офлайн-страница */
/* П-2.3: уведомления в потоке страницы над подвалом — «установить приложение», «подтвердите e-mail». */
.notices { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; display: grid; gap: 8px; }
.notices:empty { display: none; }
.notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border: 1px solid var(--border); border-left: 3px solid var(--accent, #c9a227);
  border-radius: 10px; background: var(--panel); color: var(--text);
}
.notice__text { flex: 1 1 220px; font-size: 0.92em; }
.notice__close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1em; line-height: 1; padding: 2px 6px; }
/* П-2.3: коды восстановления — нумерованные строки (копируются построчно) + кнопки скачать/скопировать */
.codes--list { list-style: none; padding: 0; }
.codes__row { display: flex; align-items: center; gap: 6px; }
.codes__num { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.6em; text-align: right; }
.codes__actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.offline__title { font-size: 1.3em; font-weight: 700; margin-bottom: 6px; }

/* §19: баннер «подтвердите e-mail» — с П-2.3 это .notice (см. выше). */
.verify-devlink { display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; color: var(--accent, var(--info, #6ab)); text-decoration: underline; }
.verify__h { margin: 0 0 4px; font-size: 1.15em; }

/* §25: примечание под оффером «Быстрый старт» — мельче основного текста, тема-независимо. */
.quickstart__note { margin-top: 0.35rem; font-size: 0.85em; }

/* §119: ссылка «Правила» и версия в футере, список правил */
.footer__link { background: none; border: none; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0 6px; font: inherit; }
.footer__link:hover { color: var(--fg, #e7ddc9); }
.footer__ver { font-size: 0.82em; opacity: 0.75; }
.rules__list { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rules__list li { line-height: 1.4; }

/* ===== Перезапуск Ф5: «Прямая линия» (пятый чат) + «Сотовый оператор» (пакеты минут), оверлей вызова ===== */
/* «Сотовый оператор»: баланс минут + сетка пакетов. */
.op__mins { font-weight: 600; margin: 0 0 8px; }
.op__packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.op-pack { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2, var(--panel)); }
.op-pack.is-locked { opacity: .6; }
.op-pack__name { font-weight: 700; }
.op-pack__mins { font-size: .9rem; }
.op-pack__reason { font-size: .8rem; }

/* Вкладка «Телепатия» */
.tele__intro { margin: 2px 0 8px; }
.tele__callrow { gap: 8px; }
.tele__mystats { margin: 8px 0; gap: 8px; align-items: center; flex-wrap: wrap; }
.tele__incoming { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.tele__inrow { gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--panel-2, var(--panel)); flex-wrap: wrap; }
.tele__sandbox { font-size: .8rem; opacity: .85; border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 10px; }
.tele__head { align-items: center; gap: 8px; flex-wrap: wrap; }
.tele__time { font-variant-numeric: tabular-nums; }
.tele__fields { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tele__lbl { font-size: .78rem; }
.tele__field { min-height: 84px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2, var(--panel)); color: var(--text); font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; }
textarea.tele__field { resize: vertical; width: 100%; }
.tele__field--peer { border-style: dashed; }
.tele__imgbar { margin-top: 8px; }
.tele__imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tele__img { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2, var(--panel)); }
.tele__img--sealed { border-style: dashed; }
.tele__imgpic { max-width: 220px; max-height: 180px; border-radius: 6px; display: block; }
.tele__note { font-size: .82rem; margin: 6px 0 0; }
.tele__focus { text-align: center; font-size: 1.05rem; padding: 10px 4px; }

/* Эфемерные картинки в ЛС */
.chat__msg--img .chat__imgpic { max-width: 200px; max-height: 160px; border-radius: 6px; display: block; }
.chat__imgeph { font-size: .78rem; display: block; }

/* Глобальный неблокирующий оверлей телепатического запроса (в стеке тостов) */
.tele-overlay { display: flex; flex-direction: column; gap: 8px; }
.tele-overlay__btns { display: flex; gap: 8px; }

/* VIP-магазин: баланс премиума (витрина расходников убрана в Ф5 — минуты у «Сотового оператора») */
.vip__balances { align-items: center; gap: 10px; flex-wrap: wrap; }

/* ===== Нижняя combats-панель (редизайн Фаза 8, §57) =====================================
   Постоянная оболочка игровых экранов: чат города + «кто в сети» + тулбар с часами. Фикс. снизу,
   контент внутри выровнен по ширине каркаса (940). Всё на токенах — светлая/тёмная тема работают
   автоматически. Показ — класс .dock--on (ставит js/dock.js); тело скрывается при .dock--collapsed. */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: none;                                   /* скрыта, пока не .dock--on */
  background: var(--chat-bg);
  border-top: 1px solid #aaa;
  box-shadow: 0 -8px 24px rgba(0,0,0,.18);
  padding-bottom: env(safe-area-inset-bottom);
}
.dock.dock--on { display: block; }
/* ЭТАЛОН: чат — ВО ВСЮ ширину окна (без центрируемой колонки), ввод — в каменном подвале. */
.dock__inner {
  padding: 0;
  display: flex; flex-direction: column; gap: 0;
  max-height: 46vh;                                /* на низких экранах панель не съедает всё */
}
.dock__body { display: flex; gap: 0; min-height: 0; }
.dock--collapsed .dock__body { display: none; }    /* свёрнуто — виден только тулбар */

/* Свернуть/развернуть — «язычок» в правом верхнем углу панели. */
.dock__collapse {
  position: absolute; top: -13px; right: 14px; width: 30px; height: 16px; line-height: 14px;
  padding: 0; cursor: pointer; font-size: 12px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-bottom: none;
  border-radius: 7px 7px 0 0;
}
.dock__collapse:hover { color: var(--text); }
.dock__collapse:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }

/* СТ-15: «увеличить чат» — такой же язычок левее сворачивания; ▴ = поднять на +65%, ▾ = вернуть. */
.dock__expand {
  position: absolute; top: -13px; right: 48px; width: 30px; height: 16px; line-height: 14px;
  padding: 0; cursor: pointer; font-size: 12px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-bottom: none;
  border-radius: 7px 7px 0 0;
}
.dock__expand:hover { color: var(--text); }
.dock__expand:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.dock--collapsed .dock__expand { display: none; }  /* свёрнутый док увеличивать нечего */

/* СТ-41 (заказчик 2026-08-10): «Логи боёв» — активная кнопка ПОД язычками свернуть/развернуть,
   правый верхний угол дока, БОРДОВО-КРАСНАЯ рамка по периметру. Появляется только на игровых
   экранах при FIGHT_LOGS_ENABLED (класс is-on ставит dock.js). */
.dock__fightlogs {
  display: none;
  position: absolute; top: 5px; right: 14px; z-index: 3;
  padding: 2px 10px; cursor: pointer;
  font: 700 11px var(--et-font-display, inherit); letter-spacing: .4px;
  color: var(--text); background: var(--panel);
  border: 2px solid #7a1a2b; border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(122, 26, 43, .25), inset 0 1px 0 rgba(255,255,255,.25);
}
.dock__fightlogs.is-on { display: inline-block; }
.dock__fightlogs:hover { background: color-mix(in srgb, var(--panel) 80%, #7a1a2b 20%); }
.dock__fightlogs:focus-visible { outline: 2px solid #c9455e; outline-offset: 1px; }
.dock--collapsed .dock__fightlogs { display: none; }   /* в свёрнутом доке ленты нет — кнопка ни к чему */

/* «Логи боёв»: список последних боёв + архивный лог (те же классы строк .log-*).
   СТ-64: список живёт на экране «Логи боёв» (screens/fightlogs.js), модалка — только сам лог. */
.dock__archlist { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow: auto; min-width: min(430px, 80vw); }
.screen--fightlogs .dock__archlist { min-width: 0; max-height: none; overflow: visible; }
.screen--fightlogs .fightlogs__bar { gap: 8px; margin-bottom: 8px; }
.screen--fightlogs .fightlogs__bar .field__input { min-height: auto; padding: 4px 9px; font-size: .9rem; }
.screen--fightlogs .fightlogs__q { flex: 1 1 160px; }
.dock__archrow { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-bottom: 1px dotted var(--border); }
.dock__archrow:last-child { border-bottom: none; }
.dock__archopp { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dock__archdate { font-size: .85em; white-space: nowrap; }
.dock__archbtn { flex: 0 0 auto; }
.dock__archlog { max-height: 60vh; overflow: auto; min-width: min(430px, 80vw); display: flex; flex-direction: column; gap: 2px; }
/* Увеличенный док: лента выше на 65% от обычного окна (196px → 323px; лента 112 → 239). */
.dock--tall .dock__feed { min-height: 239px; max-height: 239px; }
.dock--tall .dock__inner { max-height: 75vh; }

/* --- Колонка чата --- */
.dock__chat { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
/* ЭТАЛОН (.chat__tabs): серая полоса вкладок, активная — «бумажный» ярлык с рамкой, прочие — ссылки. */
.dock__tabs {
  display: flex; gap: 2px; align-items: flex-end;
  background: #ddd; border: 0; border-radius: 0; padding: 3px 8px 0;
}
.dock__tab {
  appearance: none; font: 400 11px var(--font, Arial); cursor: pointer;
  padding: 2px 12px; white-space: nowrap; border: 1px solid transparent; border-bottom: none;
  color: var(--link); background: transparent;
}
.dock__tab:hover { text-decoration: underline; }
.dock__tab:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.dock__tab.is-active {
  color: var(--text); background: var(--chat-bg); font-weight: 700;
  border-color: #999; cursor: default; text-decoration: none;
}
.dock__tab--more { margin-left: auto; }
.dock__feed {
  flex: 1 1 auto; min-height: 112px; max-height: 112px; overflow-y: auto; overflow-x: hidden;
  padding: 4px 10px; border: 0; border-radius: 0;
  background: var(--chat-bg); scrollbar-width: thin; font-size: .85rem; line-height: 1.5;
}
.dock__msg { display: block; overflow-wrap: anywhere; margin: 1px 0; }
.dock__time { color: var(--sys-dim); font-variant-numeric: tabular-nums; margin-right: 4px; font-size: .74rem; }
/* combats: синий квадратик «ⓘ» перед ником → анкета. */
.dock__sq {
  appearance: none; cursor: pointer; flex: none; vertical-align: middle;
  width: 14px; height: 14px; margin-right: 4px; padding: 0; border: none; border-radius: 2px;
  font: inherit; font-size: 9px; font-weight: 700; line-height: 14px; text-align: center;
  color: #fff; background: var(--link);
}
.dock__sq:hover { background: var(--link-hover); }
.dock__sq:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.dock__author { color: var(--nick); font-weight: 700; margin-right: 5px; }
.dock__author--alt { color: var(--nick-alt); }
.dock__author:hover { text-decoration: underline; }
.dock__text { color: var(--text); }
.dock__msg--sys .dock__text { color: var(--sys-dim); font-style: italic; }
/* ЭТАЛОН: поле ввода — внутри каменного подвала (statusbar), светлая «бумага». */
.dock__input {
  flex: 1 1 auto; min-width: 0; font: 11px var(--font, Arial); padding: 4px 8px;
  border: 1px solid #3f3f3f; border-radius: 0;
  background: var(--et-paper, #efefef); color: #1c1c1c;
}
.dock__input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
/* combats: золочёная кнопка отправки (перебивает .btn--primary повышенной специфичностью). */
.dock__toolbar .dock__send {
  flex: 0 0 auto; color: #3a2c05; font-weight: 700; font-size: .8rem;
  min-height: auto; padding: 4px 14px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  border: 1px solid var(--gold-edge);
}
.dock__toolbar .dock__send:hover { filter: brightness(1.06); }

/* --- Каменная статус-полоса (эталон: ввод · иконки · часы) --- */
.dock__toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  padding: 5px 10px; border-radius: 0;
  background: linear-gradient(180deg, var(--top-a), var(--top-b));
  border: 0; border-top: 1px solid #000; color: var(--top-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.dock__tools { display: flex; align-items: center; gap: 2px; }
.dock__tool {
  appearance: none; cursor: pointer; display: inline-grid; place-items: center;
  width: 30px; height: 28px; padding: 0; font-size: 1rem; color: var(--top-ink);
  background: transparent; border: 1px solid transparent; border-radius: 6px;
}
.dock__tool:hover { color: #fff; background: rgba(255,255,255,.12); }
.dock__tool:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
/* §55: кнопка «Чат» с раскрытием — на десктопе скрыта (там сворачивает язычок в углу),
   на телефоне это ОСНОВНОЙ способ раскрыть/свернуть чат (см. медиазапрос ниже). */
.dock__chatbtn {
  display: none; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap;
  padding: 4px 10px; border-radius: 7px; font: inherit; font-size: .84rem; font-weight: 700;
  color: #ece3cf; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
}
.dock__chatbtn:hover { background: rgba(255,255,255,.16); color: #fff; }
.dock__chatbtn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.dock__chatbtn .icon { width: 18px; height: 18px; }
.dock__chatbtn-caret { font-size: .8rem; color: var(--top-ink-dim); }
.dock__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dock__ver { font-size: .78rem; color: var(--top-ink-dim); }
.dock__link { background: none; border: none; color: var(--top-ink-dim); cursor: pointer; text-decoration: underline; padding: 0 2px; font: inherit; font-size: .82rem; }
.dock__link:hover { color: #fff; }
.dock__link:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.dock__langs { display: flex; gap: 2px; }
.dock__lang {
  appearance: none; cursor: pointer; font: inherit; font-size: .74rem; font-weight: 700;
  padding: 2px 6px; border-radius: 5px; color: var(--top-ink-dim); background: transparent; border: 1px solid rgba(255,255,255,.18);
}
.dock__lang:hover { color: #fff; }
.dock__lang:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.dock__lang.is-active { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.dock__clock {
  margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .84rem;
  color: #e9e2d0; letter-spacing: .5px; padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1);
}

/* Каркас/тосты уступают место панели; футер на игровых экранах прячется (его роль берёт тулбар панели). */
body.has-dock { padding-bottom: 196px; }
body.has-dock.dock-min { padding-bottom: 52px; }
body.has-dock.dock-tall { padding-bottom: 323px; }   /* СТ-15: увеличенный чат */
body.has-dock #footer { display: none; }
body.has-dock .toasts { bottom: 202px; }
body.has-dock.dock-min .toasts { bottom: 58px; }
body.has-dock.dock-tall .toasts { bottom: 329px; }

/* Т (2026-07-22, просьба заказчика): на ДЕСКТОПЕ (трёхколоночный каркас, ≥1021px) нижнее окно
   чата выровнено ПО ШИРИНЕ центрального окна — левая кромка под левой гранью центра
   (12px паддинга + колонка куклы + зазор), правая — под правой (12px + панорама + зазор).
   Уже 1021px каркас в один столбец → чат остаётся во всю ширину (базовое left:0/right:0).
   Боковые грани получают тонкую рамку — читается как окно, симметрично рамке центра. */
@media (min-width: 1021px) {
  .dock {
    left: calc(12px + var(--et-doll-w, 300px) + var(--et-gap, 10px));
    right: calc(12px + var(--et-pano-w, 375px) + var(--et-gap, 10px));
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
  }
}

/* Телефон: по умолчанию панель свёрнута (js/dock.js). */
@media (max-width: 640px) {
  .dock__body { flex-direction: column; }
  .dock__feed { min-height: 92px; max-height: 92px; }
  body.has-dock:not(.dock-min) { padding-bottom: 240px; }
  body.has-dock:not(.dock-min) .toasts { bottom: 246px; }
  /* §55: свёрнутый чат — кнопка «Чат»; тулбар превращается в горизонтально-прокручиваемую полосу
     иконок (одна строка → свёрнутая панель остаётся низкой ~52px, как в combats-мобайле). */
  .dock__chatbtn { display: inline-flex; flex: 0 0 auto; }
  .dock__collapse { display: none; }
  .dock__expand { display: none; }   /* СТ-15: на телефоне увеличение не нужно (свой компакт-режим) */
  .dock__toolbar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .dock__toolbar::-webkit-scrollbar { display: none; }
  .dock__tools, .dock__meta { flex: 0 0 auto; }
  .dock__clock { display: none; }                  /* декоративные часы прячем — экономим строку */
}

/* ===== Анкета (редизайн Фаза 6, §46): трёхколоночный combats-паспорт ===================== */
.screen--anketa { max-width: none; padding: 0; }
.anketa {
  display: grid;
  grid-template-columns: minmax(228px, 258px) minmax(0, 1fr) minmax(206px, 236px);
  gap: var(--gap); align-items: start;
  position: relative; /* якорь для «эхо-призрака» §41 (top-right) */
}
.anketa__col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
/* Узкие экраны: колонки в столбик, центр — первым (главное содержимое). */
@media (max-width: 900px) {
  .anketa { grid-template-columns: 1fr; }
  .anketa__col--center { order: -1; }
}

/* §41 «Эхо-призрак» старого номера: тусклый след в правом верхнем углу анкеты (виден всем, пока не скрыт).
   Декоративный слой (aria-hidden, pointer-events:none), не мешает клику; тускл/призрачен в обеих темах. */
.screen--profile { position: relative; }
.ghost-number {
  position: absolute; top: 4px; right: 8px; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1;
  pointer-events: none; user-select: none; text-align: right;
  transform: rotate(-4deg); opacity: .3;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px color-mix(in srgb, var(--text) 25%, transparent);
}
.ghost-number__cap { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.ghost-number__num { font-size: 1.2rem; font-weight: 800; color: var(--text); letter-spacing: .05em; }
@media (max-width: 900px) { .ghost-number { transform: rotate(-4deg) scale(.85); opacity: .24; } }

/* §46 «Могущество»: зелёная плашка силы сборки (статы+экипировка, без косметики). Через токен --success. */
.power-badge {
  display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px;
  color: var(--success); font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--success) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 42%, transparent);
}
.power-badge__lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; opacity: .95; }
.power-badge__val { font-size: 1rem; font-weight: 800; }

/* key→value строки (Общие сведения / Модификаторы). */
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted color-mix(in srgb, var(--border) 55%, transparent); }
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--muted); font-size: .9rem; }
.kv__v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.kv__break { font-weight: 400; font-size: .85rem; }
.kv-sep { height: 1px; background: var(--border); margin: 6px 0; }
.anketa-stats { display: flex; flex-direction: column; margin-bottom: 4px; }

/* Идентификация под куклой + переход в инвентарь. */
.anketa__ident { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center; margin-top: 8px; }
.anketa__toinv { margin-top: 10px; }
.anketa__toinv > * { flex: 1 1 auto; }
.anketa__alloc { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.anketa__free { font-weight: 700; margin-bottom: 4px; }

/* Быстрые действия (правая колонка) — кнопки в столбик. */
.anketa__actions { display: flex; flex-direction: column; gap: 8px; }
.anketa__actions > * { width: 100%; }
.anketa__hint { font-size: .82rem; margin: 10px 0 6px; }
.anketa__note { font-size: .8rem; margin: 8px 0 0; opacity: .85; }

/* «Бои чести»: рейтинг + запись цветными колонками + последний бой + недавние. */
.honor__rating { font-weight: 800; color: var(--accent); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.rec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.rec__cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--panel) 55%, var(--bg)); }
.rec__val { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rec__lbl { font-size: .72rem; color: var(--muted); text-align: center; }
.rec__cell--win .rec__val { color: var(--success); }
.rec__cell--loss .rec__val { color: var(--danger); }
.rec__cell--draw .rec__val { color: var(--muted); }
.rec__cell--wr .rec__val { color: var(--accent-2); }
.honor__last { margin: 8px 0; }
/* СТ-46: личный счёт против владельца анкеты — строкой сразу под общим счётом. */
.honor__vs { margin: 6px 0 2px; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.honor__hist { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }

/* «Двор — кто здесь»: кликабельные ники с уровнем. */
.court { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.court__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.court__row:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--border); }
.court__row:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.court__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.court__lvl { flex: 0 0 auto; font-size: .74rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-2); padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }

/* === СТ-5: ЭКРАН БОЯ v3 «DreamsCity» (бой двух тел) ============================================
   Центр — компактные радио-списки «Атака»/«Защита», строка «X против Y», урон и счётчики;
   слева (charpanel) под куклой — боевой HP/статы/шансы (.charpc); справа — кукла противника
   (.fright, каркас #cd-fight-right создаёт layout.js). Лог боя живёт в нижнем чате (dock). */
.f2__vs { text-align: center; font-weight: 800; font-size: .86rem; margin: 6px 0 2px; } /* СТ-64.2: имена под окном раунда мельче (было 1.02rem) */
.f2__me { color: var(--accent); }
.f2__vsword { color: var(--muted); font-weight: 600; }
.f2__opp { color: var(--danger); }
.f2__dealt { text-align: center; font-size: .85rem; margin: 2px 0; }
.f2__cnt { text-align: center; font-size: .8rem; margin: 0 0 4px; font-variant-numeric: tabular-nums; }

/* СТ-64.3: колонки «Атака/Защита» строго равные и не зависят от содержимого (minmax(0,1fr), а не auto-1fr). */
.f2__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 8px; }
@media (max-width: 560px) { .f2__cols { grid-template-columns: 1fr; } }
.f2__col { min-width: 0; }
.f2__colhead {
  text-align: center; font-weight: 800; font-size: .85rem; letter-spacing: .4px;
  padding: 4px 6px; margin-bottom: 4px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.f2__list { display: flex; flex-direction: column; gap: 2px; }
.f2__opt {
  appearance: none; cursor: pointer; font: inherit; font-size: .92rem; text-align: left;
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: 34px;
  color: var(--text); background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
}
.f2__opt:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); border-color: var(--border); }
.f2__opt:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.f2__opt:disabled { opacity: .55; cursor: default; }
.f2__dot {
  flex: 0 0 auto; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--muted); background: transparent;
}
.f2__opt--atk.is-active { color: var(--danger); font-weight: 700; }
.f2__opt--atk.is-active .f2__dot { border-color: var(--danger); background: radial-gradient(circle at center, var(--danger) 0 55%, transparent 60%); }
.f2__opt--blk.is-active { color: var(--info); font-weight: 700; }
.f2__opt--blk.is-active .f2__dot { border-color: var(--info); background: radial-gradient(circle at center, var(--info) 0 55%, transparent 60%); }
.f2__actions { margin-top: 10px; }

/* Левая колонка: боевой блок под куклой (внутри charpanel) */
.charpc { position: relative; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.charpc__title {
  font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin-top: 2px;
}
.charpc__stats { display: flex; flex-direction: column; gap: 1px; }
.charpc__row { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; padding: 1px 2px; }
.charpc__k { color: var(--muted); }
.charpc__v { font-weight: 700; font-variant-numeric: tabular-nums; }
.charpc__inj { color: var(--danger); font-weight: 700; font-size: .82em; }   /* СТ-6: минус к стату от травмы «(−3)» */

/* Правая колонка: противник (вместо панорамы города) */
.frame__right--fight { align-items: center; }
.fright { position: relative; width: 100%; max-width: var(--et-doll-w, 300px); display: flex; flex-direction: column; gap: 6px; }
.fright__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fright__name { font-weight: 800; font-size: 1rem; color: var(--danger); overflow-wrap: anywhere; }
.fright__hp.is-ko { filter: grayscale(1); opacity: .6; }
.fright__doll { width: 100%; }

/* Вспышки удара/уклонения на колонках (переиспользуют кейфреймы fx-hit/fx-dodge) */
.charpc.is-hit, .fright.is-hit { animation: fx-hit .38s ease; }
.charpc.is-dodge, .fright.is-dodge { animation: fx-dodge .5s ease; }
.charpc .fight__pop, .fright .fight__pop { top: 4px; }
html[data-anim="off"] .charpc.is-hit, html[data-anim="off"] .fright.is-hit,
html[data-anim="off"] .charpc.is-dodge, html[data-anim="off"] .fright.is-dodge { animation: none !important; }

/* Лог боя в ленте нижнего чата — плотнее, чем экранная лента */
.dock__feed .log-line { font-size: 12px; padding: 2px 6px; }
.dock__feed .log-zones { padding: 3px 6px; }

/* СТ-9: панель тренировки — кукла манекена (силуэт) + «вилка» уровней (L−3 / L / L+3) под ней. */
.train { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 0 2px; }
.train__figure { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.train__silhouette { width: 66px; height: 92px; position: relative; opacity: .82; }
.train__silhouette::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--et-head, #555); }
.train__silhouette::after { content: ''; position: absolute; top: 30px; left: 50%; transform: translateX(-50%); width: 54px; height: 62px; border-radius: 16px 16px 12px 12px; background: var(--et-head, #555); }
.train__cap { font-size: 12px; color: var(--muted, #777); }
.train__levels { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: stretch; }
/* СТ-11: шрифт кнопок «вилки» на ~10% меньше; боковые — «N уровень», центр — двухстрочный. */
.train__lvl { min-width: 100px; font-size: .9em; line-height: 1.2; }
.train__lvl[disabled] { opacity: .45; cursor: not-allowed; }
.train__lvl--center { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 140px; padding-top: 6px; padding-bottom: 6px; }
.train__lvl-top { font-weight: 800; }
.train__lvl-sub { font-size: .82em; font-weight: 600; opacity: .92; }

/* === СТ-30: АТЛАС МИРА (ATLAS_ENABLED) — планета-развёртка + карточка региона === */
.atlas__wrap { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
/* СТ-71 (заказчик 2026-08-30): атлас = фото-карта мира + прозрачные рамки-хотспоты над городами (ATLAS_POINTS, %). */
.atlas__map { position: relative; flex: 1 1 520px; min-width: 300px; max-width: 720px; user-select: none; }
.atlas__img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--border, #2a2f3a); }
.atlas__hot { position: absolute; transform: translate(-50%, -50%); background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; padding: 0; }
.atlas__hot:hover, .atlas__hot:focus-visible { outline: none; border-color: var(--accent, #d9a62e); background: rgba(217,166,46,.10); box-shadow: 0 0 12px rgba(217,166,46,.55); }
.atlas__hot.is-selected { border-color: var(--text, #e6e9ec); background: rgba(217,166,46,.16); box-shadow: 0 0 14px rgba(217,166,46,.8); }
.atlas__hot.is-soon { opacity: .7; }
.atlas__you { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); white-space: nowrap; color: var(--danger, #c6414a); font-size: 12px; font-weight: 700; text-shadow: 0 0 4px #000, 0 0 2px #000; pointer-events: none; }
.atlas__card { flex: 1 1 240px; min-width: 220px; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--border, #2a2f3a); border-radius: 10px; background: var(--panel2, #10141c); }
.atlas__cardhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.atlas__region { font-weight: 800; }
.atlas__city { font-size: 1.2rem; font-weight: 800; color: var(--accent, #d9a62e); }
.atlas__desc { margin: 0; }
.atlas__here { color: var(--danger, #c6414a); font-weight: 700; }
.atlas__sandbox { color: var(--accent, #d9a62e); font-weight: 600; }
.atlas__transfer { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.72); animation: atlas-fade .3s ease; }
.atlas__transferbox { padding: 18px 26px; border: 1px solid var(--accent, #d9a62e); border-radius: 12px; background: var(--panel, #171b24); font-weight: 800; font-size: 1.05rem; box-shadow: 0 0 40px rgba(217,166,46,.25); animation: atlas-pulse 1.2s ease infinite; }
@keyframes atlas-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes atlas-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
html[data-anim="off"] .atlas__transfer, html[data-anim="off"] .atlas__transferbox { animation: none !important; }
@media (max-width: 1020px) { .atlas__wrap { flex-direction: column; } .atlas__map { max-width: 100%; } }

/* ==================== СТ-40: приёмы — иконки, инвентарь, кнопки боя ==================== */
/* Окраска значка приёма: РАМКА по тиру (I серая, II зелёная, III синяя, IV фиолетовая),
   ЦВЕТ глифа по стату, эксклюзив — золотая рамка + звезда. 75 различимых значков из 6 глифов. */
.tech-ic--str { color: #b3402e; }
.tech-ic--dex { color: #2e7d4f; }
.tech-ic--int { color: #3f5a86; }
.tech-ic--end { color: #7a5230; }
.tech-ic--mid { color: #666; }
.tech-ic--t1 { border-color: #9a9a9a; }
.tech-ic--t2 { border-color: #6f9c5b; }
.tech-ic--t3 { border-color: #5f7fae; }
.tech-ic--t4 { border-color: #8a5fae; }
.tech-ic--excl { border-color: #d4a017 !important; }

/* Раздел «Приёмы» в инвентаре: карточки изученных приёмов. */
.techinv { display: flex; flex-direction: column; gap: 10px; }
.techinv__row { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); }
.techinv__row.is-rusty { opacity: .75; }
.techinv__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.techinv__ic { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border: 2px solid #9a9a9a; border-radius: 6px; background: linear-gradient(#e2e6ee, #c8cfdc); }
.techinv__svg { width: 22px; height: 22px; }
.techinv__star { position: absolute; right: -6px; top: -6px; width: 14px; height: 14px; color: #d4a017; }
.techinv__name { font-weight: 800; }
.techinv__cat { font-size: .85rem; }
.techinv__slotted { margin-left: auto; font-weight: 700; color: var(--accent, #d9a62e); font-size: .85rem; }
.techinv__desc { margin: 6px 0 2px; }
.techinv__eff { margin: 2px 0 6px; font-size: .9rem; }
.techinv__rusty { margin: 2px 0 6px; color: var(--danger); font-size: .88rem; font-weight: 700; }
.techinv__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.techinv__slotbtn { display: block; width: 100%; margin-bottom: 6px; }

/* Кнопки приёмов на экране боя — тот же скин mode-btn, что у «Сильного удара». */
.fight__techs { margin-top: 8px; }
/* СТ-64.3 (заказчик 2026-08-21): кнопки приёмов — РАВНЫЕ ячейки сетки, не «по содержимому»: подпись
   «4 ВЫН · через 1 х.» меняется каждый раунд, и кнопки прыгали в ширину. Подпись в одну строку —
   высота тоже постоянна. */
.fight__modes--techs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.tech-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.tech-btn__name { font-weight: 700; }
.tech-btn__cost { font-size: .78rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Подписи «Выносливость N/M», «−N выносливости», таймер в «Вперёд (N сек)» — табличные цифры, без дрожания. */
.fight__heavy, .fight__submit { font-variant-numeric: tabular-nums; }

/* Лавка приёмов: SVG-иконка категории вместо эмодзи (тир/стат — те же tech-ic-классы). */
.tech__ic { position: relative; display: inline-flex; align-items: center; justify-content: center; }
span.tech__ic[class*="tech-ic--t"] { width: 30px; height: 30px; border: 2px solid #9a9a9a; border-radius: 6px; background: linear-gradient(#e2e6ee, #c8cfdc); flex: none; }
.tech__icsvg { width: 20px; height: 20px; }
.tech__icstar { position: absolute; right: -6px; top: -6px; width: 13px; height: 13px; color: #d4a017; }
/* СТ-42: аватарки приёмов (реестр techImages.js) — заполняют рамку лавки/инвентаря, скругление чуть
   меньше рамки, чтобы картинка не вылезала из-под 2px границы тира. */
.tech__icimg, .techinv__img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }

/* ==================== СТ-42.2 (заказчик 2026-08-13): крупные аватарки приёмов ==================== */
/* Лавка: карточка с аватаркой — грид: слева картинка 64×64 (СТ-42.3: уменьшена вдвое по просьбе
   заказчика), справа название+чипы и описание (наплывов нет — своя колонка),
   строка кнопок «Купить»/«Изучен» — третьим рядом во всю ширину. */
.tech__item--img { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.tech__item--img > .tech__ic--big { grid-column: 1; grid-row: 1 / 3; }
.tech__item--img > .tech__item-head { grid-column: 2; grid-row: 1; }
.tech__item--img > .tech__item-desc { grid-column: 2; grid-row: 2; }
.tech__item--img > .tech__item-actions { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
span.tech__ic.tech__ic--big { width: 64px; height: 64px; cursor: zoom-in; }
span.tech__ic.tech__ic--big .tech__icstar { width: 15px; height: 15px; right: -5px; top: -5px; }
/* Текст не выходит за рамку карточки: колонкам можно ужиматься, длинные слова переносятся. */
.tech__item { min-width: 0; }
.tech__item-head, .tech__item-desc { min-width: 0; overflow-wrap: anywhere; }
.tech__item .row { flex-wrap: wrap; }
/* СТ-42.4: причина отказа мастера — мелким кеглем, своя строка с переносами (не вылезает за рамку). */
.tech__item .row > .tech__gatemsg { flex: 1 1 100%; min-width: 0; font-size: .78rem; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }
/* СТ-42.4: «Опробовать» — в противоположном от «Купить» углу строки кнопок. */
.tech__item .row > .tech__try { margin-left: auto; }
/* СТ-42.4: кошелёк лавки — метки значком; лёгкая разрядка, чтобы не сливалось с фишками. */
.tech__wallet-prem { white-space: nowrap; }
/* Инвентарь: аватарка того же размера, что в лавке (без привязки к кнопкам), клик — увеличение. */
.techinv__ic.techinv__ic--img { width: 64px; height: 64px; cursor: zoom-in; }
.techinv__ic.techinv__ic--img .techinv__star { width: 15px; height: 15px; right: -5px; top: -5px; }
/* Оверлей увеличения (клик по аватарке в лавке/слоте куклы/инвентаре): картинка 256×256 = 2×. */
.techzoom { background: rgba(0, 0, 0, .72); }
.techzoom__img { width: 256px; height: 256px; border: 2px solid #9a9a9a; border-radius: 10px; background: #111; box-shadow: 0 6px 30px rgba(0, 0, 0, .6); }

/* ===== СТ-67: значок клана перед ником (авто-герб = тег на цветной плашке; особый клан — картинка) ===== */
.clan-badge { display: inline-flex; align-items: center; justify-content: center; height: 1.05em; min-width: 1.05em; padding: 0 .3em; margin-right: .3em; border-radius: 3px; font-size: .62em; font-weight: 800; letter-spacing: .04em; line-height: 1; color: #fff; background: var(--cb, #555); border: 1px solid color-mix(in srgb, var(--cb, #555) 55%, #000); vertical-align: .12em; text-transform: uppercase; white-space: nowrap; }
.clan-badge--img { padding: 0; background: transparent; border: 0; height: auto; }
.clan-badge__img { height: 1.25em; width: auto; display: block; }
.dock__msg .clan-badge { margin-right: .2em; }
.chip.clan-chip { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.chip.clan-chip .clan-badge { margin-right: 0; }
/* Экран бригады: гейты создания, панель основателя, сетка окон налога */
.clan__gates { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.clan__gate { display: flex; gap: 8px; align-items: baseline; font-size: .9rem; }
.clan__gateic { font-weight: 800; min-width: 1.2em; text-align: center; }
.clan__gate.is-ok .clan__gateic { color: var(--hp-ok); }
.clan__gate.is-no { color: var(--muted); } .clan__gate.is-no .clan__gateic { color: var(--danger); }
.clan__badgerow { align-items: center; gap: 8px; } .clan__badgerow .clan-badge { font-size: .9rem; }
.clan__subtitle { margin: 12px 0 4px; font-size: .95rem; color: var(--accent-2); }
.clan__rulesrow { gap: 12px; align-items: flex-start; } .clan__rulesrow .field { flex: 1 1 160px; }
.clan__taxgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.clan__taxgrid .field.is-edited .field__label { color: var(--accent-2); font-weight: 700; }
.clan__invrule { flex-basis: 100%; font-size: .8rem; }
.clan__founderrow { align-items: center; gap: 8px; }
/* Банк: окно главного администратора правее вкладок, за вертикальной линией */
.bank__wrap { display: flex; gap: 16px; align-items: flex-start; }
.bank__main { flex: 1 1 auto; min-width: 0; }
.bank__owner { flex: 0 0 360px; max-width: 360px; border-left: 2px solid var(--border); padding-left: 14px; min-height: 320px; }
.bank__ownertitle { margin: 0 0 4px; font-size: 1rem; color: var(--accent-2); }
.bank__ownerbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.bank__ownerbtn { padding: 4px 10px; font-size: .82rem; }
.bank__ownertotals { gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bank__ownerlog { max-height: 420px; }
@media (max-width: 900px) { .bank__wrap { flex-direction: column; } .bank__owner { flex-basis: auto; max-width: none; border-left: 0; border-top: 2px solid var(--border); padding: 10px 0 0; } }

/* ===== СТ-81: турнир чемпионов — золото/бронза, окна финалов в баре, история в анкете ===== */
.chip--gold { background: color-mix(in srgb, #c9a227 28%, var(--panel)); border-color: #c9a227; font-weight: 700; }
.chip--bronze { background: color-mix(in srgb, #b0713b 26%, var(--panel)); border-color: #b0713b; font-weight: 700; }
.bar__window--final { border: 2px solid #c9a227; box-shadow: 0 0 8px color-mix(in srgb, #c9a227 45%, transparent); }
.bar__window--bronze { border: 2px solid #b0713b; }
.champ__medals { gap: 6px; margin-bottom: 6px; }
.champ__row { display: flex; gap: 8px; align-items: baseline; padding: 4px 2px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.champ__row:last-child { border-bottom: 0; }
.champ__title { flex: 1 1 auto; min-width: 0; }
