/* Единая система оформления: тёмная и светлая тема, одна оболочка, один набор кнопок, панелей и полей.
   Грузится последним и переопределяет вид (цвета, углы, рамки, шрифт). Раскладка страниц остаётся в home/cabinet/matches/pages/league.css.
   Шрифт один везде — Inter (подключён в theme.css). */

/* ---------- Токены ---------- */
:root {
  --surface: #0b211b; --surface-2: #0e2a22; --surface-3: #15382d; --line-strong: #7dbe9b52;
  --home-text: #f4f7f5; --home-muted: #a9bab4; --home-line: #7dbe9b2e;
  --home-green: #35d653; --home-green-hover: #52f16a; --home-defense: #2fa84a;
  --btn: #1f9a3a; --btn-hover: #27b047;
  --hdr-bg: transparent; --hdr-line: #7dbe9b2e; --hdr-text: #dbe7e1; --hdr-strong: #fff; --hdr-hover: #35d6531a; --hdr-active: #35d65329; --hdr-accent: #35d653; --hdr-muted: #a9bab4;
  --menu-bg: #071c16; --menu-line: #7dbe9b38;
  --amber-text: #f5c451; --gold: #f5c451; --err-text: #ff9a92; --err-bg: #3d2420; --warn-bg: #3a331c;
  --crest-bg: #eef3ee;
  --page-bg: #04110f; --ov1: #02100d00; --ov2: #02100d40;
  --shell-glass: #071c16e6; --shell-edge: #7dbe9b38; --shell-shadow: 0 40px 100px #000b, inset 0 1px 0 #ffffff0d;
  --panel: #0f2a22b3; --panel-hover: #15382dcc; --field: #061a14;
  --btn-grad: linear-gradient(180deg, #2fb84c, #1c8f37); --btn-grad-hover: linear-gradient(180deg, #3ccb59, #23a640);
  --btn-edge: #52f16a59; --btn-glow: 0 6px 18px #35d65333;
  --radius: 16px; --radius-sm: 12px; --radius-lg: 28px;
}
html[data-theme=light] {
  --surface: #ffffff; --surface-2: #f3f9f5; --surface-3: #e2f0e8; --line-strong: #b3cdbb;
  --home-text: #0d1f17; --home-muted: #4d6558; --home-line: #d2e3d8;
  --home-green: #12873a; --home-green-hover: #0b6f2d; --home-defense: #1f9a45;
  --btn: #1d9d3f; --btn-hover: #17852f;
  --hdr-bg: transparent; --hdr-line: #d2e3d8; --hdr-text: #254034; --hdr-strong: #0d1f17; --hdr-hover: #12873a14; --hdr-active: #12873a1f; --hdr-accent: #12873a; --hdr-muted: #58705f;
  --menu-bg: #ffffff; --menu-line: #d2e3d8;
  --amber-text: #8a5a00; --gold: #b07a00; --err-text: #b3261e; --err-bg: #fdecea; --warn-bg: #fff4d6;
  --crest-bg: #f4f8f5;
  --page-bg: #7fb2e0; --ov1: #ffffff00; --ov2: #ffffff00;
  --shell-glass: #ffffffeb; --shell-edge: #ffffff; --shell-shadow: 0 30px 80px #0f3a2438, 0 0 0 1px #12873a1c;
  --panel: #ffffff; --panel-hover: #f3f9f5; --field: #ffffff;
  --btn-grad: linear-gradient(180deg, #2bb04b, #168a33); --btn-grad-hover: linear-gradient(180deg, #33c155, #1a9c3a);
  --btn-edge: #0e6d2a66; --btn-glow: 0 6px 16px #12873a30;
}

/* ---------- Фон страницы ---------- */
body:not(.home-page):not(.auth-stage-page)::before { background: linear-gradient(var(--ov1), var(--ov2)), url('/design/bg-stadium.webp') center bottom / cover no-repeat, var(--page-bg); }
html[data-theme=light] body:not(.home-page):not(.auth-stage-page)::before { background: linear-gradient(#ffffff00, #ffffff1a), url('/design/bg-stadium-light.webp') center bottom / cover no-repeat, var(--page-bg); }
@media (max-width: 700px) {
  body:not(.home-page):not(.auth-stage-page)::before { background: linear-gradient(var(--ov1), var(--ov2)), url('/design/bg-stadium.webp') 14% bottom / cover no-repeat, var(--page-bg); }
  html[data-theme=light] body:not(.home-page):not(.auth-stage-page)::before { background: url('/design/bg-stadium-light.webp') 14% bottom / cover no-repeat, var(--page-bg); }
}

/* ---------- Оболочка и шапка ---------- */
.home-shell { max-width: 1240px; background: var(--shell-glass); border: 1px solid var(--shell-edge); border-radius: var(--radius-lg); box-shadow: var(--shell-shadow); -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); }
.home-header { background: transparent; border-bottom: 1px solid var(--hdr-line); }
.home-footer { background: transparent; border-top: 1px solid var(--hdr-line); }
.home-brand { font-size: 30px; font-weight: 800; letter-spacing: -.5px; color: var(--hdr-strong); }
.home-brand b { color: var(--hdr-accent); }
.home-header nav a:not(.home-login) { border: 1px solid transparent; font-weight: 500; }
.home-header nav a[aria-current=page] { background: var(--hdr-active); border-color: color-mix(in srgb, var(--hdr-accent) 38%, transparent); color: var(--hdr-strong); }
.league-clock-time { color: var(--hdr-accent); font-weight: 600; }
.hdr-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.hdr-gear { display: grid; place-items: center; width: 40px; height: 40px; color: var(--hdr-muted); border-radius: 50%; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform .4s var(--ease); }
.hdr-gear:hover { color: var(--hdr-strong); background: var(--hdr-hover); transform: rotate(45deg); }
.hdr-gear svg { width: 22px; height: 22px; }
@media (min-width: 1101px) {
  .home-header { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .home-header nav { justify-self: center; }
  .hdr-tools { grid-column: 3; padding-left: 14px; }
  .hdr-gear { position: relative; margin-left: 4px; }
  .hdr-gear::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; border-left: 1px solid var(--hdr-line); }
}
@media (max-width: 1100px) { .hdr-tools { grid-column: 2; grid-row: 1; } }
@media (max-width: 600px) { .hdr-tools { display: none; } }
@media (prefers-reduced-motion: reduce) { .hdr-gear:hover { transform: none; } }
body .cab-navigation { background: color-mix(in srgb, var(--menu-bg) 96%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body .cab-navigation a { color: var(--hdr-text); }
body .cab-navigation a[aria-current=page] { color: var(--home-green); border-color: var(--home-green); }

/* ---------- Кнопки ---------- */
body :is(.home-login, .home-cta, .cab-action), body .cabinet-main :is(input[type=submit], button):not(.cab-sec):not(.match-secondary):not(.settings-option):not(.sector):not(.dropdown-button):not(#rand-scheme):not(.file-pick-btn):not(.sheet-x):not(.seg button) {
  background: var(--btn-grad); border: 1px solid var(--btn-edge); color: #fff; font-weight: 600; box-shadow: var(--btn-glow);
}
body :is(.home-login, .home-cta, .cab-action):hover, body .cabinet-main :is(input[type=submit], button):not(.cab-sec):not(.match-secondary):not(.settings-option):not(.sector):not(.dropdown-button):not(#rand-scheme):not(.file-pick-btn):not(.sheet-x):not(.seg button):not(:disabled):hover { background: var(--btn-grad-hover); }
body .cabinet-main :is(input[type=submit], button):disabled { background: var(--surface-3); border-color: var(--home-line); color: var(--home-muted); box-shadow: none; cursor: not-allowed; }
body .cabinet-main :is(input.cab-sec, input.match-secondary, button#rand-scheme, .cab-auth-copy input[type=button], .cl-card input[type=button]), body .matches-main :is(a.match-secondary, .score-actions a:last-child) { background: transparent; border: 1px solid var(--line-strong); color: var(--home-text); box-shadow: none; font-weight: 500; }
body .cabinet-main :is(input.cab-sec, input.match-secondary, button#rand-scheme, .cab-auth-copy input[type=button], .cl-card input[type=button]):hover, body .matches-main :is(a.match-secondary, .score-actions a:last-child):hover { background: var(--surface-3); border-color: var(--home-green); }

/* ---------- Типографика ---------- */
.cabinet-page { font-size: 17px; line-height: 1.55; }
body .cabinet-main h1, body .page-content h1, body .matches-intro h1 { font-size: clamp(30px, 3.2vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--home-text); }
body .cabinet-main h1 { margin: 0 0 14px; }
body .cabinet-main h2, body .page-content :is(h2, h3), .match-panel-heading h2 { font-weight: 700; letter-spacing: -.02em; }
body .cabinet-main h2, .match-panel-heading h2 { font-size: 22px; }
.matches-intro p, .cab-intro p, .about-lead { font-size: 17px; color: var(--home-muted); }
.page-content { font-size: 17px; line-height: 1.65; }
.match-request p, .matches-main .match-empty, .cab-empty, .cup-status p { font-size: 17px; }
.page-content h1 { font-weight: 800; }

/* ---------- Отступы страниц ---------- */
.cab-workspace, .page-main, .matches-workspace { padding: 26px 32px 34px; }
.page-main { background: transparent; }
@media (max-width: 800px) { .cab-workspace, .page-main, .matches-workspace { padding: 22px 20px 28px; } }
@media (max-width: 600px) { .cab-workspace, .page-main, .matches-workspace { padding: 18px 16px 24px; } }

/* ---------- Панели ---------- */
body :is(.cab-club, #man, .match-panel, .cup-status, .premium-panel, .club-search, .cl-card, .cab-profile, .match-result, .request-club, .match-request, .page-reading .page-content, .about-end, .about-cards > div, .page-side, .match-empty, .cup-cards li, #table .list a, .vip-opt, .premium-notice, #cab #match table, #cab #match, .matches-main #time) { background: var(--panel); border: 1px solid var(--home-line); border-top-width: 1px; border-radius: var(--radius); box-shadow: none; }
html[data-theme=light] body :is(.cab-club, #man, .match-panel, .premium-panel, .club-search, .cl-card, .page-reading .page-content, .match-request, #table .list a, .cup-cards li, .about-cards > div) { box-shadow: 0 2px 10px #0f3a2410; }
body .match-panel { border-top: 1px solid var(--home-line); padding: 0 var(--match-inset, 22px) var(--match-inset, 22px); }
body .match-panel .match-request, body .match-panel .match-empty { background: var(--surface-2); }
body #cab #match { background: none; border: 0; }
body .cab-club { border: 1px solid var(--home-line); }
body .matches-main .match-empty { border-style: dashed; }
body :is(#table .list a, .cup-cards li, .vip-opt):hover { background: var(--panel-hover); border-color: var(--home-green); }
body .page-side { overflow: hidden; }
.about-example { background: var(--panel); border-left-color: var(--gold); }
.about-section h2 { border-left: 0; padding-left: 0; }

/* ---------- Клубы: без газонного баннера ---------- */
body .clubs-intro { display: block; margin: 0 0 18px; padding: 0; border: 0; background: none; color: var(--home-text); }
body .clubs-intro > div { padding: 0; }
body .clubs-intro h1 { margin: 0 0 6px; font-size: clamp(30px, 3.2vw, 42px); }
body .clubs-intro .club-breadcrumbs, body .clubs-intro .club-breadcrumbs a { color: var(--home-muted); }
body .clubs-intro .clubs-goal { display: none; }
body .club-search { padding: 18px 20px 20px; }

/* ---------- Поля, списки ---------- */
body .cabinet-main :is(input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], textarea, select), body .cabinet-main button.dropdown-button { background: var(--field); border: 1px solid var(--line-strong); color: var(--home-text); font-size: 16px; min-height: 48px; }
body .cabinet-main :is(input, textarea, select):focus, body .cabinet-main button.dropdown-button:focus-visible { border-color: var(--home-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-green) 28%, transparent); outline: none; }
body .page-content .dropdown-list { background: var(--menu-bg); border-color: var(--line-strong); }
body .cabinet-main input[type=file]::file-selector-button, .file-pick-btn { background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--home-text); }
body table:not(#cabinet) th { background: var(--surface-2); color: var(--home-muted); }

/* ---------- Настройки, окна ---------- */
body .cabinet-main button.settings-option { background: var(--panel); border: 2px solid var(--home-line); border-radius: var(--radius); box-shadow: none; color: var(--home-text); font-weight: 600; }
body .cabinet-main button.settings-option:hover { background: var(--panel-hover); border-color: var(--home-green); }
body .cabinet-main button.settings-option[aria-checked=true] { border-color: var(--home-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-green) 24%, transparent); }
.settings-swatch.dark { background: linear-gradient(#071c16 28%, #0f2a22 28%); }
.settings-swatch.light { background: linear-gradient(#ffffff 28%, #e2f0e8 28%); }
.sheet { background: var(--surface); border-color: var(--home-line); }
.seg { background: var(--surface-2); }
.seg button[aria-checked=true] { background: var(--btn-grad); }
.sheet-link { background: var(--surface-2); }

/* ---------- Телефон: оболочка на весь экран ---------- */
@media (max-width: 600px) {
  .home-shell { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .home-header { border-radius: 0; }
}
body #man .cab-action, body #man .cab-sec, body #man input[type=button] { margin-top: 8px; }

/* ---------- Карточки кубков: кликабельна вся карточка ---------- */
.cup-cards li { position: relative; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
body .cup-cards a { background: none; border: 0; box-shadow: none; transform: none; }
.cup-cards a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cup-cards li[data-own] { border-color: var(--home-green); }
.cup-cards a { min-height: 0 !important; }


/* ---------- Баннер кубка: без плашки у кнопки ---------- */
body .cup-hero .cup-status { background: none; border: 0; box-shadow: none; padding: 0; }

/* ---------- Последние матчи: ровные колонки ---------- */
body #cab #match table { grid-template-columns: 128px 72px minmax(0, 1fr) 92px minmax(0, 1fr) 72px 128px; column-gap: 12px; padding: 10px 16px; }
body #cab #match td:has(> .gate-view) { justify-self: center; text-align: center; white-space: normal; }
body #cab #match .gate-nums { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; color: var(--home-muted); }
body #cab #match tr:nth-child(2) > td:nth-child(2) { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
body #cab #match tr:nth-child(1) > td:nth-child(2) { font-size: 11px; }
body #cab #match img { width: 64px; height: 64px; object-fit: contain; justify-self: center; }
@media (max-width: 700px) {
  body #cab #match table { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr) max-content; column-gap: 6px; padding: 8px 8px; }
  body #cab #match tr:nth-child(2) > td:nth-child(2) { overflow: visible; text-overflow: clip; padding: 0 4px; }
  body #cab #match tr:nth-child(2) > td:nth-child(1) { justify-self: end; }
  body #cab #match tr:nth-child(2) > td:nth-child(3) { justify-self: start; }
  body #cab #match tr:nth-child(2) > td:nth-child(2) { font-size: 22px; }
  body #cab #match img { width: 46px; height: 46px; }
  body #cab #match .gate-nums { font-size: 10px; }
}
@media (max-width: 360px) { body #cab #match table { grid-template-columns: 78px minmax(0, 1fr) 58px minmax(0, 1fr) 78px; } body #cab #match img { width: 40px; height: 40px; } }

/* ---------- Заявочный лист: гербы без плашки, подсказка у стрелки ---------- */
body .cup-list .cup-club img:not(.vip-star) { padding: 0; background: none; border-radius: 0; }
.cup-go { position: relative; }
.cup-bio { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 20; display: grid; gap: 2px; width: max-content; max-width: 260px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--menu-bg); color: var(--home-text); box-shadow: 0 14px 34px #0006; font-size: 14px; line-height: 1.35; text-align: left; opacity: 0; visibility: hidden; transform: translateY(4px); pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur); }
.cup-bio b { display: flex; align-items: center; font-size: 15px; }
.cup-bio span { color: var(--home-muted); }
.cup-go:hover .cup-bio, .cup-go:focus-visible .cup-bio { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: none) { .cup-bio { display: none; } }

/* Гербы на прозрачном фоне: в тёмной теме тонкая светлая кромка, чтобы тёмные эмблемы не терялись */
html:not([data-theme=light]) img[src*="/images/game/"]:not(.flag):not(.dropdown-icon):not([src*="/user-"]) { filter: none; }
html[data-theme=light] img[src*="/images/game/"]:not(.flag):not(.dropdown-icon):not([src*="/user-"]) { filter: none; }

/* Ряды матчей: имена и счёт в одной строке, подпись под ними на всю ширину */
body #cab #match tr:nth-child(1) > td:nth-child(1) { grid-area: 1 / 3 / 2 / 4; text-align: left; }
body #cab #match tr:nth-child(1) > td:nth-child(3) { grid-area: 1 / 5 / 2 / 6; text-align: right; }
body #cab #match tr:nth-child(2) > td:nth-child(2) { grid-area: 1 / 4 / 2 / 5; }
body #cab #match tr:nth-child(1) > td:nth-child(2) { grid-area: 2 / 3 / 3 / 6; justify-self: center; width: auto; max-width: 100%; overflow: visible; white-space: normal; font-size: 12px; text-align: center; color: var(--home-muted); }
body #cab #match tr:nth-child(1) > td:nth-child(2) br { display: inline; }
body .gate-nums i { display: block; font-style: normal; white-space: nowrap; }
@media (max-width: 700px) {
  body #cab #match tr:nth-child(1) > td:nth-child(2) { display: none; }
}

body .cup-hero section.cup-status { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
body .cup-hero .cup-note { margin: 10px 0 0; }

/* ---------- Шапка при прокрутке непрозрачная ---------- */
body .home-header { background: color-mix(in srgb, var(--menu-bg) 98%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
@media (max-width: 600px) { body .home-header { border-radius: 0; } }

/* ---------- Кубки и аватар: прозрачные картинки ---------- */
img[src*="/images/trophy/"] { object-fit: contain; background: none !important; box-shadow: none !important; filter: drop-shadow(0 4px 8px #0000004d); }
.trophy-grid li.trophy-gold img { filter: drop-shadow(0 0 12px var(--gold)) saturate(1.15); }

/* Кубки в ленте тем и в заголовках крупнее, без обрезки */
body .theme-tabs a { grid-template-columns: 64px minmax(0, 1fr); }
body .theme-tabs img { width: 64px; height: 84px; border-radius: 0; object-fit: contain; }
body .trophy-grid img { width: 72px; height: 90px; object-fit: contain; }
@media (max-width: 700px) { body .theme-tabs img { width: 52px; height: 68px; } body .theme-tabs a { grid-template-columns: 52px minmax(0, 1fr); } }

/* =====================================================================
   Стартовые экраны (главная, вход, регистрация, восстановление)
   ===================================================================== */
html body.home-page::before, html body.auth-stage-page::before { background: linear-gradient(90deg, #02100d00 42%, #02100d8c 100%), url('/design/stage-bg-v2.webp') 28% center / cover no-repeat, var(--page-bg); }
@media (max-width: 700px) {
  html body.home-page::before, html body.auth-stage-page::before { background: linear-gradient(#02100d00 30%, #02100db3 78%), url('/design/stage-bg-m-v2.webp') center top / cover no-repeat, var(--page-bg); }
}
body .stage-window { max-width: 448px; padding: 30px 32px 22px; border-radius: var(--radius-lg); background: var(--shell-glass); border: 1px solid var(--shell-edge); box-shadow: 0 40px 100px #000a, inset 0 1px 0 #ffffff14; -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); }
body .stage-field { display: none; }
body .stage-brand { gap: 14px; margin: 0 0 20px; font-size: 36px; font-weight: 800; letter-spacing: -.02em; }
body .stage-brand img { width: 60px; }
body .stage-window h2, body .stage-window .cab-intro h1 { margin: 0 0 12px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
body .stage-window .cab-intro p { font-size: 15px; }
body .stage-window label { margin: 12px 0 6px; font-size: 14px; font-weight: 600; color: var(--home-muted); }
body .stage-window :is(input[type=email], input[type=password], input[type=text]) { min-height: 50px; background: var(--field); border: 1px solid var(--line-strong); color: var(--home-text); font-size: 16px; }
body .stage-window :is(input[type=email], input[type=password], input[type=text]):focus { border-color: var(--home-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-green) 28%, transparent); outline: none; }
body .stage-window input[type=submit] { min-height: 52px; margin-top: 18px; background: var(--btn-grad); border: 1px solid var(--btn-edge); box-shadow: var(--btn-glow); font-size: 17px; }
body .stage-window input[type=submit]:hover { background: var(--btn-grad-hover); }
body .stage-forgot { margin-top: 10px; padding: 8px 0; font-size: 15px; color: var(--home-green); }
body .stage-window hr { margin: 12px 0; border-top-color: var(--home-line); }
body .stage-register { min-height: 50px; margin-top: 4px; background: transparent; border: 1px solid var(--line-strong); color: var(--home-text); font-weight: 600; }
body .stage-register:hover { background: var(--surface-3); border-color: var(--home-green); }
body .stage-window .cab-auth-link { margin-top: 14px; font-size: 15px; }
body .stage-window .crest-strip { margin: 20px -32px 0; }
body .stage-window .crest-track { gap: 18px; padding: 6px 0; }
body .stage-window .crest-track img { width: 56px; height: 56px; padding: 0; background: none; border-radius: 0; box-shadow: none; object-fit: contain; }
body .stage-links { margin-top: 10px; font-size: 14px; gap: 4px 14px; }
body .stage-links a { color: var(--home-muted); }
body .stage-links a:hover { color: var(--home-text); }
@media (max-width: 760px) {
  body .stage-window { padding: 20px 18px 12px; border-radius: 22px; }
  body .stage-brand { font-size: 28px; margin-bottom: 8px; }
  body .stage-brand img { width: 44px; }
  body .stage-window .crest-strip { margin: 12px -18px 0; }
  body .stage-window .crest-track img { width: 44px; height: 44px; }
}
body .stage-window.stage-open { max-width: 860px; }
body .stage-back { background: transparent; border-color: var(--line-strong); color: var(--home-text); }
body .stage-back:hover { background: var(--surface-3); }

/* =====================================================================
   Страницы-документы: Об игре, Правила, Регламент, FAQ, Платное, Новости, Контакты
   ===================================================================== */
body .page-main { background: transparent; }
body .page-reading .page-content { padding: 30px 34px 34px; }
body :is(.page-content, .stage-doc-body) > h1 { margin: 0 0 12px; font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.03em; text-align: left; }
body :is(.page-content, .stage-doc-body) h2 { margin: 30px 0 12px; padding: 0; border: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
body :is(.page-content, .stage-doc-body) h3 { margin: 0 0 6px; color: var(--home-text); font-size: 17px; font-weight: 700; }
body :is(.page-content, .stage-doc-body) p { max-width: 70ch; color: var(--home-text); }
body :is(.page-content, .stage-doc-body) .doc-lead { margin: 0 0 22px; color: var(--home-muted); font-size: 19px; line-height: 1.5; }
body :is(.page-content, .stage-doc-body) .doc-steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
body :is(.page-content, .stage-doc-body) .doc-steps li { counter-increment: step; position: relative; margin: 0; padding: 18px 18px 18px 18px; border: 1px solid var(--home-line); border-radius: var(--radius); background: var(--panel); }
body :is(.page-content, .stage-doc-body) .doc-steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 50%; background: var(--btn-grad); color: #fff; font-weight: 700; font-size: 15px; }
.doc-steps p, .doc-grid p, .doc-note p { margin: 0; color: var(--home-muted) !important; font-size: 15px; line-height: 1.5; }
.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.doc-grid > div { padding: 16px 18px; border: 1px solid var(--home-line); border-radius: var(--radius); background: var(--panel); }
.doc-note { margin: 0 0 16px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--gold) 9%, transparent); }
.doc-note h3 { margin: 0 0 2px; color: var(--gold); font-size: 15px; }
.doc-note p { color: var(--home-text) !important; }
body :is(.page-content, .stage-doc-body) .doc-list { margin: 0 0 16px; padding: 0; list-style: none; }
body :is(.page-content, .stage-doc-body) .doc-list li { position: relative; margin: 0; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--home-line); }
body :is(.page-content, .stage-doc-body) .doc-list li::before { content: ""; position: absolute; left: 4px; top: 1.1em; width: 8px; height: 8px; border-radius: 50%; background: var(--home-green); }
.doc-facts { margin: 0 0 16px; }
.doc-facts > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--home-line); }
.doc-facts dt { font-weight: 700; }
.doc-facts dd { margin: 0; color: var(--home-muted); }
.faq-list { display: grid; gap: 8px; margin: 0 0 18px; }
.faq-item { border: 1px solid var(--home-line); border-radius: var(--radius-sm); background: var(--panel); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; width: 9px; height: 9px; border: solid var(--home-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform var(--dur) var(--ease); }
.faq-item[open] { border-color: var(--line-strong); }
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--home-muted); }
@media (max-width: 800px) { body :is(.page-content, .stage-doc-body) :is(.doc-steps, .doc-grid) { grid-template-columns: minmax(0, 1fr); } .doc-facts > div { grid-template-columns: minmax(0, 1fr); } body .page-reading .page-content { padding: 20px 16px 24px; } }
@media (min-width: 801px) and (max-width: 1100px) { .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body .stage-doc-body { font-size: 16px; }
body .stage-doc-body :is(.doc-steps, .doc-grid) { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- Боковая колонка разделов ---------- */
body .page-side { background: var(--panel); }
body .page-side-body { padding: 18px; }
body .page-side-body .cab-eyebrow { display: none; }
body .page-side-body nav { margin: 0 0 16px; }
body .page-side-body nav a { padding: 10px 12px; border: 0; border-radius: var(--radius-sm); color: var(--home-text); font-size: 15px; }
body .page-side-body nav a:hover { background: var(--surface-3); }
body .page-side-body nav a[aria-current=page] { background: var(--hdr-active); color: var(--home-green); font-weight: 600; }

/* ---------- Контакты ---------- */
body .page-content #cabinet { max-width: 560px; margin: 8px 0 0; }
body .page-content #cabinet :is(tbody, tr, td) { display: block; width: 100%; padding: 0; border: 0; }
body .page-content #cabinet tr { margin-bottom: 16px; }
body .page-content #cabinet label { display: block; margin: 0 0 6px; color: var(--home-muted); font-size: 14px; font-weight: 600; }
body .page-content #cabinet :is(input[type=text], input[type=email], textarea) { width: 100%; box-sizing: border-box; padding: 12px 14px; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--home-text); font: inherit; font-size: 16px; }
body .page-content #cabinet :is(input, textarea):focus { border-color: var(--home-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-green) 28%, transparent); outline: none; }
body .page-content #cabinet textarea { min-height: 150px; resize: vertical; }
body .page-content #cabinet td.center { text-align: left; }
body.home-page .home-shell, body.auth-stage-page .home-shell { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border: 0; }

body :is(.page-content, .stage-doc-body) .doc-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { body :is(.page-content, .stage-doc-body) .doc-grid.two { grid-template-columns: minmax(0, 1fr); } }
body .doc-facts dt { overflow-wrap: anywhere; }

/* =====================================================================
   Правки 13.10: золотая табличка VIP, схемы, «Всё про тему», силуэты кубков, шестерёнка
   ===================================================================== */
body .cab-vip { display: flex; align-items: center; margin: 6px 0 0; color: var(--home-text); font-size: 15px; }
body #man h2 { display: flex; align-items: center; flex-wrap: wrap; }

/* Атака и защита под схемой: метка цветом сектора, цифры ровно */
body .gate-nums { display: grid; gap: 3px; margin-top: 8px; font-size: 13px; line-height: 1.2; font-variant-numeric: tabular-nums; }
body .gate-nums i { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-style: normal; color: var(--home-text); font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
body .gate-nums b { font-size: .86em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
body .gate-nums .gn-atk b { color: var(--home-green); }
body .gate-nums .gn-def b { color: #ff6600; }
body .gate-big + .gate-nums { font-size: 15px; }

/* Сыграно сегодня: компактные окна */
body .match-results { gap: 8px; }
body .match-results .match-result { padding: 14px 16px; gap: 6px 12px; }
body .match-results .match-result img { width: 56px; height: 56px; }
body .match-results .match-result tr:nth-child(2) > td:nth-child(2) { font-size: 30px; }
body .match-results .match-result tr:first-child > td:not(:nth-child(2)) { font-size: 16px; }
body .match-results .match-result caption { font-size: 14px; }
body .match-results .gate-view { --cell: 22px; }
body .match-results .match-result .scheme { margin: 0; }

/* «Всё про тему» кнопкой */
body .match-panel-heading > span > a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--home-text); font-size: 15px; font-weight: 500; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
body .match-panel-heading > span > a:hover { background: var(--surface-3); border-color: var(--home-green); }

/* Силуэты кубков у темы: серые, собранные в цвете */
body .theme-tabs a { position: relative; }
.theme-bag { position: absolute; left: 50%; top: calc(100% + 8px); z-index: 25; display: flex; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--menu-bg); box-shadow: 0 16px 36px #0006; transform: translate(-50%, -4px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur); }
.theme-bag img { width: 40px !important; height: 52px !important; object-fit: contain; grid-row: auto !important; filter: brightness(0) opacity(.28) !important; }
.theme-bag img.on { filter: drop-shadow(0 2px 6px #0006) !important; }
body .theme-tabs a:hover .theme-bag, body .theme-tabs a:focus-visible .theme-bag { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
html[data-theme=light] .theme-bag img:not(.on) { filter: brightness(0) opacity(.2) !important; }
@media (hover: none) { .theme-bag { display: none; } }

/* Шестерёнка: поворачивается только значок, разделитель на месте */
body .hdr-gear { overflow: visible; }
body .hdr-gear:hover { transform: none; background: var(--hdr-hover); }
body .hdr-gear svg { transition: transform .4s var(--ease); }
body .hdr-gear:hover svg { transform: rotate(60deg); }
@media (min-width: 1101px) { body .hdr-gear::before { left: -14px; top: 6px; bottom: 6px; } }
@media (prefers-reduced-motion: reduce) { body .hdr-gear svg { transition: none; } body .hdr-gear:hover svg { transform: none; } }

/* Сыграно сегодня на ПК: слева и справа схемы, в центре гербы со счётом, под ними имена и время */
@media (min-width: 1500px) {
  body :where(.matches-main) .match-results .match-result { grid-template-columns: 156px minmax(0, 1fr) auto minmax(0, 1fr) 156px; align-items: center; gap: 2px 8px; padding: 12px 14px; }
  body :where(.matches-main) .match-results .match-result tr:nth-child(2) > td:first-child { grid-area: 1 / 2 / 2 / 3; justify-self: end; }
  body :where(.matches-main) .match-results .match-result tr:nth-child(2) > td:nth-child(2) { grid-area: 1 / 3 / 2 / 4; font-size: 28px; padding: 0 4px; }
  body :where(.matches-main) .match-results .match-result tr:nth-child(2) > td:last-child { grid-area: 1 / 4 / 2 / 5; justify-self: start; }
  body :where(.matches-main) .match-results .match-result tr:first-child > td:first-child { grid-area: 2 / 2 / 3 / 3; text-align: right; align-self: start; }
  body :where(.matches-main) .match-results .match-result tr:first-child > td:last-child { grid-area: 2 / 4 / 3 / 5; text-align: left; align-self: start; }
  body :where(.matches-main) .match-results .match-result tr:last-child > td:first-child { grid-area: 1 / 1 / 4 / 2; align-self: center; }
  body :where(.matches-main) .match-results .match-result tr:last-child > td:last-child { grid-area: 1 / 5 / 4 / 6; align-self: center; }
  body :where(.matches-main) .match-results .match-result caption { grid-area: 3 / 2 / 4 / 5; align-self: start; text-align: center; font-size: 13px; color: var(--home-muted); }
  body :where(.matches-main) .match-results .match-result tr:first-child > td:not(:nth-child(2)) { font-size: 15px; }
  body :where(.matches-main) .match-results .match-result img { width: 52px; height: 52px; }
  body :where(.matches-main) .match-results .match-result .gate-nums { font-size: 12px; }
  body :where(.matches-main) .match-results .match-result .gate-nums i { flex-wrap: wrap; white-space: normal; }
}
.theme-bag { width: max-content; flex-wrap: wrap; justify-content: center; }
.bag-create { flex-basis: 100%; white-space: nowrap; margin-top: 2px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: 600 12px/1.2 inherit; font-style: normal; text-align: center; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); opacity: .7; }
.bag-go { cursor: pointer; white-space: normal; text-transform: none; letter-spacing: 0; font-size: 14px; padding: 10px 12px; }
.bag-go { transition: filter var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease); }
.bag-create.on.bag-go { color: #fff; }
.bag-go:hover { color: #fff; filter: brightness(1.12); box-shadow: 0 0 22px #6fcf4e99; }
.theme-bag:has(.bag-go)::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; }
body .theme-tabs a:hover .theme-bag:has(.bag-go), body .theme-tabs a:focus-visible .theme-bag:has(.bag-go) { pointer-events: auto; }
.bag-create.on { border-color: var(--home-green); background: var(--home-green); color: #0b1a0b; opacity: 1; box-shadow: 0 0 14px #6fcf4e66; }
.theme-bag img { filter: brightness(0) invert(1) opacity(.16) !important; }
.theme-bag img.on { filter: drop-shadow(0 2px 6px #0006) !important; }
html[data-theme=light] .theme-bag img:not(.on) { filter: brightness(0) opacity(.16) !important; }

/* --- Matches lobby: right panel runs down to the footer; played-today cards --- */
.matches-main { display: flex; flex-direction: column; }
.matches-workspace:has(.match-lobby) { flex: 1; display: flex; flex-direction: column; padding-bottom: 0; }
.matches-workspace:has(.match-lobby) .match-lobby { flex: 1; align-items: stretch; }
body .match-lobby .match-panel { padding-bottom: var(--match-inset, 22px); border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
body .match-lobby .match-panel:last-child { align-content: start; }
@media (min-width: 1500px) {
  body :where(.matches-main) .match-results .match-result { grid-template-columns: 136px minmax(0, 1fr) auto minmax(0, 1fr) 136px; gap: 2px 6px; padding: 18px 12px 16px; }
  body :where(.matches-main) .match-results .match-result tr:first-child > td:not(:nth-child(2)) { overflow-wrap: normal; hyphens: none; }
  body :where(.matches-main) .match-results .match-result img { width: 84px; height: 84px; }
  body :where(.matches-main) .match-results .match-result tr:nth-child(2) > td:first-child,
  body :where(.matches-main) .match-results .match-result tr:nth-child(2) > td:last-child { align-self: end; padding-top: 14px; }
  body :where(.matches-main) .match-results .match-result tr:nth-child(2) > td:nth-child(2) { font-size: 44px; font-weight: 600; padding: 14px 6px 0; align-self: end; }
  body :where(.matches-main) .match-results .match-result tr:first-child > td:not(:nth-child(2)) { font-size: 15px; font-weight: 700; }
  body :where(.matches-main) .match-results .match-result caption { font-size: 16px; font-weight: 700; letter-spacing: .08em; color: var(--home-green); font-variant-numeric: tabular-nums; }
}
@media (max-width: 700px) {
  body .match-results .match-result caption { font-weight: 700; color: var(--home-green); }
}

/* --- Tournaments: theme sections and cup cards --- */
body .theme-section { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--surface-2), var(--surface) 55%); }
body .theme-section::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--home-green), transparent 70%); }
.theme-section .match-panel-heading h2 { gap: 14px; font-size: 26px; }
.theme-section .match-panel-heading img { width: 40px; height: 46px; object-fit: contain; border-radius: 0; filter: drop-shadow(0 3px 8px #0008); }
.theme-line { font-size: 16px; }
body .cup-cards { gap: 14px; }
body .cup-cards li { gap: 10px; padding: 16px 18px 18px; border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); border-color: var(--line-strong); box-shadow: 0 6px 18px #0003; }
body .cup-cards li:hover { box-shadow: 0 12px 26px #0005; }
body .cup-cards a { align-items: center; gap: 12px; font-size: 18px; font-weight: 700; line-height: 1.25; }
body .cup-cards a time { padding: 3px 10px; border-radius: 999px; background: #6fcf4e22; border: 1px solid #6fcf4e55; color: var(--home-green-hover); font-size: 16px; font-weight: 700; }
body .cup-stake { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
body .cup-stake b { padding: 2px 10px; border-radius: 999px; background: #ffc04420; border: 1px solid #ffc04455; }
body .cup-cards small { color: var(--home-muted); font-size: 14px; }
.cup-bar { display: block; height: 5px; margin-top: 2px; border-radius: 3px; background: #ffffff18; overflow: hidden; }
.cup-bar::after { content: ""; display: block; width: var(--p); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--home-green), var(--home-green-hover)); }
html[data-theme=light] body .cup-cards li { background: linear-gradient(180deg, #fff, var(--surface-2)); }
html[data-theme=light] .cup-bar { background: #0001; }

/* --- Cabinet: club card and profile card --- */
body .cab-club { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 26px; padding: 26px 32px; text-align: left; background: linear-gradient(135deg, var(--surface-2), var(--surface) 70%); position: relative; overflow: hidden; }
body .cab-club > img { position: relative; width: 112px; height: 112px; margin: 0; filter: none; }
body .cab-club > div { display: block; flex: 1 1 auto; position: relative; }
body .cab-club .cab-club-eyebrow { display: block; margin: 0 0 4px; color: var(--home-green); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
body .cab-club > div > h2 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
body .cab-club .cab-rating { margin-top: 10px; }
body #man .cab-awards { grid-column: 1 / -1; margin: 0 0 16px; text-align: left; }
body #man .cab-awards h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--home-green); }
body #man .cab-awards ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
body #man .cab-awards li { position: relative; display: flex; align-items: flex-end; gap: 2px; padding: 6px 8px; border-radius: 10px; background: #ffffff0d; }
body #man .cab-awards li img { display: block; width: 40px; height: auto; }
body #man .cab-awards li b { font-size: 14px; }
body #man .cab-awards .cab-awards-empty { margin: 0 0 8px; color: var(--home-muted); font-size: 14px; }
body #man .cab-awards a { color: var(--home-green-hover); font-size: 14px; font-weight: 600; }
body form.trophy-real { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0 0; }
body form.trophy-real p { margin: 0; flex: 1 1 160px; }
body form.trophy-real input[type=submit]:disabled { opacity: .4; cursor: not-allowed; }
body dialog.win-banner { width: min(92vw, 560px); padding: 40px 40px 34px; border: 2px solid var(--home-green); border-radius: 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--text, inherit); text-align: center; box-shadow: 0 0 0 6px #6fcf4e22, 0 24px 60px #000a; }
body dialog.win-banner::backdrop { background: #000b; }
body dialog.win-banner img { display: block; margin: 0 auto 12px; width: 120px; height: auto; filter: drop-shadow(0 8px 22px #6fcf4e66); }
body dialog.win-banner h2 { margin: 0 0 6px; font-size: clamp(24px, 6vw, 32px); line-height: 1.15; }
body dialog.win-banner .win-cup { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
body dialog.win-banner .win-prize { margin: 0 0 4px; color: var(--home-muted); }
body dialog.win-banner .win-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 24px 0 0; }
body dialog.win-banner .win-actions .cab-action { min-width: 260px; }
body dialog.win-banner .win-actions button.match-secondary { min-width: 200px; min-height: 44px; padding: 8px 22px; border: 1px solid var(--home-green); border-radius: var(--radius-sm); background: #143a1c; color: #fff; font-size: 16px; font-weight: 600; box-shadow: none; }
body dialog.win-banner .win-actions button.match-secondary:hover { background: #1b4d26; }
body .cab-club .cab-penalty { margin: 10px 0 0; color: var(--home-muted); font-size: 15px; }
body .cab-club .cab-penalty b { color: inherit; font-weight: 600; letter-spacing: .04em; }
body .cab-club .cab-penalty a { margin-left: 8px; white-space: nowrap; color: var(--home-green-hover); font-weight: 600; }
@media (max-width: 600px) { body .cab-club { gap: 16px; padding: 18px 16px; } body .cab-club > img { width: 80px; height: 80px; } }

body #man { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
body #man .cab-avatar { padding: 3px; border-radius: 50%; border: 2px solid var(--home-green); box-shadow: 0 0 0 4px #6fcf4e22, 0 8px 22px #0006; }
body #man .cab-resources { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin: 16px 0; }
body #man .cab-resources > div { margin: 0; min-width: 0; padding: 10px 8px 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
body #man .cab-resources > div:last-child { grid-column: 1 / -1; }
body #man .cab-resources dt { font-size: 11px; white-space: nowrap; }
body #man .cab-resources dd { margin: 2px 0 0; font-size: 24px; font-weight: 600; }
body #man .cab-anketa { display: block; width: 100%; box-sizing: border-box; background: transparent; }
body #man .cab-sec { box-sizing: border-box; }
body .cup-cards a span { color: var(--home-text); }

/* Played today: crests and score larger, time green (base and narrow layout) */
body .match-results .match-result img { width: 80px; height: 80px; }
body .match-results .match-result tr:nth-child(2) > td:first-child, body .match-results .match-result tr:nth-child(2) > td:last-child { padding-top: 10px; }
body .match-results .match-result tr:nth-child(2) > td:nth-child(2) { font-size: 44px; font-weight: 600; padding-top: 10px; }
body .match-results .match-result tr:first-child > td:not(:nth-child(2)) { font-size: 17px; }
body .match-results .match-result caption { font-size: 16px; font-weight: 700; letter-spacing: .08em; color: var(--home-green); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { body .match-results .match-result img { width: 64px; height: 64px; } body .match-results .match-result tr:nth-child(2) > td:nth-child(2) { font-size: 36px; } }

/* Profile avatar: larger, centered; theme bag opaque; result buttons; VIP glow everywhere */
body #man .cab-avatar { display: block; width: 128px; height: 128px; margin: 4px auto 18px; object-fit: cover; }
body #man { text-align: left; }
.theme-bag { background: var(--surface-2); backdrop-filter: none; }
html[data-theme=light] .theme-bag { background: #fff; }
body .matches-main .score-actions :is(input[type=submit], a) { box-sizing: border-box; min-height: 52px; padding: 12px 26px; border-radius: var(--radius-sm); font-size: 18px; font-weight: 600; transform: none; }
body .matches-main .score-actions input[type=submit] { background: var(--btn-grad); border: 1px solid var(--btn-edge); color: #fff; box-shadow: var(--btn-glow); }
body .matches-main .score-actions input[type=submit]:hover { background: var(--btn-grad-hover); }
body .matches-main .score-actions a:first-child { background: var(--btn-grad); border-color: var(--btn-edge); color: #fff; }

/* Played today: crest and name in one centered cell; result page: name under the crest */
body .match-results .match-result tr:first-child > td { display: none; }
body .match-results .match-result tr:nth-child(2) > td:is(:first-child, :last-child) { display: flex; flex-direction: column; align-items: center; justify-self: center; align-self: start; gap: 8px; padding-top: 0; text-align: center; }
body .match-results .match-result .mr-name { max-width: 100%; font-size: 16px; font-weight: 800; line-height: 1.2; overflow-wrap: normal; hyphens: none; }
body .match-results .match-result img { flex: none; object-fit: contain; }
.matches-main #score tr:nth-child(2) > td { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.matches-main #score h3 { margin: 0; font-weight: 800; text-align: center; }

/* Text pages: hero, stats, contents chips, tables, gate example */
.doc-hero { position: relative; margin: 0 0 28px; padding: 28px 28px 24px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: radial-gradient(120% 150% at 0% 0%, #6fcf4e26, transparent 55%), linear-gradient(160deg, var(--surface-3), var(--surface-2)); }
.doc-hero h1 { margin: 0 0 10px; }
.doc-hero .doc-lead { margin: 0; max-width: 62ch; }
.doc-eyebrow { margin: 0 0 8px; color: var(--home-green); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.doc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 22px; }
.doc-stats > div { padding: 12px 14px; border: 1px solid var(--home-line); border-radius: var(--radius-sm); background: #0000002e; }
.doc-stats b { display: block; color: var(--home-green-hover); font-size: 26px; font-weight: 800; line-height: 1.1; }
.doc-stats span { color: var(--home-muted); font-size: 13px; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
body .page-content .doc-toc a { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--home-text); font-size: 14px; font-weight: 600; text-decoration: none; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
body .page-content .doc-toc a:hover { border-color: var(--home-green); background: var(--surface-3); }
body .page-content h2[id] { scroll-margin-top: calc(var(--sticky, 70px) + 16px); margin: 36px 0 14px; padding-left: 14px; border-left: 4px solid var(--home-green); line-height: 1.2; }
.doc-table { width: 100%; margin: 0 0 16px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--home-line); border-radius: var(--radius-sm); overflow: hidden; font-size: 15px; }
.doc-table th { padding: 10px 14px; background: var(--surface-2); color: var(--home-muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.doc-table td { padding: 12px 14px; border-top: 1px solid var(--home-line); vertical-align: top; }
.doc-table td:first-child b { color: var(--home-green-hover); }
.doc-example { display: grid; grid-template-columns: auto auto auto; justify-content: start; align-items: center; gap: 12px 22px; margin: 0 0 18px; padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--panel); }
.doc-example > p { grid-column: 1 / -1; margin: 0; color: var(--home-muted); font-size: 15px; }
.doc-cap { display: block; margin-bottom: 8px; color: var(--home-muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.doc-vs { color: var(--home-muted); font-size: 14px; }
.doc-gate { display: grid; grid-template-columns: repeat(3, 40px); gap: 4px; width: max-content; padding: 6px 6px 8px; border: 3px solid #fff; border-bottom: 0; }
.doc-gate i { display: grid; place-items: center; height: 34px; border-radius: 4px; background: var(--surface-3); color: var(--home-muted); font-size: 14px; font-style: normal; font-weight: 700; }
.doc-gate .a { background: var(--gold); color: #3a2600; }
.doc-gate .d { background: var(--home-green); color: #06210f; }
.doc-gate .g { box-shadow: 0 0 0 2px #fff, 0 0 14px #ffc044; }
@media (max-width: 700px) {
  .doc-hero { padding: 20px 18px; }
  .doc-example { grid-template-columns: minmax(0, 1fr); }
  .doc-table { display: block; overflow-x: auto; }
}

/* Страна / клуб в заголовке */
body .clubs-intro h1 .club-crumb { color: var(--home-green); font-weight: inherit; }
body .theme-tabs a:hover, body .cup-cards a:hover, body #table .list a:hover { transform: none; }
/* Наведённая плитка темы выше соседних блоков, иначе их рамка режет всплывашку */
body .theme-tabs a:hover, body .theme-tabs a:focus-visible { z-index: 30; }

/* Подвал: ссылки мелко, ниже тонкая строка с копирайтом */
body .home-footer { border-top: 0; display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-top: 36px; padding: 22px 38px 16px; font-size: 13px; }
body .home-footer nav { gap: 6px 22px; justify-content: center; }
body .home-footer nav a { padding-inline: 0; }
body .home-footer .foot-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding-top: 14px; border-top: 1px solid var(--hdr-line); font-size: 12px; opacity: .8; }
body .home-footer .foot-bar p { margin: 0; }
body .home-footer .foot-more { align-self: center; }
@media (max-width: 760px) { body .home-footer { margin-top: 24px; padding: 14px 70px 12px 14px; } body .home-footer .foot-bar { justify-content: center; text-align: center; } }
/* Телефон: backdrop-filter у оболочки делал её контейнером для position:fixed, и нижняя навигация уезжала в конец страницы */
@media (max-width: 600px) { .home-shell { -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (max-width: 600px) {
  #rand-scheme { padding: 0 6px; font-size: 15px; }
}
@media (max-width: 600px) {
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; overflow: visible; }
  .doc-table { border: 0; }
  .doc-table thead { display: none; }
  .doc-table tr { margin-bottom: 10px; padding: 10px 14px; border: 1px solid var(--home-line); border-radius: var(--radius-sm); background: var(--surface-2); }
  .page-content table.doc-table:not(#cabinet) td { padding: 2px 0; border: 0; }
  .page-content table.doc-table:not(#cabinet) td:first-child { padding-bottom: 4px; font-size: 17px; }
}

/* Match cards (lobby, cabinet archive, club page): base layout here so it works on pages without matches.css */
.match-results { display: grid; gap: 14px; }
.match-result { display: grid; width: 100%; margin: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 16px; padding: var(--match-inset, 16px); border: 1px solid var(--home-line); border-spacing: 0; border-radius: var(--radius); text-align: center; }
.match-result :is(tbody, tr) { display: contents; }
.match-result caption { grid-area: 4 / 1 / 5 / 7; margin: 0; }
.match-result td { padding: 0; min-width: 0; align-self: center; font-size: 20px; }
.match-result tr:first-child > td:nth-child(2), .match-result tr:last-child > td:nth-child(2) { display: none; }
.match-result tr:nth-child(2) > td:first-child { grid-area: 1 / 1 / 2 / 3; }
.match-result tr:nth-child(2) > td:nth-child(2) { grid-area: 1 / 3 / 2 / 5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.match-result tr:nth-child(2) > td:last-child { grid-area: 1 / 5 / 2 / 7; }
.match-result tr:last-child > td:first-child { grid-area: 3 / 1 / 4 / 3; }
.match-result tr:last-child > td:last-child { grid-area: 3 / 5 / 4 / 7; }
.match-result .scheme { align-self: start; margin: 4px 0 0; color: var(--home-muted); text-align: center; font-size: 18px; line-height: 1.5; }
.match-result .mr-type { display: block; margin-bottom: 2px; color: var(--home-muted); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }

/* Cabinet archive on a wide column: schemes on the sides, crests and score in the middle */
@container (min-width: 600px) {
  body .cab-main .match-results .match-result { grid-template-columns: 150px minmax(0, 1fr) auto minmax(0, 1fr) 150px; gap: 6px 10px; padding: 18px 16px; }
  body .cab-main .match-results .match-result tr:nth-child(2) > td:first-child { grid-area: 1 / 2 / 2 / 3; align-self: center; }
  body .cab-main .match-results .match-result tr:nth-child(2) > td:nth-child(2) { grid-area: 1 / 3 / 2 / 4; padding: 0 20px; align-self: center; }
  body .cab-main .match-results .match-result tr:nth-child(2) > td:last-child { grid-area: 1 / 4 / 2 / 5; }
  body .cab-main .match-results .match-result tr:last-child > td:first-child { grid-area: 1 / 1 / 2 / 2; align-self: center; }
  body .cab-main .match-results .match-result tr:last-child > td:last-child { grid-area: 1 / 5 / 2 / 6; align-self: center; }
  body .cab-main .match-results .match-result caption { grid-area: 2 / 1 / 3 / 6; align-self: start; }
}
/* Профиль до 900px: аватар круглый (колонка 80px сжимала его по ширине), бонус и VIP на всю ширину карточки */
@media (max-width: 900px) {
  body #man { grid-template-columns: 96px minmax(0, 1fr); }
  body #man .cab-avatar { box-sizing: border-box; width: 96px; height: 96px; margin: 0; align-self: start; }
  body #man :is(.cab-bonus, .cab-vip) { grid-column: 1 / -1; }
}

/* Cabinet archive: compact and narrower cards */
body .cab-main .match-results { max-width: 700px; gap: 10px; }
body .cab-main .match-results .match-result { grid-template-columns: 136px minmax(0, 1fr) auto minmax(0, 1fr) 136px; gap: 4px 8px; padding: 12px 14px; }
body .cab-main .match-results .match-result img { width: 60px; height: 60px; }
body .cab-main .match-results .match-result .mr-name { font-size: 14px; }
body .cab-main .match-results .match-result tr:nth-child(2) > td:nth-child(2) { font-size: 32px; padding: 0 12px; }
body .cab-main .match-results .match-result .gate-view { --cell: 17px; }
body .cab-main .match-results .match-result .gate-nums { font-size: 11px; gap: 1px; margin-top: 4px; }
body .cab-main .match-results .match-result .gate-nums i { flex-wrap: wrap; white-space: normal; }
body .cab-main .match-results .match-result caption { font-size: 13px; letter-spacing: .04em; }
body .cab-main .match-results .match-result .mr-type { font-size: 12px; }

/* No glow around crests */
img.dropdown-icon, img.flag { box-shadow: none !important; }

/* Cabinet: wider profile column, club card and matches share one 700px column */
@media (min-width: 801px) {
  body #cab { grid-template-columns: 340px minmax(0, 700px); justify-content: center; }
}

/* Cup cards: the whole card is the link and lights up on hover, no highlight on the title row */
body .cup-cards li { cursor: pointer; }
body .cup-cards li:hover, body .cup-cards li:focus-within { background: linear-gradient(180deg, var(--surface-3), var(--surface-3)); border-color: var(--home-green); box-shadow: 0 10px 24px #0005, 0 0 0 1px var(--home-green); }
body .cup-cards a, body .cup-cards a:hover, body .cup-cards a:focus-visible { background: none !important; box-shadow: none !important; transform: none !important; outline: none; }
body .cup-cards li:focus-within { outline: none; }
html[data-theme=light] body .cup-cards li:hover { background: #eef8e9; }

/* Settings sheet: compact so the whole menu fits without scrolling */
.sheet { max-height: 96vh; }
.sheet-head { padding: 12px 22px 2px; }
.sheet-head h2 { font-size: 22px; }
.sheet-x { width: 38px; height: 38px; font-size: 24px; }
.sheet-body { gap: 12px; padding: 6px 22px calc(16px + env(safe-area-inset-bottom, 0px)); }
.sheet-body h3 { margin-bottom: 5px; font-size: 12px; }
.seg button { min-height: 38px; font-size: 15px; }
.sheet-link { min-height: 44px; margin-bottom: 6px; }
.sheet-note { font-size: 13px; }

/* Whole cell lights up on hover: country and club lists, theme tiles */
body :is(#table .list a, .theme-tabs a) { transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
body :is(#table .list a, .theme-tabs a):is(:hover, :focus-visible) { background: linear-gradient(180deg, #6fcf4e26, #6fcf4e12) !important; border-color: var(--home-green) !important; box-shadow: 0 0 0 1px var(--home-green), 0 0 22px #6fcf4e55 !important; }
html[data-theme=light] body :is(#table .list a, .theme-tabs a):is(:hover, :focus-visible) { background: #eef8e9 !important; box-shadow: 0 0 0 1px var(--home-green), 0 0 18px #3fa02e44 !important; }

/* Brand: text stays put, the logo just grows a little on hover */
body .home-brand:hover, body .home-brand:active { transform: none; }
.home-brand img, .stage-brand img { transition: transform .25s ease, filter .25s ease; }
body .home-brand:hover img, body .stage-brand:hover img { transform: scale(1.08); filter: drop-shadow(0 0 10px #6fcf4ecc); }

/* Cup cards on /cups light up like the country cells */
body .cup-cards li { transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
body .cup-cards li:is(:hover, :focus-within) { background: linear-gradient(180deg, #6fcf4e26, #6fcf4e12) !important; border-color: var(--home-green) !important; box-shadow: 0 0 0 1px var(--home-green), 0 0 22px #6fcf4e55 !important; }
html[data-theme=light] body .cup-cards li:is(:hover, :focus-within) { background: #eef8e9 !important; box-shadow: 0 0 0 1px var(--home-green), 0 0 18px #3fa02e44 !important; }

/* club banner behind logo and name: dark fade on the left keeps the text readable */
body :is(.cab-club, #tabtit).has-banner { background: linear-gradient(90deg, #07140dee 0%, #07140dcc 35%, #07140d33 100%), var(--banner) center / cover no-repeat; border-radius: var(--radius); color: #fff; }
/* баннер 3:1 — блок той же пропорции, иначе cover срезает края (звёзды, мяч); не хватает места — режется тёмная левая часть */
body #tabtit.has-banner { aspect-ratio: 3 / 1; padding: 16px 22px; margin: 18px 0; gap: 16px; font-size: 30px; background-position: center, right center; }
body #tabtit.has-banner img { width: 96px; height: 96px; }
@media (max-width: 600px) { body #tabtit.has-banner { font-size: 24px; } body #tabtit.has-banner img { width: 72px; height: 72px; } }
body :is(.cab-club, #tabtit).has-banner :is(h2, span) { color: #fff; text-shadow: 0 2px 12px #000a; }
/* Чемпионаты: медали трёх степеней во всплывашке темы; не полученные полупрозрачные, третья светится (радиус тени — анимируемая переменная) */
@property --medal-glow { syntax: "<length>"; inherits: false; initial-value: 4px; }
body .theme-bag.medals img { filter: none !important; opacity: .3; }
body .theme-bag.medals img.on { opacity: 1; filter: drop-shadow(0 2px 6px #0006) !important; }
body .theme-bag.medals img.on:nth-child(3) { filter: drop-shadow(0 0 var(--medal-glow) var(--gold, #f5c542)) !important; animation: medal-glow 2.4s ease-in-out infinite; }
@keyframes medal-glow { 0%, 100% { --medal-glow: 3px; } 50% { --medal-glow: 12px; } }
@media (prefers-reduced-motion: reduce) { body .theme-bag.medals img.on:nth-child(3) { animation: none; --medal-glow: 8px; } }

/* --- Tournaments, calm pass: groups, tables, bracket, cards --- */
body .match-panel-heading > span:not(:has(a, .cup-count)) { color: var(--home-muted); font-size: 14px; }
body .cup-hero { padding: 24px 28px 14px; }
body .cup-hero .matches-intro h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em; }
body .cup-groups { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
body .cup-group { padding: 18px 20px 16px; border-radius: var(--radius-sm); border-color: var(--home-line); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
body .cup-group h3 { margin: 0 0 10px; color: var(--home-muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
body :is(.cup-group, .cup-champ) table { font-size: 15px; font-variant-numeric: tabular-nums; }
body :is(.cup-group, .cup-champ) th { padding: 6px 8px; background: none; color: var(--home-muted); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-align: center; }
body :is(.cup-group, .cup-champ) th:nth-child(2) { text-align: left; }
body :is(.cup-group, .cup-champ) td { padding: 9px 8px; border-top: 1px solid color-mix(in srgb, var(--home-line) 70%, transparent); text-align: center; }
body :is(.cup-group, .cup-champ) td:nth-child(2) { text-align: left; }
body :is(.cup-group, .cup-champ) td:first-child { width: 28px; padding-left: 4px; color: var(--home-muted); }
body :is(.cup-group, .cup-champ) td b { font-weight: 600; }
body :is(.cup-group, .cup-champ) .cup-club { gap: 10px; font-weight: 500; }
body :is(.cup-group, .cup-champ) td .cup-club img:not(.vip-star) { width: 24px; height: 24px; }
body :is(.cup-group, .cup-champ) tr.cup-qual td { background: none; }
body :is(.cup-group, .cup-champ) tr.cup-qual td:first-child { box-shadow: inset 2px 0 0 var(--home-green); color: var(--home-green-hover); }
body :is(.cup-group, .cup-champ) tr[data-own] td { background: color-mix(in srgb, var(--home-text) 6%, transparent); box-shadow: none; }
body :is(.cup-group, .cup-champ) tr[data-own] td:first-child { box-shadow: inset 2px 0 0 var(--home-green); }
body :is(.cup-group, .cup-champ) tr[data-own] .cup-club { font-weight: 600; }
body .cup-group .cup-tours { margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--home-line) 70%, transparent); font-size: 13px; line-height: 1.75; }
body .cup-tours b { margin: 0 2px; font-weight: 600; }
body .cup-bracket { grid-template-columns: repeat(var(--rounds), minmax(220px, 300px)); justify-content: start; gap: 28px; }
body .cup-round h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
body .cup-pair { border-color: var(--home-line); border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
body .cup-pair p { padding: 10px 14px; font-size: 15px; }
body .cup-pair p + p { border-top-color: color-mix(in srgb, var(--home-line) 70%, transparent); }
body .cup-pair .cup-club { gap: 10px; font-weight: 500; }
body .cup-pair .cup-win { background: color-mix(in srgb, var(--home-green) 9%, transparent); font-weight: 600; }
body .cup-pair .cup-win b { color: var(--home-green-hover); }
body .cup-pair .cup-own { font-weight: 600; }
body .cup-pair .cup-tbd { opacity: .5; }
body .cup-bracket + .cup-note { font-size: 13px; }
@media (max-width: 1000px) { body .cup-bracket { grid-template-columns: minmax(0, 360px); } }
body .cup-cards a time { border-color: transparent; background: none; padding: 0; font-weight: 600; }
body .cup-stake b { border-color: transparent; background: none; padding: 0; color: var(--home-text); font-weight: 600; }
body .cup-stake i { color: var(--home-muted); font-style: normal; }
body .cup-groups { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
@media (max-width: 520px) { body .cup-groups { grid-template-columns: minmax(0, 1fr); } body .cup-group { padding: 14px 12px; } body :is(.cup-group, .cup-champ) td, body :is(.cup-group, .cup-champ) th { padding-inline: 4px; } }
body .cup-places { max-width: 560px; }
body .cup-places li { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body .cup-places li small { margin: 0; white-space: nowrap; }
body .cup-round { justify-content: flex-start; }
body .cup-pairs { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
body .cup-round h3 { margin: 0 0 14px; color: var(--home-text); font-size: 17px; font-weight: 800; letter-spacing: .04em; }
/* Подсказка у сокращений в таблицах: полное слово при наведении, фокусе и касании */
body th[data-tip] { position: relative; cursor: help; }
body th[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 4px); z-index: 20; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-3); color: var(--home-text); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 4px); transition: opacity .15s ease, transform .15s ease; box-shadow: 0 6px 18px #0006; }
body th[data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transform: translate(-50%, 0); }
body th[data-tip]:focus-visible { outline: none; color: var(--home-text); }
/* Сетка на вылет: пары в слотах равной высоты, соединены линиями как в турнирной сетке */
body .cup-bracket { --g: 56px; --ln: color-mix(in srgb, var(--home-text) 32%, transparent); gap: 0 var(--g); }
body .cup-pairs { gap: 0; justify-content: stretch; }
body .cup-slot { position: relative; display: flex; align-items: center; flex: 1; padding: 7px 0; }
body .cup-slot .cup-pair { position: relative; width: 100%; overflow: visible; }
body .cup-pair p:first-child { border-radius: 12px 12px 0 0; }
body .cup-pair p:last-child { border-radius: 0 0 12px 12px; }
body .cup-slot::before, body .cup-slot::after, body .cup-pair::before { content: ""; position: absolute; background: var(--ln); pointer-events: none; }
body .cup-slot::after { right: calc(var(--g) / -2); top: calc(50% - 1px); width: calc(var(--g) / 2); height: 2px; }
body .cup-slot::before { right: calc(var(--g) / -2 - 1px); width: 2px; }
body .cup-slot:nth-child(odd)::before { top: 50%; bottom: 0; }
body .cup-slot:nth-child(even)::before { top: 0; bottom: 50%; }
body .cup-pair::before { left: calc(var(--g) / -2); top: calc(50% - 1px); width: calc(var(--g) / 2); height: 2px; }
body .cup-round:last-child .cup-slot::before, body .cup-round:last-child .cup-slot::after, body .cup-round:first-child .cup-pair::before { display: none; }
@media (max-width: 1000px) { body .cup-slot::before, body .cup-slot::after, body .cup-pair::before { display: none; } body .cup-slot { padding: 6px 0; } }
/* Ник менеджера рядом с клубом (призёры, группы, таблица, сетка): наведение, фокус или касание; ник — ссылка на страницу клуба. Справа от названия, чтобы не закрывать соседние строки */
body .cup-club[tabindex] { position: relative; outline: none; cursor: default; }
body .club-bio { position: absolute; left: calc(100% + 10px); top: 50%; z-index: 30; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--menu-bg); color: var(--home-text); box-shadow: 0 6px 16px #0005; font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap; opacity: 0; visibility: hidden; transform: translate(-4px, -50%); transition: opacity .15s ease .05s, transform .15s ease .05s, visibility 0s linear .2s; }
body .club-bio::before { content: ""; position: absolute; right: 100%; top: 0; bottom: 0; width: 10px; }
body .cup-club:is(:hover, :focus-within) > .club-bio { opacity: 1; visibility: visible; transform: translate(0, -50%); transition-delay: 0s; }
body .club-bio:hover { color: var(--home-green-hover); text-decoration: underline; }
body .cup-bracket { padding-top: 28px; }
@media (min-width: 701px) { body .cup-champ { overflow: visible; } }
/* Группы, спокойный вид: таблица без лишних линий, туры компактно по строкам */
body .cup-group { padding: 20px 22px 18px; }
body .cup-group h3 { margin-bottom: 8px; }
body .cup-group th { font-size: 12px; font-weight: 500; }
body .cup-group td { padding: 11px 8px; border-top-color: color-mix(in srgb, var(--home-line) 45%, transparent); font-size: 15px; }
body .cup-group tbody tr:first-child td { border-top-color: transparent; }
body .cup-group td:last-child b { font-size: 16px; }
body .cup-group .cup-club { font-size: 16px; }
body .cup-rounds { display: grid; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--home-line) 45%, transparent); }
body .cup-round-row { display: grid; grid-template-columns: 44px 1fr 1fr; align-items: center; gap: 4px 14px; }
body .cup-round-row > span { color: var(--home-muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
body .cup-round-row p { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; padding: 5px 8px; border-radius: 8px; background: color-mix(in srgb, var(--home-text) 4%, transparent); font-size: 13px; color: var(--home-text); }
body .cup-round-row p i { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
body .cup-round-row p i:first-child { text-align: right; }
body .cup-round-row p b { min-width: 34px; color: var(--home-green-hover); font-size: 14px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { body .cup-round-row { grid-template-columns: 1fr; } }
body :is(.cup-group, .cup-champ) :is(thead, thead tr, th) { background: none; }
@media (max-width: 520px) { body .cup-group { padding: 16px 10px 14px; } body .cup-group td, body .cup-group th { padding-inline: 2px; } body .cup-group .cup-club { gap: 6px; font-size: 14px; } body .cup-group td .cup-club img:not(.vip-star) { width: 20px; height: 20px; } }
/* Ободки окон турниров чуть ярче */
body .cups-workspace { --edge: color-mix(in srgb, var(--home-text) 24%, transparent); }
body .cups-workspace .match-panel, body .cups-workspace .cup-group, body .cups-workspace .cup-pair, body .cups-workspace .cup-list li, body .cups-workspace .cup-cards li, body .cups-workspace .cup-hero { border-color: var(--edge); }
body .cups-workspace .cup-pair p + p { border-top-color: var(--edge); }
/* Призёры в два столбца: места идут сверху вниз по левому, затем по правому; при одном призёре — один столбец */
body .cup-places { max-width: none; display: block; columns: 2; column-gap: 16px; }
body .cup-places li { break-inside: avoid; margin-bottom: 8px; }
body .cup-places li::before { content: attr(value); flex: none; width: 22px; color: var(--home-muted); font-size: 14px; text-align: center; }
body .cup-places li .cup-club { margin-right: auto; }
@media (max-width: 700px) { body .cup-places { columns: 1; } }
body .cup-rounds-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 0; padding-top: 0; border-top: 0; gap: 8px; }
body .cup-rounds-wide p { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; padding: 7px 10px; border-radius: 8px; background: color-mix(in srgb, var(--home-text) 4%, transparent); font-size: 14px; color: var(--home-text); }
body .cup-rounds-wide p i { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
body .cup-rounds-wide p i:first-child { text-align: right; }
body .cup-rounds-wide p b { min-width: 34px; color: var(--home-green-hover); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
/* Справа от последней колонки сетки оставлено место под подсказку с ником, чтобы она не обрезалась краем блока */
@media (min-width: 1001px) { body .cup-bracket { --g: 40px; grid-template-columns: repeat(var(--rounds), minmax(190px, 300px)) 190px; } }
/* Сетка на всю ширину блока: колонки равные, названия в одну строку с многоточием; подсказка последней колонки уходит влево, внутрь поля */
body .cup-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .cup-pair p, body .cup-pair .cup-club { min-width: 0; }
@media (min-width: 1001px) { body .cup-bracket { grid-template-columns: repeat(var(--rounds), minmax(0, 1fr)); justify-content: stretch; overflow: visible; } }
body .cup-round:last-child .club-bio { left: auto; right: calc(100% + 10px); transform: translate(4px, -50%); }
body .cup-round:last-child .club-bio::before { right: auto; left: 100%; }
body .cup-round:last-child .cup-club:is(:hover, :focus-within) > .club-bio { transform: translate(0, -50%); }

/* Архив матчей клуба: узкая колонка, строки «Атака/Защита» переносятся, а не режутся краем карточки */
#list .gate-nums i { flex-wrap: wrap; white-space: normal; text-align: center; }
#list .gate-nums { max-width: 100%; }

/* ---------- VIP-звёзды: ранг 1–3 в .vip-star-N, чем выше ранг, тем сильнее сияние ---------- */
.vip-star { width: 1.4em !important; height: 1.4em !important; margin-right: .3em; vertical-align: -.35em; }
.vip-star-2 { animation: vipGlint2 4s ease-in-out infinite; }
.vip-star-3 { animation: vipGlint3 2s ease-in-out infinite; }
@keyframes vipGlint2 { 0%, 82%, 100% { filter: none; } 91% { filter: brightness(1.22) drop-shadow(0 0 1px #fff8); } }
@keyframes vipGlint3 { 0%, 70%, 100% { filter: none; } 85% { filter: brightness(1.45) saturate(1.1) drop-shadow(0 0 2px #fffc); } }
@media (prefers-reduced-motion: reduce) { .vip-star { animation: none; } }
body .cup-club .vip-star { width: 24px !important; height: 24px !important; margin: 0; }
body .club-bio .vip-star { width: 22px !important; height: 22px !important; margin: 0 4px 0 0; }
/* çâåçäà â ïðàâîì íèæíåì óãëó àâàòàðêè */
.av { position: relative; display: block; width: max-content; flex: none; }
.av .vip-star { position: absolute; right: -6px; bottom: -6px; margin: 0; vertical-align: baseline; }
body #man .av { margin-bottom: 20px; }
body #man .av .cab-avatar { margin: 0; }
body #man .av .vip-star { width: 44px !important; height: 44px !important; }
body .pf-avatar + .vip-star { width: 50px !important; height: 50px !important; right: -7px; bottom: -7px; }
@media (max-width: 800px) { body #man .av { grid-row: 1/4; margin: 0; } }
.chat-msg .vip-star { width: 22px !important; height: 22px !important; margin-right: 3px; vertical-align: -.25em; }
.premium-balance dd .vip-star { width: 28px !important; height: 28px !important; margin: 0 6px 0 0; vertical-align: middle; }
.vip-row legend .vip-star { width: 40px !important; height: 40px !important; margin: -2px 0; }

/* ---------- Çàë òðîôååâ ---------- */
body .trophy-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
body .trophy-grid li { gap: 6px; padding: 22px 14px 16px; border-radius: var(--radius-lg, 14px); background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--amber-text) 10%, var(--surface)), var(--surface) 70%); transition: transform .15s, box-shadow .15s; }
body .trophy-grid li:hover { transform: translateY(-2px); box-shadow: 0 8px 22px #0000004d; }
body .trophy-grid img { width: 96px; height: 120px; margin-bottom: 6px; }
body .trophy-grid b { font-size: 15px; line-height: 1.3; }
body .trophy-grid small { font-size: 13px; line-height: 1.4; }
@media (max-width: 700px) { body .trophy-grid { gap: 10px; } body .trophy-grid li { padding: 16px 8px 12px; } body .trophy-grid img { width: 78px; height: 98px; } }

/* Лента тем: название крупнее, описание — во всплывашке при наведении */
body .theme-tabs b { grid-row: 1 / 4; align-self: center; font-size: 22px; line-height: 1.2; }
.theme-bag { max-width: 320px; }
.bag-text { flex-basis: 100%; width: 280px; max-width: 100%; font-size: 14px; line-height: 1.4; color: var(--home-muted); text-align: left; }

/* Manager profile (/managers/<id>) */
body .pf { display: grid; gap: 16px; }
body .pf-head { display: flex; align-items: center; gap: 24px; padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
body .pf-avatar { flex: none; width: 128px; height: 128px; padding: 3px; border-radius: 50%; border: 2px solid var(--home-green); box-shadow: 0 0 0 4px #6fcf4e22, 0 8px 22px #0006; object-fit: cover; }
body .pf-who { min-width: 0; }
body .pf-who h1 { margin: 0 0 6px; font-size: clamp(24px, 5vw, 32px); line-height: 1.15; overflow-wrap: anywhere; }
body .pf-who p { margin: 2px 0; }
body .pf-loc, body .pf-since { color: var(--home-muted); }
body .pf-seen::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--home-muted); }
body .pf-seen.on { font-weight: 600; }
body .pf-seen.on::before { background: var(--home-green); box-shadow: 0 0 0 3px #6fcf4e44; }
body .pf-bio { margin: 0; padding: 16px 20px; border: 1px solid var(--line-strong); border-left: 4px solid var(--home-green); border-radius: var(--radius-sm); background: var(--surface); font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
body .pf-bio-empty { color: var(--home-muted); border-left-color: var(--line-strong); }
body .pf-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
body .pf-card { padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
body .pf-card h2 { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--home-muted); }
body .pf-club { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; min-height: 56px; overflow-wrap: anywhere; }
body .pf-club img { flex: none; object-fit: contain; }
body .pf-none { margin: 0; color: var(--home-muted); }
body .pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
body .pf-stats > div { min-width: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
body .pf-stats dt { font-size: 12px; color: var(--home-muted); }
body .pf-stats dd { margin: 2px 0 0; font-size: 24px; font-weight: 600; }
body .pf-stats .w dd { color: var(--home-green); }
body .pf-rate { height: 8px; margin: 14px 0 6px; border-radius: 4px; background: var(--line-strong); overflow: hidden; }
body .pf-rate span { display: block; height: 100%; background: var(--home-green); }
body .pf-ratet { margin: 0; font-size: 13px; color: var(--home-muted); }
body .pf-card ul { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
body .pf-card li { display: flex; align-items: center; gap: 6px; }
@media (max-width: 600px) {
  body .pf-head { flex-direction: column; text-align: center; padding: 20px 16px; }
  body .pf-cols { grid-template-columns: 1fr; }
  body .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Green on hover: manager and club links (club page, profile, manager list) */
body :is(.cl-card a[href^="/managers/"], .pf-club, .pf-bio a, .man-list a) { transition: color .15s; }
body :is(.cl-card a[href^="/managers/"], .pf-club, .man-list a):is(:hover, :focus-visible) { color: var(--home-green); }
body .pf-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--home-green); }
body .pf-bio { max-width: none; }

body .pf-card h3 { margin: 18px 0 10px; font-size: 13px; font-weight: 600; color: var(--home-muted); }
body .pf-card h2 + h3 { margin-top: 0; }
body .aw-top { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: aw; }
body .aw-top li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; }
body .aw-top li:first-child { border-color: var(--home-green); background: linear-gradient(180deg, #6fcf4e22, var(--surface-2)); box-shadow: 0 0 0 3px #6fcf4e18; }
body .aw-top li::before { counter-increment: aw; content: counter(aw); position: absolute; top: 8px; left: 10px; font-size: 13px; font-weight: 600; color: var(--home-muted); }
body .aw-top li:first-child::before { color: var(--home-green); }
body .aw-pic { position: relative; display: block; }
body .aw-pic img { display: block; height: 90px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 12px #0008); }
body .aw-pic i { position: absolute; right: -14px; bottom: -4px; padding: 1px 8px; border-radius: 999px; background: var(--home-green); color: #fff; font-style: normal; font-size: 14px; font-weight: 700; }
body .aw-top b { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
body .aw-top small { color: var(--home-muted); font-size: 12px; }
body .pf p.pf-bio { max-width: none; width: auto; }

body .pf-head .pf-club { flex: none; margin-left: auto; display: flex; align-items: center; gap: 14px; min-height: 0; padding: 14px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
body .pf-head .pf-club:hover, body .pf-head .pf-club:focus-visible { border-color: var(--home-green); }
body .pf-club span { display: grid; gap: 2px; min-width: 0; }
body .pf-club small { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--home-muted); }
body .pf-club b { font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
body .pf-last { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
body .pf-last li { display: flex; align-items: center; gap: 10px; min-width: 0; }
body .pf-last i { flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; background: var(--home-muted); }
body .pf-last i.w { background: var(--home-green); }
body .pf-last i.l { background: #c0392b; }
body .pf-last img { flex: none; object-fit: contain; }
body .pf-last span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .pf-last b { flex: none; font-variant-numeric: tabular-nums; }
body .pf-last time { flex: none; width: 42px; text-align: right; font-size: 13px; color: var(--home-muted); }
@media (max-width: 600px) { body .pf-head .pf-club { margin-left: 0; align-self: stretch; justify-content: center; } }
