/* v12 — шапка, главное меню, разделы сайта (гайд, расы), карточка бойца. */

/* ---------- Шапка: логотип по центру, навигация слева, аккаунт справа ---------- */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 64px; }
.topbar .brand { display: none; }
.site-nav { display: flex; gap: 4px; justify-self: start; }
.site-nav a { position: relative; padding: 8px 12px; color: var(--muted); text-decoration: none; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; border-radius: 8px; transition: color .2s, background .2s; }
.site-nav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: scaleX(0); transition: transform .3s; }
.site-nav a:hover, .site-nav a.on { color: var(--gold-2, #f3dca3); background: rgba(216, 179, 106, .07); }
.site-nav a:hover::after, .site-nav a.on::after { transform: scaleX(1); }
.top-logo { justify-self: center; display: block; line-height: 0; transition: transform .3s, filter .3s; }
.top-logo img { height: 44px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .8)); }
.top-logo:hover { transform: translateY(-1px) scale(1.03); filter: brightness(1.12); }
.top-right { justify-self: end; }
body[data-screen="title"] .top-logo, body[data-screen="login"] .top-logo { visibility: hidden; }
body[data-screen="login"] .site-nav a[data-nav="codex"], body[data-screen="login"] .site-nav a[data-nav="play"] { display: none; }

/* Состояние связи — маленькая точка, без «топорного» текста */
.conn { font-size: 0; gap: 0; width: 22px; height: 22px; justify-content: center; border-radius: 50%; }
.conn::before { width: 8px; height: 8px; }
body[data-status="offline"] .conn, body[data-status="reconnecting"] .conn { font-size: .72rem; width: auto; gap: 6px; padding: 0 8px; }

/* Аккаунт */
.account-chip { position: relative; display: block; font-size: inherit; }
.ac-main { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid rgba(216, 179, 106, .28); border-radius: 999px; color: var(--text); cursor: pointer;
  background: linear-gradient(180deg, rgba(30, 24, 16, .85), rgba(14, 12, 10, .85)); box-shadow: inset 0 1px 0 rgba(255, 230, 170, .08), 0 6px 18px rgba(0, 0, 0, .45); transition: border-color .2s, box-shadow .2s; }
.ac-main:hover, .ac-main[aria-expanded="true"] { border-color: var(--gold); box-shadow: inset 0 1px 0 rgba(255, 230, 170, .12), 0 0 0 3px rgba(216, 179, 106, .12), 0 6px 18px rgba(0, 0, 0, .5); }
.ac-ava { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: #241606;
  background: radial-gradient(circle at 35% 30%, #fbe7b0, #d4a24c 55%, #8c6223); box-shadow: 0 0 0 2px rgba(20, 14, 8, .9), 0 0 0 3px rgba(216, 179, 106, .55), 0 0 14px rgba(232, 190, 110, .35); }
.ac-text { display: grid; text-align: left; line-height: 1.15; }
.ac-name { font-weight: 600; font-size: .86rem; color: #f6e7c4; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-rank { font-size: .68rem; color: var(--gold); letter-spacing: .04em; }
.ac-rank:empty { display: none; }
.ac-caret { font-size: .7rem; color: var(--muted); transition: transform .2s; }
.ac-main[aria-expanded="true"] .ac-caret { transform: rotate(180deg); }
.ac-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 8px; border: 1px solid rgba(216, 179, 106, .3); border-radius: 14px; z-index: 60;
  background: rgba(16, 13, 10, .97); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); backdrop-filter: blur(10px); animation: fade-up .18s ease-out; }
.ac-head { display: grid; gap: 4px; padding: 8px 10px 12px; border-bottom: 1px solid rgba(216, 179, 106, .15); margin-bottom: 6px; }
.ac-head .ac-name { font-size: 1rem; max-width: none; }
.ac-glory { font-size: .74rem; color: var(--muted); }
.ac-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ac-bar i { display: block; height: 100%; width: 3%; background: linear-gradient(90deg, #a87a30, #f3d48a); }
.ac-menu a, .ac-menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; text-decoration: none; font: inherit; font-size: .86rem; cursor: pointer; }
.ac-menu a:hover, .ac-menu button:hover { background: rgba(216, 179, 106, .1); color: #f6e7c4; }
.ac-out { color: #e79a8a !important; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .site-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(10, 9, 8, .94); border-top: 1px solid rgba(216, 179, 106, .2); backdrop-filter: blur(8px); }
  .site-nav a { font-size: .66rem; letter-spacing: .08em; padding: 8px 6px; }
  .top-logo { justify-self: start; } .top-logo img { height: 30px; }
  body[data-screen="title"] .top-logo { visibility: visible; opacity: 0; }
  .ac-text, .ac-caret { display: none; } .ac-main { padding: 3px; }
  .stage { padding-bottom: 64px; }
  body[data-screen="title"] .site-nav { display: none; } body[data-screen="title"] .stage { padding-bottom: 0; }
}

/* ---------- Главное меню ---------- */
.game-logo { margin: 0; display: grid; justify-items: center; gap: 4px; animation: fade-up .8s .1s ease-out both; }
.game-logo img { width: min(760px, 88vw); height: auto; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .8)); animation: logo-glow 6s ease-in-out 1s infinite; }
.game-logo span { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(16px, 2vw, 24px); letter-spacing: .14em; color: var(--gold); text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
@keyframes logo-glow { 0%, 100% { filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .8)); } 50% { filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .8)) drop-shadow(0 0 22px rgba(240, 190, 90, .28)); } }
.menu { width: min(520px, 100%); gap: 14px; }
.menu-main { position: relative; overflow: hidden; min-height: 72px; font-size: 1.2rem; }
.menu-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 245, 210, .45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 4.5s ease-in-out 1.5s infinite; pointer-events: none; }
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.menu-tile { position: relative; display: grid; justify-items: center; gap: 3px; padding: 16px 8px 14px; border: 1px solid rgba(216, 179, 106, .3); border-radius: 12px; text-decoration: none; color: var(--text); overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 22, 15, .82), rgba(12, 10, 8, .82)); box-shadow: inset 0 1px 0 rgba(255, 230, 170, .06), 0 8px 22px rgba(0, 0, 0, .4); transition: transform .25s, border-color .25s, box-shadow .25s; }
.menu-tile::before { content: ''; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(closest-side, rgba(240, 190, 90, .22), transparent); opacity: 0; transition: opacity .3s; }
.menu-tile:hover, .menu-tile:focus-visible { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(216, 179, 106, .3); }
.menu-tile:hover::before { opacity: 1; }
.menu-tile i { font-style: normal; font-size: 1.5rem; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); transition: transform .3s; }
.menu-tile:hover i { transform: scale(1.18) rotate(-6deg); }
.menu-tile b { font-size: .86rem; letter-spacing: .12em; text-transform: uppercase; color: #f6e7c4; }
.menu-tile span { font-size: .68rem; color: var(--muted); }
@media (max-width: 520px) { .menu-grid { grid-template-columns: 1fr 1fr; gap: 6px; } .menu-tile { padding: 12px 4px; } .menu-tile span { display: none; } }

/* ---------- Общие элементы разделов ---------- */
.hub-screen { padding: 0 0 80px; }
.hub-root { width: min(1240px, 100%); margin: 0 auto; padding: 0 clamp(14px, 3vw, 32px); }
.hub-error { padding: 80px 0; text-align: center; color: var(--muted); }
.kicker { display: inline-block; font-size: .7rem; letter-spacing: .28em; color: var(--gold); text-transform: uppercase; }
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--delay, 0ms); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } .menu-main::after, .game-logo img { animation: none; } }
.tier-badge { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: #1b1206;
  background: linear-gradient(180deg, #f1d79a, #b98c3e); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.t2 .tier-badge, .tier-badge.t2 { background: linear-gradient(180deg, #c9e2ff, #5d8fc9); }
.t3 .tier-badge, .tier-badge.t3 { background: linear-gradient(180deg, #f6c6ff, #a259c4); }
.good { color: #8fd18a; } .bad { color: #e98f7d; }
.eyebrow.good { color: #8fd18a; } .eyebrow.bad { color: #e98f7d; }

.hub-hero { position: relative; min-height: 520px; margin: 0 calc(-1 * clamp(14px, 3vw, 32px)) 30px; display: grid; align-items: end; overflow: hidden; border-bottom: 1px solid rgba(216, 179, 106, .2); }
.hub-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
.hub-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 10, 14, .98) 4%, rgba(8, 10, 14, .55) 45%, rgba(8, 10, 14, .1)), linear-gradient(90deg, rgba(8, 10, 14, .7), transparent 60%); }
.hub-hero-text { position: relative; z-index: 1; max-width: 760px; padding: 0 clamp(18px, 4vw, 48px) 40px; }
.hub-hero-text h1, .hub-head h1 { margin: 8px 0 14px; font-family: var(--serif); font-size: clamp(34px, 5vw, 64px); line-height: 1; color: #f6e7c4; text-shadow: 0 4px 20px rgba(0, 0, 0, .8); }
.hub-hero-text p { font-size: 1.05rem; line-height: 1.6; color: #e3d6bb; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-facts span { padding: 7px 14px; border: 1px solid rgba(216, 179, 106, .3); border-radius: 999px; background: rgba(10, 8, 6, .6); font-size: .82rem; color: var(--muted); backdrop-filter: blur(4px); }
.hero-facts b { color: #f6e7c4; margin-right: 4px; }
.hub-head { padding: 54px 0 30px; text-align: center; max-width: 760px; margin: 0 auto; }
.hub-head p { color: var(--muted); line-height: 1.6; }

/* ---------- Гайд ---------- */
.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.guide-toc { position: sticky; top: 84px; display: grid; gap: 2px; padding: 12px; border: 1px solid rgba(216, 179, 106, .16); border-radius: 14px; background: rgba(12, 10, 8, .6); backdrop-filter: blur(6px); }
.guide-toc a { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .86rem; transition: background .2s, color .2s; }
.guide-toc a i { font-style: normal; font-size: .68rem; color: rgba(216, 179, 106, .55); font-variant-numeric: tabular-nums; }
.guide-toc a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.guide-toc a.on { color: #f6e7c4; background: linear-gradient(90deg, rgba(216, 179, 106, .18), transparent); box-shadow: inset 2px 0 0 var(--gold); }
.guide-body { display: grid; gap: 30px; min-width: 0; }
.g-sec { scroll-margin-top: 84px; padding: clamp(20px, 3vw, 34px); border: 1px solid rgba(216, 179, 106, .14); border-radius: 18px; background: linear-gradient(180deg, rgba(22, 18, 14, .78), rgba(12, 11, 10, .78)); box-shadow: 0 20px 40px rgba(0, 0, 0, .3); }
.g-sec h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); color: #f6e7c4; }
.g-sec h2 i { font-style: normal; font-family: inherit; font-size: .55em; color: #1b1206; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fbe7b0, #c28f3c); box-shadow: 0 0 0 3px rgba(216, 179, 106, .18); }
.g-sec h3 { margin: 22px 0 8px; color: var(--gold-2, #f3dca3); font-size: 1.05rem; letter-spacing: .04em; }
.g-sec p, .g-sec li { line-height: 1.65; color: #ddd0b4; }
.g-sec b { color: #f6e7c4; }
.g-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.g-fig { margin: 0; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(216, 179, 106, .2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.g-fig img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.g-fig:hover img { transform: scale(1.05); }
.g-fig figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; font-size: .8rem; color: #eadbbd; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); }
.g-gallery { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 14px; margin: 18px 0; }
.g-gallery .wide { grid-row: span 2; }
.g-gallery .g-fig { aspect-ratio: 4 / 3; } .g-gallery .wide { aspect-ratio: auto; }
.g-note { font-size: .82rem; color: var(--muted) !important; font-style: italic; }
.g-tip { padding: 12px 16px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: rgba(216, 179, 106, .08); }
.g-list { padding-left: 20px; } .g-list li::marker { color: var(--gold); }
.timeline { list-style: none; counter-reset: t; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { counter-increment: t; position: relative; padding: 10px 0 18px 58px; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 6px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; color: #f6e7c4; border: 1px solid var(--gold); background: #17120c; box-shadow: 0 0 14px rgba(216, 179, 106, .25); }
.timeline li::after { content: ''; position: absolute; left: 19px; top: 46px; bottom: -4px; width: 1px; background: linear-gradient(var(--gold), transparent); }
.timeline li:last-child::after { display: none; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.stat { display: grid; gap: 2px; padding: 12px 8px; text-align: center; border-radius: 12px; border: 1px solid rgba(216, 179, 106, .2); background: rgba(0, 0, 0, .25); }
.stat b { font-size: 1.3rem; color: #f3d48a !important; } .stat span { font-size: .7rem; color: var(--muted); }
.g-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .88rem; }
.g-table th, .g-table td { padding: 9px 10px; border-bottom: 1px solid rgba(216, 179, 106, .1); text-align: left; }
.g-table thead th { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.g-table tbody tr { transition: background .2s; } .g-table tbody tr:hover { background: rgba(216, 179, 106, .05); }
.lvl { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(216, 179, 106, .15); color: #f3d48a; font-weight: 700; font-size: .8rem; }
.bar { position: relative; display: inline-block; min-width: 150px; padding: 2px 8px; border-radius: 6px; overflow: hidden; z-index: 0; }
.bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); z-index: -1; background: linear-gradient(90deg, rgba(143, 209, 138, .35), rgba(233, 143, 125, .35)); border-radius: 6px; }
.tier-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.tier-card { display: grid; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid rgba(216, 179, 106, .2); background: rgba(0, 0, 0, .25); transition: transform .25s; }
.tier-card:hover { transform: translateY(-3px); }
.tier-card.t2 { border-color: rgba(120, 170, 230, .3); } .tier-card.t3 { border-color: rgba(200, 120, 230, .3); }
.tier-card span { font-size: .84rem; color: #ddd0b4; } .tier-card small { color: var(--muted); font-size: .74rem; }
.sell-calc, .calc { margin-top: 18px; padding: 16px; border-radius: 12px; border: 1px dashed rgba(216, 179, 106, .3); background: rgba(0, 0, 0, .2); }
.sell-calc { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.sell-calc label, .calc label { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); }
.sell-calc input[type=range] { width: 220px; accent-color: #d8b36a; }
.sell-calc output { font-size: 1.05rem; font-weight: 700; color: #f3d48a; }
.calc h3 { margin-top: 0; }
.calc-row { display: flex; flex-wrap: wrap; gap: 12px; }
.calc input, .calc select { min-width: 90px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(216, 179, 106, .3); background: #120f0c; color: var(--text); font: inherit; }
.calc-out { display: block; margin-top: 12px; font-size: 1rem; } .calc-out b { font-size: 1.3rem; color: #f3d48a; } .calc-out span { margin-left: 8px; font-size: .8rem; }
.formula { margin: 14px 0; padding: 14px 18px; border-radius: 12px; text-align: center; font-family: var(--serif); font-size: 1.05rem; color: #eadbbd; background: radial-gradient(ellipse at center, rgba(216, 179, 106, .14), rgba(0, 0, 0, .2)); border: 1px solid rgba(216, 179, 106, .25); }
.matrix-wrap { overflow-x: auto; }
.matrix td.mx { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.matrix td.vup { color: #9be095; background: rgba(110, 200, 100, calc((var(--p) - .5) * .5)); }
.matrix td.vdown { color: #f09c88; background: rgba(230, 110, 90, calc((.5 - var(--p)) * .5)); }
.matrix td.veq { color: var(--muted); }
.matrix th { white-space: nowrap; }
.struct-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.struct { padding: 14px; border-radius: 12px; border: 1px solid rgba(216, 179, 106, .2); background: rgba(0, 0, 0, .25); }
.struct h3 { margin: 0 0 8px; }
.struct dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .84rem; } .struct dt { color: var(--muted); } .struct dd { margin: 0; text-align: right; color: #f6e7c4; }
.tech-steps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.tech-step { display: grid; gap: 6px; justify-items: start; padding: 14px; border-radius: 12px; border: 1px solid rgba(216, 179, 106, .2); background: rgba(0, 0, 0, .25); flex: 1 1 180px; }
.tech-step small { color: var(--muted); font-size: .76rem; }
.tech-arrow { font-size: 1.6rem; color: var(--gold); }
.shot { position: relative; }
.hot { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; background: #d8b36a; box-shadow: 0 0 0 4px rgba(216, 179, 106, .3); animation: hot 2s ease-in-out infinite; pointer-events: none; }
.hot::after { content: attr(data-n); position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #1b1206; }
@keyframes hot { 0%, 100% { box-shadow: 0 0 0 4px rgba(216, 179, 106, .35); } 50% { box-shadow: 0 0 0 12px rgba(216, 179, 106, 0); } }
.hot.h1 { left: 33%; top: 3%; } .hot.h2 { left: 57%; top: 8%; } .hot.h3 { left: 50%; top: 40%; } .hot.h4 { left: 27%; top: 86%; } .hot.h5 { left: 91%; top: 27%; } .hot.h6 { left: 82%; top: 64%; } /* v21: новый скриншот интерфейса */
.legend { columns: 2; column-gap: 30px; padding-left: 22px; margin-top: 14px; } .legend li { break-inside: avoid; margin-bottom: 6px; } .legend li::marker { color: var(--gold); font-weight: 700; }
.keys td:first-child { width: 160px; }
kbd { display: inline-block; min-width: 28px; padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(216, 179, 106, .4); border-bottom-width: 3px; background: #1d1711; color: #f6e7c4; font: 600 .8rem/1.4 ui-monospace, monospace; text-align: center; }
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tip { padding: 16px; border-radius: 12px; border: 1px solid rgba(216, 179, 106, .18); background: linear-gradient(160deg, rgba(216, 179, 106, .09), rgba(0, 0, 0, .2)); transition: transform .25s, border-color .25s; }
.tip:hover { transform: translateY(-3px); border-color: var(--gold); }
.tip p { margin: 6px 0 0; font-size: .88rem; }
.g-cta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
@media (max-width: 960px) {
  .guide-layout { grid-template-columns: 1fr; } .guide-toc { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .g-cols, .struct-cards { grid-template-columns: 1fr; } .g-gallery { grid-template-columns: 1fr; } .g-gallery .wide { grid-row: auto; }
  .stat-row { grid-template-columns: 1fr 1fr; } .tier-cards { grid-template-columns: 1fr; } .legend { columns: 1; } .hub-hero { min-height: 440px; }
}

/* ---------- Расы: витрина ---------- */
.race-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.race-tile { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--text); border: 1px solid rgba(216, 179, 106, .2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5); transition: transform .45s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .45s; isolation: isolate; }
.race-tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(.85); transition: transform 1s cubic-bezier(.2, .8, .2, 1), filter .5s; }
.race-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(6, 6, 8, .96) 6%, rgba(6, 6, 8, .4) 45%, transparent 70%); }
.rt-glow { position: absolute; inset: auto -20% -30% -20%; height: 60%; z-index: -1; background: radial-gradient(closest-side, var(--accent), transparent); opacity: .0; transition: opacity .45s; mix-blend-mode: screen; }
.race-tile:hover, .race-tile:focus-visible { transform: translateY(-8px) scale(1.015); border-color: var(--accent); box-shadow: 0 26px 50px rgba(0, 0, 0, .65), 0 0 0 1px var(--accent), 0 0 40px -6px var(--accent); }
.race-tile:hover > img { transform: scale(1.08); filter: saturate(1.1); }
.race-tile:hover .rt-glow { opacity: .35; }
.rt-text { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 3px; padding: 20px 20px 66px; }
.rt-text small { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.rt-text b { font-family: var(--serif); font-size: 1.9rem; color: #f6e7c4; text-shadow: 0 3px 12px #000; }
.rt-text em { font-style: normal; font-size: .82rem; color: #cfc2a6; line-height: 1.4; }
.rt-faces { position: absolute; left: 20px; bottom: 18px; display: flex; }
.rt-faces img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid #120f0c; box-shadow: 0 0 0 1px var(--accent); margin-right: -8px; transition: transform .3s, margin .3s; }
.race-tile:hover .rt-faces img { margin-right: 4px; }

/* ---------- Страница расы ---------- */
.race-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; align-items: center; min-height: 560px; margin: 0 calc(-1 * clamp(14px, 3vw, 32px)) 24px; padding: 40px clamp(18px, 4vw, 48px); overflow: hidden; isolation: isolate; }
.race-hero-art { position: absolute; right: 0; top: 0; width: 62%; height: 100%; object-fit: cover; object-position: center 3%; /* v25 (п.6.2): голова не упирается в край и верхнюю панель */ z-index: -2; mask-image: linear-gradient(90deg, transparent, #000 40%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); animation: kenburns 30s ease-in-out infinite alternate; }
.race-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 20% 60%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), linear-gradient(0deg, rgba(8, 10, 14, 1), transparent 30%); }
.race-hero-text h1 { margin: 6px 0 6px; font-family: var(--serif); font-size: clamp(44px, 6vw, 84px); line-height: 1; color: #f6e7c4; text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent), 0 4px 18px #000; }
.race-hero-text .kicker { color: var(--accent); }
.race-hero-text { max-width: 640px; }
.race-hero-text p { max-width: 620px; line-height: 1.65; color: #e3d6bb; text-shadow: 0 2px 8px #000; }
.motto { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--gold) !important; }
.crumb { display: table; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-size: .84rem; } .crumb:hover { color: var(--gold); }
.race-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.race-radar { align-content: center; display: grid; justify-items: center; gap: 6px; padding: 16px; border-radius: 18px; background: rgba(8, 8, 10, .62); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); backdrop-filter: blur(8px); }
.race-radar small { font-size: .7rem; color: var(--muted); }
.radar { width: 280px; height: 280px; overflow: visible; }
.radar text { font-size: 9px; fill: #cfc2a6; }
.r-ring { fill: none; stroke: rgba(216, 179, 106, .16); } .r-axis { stroke: rgba(216, 179, 106, .16); }
.r-shape { fill-opacity: .28; stroke-width: 2; animation: radar-in 1s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 110px 110px; }
@keyframes radar-in { from { transform: scale(.2); opacity: 0; } }
.race-sw { display: grid; grid-template-columns: auto 1fr 1fr; gap: 16px; margin-bottom: 30px; align-items: stretch; }
.race-sw .radar { width: 230px; height: 230px; }
.sw { padding: 20px 24px; border-radius: 16px; background: rgba(12, 11, 10, .75); border: 1px solid rgba(216, 179, 106, .15); }
.sw.good { box-shadow: inset 3px 0 0 #6fbf6a; } .sw.bad { box-shadow: inset 3px 0 0 #d67a66; }
.sw ul { margin: 10px 0 0; padding-left: 18px; } .sw li { line-height: 1.6; color: #ddd0b4; }
.tier-sec { margin-bottom: 34px; }
.tier-h { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--serif); font-size: 1.5rem; color: #f6e7c4; }
.tier-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(216, 179, 106, .4), transparent); }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 860px) { .race-hero { grid-template-columns: 1fr; } .race-hero-art { width: 100%; opacity: .45; } .race-sw { grid-template-columns: 1fr; } }

/* Карточка бойца в сетке — «коллекционная карта» */
.unit-card-x { position: relative; display: grid; gap: 4px; padding: 10px 10px 14px; border-radius: 16px; text-decoration: none; color: var(--text); overflow: hidden;
  border: 1px solid rgba(216, 179, 106, .25); background: linear-gradient(180deg, #1c1712, #0e0c0a); box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .3s; }
.unit-card-x.t2 { border-color: rgba(120, 170, 230, .35); } .unit-card-x.t3 { border-color: rgba(200, 130, 235, .4); background: linear-gradient(180deg, #211629, #0e0b10); }
.unit-card-x:hover, .unit-card-x:focus-visible { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 24px 44px rgba(0, 0, 0, .6), 0 0 30px -8px rgba(240, 190, 90, .55); border-color: var(--gold); }
.uc-frame { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000; margin-bottom: 6px; }
.uc-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.unit-card-x:hover .uc-frame img { transform: scale(1.08); }
.uc-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 240, 200, .35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .9s; }
.unit-card-x:hover .uc-shine { transform: translateX(120%); }
.uc-tier { position: absolute; top: 16px; left: 16px; padding: 2px 8px; border-radius: 6px; font-size: .7rem; font-weight: 800; color: #1b1206; background: linear-gradient(180deg, #f1d79a, #b98c3e); box-shadow: 0 2px 8px #000; }
.t2 .uc-tier { background: linear-gradient(180deg, #c9e2ff, #5d8fc9); } .t3 .uc-tier { background: linear-gradient(180deg, #f6c6ff, #a259c4); }
.uc-cost { position: absolute; top: 16px; right: 16px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; color: #f3d48a; background: rgba(0, 0, 0, .75); border: 1px solid rgba(216, 179, 106, .4); }
.unit-card-x b { font-size: 1rem; color: #f6e7c4; line-height: 1.2; }
.unit-card-x small { font-size: .74rem; color: var(--muted); }
.uc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.uc-chips i { font-style: normal; font-size: .66rem; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: #cfc2a6; border: 1px solid rgba(255, 255, 255, .06); }
.uc-chips i.air { color: #9fd3ff; border-color: rgba(120, 180, 255, .3); }

/* ---------- Модальная карточка бойца ---------- */
.unit-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(4, 4, 6, .78); backdrop-filter: blur(6px); animation: fade-in .2s ease-out; }
.unit-modal[hidden] { display: none; }
body.modal-open { overflow: hidden; }
@keyframes fade-in { from { opacity: 0; } }
.um-frame { position: relative; width: min(1180px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 22px; border: 1px solid rgba(216, 179, 106, .35);
  background: linear-gradient(180deg, #17130f, #0b0a09); box-shadow: 0 40px 90px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .8); animation: um-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes um-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.um-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(216, 179, 106, .4); background: rgba(0, 0, 0, .6); color: #f6e7c4; font-size: 1rem; cursor: pointer; transition: transform .2s, background .2s; }
.um-close:hover { transform: rotate(90deg); background: rgba(216, 179, 106, .2); }
.um-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.um-art { position: relative; display: grid; align-content: start; gap: 12px; padding: 22px; isolation: isolate; border-right: 1px solid rgba(216, 179, 106, .12); }
.um-art::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 65%); }
.um-stage { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; border: 1px solid rgba(216, 179, 106, .25); background: radial-gradient(circle at 50% 40%, #2a2219, #0a0908); }
.um-img { width: 100%; height: 100%; object-fit: cover; animation: um-art 8s ease-in-out infinite alternate; }
@keyframes um-art { from { transform: scale(1.0); } to { transform: scale(1.06); } }
.um-3d { width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.um-loading { position: absolute; inset: auto 0 14px; text-align: center; color: var(--muted); font-size: .84rem; }
.um-view, .um-anims { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.um-view button, .um-anims button { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(216, 179, 106, .3); background: rgba(0, 0, 0, .35); color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; transition: all .2s; }
.um-view button.on, .um-anims button.on, .um-view button:hover, .um-anims button:hover { color: #1b1206; background: linear-gradient(180deg, #f1d79a, #b98c3e); border-color: transparent; }
.um-info { padding: 28px 30px 26px; display: grid; gap: 14px; align-content: start; }
.um-info .kicker { color: var(--gold); }
.um-info h2 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; color: #f6e7c4; }
.um-role { margin: -6px 0 0; color: var(--muted); }
.um-cost { display: flex; flex-wrap: wrap; gap: 8px; }
.um-cost span { padding: 7px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(216, 179, 106, .18); font-weight: 700; color: #f6e7c4; }
.um-cost small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.um-cost .gold { color: #f3d48a; border-color: rgba(216, 179, 106, .45); }
.um-sum { margin: 0; line-height: 1.6; color: #ddd0b4; font-size: .98rem; }
.um-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.sbar { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: .78rem; color: var(--muted); }
.sbar b { color: #f6e7c4; font-variant-numeric: tabular-nums; }
.sbar i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); position: relative; overflow: hidden; }
.sbar i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); border-radius: 6px; background: linear-gradient(90deg, #8a6226, #f3d48a); box-shadow: 0 0 10px rgba(243, 212, 138, .5); animation: grow 1s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.um-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.um-types > div { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(216, 179, 106, .15); }
.um-types small { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.um-types b { color: #f6e7c4; font-size: 1.02rem; } .um-types span { font-size: .78rem; color: var(--muted); line-height: 1.45; }
.um-match p { margin: 4px 0; font-size: .86rem; color: #ddd0b4; } .um-match .good b { color: #8fd18a; } .um-match .bad b { color: #e98f7d; }
.um-tac { display: grid; gap: 8px; }
.um-tac p { margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .03); font-size: .88rem; line-height: 1.55; color: #ddd0b4; }
.um-tac .eyebrow { display: block; margin-bottom: 3px; font-size: .64rem; letter-spacing: .2em; }
.um-abil { display: grid; gap: 8px; }
.um-abil .eyebrow { font-size: .64rem; letter-spacing: .2em; color: var(--gold); } .um-abil .eyebrow em { font-style: normal; letter-spacing: 0; color: var(--muted); margin-left: 6px; font-size: .9em; }
.ab { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(160, 120, 230, .3); background: linear-gradient(160deg, rgba(140, 100, 220, .1), rgba(0, 0, 0, .2)); }
.ab b { color: #e3cfff; } .ab p { margin: 4px 0 0; font-size: .86rem; color: #ddd0b4; line-height: 1.5; } .ab small { color: var(--muted); font-size: .72rem; }
.um-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
@media (max-width: 860px) { .um-body { grid-template-columns: 1fr; } .um-art { border-right: 0; border-bottom: 1px solid rgba(216, 179, 106, .12); } .um-stats, .um-types { grid-template-columns: 1fr; } .unit-modal { padding: 0; } .um-frame { max-height: 100vh; border-radius: 0; } }

/* ================= Лобби v2: сцена «Север против Юга» + нижняя панель ================= */
.lobby-v2 { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-height: calc(100vh - 72px); padding-bottom: 18px; }
.lobby-v2 .lobby-head { gap: 12px; }
.lobby-v2 .lobby-head h2 { font-family: var(--serif); margin: 0; }
.lobby-v2 .lobby-sub { opacity: .8; }
.lobby-v2 .lobby-help { margin-left: auto; text-decoration: none; }

.lobby-stage { position: relative; display: grid; align-items: center; min-height: 0; border-radius: 22px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(216, 179, 106, .16); background: radial-gradient(ellipse at 50% 110%, rgba(216, 179, 106, .12), transparent 60%), linear-gradient(180deg, rgba(14, 16, 20, .55), rgba(8, 9, 11, .8)); }
.lobby-stage::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(90, 160, 255, .10), transparent 35%, transparent 65%, rgba(255, 120, 80, .10)); }
.lobby-v2 .sides { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); align-items: center; gap: 0; padding: 22px clamp(14px, 3vw, 36px); }
.lobby-v2 .sides::after { content: 'VS'; grid-column: 2; grid-row: 1; justify-self: center; font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.6rem); color: #f3d48a;
  text-shadow: 0 0 30px rgba(240, 190, 90, .55), 0 4px 10px #000; animation: vs-pulse 2.6s ease-in-out infinite; }
@keyframes vs-pulse { 50% { transform: scale(1.08); text-shadow: 0 0 46px rgba(240, 190, 90, .8), 0 4px 10px #000; } }
.lobby-v2 .side { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 0; border: 0; background: none; grid-row: 1; }
.lobby-v2 .side.north { grid-column: 1; } .lobby-v2 .side.south { grid-column: 3; }
.lobby-v2 .side-head { flex: 1 0 100%; justify-content: center; gap: 10px; }
.lobby-v2 .side-head h4 { font-size: 1.4rem; letter-spacing: .12em; text-transform: uppercase; }
.lobby-v2 .side.north .side-head h4 { color: #8cc4ff; text-shadow: 0 0 18px rgba(90, 160, 255, .5); }
.lobby-v2 .side.south .side-head h4 { color: #ff9f7f; text-shadow: 0 0 18px rgba(255, 120, 80, .5); }

/* карточка командира */
.lobby-v2 .sides .seat { position: relative; flex: 1 1 0; max-width: 300px; min-width: 150px; display: block; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border-radius: 18px;
  border: 2px solid var(--pc, rgba(216, 179, 106, .25)); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); background: #0b0c0e; transition: transform .3s, box-shadow .3s; }
.lobby-v2 .sides .seat:not(.empty):hover { transform: translateY(-4px); }
.lobby-v2 .sides .seat.self { box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 3px rgba(243, 212, 138, .25), 0 0 40px -8px var(--pc, #f3d48a); }
.lobby-v2 .sides .seat.ready { box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 3px rgba(143, 211, 155, .55), 0 0 40px -6px rgba(143, 211, 155, .7); }
.lobby-v2 .sides .seat-image { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; outline: 0; object-fit: cover; object-position: 50% 18%; }
.lobby-v2 .sides .seat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .92) 8%, rgba(0, 0, 0, .25) 45%, transparent 65%); pointer-events: none; }
.lobby-v2 .sides .seat-info { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 42px; }
.lobby-v2 .sides .seat-name { font-size: 1.3rem; color: #f6e7c4; text-shadow: 0 2px 8px #000; }
.lobby-v2 .sides .seat-race { color: #d8cbb0; }
.lobby-v2 .sides .seat-state { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.lobby-v2 .sides .seat-state strong { padding: 3px 10px; border-radius: 999px; font-size: .74rem; background: rgba(143, 211, 155, .18); border: 1px solid rgba(143, 211, 155, .6); }
.lobby-v2 .sides .seat-state strong.unready { background: rgba(0, 0, 0, .5); border-color: rgba(255, 255, 255, .18); color: #cfc2a6; }
.lobby-v2 .sides .seat-state span { font-size: .72rem; }
.lobby-v2 .sides .seat.empty { display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; border: 2px dashed rgba(216, 179, 106, .3); background: rgba(0, 0, 0, .25); opacity: 1; }
.lobby-v2 .sides .seat.empty::after { display: none; }
.lobby-v2 .sides .seat.empty .seat-info { position: static; }
.lobby-v2 .sides .seat-placeholder { width: 84px; height: 84px; border-radius: 50%; font-size: 2.2rem; border: 2px dashed rgba(216, 179, 106, .35); color: rgba(216, 179, 106, .6); animation: seat-wait 2.4s ease-in-out infinite; }
@keyframes seat-wait { 50% { border-color: rgba(216, 179, 106, .8); box-shadow: 0 0 24px rgba(216, 179, 106, .25); } }
.lobby-v2 .sides .seat.empty .btn { padding: 9px 22px !important; }

/* нижняя панель */
.lobby-dock { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
.dock-banner, .dock-ready { border-radius: 18px; border: 1px solid rgba(216, 179, 106, .18); background: linear-gradient(180deg, rgba(22, 18, 14, .88), rgba(12, 11, 10, .9)); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
.dock-banner { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; padding: 14px 18px; align-items: center; }
.lobby-v2 .race-detail { grid-template-columns: 92px 1fr; gap: 14px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.lobby-v2 .race-portrait { width: 92px; height: 92px; object-fit: cover; object-position: 50% 15%; border-radius: 50%; border: 2px solid var(--accent, var(--gold)); box-shadow: 0 0 24px -4px var(--accent, var(--gold)); }
.lobby-v2 .race-copy strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: #f6e7c4; line-height: 1.1; }
.lobby-v2 .race-copy .kicker { color: var(--accent, var(--gold)); font-size: .62rem; }
.lobby-v2 .race-copy p { margin: 2px 0 4px; font-size: .82rem; }
.lobby-v2 .race-copy .btn.text { padding: 0; font-size: .82rem; }
.dock-pickers { display: grid; gap: 10px; min-width: 0; }
.lobby-v2 .factions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.lobby-v2 .faction { width: 50px; height: 50px; aspect-ratio: auto; border-radius: 50%; border-width: 2px; flex: 0 0 auto; }
.lobby-v2 .faction img { object-position: 50% 15%; }
.lobby-v2 .faction .label, .lobby-v2 .faction .roster-mark { display: none; }
.lobby-v2 .faction[aria-checked="true"] { transform: scale(1.12); box-shadow: 0 0 0 2px #0b0a09, 0 0 0 4px var(--accent), 0 0 18px var(--accent); }
.lobby-v2 .color-row { display: flex; align-items: center; gap: 12px; padding: 0; }
.lobby-v2 .colors { gap: 6px; }
.lobby-v2 .colors button { width: 26px; height: 26px; }
.name-edit summary { cursor: pointer; font-size: .78rem; color: var(--muted); list-style: none; }
.name-edit summary::before { content: '✎ '; } .name-edit summary::-webkit-details-marker { display: none; }
.name-edit[open] summary { color: var(--gold); margin-bottom: 6px; }
.name-edit .field-row { margin-top: 4px; } .name-edit .hint { margin: 0; font-size: .74rem; }
.dock-ready { display: grid; gap: 10px; align-content: center; padding: 16px 18px; }
.lobby-v2 .ready-btn { min-height: 64px; font-size: 1.25rem; position: relative; overflow: hidden; }
.lobby-v2 .ready-btn:not(:disabled)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 245, 210, .45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.5s ease-in-out 1s infinite; }
.lobby-v2 .room-status { margin: 0; font-size: .8rem; color: var(--muted); text-align: center; }
@media (max-width: 1100px) { .dock-banner { grid-template-columns: 1fr; } .lobby-dock { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 820px) {
  .lobby-v2 { min-height: 0; }
  .lobby-v2 .sides { grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); padding: 14px 8px; }
  .lobby-v2 .sides::after { font-size: 1.6rem; }
  .lobby-v2 .sides .seat { min-width: 0; max-width: 100%; border-radius: 12px; }
  .lobby-v2 .sides .seat-name { font-size: .95rem; } .lobby-v2 .sides .seat-race, .lobby-v2 .sides .seat-state span { display: none; }
  .lobby-v2 .sides .seat-info { bottom: 36px; left: 8px; right: 8px; } .lobby-v2 .sides .seat-state { left: 8px; right: 8px; bottom: 8px; }
  .lobby-v2 .sides .seat-placeholder { width: 54px; height: 54px; font-size: 1.4rem; }
  .lobby-dock { grid-template-columns: 1fr; } .dock-ready { order: -1; position: sticky; bottom: 66px; z-index: 5; }
  .lobby-v2 .faction { width: 42px; height: 42px; }
  .lobby-v2 .lobby-help { display: none; }
}

.lobby-v2 .sides .seat.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; grid-template-columns: none; }
.lobby-v2 .sides .seat.empty .seat-info { text-align: center; }
.lobby-v2 #leave-action { display: none !important; }

.game-row.mine { border-color: rgba(243, 212, 138, .55); box-shadow: inset 3px 0 0 #f3d48a; }
.game-row.mine .game-name::after { content: ' · твоя игра'; font-family: var(--sans); font-size: .7rem; letter-spacing: .1em; color: #f3d48a; }

/* выбор расы крупнее: плитки с названием */
.dock-banner { grid-template-columns: 300px minmax(0, 1fr); padding: 16px 20px; }
.lobby-v2 .factions { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.lobby-v2 .faction { width: auto; height: auto; aspect-ratio: 1; border-radius: 14px; }
.lobby-v2 .faction img { object-position: 50% 12%; }
.lobby-v2 .faction .label { display: block; padding: 18px 4px 5px; font-size: .66rem; }
.lobby-v2 .faction[aria-checked="true"] { transform: translateY(-3px); box-shadow: 0 0 0 2px #0b0a09, 0 0 0 4px var(--accent), 0 10px 22px -4px var(--accent); }
.lobby-v2 .faction[aria-checked="true"] .label { color: #fff; }
.lobby-v2 .race-portrait { width: 120px; height: 120px; }
.lobby-v2 .race-detail { grid-template-columns: 120px 1fr; }
.lobby-v2 .colors button { width: 30px; height: 30px; }
@media (max-width: 1100px) { .lobby-v2 .factions { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); } }
@media (max-width: 820px) { .lobby-v2 .factions { grid-template-columns: repeat(4, minmax(0, 1fr)); } .lobby-v2 .race-portrait { width: 84px; height: 84px; } .lobby-v2 .race-detail { grid-template-columns: 84px 1fr; } }

@media (max-width: 1100px) { .dock-banner { grid-template-columns: minmax(0, 1fr); } }

/* ================= Личный кабинет ================= */
.site-nav a[hidden] { display: none; }
.ac-profile { font-weight: 600; color: #f3d48a !important; }
.pf-empty { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.pf-guest { max-width: 620px; margin: 12vh auto; text-align: center; display: grid; gap: 14px; justify-items: center; }
.pf-guest h1 { font-family: var(--serif); font-size: clamp(30px, 4vw, 48px); margin: 0; color: #f6e7c4; } .pf-guest p { color: var(--muted); line-height: 1.6; }
.pf-hero { position: relative; display: grid; grid-template-columns: 1fr minmax(280px, 420px); gap: 30px; align-items: end; margin: 24px 0 18px; padding: 34px clamp(18px, 3vw, 40px); border-radius: 22px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(216, 179, 106, .25); background: linear-gradient(110deg, rgba(20, 16, 12, .96) 35%, rgba(20, 16, 12, .55)); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
.pf-hero-art { position: absolute; right: 0; top: 0; width: 55%; height: 100%; object-fit: cover; object-position: 50% 18%; z-index: -1; opacity: .55; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.pf-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 15% 100%, color-mix(in srgb, var(--accent, #d8b36a) 22%, transparent), transparent 60%); }
.pf-id { display: flex; gap: 22px; align-items: center; }
.pf-ava { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; font-family: var(--serif); font-size: 3rem; font-weight: 700; color: #241606;
  background: radial-gradient(circle at 35% 30%, #fbe7b0, #d4a24c 55%, #8c6223); box-shadow: 0 0 0 4px #120e0a, 0 0 0 6px rgba(216, 179, 106, .7), 0 0 40px rgba(232, 190, 110, .45); }
.lvl-badge { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 800 .9rem/1 var(--sans); font-style: normal; color: #f6e7c4; background: #1b140d; border: 2px solid #d8b36a; }
.pf-id h1 { margin: 4px 0; font-family: var(--serif); font-size: clamp(32px, 4.5vw, 56px); color: #f6e7c4; line-height: 1; }
.pf-sub { margin: 0; color: var(--muted); font-size: .84rem; }
.pf-rank { display: grid; gap: 8px; padding: 16px 18px; border-radius: 16px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(216, 179, 106, .25); backdrop-filter: blur(6px); }
.pf-rank-top { display: flex; justify-content: space-between; align-items: baseline; } .pf-rank-top b { font-family: var(--serif); font-size: 1.5rem; color: #f3d48a; } .pf-rank-top span { color: #f6e7c4; font-weight: 700; }
.pf-rank-bar { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pf-rank-bar i { display: block; height: 100%; width: calc(var(--p) * 100%); border-radius: 10px; background: linear-gradient(90deg, #8a6226, #f3d48a); box-shadow: 0 0 14px rgba(243, 212, 138, .6); animation: grow 1.2s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.pf-rank small { color: var(--muted); font-size: .76rem; }
.pf-stats { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; margin-bottom: 18px; padding: 20px; border-radius: 18px; border: 1px solid rgba(216, 179, 106, .15); background: rgba(12, 11, 10, .78); }
.pf-ring { position: relative; display: grid; place-items: center; width: 170px; height: 170px; margin: auto; }
.pf-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.pf-ring circle { fill: none; stroke-width: 10; } .pf-ring .bg { stroke: rgba(255, 255, 255, .07); }
.pf-ring .fg { stroke: #f3d48a; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: calc(326.7 * (1 - var(--p))); filter: drop-shadow(0 0 6px rgba(243, 212, 138, .6)); transition: stroke-dashoffset 1.2s; }
.pf-ring b { font-family: var(--serif); font-size: 2.6rem; color: #f6e7c4; line-height: 1; margin-top: -10px; } .pf-ring span { position: absolute; bottom: 48px; font-size: .74rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pf-stat { display: grid; gap: 2px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(216, 179, 106, .12); transition: transform .2s, border-color .2s; }
.pf-stat:hover { transform: translateY(-2px); border-color: rgba(216, 179, 106, .4); }
.pf-stat b { font-size: 1.45rem; color: #f6e7c4; font-variant-numeric: tabular-nums; } .pf-stat span { font-size: .74rem; color: var(--muted); }
.pf-stat.good b { color: #8fd18a; } .pf-stat.bad b { color: #e98f7d; }
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.pf-card { padding: 20px 22px; border-radius: 18px; border: 1px solid rgba(216, 179, 106, .15); background: linear-gradient(180deg, rgba(22, 18, 14, .85), rgba(12, 11, 10, .85)); margin-bottom: 18px; }
.pf-cols .pf-card { margin-bottom: 0; }
.pf-card h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 1.4rem; color: #f6e7c4; display: flex; align-items: baseline; gap: 10px; }
.pf-card h2 small { font-family: var(--sans); font-size: .74rem; color: var(--muted); font-weight: 400; }
.pf-spark { width: 100%; height: 140px; display: block; }
.pf-advice { margin: 0; padding-left: 18px; display: grid; gap: 8px; } .pf-advice li { line-height: 1.55; color: #ddd0b4; font-size: .9rem; } .pf-advice li::marker { content: '✦  '; color: var(--gold); }
.pf-races { display: grid; gap: 8px; }
.pf-race { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--text); background: rgba(255, 255, 255, .03); border: 1px solid transparent; transition: border-color .2s; }
.pf-race:hover { border-color: var(--accent); }
.pf-race img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; box-shadow: 0 0 0 2px var(--accent); }
.pf-race span { display: grid; gap: 3px; } .pf-race small { color: var(--muted); font-size: .74rem; } .pf-race em { font-style: normal; font-weight: 700; color: #f3d48a; }
.pf-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .07); position: relative; overflow: hidden; }
.pf-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); background: var(--accent, #f3d48a); }
.pf-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.pf-modes div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); text-align: center; } .pf-modes b { color: #f6e7c4; } .pf-modes span { font-size: .78rem; color: var(--muted); }
.pf-rivals { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-rivals li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); } .pf-rivals span { color: #f3d48a; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-history { display: grid; gap: 8px; max-height: 560px; overflow: auto; padding-right: 4px; }
.pf-match { display: grid; grid-template-columns: 104px 44px minmax(0, 1fr) auto 120px; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border-left: 3px solid var(--muted); }
.pf-match.win { border-left-color: #6fbf6a; background: linear-gradient(90deg, rgba(111, 191, 106, .1), rgba(255, 255, 255, .02) 40%); }
.pf-match.loss { border-left-color: #d67a66; background: linear-gradient(90deg, rgba(214, 122, 102, .09), rgba(255, 255, 255, .02) 40%); }
.pf-res { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; } .win .pf-res { color: #8fd18a; } .loss .pf-res { color: #e98f7d; } .draw .pf-res { color: var(--muted); }
.pf-match img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.pf-m-main { display: grid; gap: 2px; min-width: 0; } .pf-m-main b { color: #f6e7c4; font-size: .92rem; } .pf-m-main small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-m-nums { display: flex; gap: 12px; font-size: .78rem; color: #cfc2a6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-match time { display: grid; text-align: right; font-size: .76rem; color: var(--muted); } .pf-match time small { font-size: .68rem; opacity: .8; }
.pf-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ach { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .02); border: 1px dashed rgba(255, 255, 255, .1); opacity: .55; filter: grayscale(1); }
.ach i { grid-row: span 2; font-style: normal; font-size: 1.6rem; color: #8a7a5a; text-align: center; } .ach b { font-size: .88rem; color: #f6e7c4; } .ach small { font-size: .72rem; color: var(--muted); }
.ach.done { opacity: 1; filter: none; border: 1px solid rgba(243, 212, 138, .45); background: linear-gradient(160deg, rgba(243, 212, 138, .14), rgba(0, 0, 0, .2)); box-shadow: 0 0 22px -10px rgba(243, 212, 138, .8); }
.ach.done i { color: #f3d48a; text-shadow: 0 0 12px rgba(243, 212, 138, .8); }
.pf-note-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pf-note-tabs button { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(216, 179, 106, .25); background: rgba(0, 0, 0, .3); color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.pf-note-tabs button.has::after { content: ' •'; color: #f3d48a; }
.pf-note-tabs button[aria-selected="true"] { color: #1b1206; background: linear-gradient(180deg, #f1d79a, #b98c3e); border-color: transparent; }
#pf-note { width: 100%; box-sizing: border-box; padding: 14px; border-radius: 12px; border: 1px solid rgba(216, 179, 106, .3); background: #0f0d0b; color: var(--text); font: inherit; line-height: 1.6; resize: vertical; }
.pf-note-foot { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: .78rem; color: var(--muted); } .pf-note-foot button { margin-left: auto; }
#pf-note-state { color: #f3d48a; }
.pf-danger { margin: 10px 0 30px; padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(214, 122, 102, .25); color: var(--muted); font-size: .86rem; }
.pf-danger summary { cursor: pointer; color: #e98f7d; } .pf-danger .input-row { display: flex; gap: 8px; max-width: 420px; }
.pf-danger input { flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(214, 122, 102, .4); background: #120e0c; color: var(--text); font: inherit; }
@media (max-width: 900px) {
  .pf-hero { grid-template-columns: 1fr; } .pf-hero-art { width: 100%; opacity: .25; } .pf-ava { width: 76px; height: 76px; font-size: 2.2rem; }
  .pf-stats { grid-template-columns: 1fr; } .pf-grid { grid-template-columns: repeat(2, 1fr); } .pf-cols { grid-template-columns: 1fr; }
  .pf-match { grid-template-columns: 84px 36px minmax(0, 1fr); } .pf-match img { width: 36px; height: 36px; } .pf-m-nums, .pf-match time { grid-column: 1 / -1; justify-content: flex-start; text-align: left; }
}

/* Уведомление лобби (игрок вернулся на вкладку — баннер виден, пока он не нажмёт на страницу) */
.lobby-alert { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 90; padding: 12px 22px; border-radius: 999px; font-weight: 700; letter-spacing: .02em;
  color: #1b1206; background: linear-gradient(180deg, #f1d79a, #c49a48); box-shadow: 0 14px 34px rgba(0, 0, 0, .55); pointer-events: none; animation: fade-up .3s ease-out; }
.lobby-alert.full { background: linear-gradient(180deg, #a8f0a0, #4fb860); animation: fade-up .3s ease-out, alert-pulse 1.6s ease-in-out infinite; }
@keyframes alert-pulse { 50% { box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 8px rgba(120, 220, 120, .25); } }

/* v14: счёт встречи, другие игры и чат лобби (под выбором рас) */
.lobby-score { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 210, 122, .45); background: rgba(40, 30, 12, .7); font-size: 13px; letter-spacing: .03em; }
.lobby-score b { font-size: 17px; color: #ffe08a; font-variant-numeric: tabular-nums; }
.lobby-score .ls-n { color: #8fc4ff; } .lobby-score .ls-s { color: #ffa98a; }
.lobby-extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.lx-panel { display: flex; flex-direction: column; min-width: 0; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(10, 16, 24, .72); padding: 12px 14px; }
.lx-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lx-head h4 { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #d9c08a; }
.lx-head select { margin-left: auto; background: rgba(255, 255, 255, .06); color: inherit; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; padding: 4px 8px; }
.lx-badge { font-size: 12px; color: #ffe08a; }
.lx-list { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; padding-right: 4px; }
.lx-game { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.lx-game.closed { opacity: .6; }
.lx-main { display: flex; flex-direction: column; min-width: 0; } .lx-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lx-main span { font-size: 12px; }
.lx-meta { display: flex; gap: 6px; align-items: center; font-size: 12px; } .lx-count { font-variant-numeric: tabular-nums; }
.lx-phase.handoff { color: #ffb08a; } .lx-phase.lobby { color: #9fe0a8; }
.lx-log { flex: 1; min-height: 120px; max-height: 210px; overflow-y: auto; font-size: 13px; line-height: 1.45; padding-right: 4px; }
.lx-log p { margin: 0 0 4px; overflow-wrap: anywhere; }
.lx-log .ch { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; margin-right: 5px; padding: 0 4px; border-radius: 3px; vertical-align: 1px; }
.lx-log .ch.room { background: rgba(255, 210, 122, .16); color: #ffd27a; } .lx-log .ch.team { background: rgba(98, 203, 234, .16); color: #8fdcf5; }
.lx-empty { font-size: 13px; margin: 6px 0; }
.lx-form { display: flex; gap: 8px; margin-top: 8px; } .lx-form input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .06); color: inherit; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; padding: 7px 10px; }
@media (max-width: 900px) { .lobby-extra { grid-template-columns: 1fr; } }

/* v14: страница «Контент» */
.ct-strip { margin: 0 0 34px; }
.ct-strip header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid rgba(216, 179, 106, .18); padding-bottom: 8px; }
.ct-strip h2 { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); color: #f2deb0; }
.ct-strip header p { margin: 0; }
.ct-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.ct-card { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: rgba(14, 20, 28, .85); border: 1px solid rgba(255, 255, 255, .08); color: inherit; text-decoration: none; scroll-snap-align: start; transition: transform .2s, border-color .2s; }
.ct-card:hover { transform: translateY(-3px); border-color: rgba(255, 210, 122, .5); }
.ct-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1b2533, #0d131b); display: grid; place-items: center; }
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; } .ct-ph { font-size: 34px; color: rgba(255, 210, 122, .5); }
.ct-live { position: absolute; left: 8px; top: 8px; background: #e5484d; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; letter-spacing: .06em; }
.ct-meta { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; } .ct-meta span { font-size: 12px; color: var(--muted); }
.ct-empty { position: relative; border: 1px dashed rgba(216, 179, 106, .3); border-radius: 14px; padding: 18px 20px; background: rgba(12, 17, 24, .6); overflow: hidden; }
.ct-empty-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ct-empty-cards span { aspect-ratio: 16 / 9; border-radius: 10px; background: linear-gradient(110deg, rgba(255, 255, 255, .04) 30%, rgba(255, 210, 122, .1) 50%, rgba(255, 255, 255, .04) 70%); background-size: 200% 100%; animation: ct-shine 2.6s linear infinite; }
.ct-empty p { margin: 4px 0; } .ct-empty a { color: #ffd27a; }
@keyframes ct-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ct-empty-cards span { animation: none; } }
.ct-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ct-fan { margin: 0; border-radius: 12px; overflow: hidden; background: rgba(14, 20, 28, .85); } .ct-fan img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ct-fan figcaption { padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; } .ct-fan figcaption span { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .ct-empty-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lx-head h4 { white-space: nowrap; }
.lx-head select { width: auto; flex: 0 0 auto; font-size: 13px; padding: 4px 26px 4px 8px; min-height: 0; }
.lobby-extra { align-items: start; }

/* v19: ползунок приближения 3D-модели */
.um-zoom { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 2px auto 8px; width: min(320px, 90%); color: var(--muted); font-size: 1.1rem; }
.um-zoom[hidden] { display: none; }
.um-zoom input { flex: 1; accent-color: #d8b36a; cursor: pointer; }

/* v21: вкладка «Игроки» */
.pl-table { max-width: 1080px; margin: 0 auto 40px; display: flex; flex-direction: column; gap: 4px; }
.pl-row { display: grid; grid-template-columns: 56px minmax(0, 1.6fr) 80px 120px 80px minmax(0, 1.6fr); gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px;
  background: rgba(14, 20, 28, .82); border: 1px solid rgba(255, 255, 255, .07); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pl-row:hover, .pl-row.open { border-color: rgba(255, 210, 122, .5); }
.pl-head .hs { display: none; }
.pl-row .pl-place-4 { font-size: 17px; } /* v37: места от 1000 — помещаются в колонку */
.pl-head { background: transparent; border: 0; cursor: default; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pl-place { font-family: var(--serif); font-size: 22px; color: #f6e7c4; text-align: center; }
.pl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pl-glory { font-weight: 700; color: #ffd76a; font-variant-numeric: tabular-nums; }
.pl-opp { color: var(--muted); font-variant-numeric: tabular-nums; } .pl-has-links { margin-left: 6px; color: #b58cff; font-size: 11px; }
.pl-races { display: flex; gap: 8px; flex-wrap: wrap; } .pl-race { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.pl-race img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; } .pl-race.big img { width: 36px; height: 36px; }
.pl-race.big { padding: 4px 8px 4px 4px; border-radius: 8px; background: rgba(255, 255, 255, .05); } .pl-race small { display: block; color: var(--muted); }
.pl-modal { position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 10, .7); display: grid; place-items: center; padding: 20px; }
.pl-card { position: relative; width: min(860px, 100%); max-height: 90vh; overflow: auto; padding: 22px 24px; }
.pl-card h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 30px; } .pl-card h3 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #c9a14a; }
.pl-close { position: absolute; right: 12px; top: 10px; background: none; border: 0; color: inherit; font-size: 26px; cursor: pointer; }
.pl-links { display: flex; gap: 8px; margin-top: 8px; } .pl-link { padding: 4px 10px; border-radius: 6px; font-size: 13px; color: #fff; text-decoration: none; }
.pl-link.twitch { background: #6441a5; } .pl-link.youtube { background: #c4302b; }
.pl-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.pl-stats div { padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); } .pl-stats small { display: block; font-size: 11px; color: var(--muted); }
.pl-byrace, .pl-ach { display: flex; flex-wrap: wrap; gap: 8px; } .pl-ach span { padding: 3px 8px; border-radius: 6px; background: rgba(255, 215, 106, .1); font-size: 13px; }
.pl-hist { display: flex; flex-direction: column; gap: 4px; } .pl-h { display: grid; grid-template-columns: 100px 1fr auto; gap: 10px; font-size: 13px; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .03); }
.pl-h.win b { color: #8fe08a; } .pl-h.loss b { color: #ff8a7a; } .pl-h small { color: var(--muted); }
@media (max-width: 760px) { .pl-row { grid-template-columns: 44px minmax(0, 1fr) 44px 40px; gap: 6px; } .pl-row .pl-place { font-size: 20px; } .pl-row .pl-place-4 { font-size: 15px; } .pl-row .pl-opp, .pl-row .pl-races, .pl-head span:nth-child(4), .pl-head span:nth-child(6) { display: none; } .pl-name small { display: none; } .pl-row .pl-wr { text-align: right; font-size: 13px; } .pl-row .pl-glory { text-align: right; } .pl-head .hl { display: none; } .pl-head .hs { display: inline; } .pl-head span:nth-child(5) { text-align: right; } /* v37: на телефоне — винрейт у всех, включая ботов; модель бота прячем, чтобы не резала строку */ .pl-h { grid-template-columns: 80px 1fr; } .pl-h small { display: none; } }
/* v21: стримеры и видео на «Контенте» */
.ct-card.stream.grey { filter: grayscale(1); opacity: .72; } .ct-card.stream.grey:hover { filter: grayscale(.4); opacity: 1; }
.ct-card.stream .ct-thumb { background: #10161f; } .ct-avatar { position: absolute; left: 10px; bottom: -18px; width: 52px; height: 52px; border-radius: 50%; border: 3px solid #0e141c; object-fit: cover; background: #222; }
.ct-card.stream .ct-meta { padding-top: 22px; } .ct-state { font-size: 11px; } .ct-card.stream.on .ct-state { color: #8fe08a; }
.ct-card.video .ct-thumb img.ct-frame { position: absolute; right: 8px; bottom: 8px; width: 40%; height: auto; border-radius: 6px; border: 2px solid rgba(255, 255, 255, .85); opacity: 0; transition: opacity .15s; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.ct-card.video:hover .ct-thumb img.ct-frame { opacity: 1; } .ct-card.video .ct-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: rgba(255,255,255,.85); text-shadow: 0 2px 12px #000; pointer-events: none; }

/* v22: винрейт, число игр на расе, рейтинг ботов */
.pl-wr { font-variant-numeric: tabular-nums; color: #cfe6c4; }
.pl-race small { font-size: 11px; opacity: .7; margin-left: 2px; }
.pl-bots { margin-top: 28px; } .pl-bots h2 { margin: 0 0 4px; } .pl-bots > p { margin: 0 0 10px; }
.bot-row { cursor: default; }
/* v22: видео при наведении — встроенный плеер поверх обложки (клики проходят к ссылке) */
.ct-card.video .ct-thumb iframe.ct-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: #000; }
.ct-card.video.playing .ct-play { opacity: 0; }

/* v25: смена пароля в кабинете */
.pf-pass { margin-top: 14px; } .pf-pass summary { cursor: pointer; font-weight: 600; }
.pf-pass-form { display: grid; gap: 8px; max-width: 420px; margin-top: 8px; }
.pf-pass-form input { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(214,177,92,.4); background: rgba(0,0,0,.35); color: inherit; font: inherit; }

/* ===== v26 (ТЗ 15.10, п.5.2–5.8): страница «Турниры» — таверна, список слева, турнир справа ===== */
.hub-root[data-page="tournaments"] { width: 100%; max-width: none; padding: 0; }
#screen-hub:has(.hub-root[data-page="tournaments"]) { padding-bottom: 0; }
.tp { position: relative; display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 18px; min-height: calc(100vh - 64px); padding: 18px clamp(12px, 2vw, 28px) 24px; isolation: isolate; }
.tp-bg { position: fixed; inset: 0; z-index: -1; background: url('/assets/tournaments/tavern.webp') center 35% / cover no-repeat; }
.tp-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,6,4,.78) 0, rgba(8,6,4,.35) 340px, rgba(8,6,4,0) 60%); }
.tp-list h1 { margin: 6px 0 14px; font-family: var(--serif); font-size: clamp(32px, 3.4vw, 46px); color: #f6e7c4; text-shadow: 0 3px 18px #000; }
.tp-cats { display: grid; gap: 10px; }
.tp-cat { padding: 10px; border-radius: 12px; background: rgba(14,11,8,.82); border: 1px solid rgba(214,177,92,.25); backdrop-filter: blur(3px); }
.tp-cat h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.02rem; font-weight: 500; color: #e9d9b4; }
.tp-cat.playing { border-color: rgba(120, 220, 140, .45); }
.tp-none { margin: 2px 0; font-size: .84rem; color: #9c9384; }
.tp-item { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; padding: 8px; margin-top: 6px; border-radius: 9px; border: 1px solid rgba(214,177,92,.18); background: rgba(40,30,20,.55); color: #efe4cc; text-decoration: none; transition: border-color .2s, background .2s; }
.tp-item:hover { border-color: rgba(214,177,92,.6); }
.tp-item.on { border-color: #d8b36a; background: rgba(120, 88, 30, .55); box-shadow: 0 0 0 1px #d8b36a, 0 0 18px -4px #d8b36a; }
.tp-item .tp-ico { grid-row: span 3; font-style: normal; font-size: 1.35rem; display: grid; place-items: center; }
.tp-item b { font-size: .95rem; } .tp-item .tp-meta { font-size: .78rem; color: #cbb98f; } .tp-item small { font-size: .75rem; color: #a99d86; }
.tp-cat.finished .tp-item { opacity: .75; }
.tp-main { display: grid; gap: 12px; align-content: start; max-width: 1100px; }
.tp-main:not(.on) { visibility: hidden; }
.tp-card { padding: 12px 14px; border-radius: 12px; background: rgba(14,11,8,.86); border: 1px solid rgba(214,177,92,.28); color: #efe4cc; backdrop-filter: blur(3px); }
.tp-card h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 1.12rem; color: #f2e2bd; }
.tp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .tp-head h2, .tp-head h3 { margin: 0; } .tp-head > :last-child:not(h2):not(h3):not(.tp-status) { margin-left: auto; }
.tp-info h2 { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); color: #f6e7c4; font-weight: 500; }
.tp-status { padding: 2px 10px; border-radius: 99px; font-size: .78rem; background: rgba(255,255,255,.08); }
.tp-status.running { background: rgba(70, 180, 95, .22); color: #8be3a0; } .tp-status.finished { color: #b7ad9a; } .tp-status.closing { background: rgba(230, 160, 60, .2); color: #f2c27a; }
.tp-desc { margin: 8px 0 4px; color: #d8ccb2; } .tp-line { margin: 4px 0; font-size: .88rem; color: #cdbf9f; }
.tp-acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tp-part-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 108px; overflow: auto; }
.tp-chip { padding: 3px 10px; border-radius: 7px; background: rgba(214,177,92,.12); border: 1px solid rgba(214,177,92,.25); font-size: .84rem; }
.tp-team { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(214,177,92,.2); }
.tp-team b { margin-right: 4px; color: #f2d58c; font-size: .86rem; }
.tp-zoom { display: flex; align-items: center; gap: 4px; } .tp-zoom span { min-width: 44px; text-align: center; font-size: .82rem; color: #cbbd9c; }
.tp-bview { position: relative; height: 330px; margin-top: 8px; overflow: hidden; border-radius: 10px; background: rgba(0,0,0,.25); cursor: grab; touch-action: none; }
.tp-bview.drag { cursor: grabbing; }
.tp-bcanvas { position: absolute; left: 12px; top: 8px; display: flex; gap: 46px; transform-origin: 0 0; }
.tp-round h4 { margin: 0 0 8px; text-align: center; font-weight: 500; font-size: .84rem; color: #cbbd9c; }
.tp-round-list { display: flex; flex-direction: column; gap: calc(16px + var(--gap)); padding-top: calc(var(--gap) / 2); }
.tp-match { position: relative; width: 196px; border-radius: 8px; background: rgba(28,22,16,.95); border: 1px solid rgba(214,177,92,.3); }
.tp-match::after { content: ''; position: absolute; right: -46px; top: 50%; width: 46px; border-top: 1px solid rgba(214,177,92,.45); }
.tp-round:last-child .tp-match::after { display: none; }
.tp-match.live { border-color: #5fcf7b; box-shadow: 0 0 12px -3px #5fcf7b; } .tp-match.edit { cursor: pointer; } .tp-match.edit:hover { border-color: #d8b36a; } .tp-match.bye { opacity: .55; }
.tp-side { display: flex; justify-content: space-between; gap: 6px; padding: 5px 9px; font-size: .86rem; } .tp-side + .tp-side { border-top: 1px solid rgba(255,255,255,.07); }
.tp-side.won { color: #ffe39a; font-weight: 600; } .tp-side.lost { color: #8f8677; } .tp-score { min-width: 18px; text-align: right; }
.tp-match small { display: block; padding: 0 9px 4px; font-size: .72rem; } .tp-live { color: #6fe08a; } .tp-wait { color: #b5a98f; }
.tp-my { display: flex; align-items: center; gap: 12px; } .tp-my .tp-ico { font-style: normal; font-size: 1.4rem; } .tp-my-text { font-family: var(--serif); font-size: 1.08rem; }
.tp-my-btn { margin-left: auto; min-width: 170px; font-family: var(--serif); letter-spacing: .06em; font-size: 1.05rem; }
.tp-chats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tp-chat { display: flex; flex-direction: column; min-height: 210px; }
.tp-msgs { flex: 1; max-height: 170px; min-height: 90px; overflow: auto; font-size: .86rem; }
.tp-msg { margin: 3px 0; line-height: 1.35; } .tp-msg time { margin-right: 6px; color: #8f8677; font-size: .78rem; } .tp-msg b { color: #9fc5ff; font-weight: 600; } .tp-msg.staff b { color: #f2c27a; }
.tp-send { display: flex; gap: 6px; margin-top: 8px; } .tp-send input { flex: 1; min-height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(214,177,92,.35); background: rgba(0,0,0,.35); color: inherit; font: inherit; }
.tp-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; } .tp-note { color: #a99d86; font-size: .76rem; }
.tp-log p { margin: 4px 0; font-size: .82rem; color: #cdbf9f; } .tp-log summary { cursor: pointer; color: #e9d9b4; }
.tp-err { color: #f07878; }
.tp-dialog { max-width: 440px; padding: 18px; border-radius: 12px; border: 1px solid #d8b36a; background: #17110c; color: #efe4cc; }
.tp-dialog::backdrop { background: rgba(0,0,0,.6); } .tp-dialog form { display: grid; gap: 10px; } .tp-dialog h3 { margin: 0; font-family: var(--serif); font-weight: 500; }
.tp-dialog select, .tp-dialog input { min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid rgba(214,177,92,.4); background: #0e0a07; color: inherit; font: inherit; }
.tp-scorerow { display: flex; align-items: center; gap: 8px; } .tp-num { width: 64px; } .tp-warn { margin: 0; color: #f2c27a; font-size: .86rem; }
@media (max-width: 900px) { .tp { grid-template-columns: 1fr; } .tp-chats { grid-template-columns: 1fr; } .tp-bg::after { background: rgba(8,6,4,.55); } }

/* ===== v27 (Правка 15.10 ч.2, п.14.1): сетки трёх форматов — разделы, таблица швейцарской, весь экран ===== */
.tp-sections { display: flex; flex-direction: column; gap: 26px; }
.tp-cols { display: flex; gap: 46px; align-items: flex-start; }
.tp-cols.nolines .tp-match::after { display: none; }
.tp-sec-title { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 1.05rem; color: #f2d58c; }
.tp-match { width: auto; min-width: 210px; }
.tp-side .tp-name { white-space: nowrap; }
.tp-match.empty { opacity: .35; } .tp-match.bye .tp-side.won { color: #cbbd9c; }
.tp-swap { margin-left: 4px; padding: 0 5px; border: 1px solid rgba(214,177,92,.4); border-radius: 5px; background: transparent; color: #e7c773; cursor: pointer; font-size: .8rem; line-height: 1.3; }
.tp-swap.on { background: #d8b36a; color: #1b1208; }
.tp-stand { border-collapse: collapse; min-width: 520px; font-size: .9rem; }
.tp-stand th, .tp-stand td { padding: 5px 10px; border-bottom: 1px solid rgba(214,177,92,.18); text-align: left; white-space: nowrap; }
.tp-stand th { color: #cbbd9c; font-weight: 500; } .tp-stand tbody tr:first-child td { color: #ffe39a; font-weight: 600; }
.tp-champ { margin: 6px 0 0; font-family: var(--serif); font-size: 1.15rem; color: #ffe39a; }
.tp-bracket:fullscreen, .tp-bracket.tp-full { position: fixed; inset: 0; z-index: 50; margin: 0; border-radius: 0; display: flex; flex-direction: column; background: #120d09; }
.tp-bracket:fullscreen .tp-bview, .tp-bracket.tp-full .tp-bview { flex: 1; height: auto; }
.tp-bracket:fullscreen .tp-side, .tp-bracket.tp-full .tp-side { font-size: 1.02rem; padding: 7px 11px; }

/* v27 п.16: админ-кнопки в профиле игрока */
.pl-admin { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(214,177,92,.45); background: rgba(214,177,92,.06); }
.pl-admin h3 { margin: 0 0 8px; } .pl-prot { margin-left: 6px; font-size: .78rem; color: #8fe3b0; }
.pl-adm-roles { display: flex; flex-wrap: wrap; gap: 6px; } .pl-adm-link { display: flex; flex-wrap: wrap; align-items: end; gap: 6px; margin-top: 8px; }
.pl-adm-link label { display: grid; gap: 2px; font-size: .8rem; color: #cbbd9c; } .pl-adm-link input { min-width: 260px; min-height: 32px; padding: 0 8px; border-radius: 7px; border: 1px solid rgba(214,177,92,.4); background: rgba(0,0,0,.35); color: inherit; font: inherit; }
.pl-adm-msg { min-height: 1.2em; margin: 8px 0 0; font-size: .85rem; color: #8fe3b0; } .pl-adm-msg.bad { color: #f2a07a; }

/* ---- v28 (ТЗ Fury cup 1, п.1): расы участника — 14 значков, сыгранные под цепями */
.tp-races .tp-head { flex-wrap: wrap; gap: 8px; }
.tp-race-who { max-width: 260px; background: rgba(0,0,0,.35); color: inherit; border: 1px solid rgba(214,177,92,.35); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: .86rem; }
.tp-race-row { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; margin: 8px 0 4px; }
.tp-race { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px 3px; border-radius: 9px; border: 1px solid transparent; background: none; color: inherit; cursor: help; min-width: 0; }
.tp-race img { width: 100%; max-width: 56px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 2px rgba(214,177,92,.35); }
.tp-race span { font-size: .66rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tp-race:hover, .tp-race:focus-visible { border-color: rgba(214,177,92,.6); background: rgba(0,0,0,.25); }
.tp-race:hover img { box-shadow: 0 0 0 2px rgba(240,200,110,.95); }
.tp-race.played img { box-shadow: 0 0 0 2px rgba(120,200,120,.7); }
.tp-hint { margin: 6px 0 0; font-size: .86rem; opacity: .85; }
.tp-race.used img { filter: grayscale(.9) brightness(.5); }
.tp-race.used span { opacity: .6; text-decoration: line-through; }
.tp-race.used::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); width: min(100%, 60px); top: 2px; aspect-ratio: 1; background: url(/assets/ui/race-chains.svg) center / contain no-repeat; pointer-events: none; }
@media (max-width: 900px) { .tp-race-row { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.tp-chip.bot { border-style: dashed; }
.tp-mraces { display: flex; gap: 3px; margin-top: 3px; }
.tp-mraces img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.tp-botrun { margin-top: 4px; width: 100%; }
.tp-race-pick { display: grid; gap: 6px; }
.tp-check { display: flex; gap: 6px; align-items: center; font-size: .84rem; }
.tp-replace { margin-left: 2px; }
@media (max-width: 600px) { .tp-race span { font-size: .56rem; } }
.tp-side.draw .tp-name { color: #e8c46a; }

/* v29: наказания в профиле игрока */
.pl-adm-sanct { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(214,177,92,.2); }
.pl-adm-sanct h4 { margin: 0 0 6px; font-size: .92rem; color: #e8c46a; letter-spacing: .04em; text-transform: uppercase; }
.pl-sanct-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 5px 8px; margin: 4px 0; border-radius: 7px; background: rgba(216,68,47,.12); border: 1px solid rgba(216,68,47,.35); font-size: .86rem; }
.pl-sanct-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 8px 0; font-size: .86rem; }
.pl-sanct-form label { display: flex; flex-direction: column; gap: 3px; }
.pl-sanct-form select, .pl-sanct-form input:not([type]) { background: rgba(0,0,0,.35); color: inherit; border: 1px solid rgba(214,177,92,.3); border-radius: 7px; padding: 5px 8px; font: inherit; min-width: 170px; }
.sx-scopes { display: flex; flex-wrap: wrap; gap: 4px 12px; width: 100%; }
.sx-scopes[hidden] { display: none; }
.sx-scope { flex-direction: row !important; align-items: center; gap: 5px !important; }
.pl-sanct-hist summary { cursor: pointer; font-size: .86rem; }
.pl-sanct-form label:has(.sx-reason) { flex: 1 1 260px; }
.pl-sanct-form .sx-reason { width: 100%; box-sizing: border-box; }

/* v33 (24.5): таблица использованных рас */
.tp-race-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; } .tp-race-table th, .tp-race-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; } .tp-race-table th { color: var(--muted, #9aa7a3); font-weight: 500; }
.tp-hall-btn { margin: 0 0 10px; } .tp-hall-row { display: grid; gap: 2px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.08); color: inherit; text-decoration: none; } .tp-hall-row:hover { background: rgba(255,255,255,.04); } .tp-hall-row small { opacity: .7; }
.tp-content-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); } .tp-content-row small { opacity: .7; }
.tp-content-row a { color: #e7c77f; }
.tp-replays { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; } .tp-replay { font-size: 12px; color: #e7c77f; text-decoration: none; border: 1px solid rgba(231,199,127,.45); border-radius: 5px; padding: 1px 6px; } .tp-replay:hover { background: rgba(231,199,127,.12); }

/* v39: удалённый аккаунт в карточке (видит администрация) */
.pl-deleted{margin:.5rem 0;padding:.6rem .75rem;border:1px solid #a8483b;border-radius:8px;background:rgba(168,72,59,.14);line-height:1.45}.pl-deleted .btn{margin-top:.4rem}

/* ===== Эволюция (17.11): деревья улучшений фракции и карточка формы ===== */
.et-intro{margin:34px 0 8px}.et-intro p{max-width:860px;color:#d9ccb2;line-height:1.6}
.et-sec{margin:22px 0 30px;padding:18px 18px 14px;border-radius:18px;border:1px solid rgba(201,147,96,.28);background:linear-gradient(170deg,rgba(29,42,62,.55),rgba(12,16,24,.75))}
.et-h{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px;font-family:var(--serif);font-size:1.35rem;color:#f6e7c4}
.et-h small{font-family:inherit;font-size:.8rem;color:var(--muted);font-weight:400}
.et-root{width:44px;height:44px;border-radius:50%;overflow:hidden;border:2px solid #c99360;box-shadow:0 0 0 3px #0e1520}
.et-root img{width:100%;height:100%;display:block}
.evo-tree{overflow-x:auto;padding:4px 2px 10px;scrollbar-width:thin;outline:none}
.evo-tree ul{list-style:none;margin:0;padding:0 0 0 26px;position:relative;display:flex;flex-direction:column;justify-content:center}
.evo-tree>ul{padding-left:0;width:max-content}
.evo-tree li{position:relative;display:flex;align-items:center;padding:4px 0 4px 26px}
.evo-tree>ul>li{padding-left:0}
.evo-tree ul ul::before{content:"";position:absolute;left:0;top:50%;width:26px;border-top:2px solid rgba(201,147,96,.55)}
.evo-tree ul ul>li::before{content:"";position:absolute;left:0;top:50%;width:26px;border-top:2px solid rgba(201,147,96,.55)}
.evo-tree ul ul>li::after{content:"";position:absolute;left:0;top:0;bottom:0;border-left:2px solid rgba(201,147,96,.55)}
.evo-tree ul ul>li:first-child::after{top:50%}.evo-tree ul ul>li:last-child::after{bottom:50%}
.evo-tree ul ul>li:only-child::after{display:none}
.et-node{display:flex;align-items:center;gap:8px;width:186px;padding:5px 8px 5px 5px;border-radius:999px;text-decoration:none;color:var(--text);
 background:linear-gradient(170deg,#1d2a3e,#111a27);border:1px solid rgba(201,147,96,.45);box-shadow:0 4px 12px rgba(0,0,0,.35);transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
.et-node:hover,.et-node:focus-visible{transform:translateY(-2px);border-color:#ecc38f;box-shadow:0 8px 20px rgba(0,0,0,.5),0 0 14px -4px #e0a96b}
.et-node.air{border-color:rgba(143,209,106,.55)}
.et-node.off{opacity:.45;filter:grayscale(.6)}
.et-med{flex:0 0 40px;width:40px;height:40px;border-radius:50%;overflow:hidden;border:2px solid #c99360;background:#0e1520}
.et-med img{width:100%;height:100%;display:block}
.et-txt{min-width:0;display:grid;grid-template-columns:1fr auto;column-gap:6px;line-height:1.15}
.et-txt b{font-size:.84rem;color:#f3e1c2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.et-cost{font-weight:700;font-size:.8rem;color:#ffd27a}
.et-txt small{grid-column:1/-1;font-size:.72rem;color:var(--muted);white-space:nowrap}
.um-off{margin:0;color:#e59a8c;font-size:.9rem}
.um-tree{display:grid;gap:8px}
.um-tree>div{display:flex;flex-wrap:wrap;gap:8px}
.um-chip{display:inline-flex;align-items:center;gap:8px;padding:4px 12px 4px 4px;border-radius:999px;border:1px solid rgba(201,147,96,.45);background:rgba(0,0,0,.3);color:var(--text);text-decoration:none;font-size:.86rem}
.um-chip:hover{border-color:#ecc38f}
.um-chip.off{opacity:.5}
.um-chip img{width:32px;height:32px;border-radius:50%;border:1px solid #c99360}
.um-chip em{font-style:normal;font-weight:700;color:#ffd27a;margin-left:6px}
@media (max-width:600px){.et-sec{padding:12px 10px}.et-node{width:160px}}
.et-sec,.et-intro{min-width:0;max-width:100%;contain:inline-size}.evo-tree{max-width:100%}

/* 17.11: имена в узлах — до двух строк, без обрезки; глубокое дерево листается вбок с подсказкой */
.et-node{width:170px;border-radius:22px;align-items:center}
.et-txt b{white-space:normal;overflow:visible;text-overflow:clip;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.12}
.evo-tree ul{padding-left:22px}.evo-tree>ul{padding-left:0}.evo-tree li{padding-left:22px}.evo-tree>ul>li{padding-left:0}
.evo-tree ul ul::before,.evo-tree ul ul>li::before{width:22px}
.evo-tree.scroll{-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
.evo-tree.scroll.end{-webkit-mask-image:none;mask-image:none}
.et-more{display:none;font-size:.78rem;color:var(--muted);margin:-4px 0 6px}.et-sec.has-scroll .et-more{display:block}
/* портрет героя на странице фракции — мягкие края, без жёсткого квадрата */
.race-hero-art{-webkit-mask-image:radial-gradient(ellipse 70% 75% at 60% 45%,#000 55%,transparent 100%);mask-image:radial-gradient(ellipse 70% 75% at 60% 45%,#000 55%,transparent 100%);object-fit:contain;object-position:right center}
.et-node{width:158px}.evo-tree ul,.evo-tree li{padding-left:20px}.evo-tree>ul,.evo-tree>ul>li{padding-left:0}.evo-tree ul ul::before,.evo-tree ul ul>li::before{width:20px}
.evo-tree ul,.evo-tree li{padding-left:14px}.evo-tree>ul,.evo-tree>ul>li{padding-left:0}.evo-tree ul ul::before,.evo-tree ul ul>li::before{width:14px}
.et-txt{display:flex;flex-direction:column;gap:2px}.et-txt small{white-space:nowrap}.et-txt .et-cost{margin-right:3px}
.race-hero-art{width:auto;aspect-ratio:1/1;right:4%;object-fit:cover;-webkit-mask-image:radial-gradient(circle at 50% 46%,#000 42%,transparent 71%);mask-image:radial-gradient(circle at 50% 46%,#000 42%,transparent 71%)}
@media (max-width:860px){.race-hero-art{width:100%;right:0;opacity:.45}}
.et-node{width:162px;padding-right:6px}.et-txt small{font-size:.68rem;letter-spacing:-.01em}.et-txt b{font-size:.8rem}
.et-txt b{-webkit-line-clamp:3}
.et-txt b{-webkit-hyphens:auto;hyphens:auto}.et-txt small{white-space:normal}
/* 17.11: матрица 33×15 не должна раздвигать страницу гайда */
.guide-body,.g-sec{min-width:0}.matrix-wrap{max-width:100%;overflow-x:auto}
@media (max-width:900px){.guide-layout{grid-template-columns:minmax(0,1fr)}}.guide-layout>*{min-width:0}
@media (max-width:600px){.g-table.mine-table{display:block;overflow-x:auto;max-width:100%}}
.tier-card .tier-badge{color:#1b1206;font-weight:700}.g-sec a:not(.btn){color:#ecc38f}
/* 17.11: витрина фракций пирамидой — 3 сверху, 4 снизу (8 колонок, плитка = 2) */
@media (min-width:980px){.race-grid{grid-template-columns:repeat(8,minmax(0,1fr));max-width:1240px;margin:0 auto}.race-grid>.race-tile{grid-column:span 2}.race-grid>.race-tile:first-child{grid-column:2/span 2}}
@media (min-width:620px) and (max-width:979px){.race-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.race-grid>.race-tile{grid-column:span 2}.race-grid>.race-tile:nth-child(n+4){grid-column:span 3}.race-grid>.race-tile:nth-child(n+4){aspect-ratio:4/3}}
.race-tile>img{object-position:50% 20%}
@media (min-width:620px) and (max-width:979px){.race-grid>.race-tile:nth-child(n+4)>img{object-position:50% 6%}}
