:root {
  --bg: #f4f6f8; --card: #fff; --text: #1d2733; --muted: #6b7785; --line: #e2e7ec;
  --accent: #1f7a4d; --accent-2: #e8f4ee; --danger: #c0392b; --warn: #c77700;
  }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2em 0 .6em; }
h2 { font-size: 1.15rem; margin: 0 0 .6em; }
h3 { font-size: 1rem; margin: 1em 0 .4em; }
/* Шапка в цветах логотипа лиги: чёрный + жёлтый */
:root { --league-yellow: #f2c21b; --league-black: #111; }
.topbar { display: flex; gap: 24px; align-items: center; padding: 8px 24px; background: var(--league-black); color: #fff; flex-wrap: wrap;
  border-bottom: 3px solid var(--league-yellow); }
.topbar a { color: #e8e8e8; }
.topbar a:hover { color: var(--league-yellow); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 600; letter-spacing: .02em; }
.brand img { width: 34px; height: 34px; background: #fff; border-radius: 50%; padding: 2px; }
.brand b { color: var(--league-yellow); font-weight: 800; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a { padding: 6px 10px; border-radius: 4px; font-weight: 500; }
.topbar nav a.active { background: var(--league-yellow); color: var(--league-black); font-weight: 700; }
.admin-link { color: var(--league-yellow) !important; }
.admin-link.active { color: var(--league-black) !important; }
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }
main.wide { max-width: 1500px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.narrow { max-width: 440px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
.row-form, .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.row-form label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); }
label.inline { display: inline-flex; align-items: center; gap: 4px; }
input, select { font: inherit; padding: 6px 8px; border: 1px solid #c9d1d9; border-radius: 6px; background: #fff; color: var(--text); }
input[type=checkbox] { width: auto; }
button, .button { font: inherit; display: inline-block; padding: 7px 14px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; }
button:hover, .button:hover { filter: brightness(1.1); text-decoration: none; }
button:disabled { background: #b8c2cc; cursor: not-allowed; }
button.secondary, .button.secondary { background: #e3e8ed; color: var(--text); }
button.danger { background: var(--danger); }
button.small, .button.small { padding: 3px 8px; font-size: .85rem; }
form.inline { display: inline; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
td input { width: 100%; }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
tr.me td { background: var(--accent-2); font-weight: 600; }
tr.picked td { background: var(--accent-2); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.big { font-size: 1.4rem; }
.hidden { display: none; }
.ok-text { color: var(--accent); font-weight: 600; }
.warn-text { color: var(--danger); font-weight: 600; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: #eef4ff; border: 1px solid #c9d8f5; }
.flash.ok { background: var(--accent-2); border-color: #b9dcc8; }
.flash.error { background: #fdecea; border-color: #f3c2bc; color: #8a1f14; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 5px 12px; border-radius: 999px; background: #e3e8ed; color: var(--text); font-size: .9rem; }
.tabs a.active { background: var(--accent); color: #fff; }
.columns { columns: 3 220px; margin: 10px 0 0; padding-left: 18px; }
details summary { cursor: pointer; }
code { background: #eef1f4; padding: 1px 4px; border-radius: 4px; }

/* Сборка состава */
.squad-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
/* Колонка поля — чтобы вторая четвёрка (4 карточки полного размера) вставала в один ряд */
.builder { display: grid; grid-template-columns: minmax(540px, 5fr) 6fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .builder { grid-template-columns: minmax(0, 1fr); } }
.budget-bar { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 12px; background: #f0f3f6; border-radius: 8px; margin-bottom: 8px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.market-list { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.market-list th { position: sticky; top: 0; background: #fff; }
.countdown { color: var(--warn); font-weight: 600; }
.progress { height: 8px; background: #e3e8ed; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.progress div { height: 100%; background: var(--accent); }
table.results input.ev { width: 4.5em; }
.badge { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: .72rem; font-weight: 700; background: #ffd479; color: #5a3d00; }
.badge.sub { background: var(--accent-2); color: var(--accent); }
.badge.out { background: #eef1f4; color: var(--muted); }
tr.dimmed td { color: var(--muted); }
tr.counted td { background: #fbfdfb; }
.captain-btn.active { background: #ffb400; color: #3a2800; }

/* ---------- Поле и карточки в стиле FUT ---------- */
/* Площадка в перспективе: медовый паркет и синяя штрафная, как в ФОКе.
   Наклоняется только пол с разметкой, карточки стоят ровно. */
/* Площадка в цветах лиги: жёлтый паркет, чёрные линии и вратарская зона */
.pitch {
  --wood-1: #d9b45a; --wood-2: #cfa94f; --wood-3: #e0bd66; --seam: rgba(90,60,0,.28);
  --court-blue: #111;  /* цвет вратарской зоны */
  /* «краска» вратарской зоны поверх досок: последнее число — насколько сквозь неё видна текстура */
  --paint: linear-gradient(rgba(17,17,17,.88), rgba(17,17,17,.88)); --court-line: #111;
  /* текстура досок — общая для паркета и крашеных зон */
  --grain:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 4px, rgba(110,55,5,.06) 4px 5px, transparent 5px 9px),
    linear-gradient(0deg, var(--seam) 1px, transparent 1px) 0 0 / 30px 190px,
    linear-gradient(0deg, var(--seam) 1px, transparent 1px) 30px 70px / 30px 190px,
    linear-gradient(0deg, var(--seam) 1px, transparent 1px) 60px 140px / 30px 190px,
    repeating-linear-gradient(90deg, var(--seam) 0 1px, transparent 1px 30px);
  position: relative; overflow: hidden;
  /* Одинаковые пропорции на всех страницах (как на главной): размеры — в долях ширины площадки (cqw) */
  container-type: inline-size; aspect-ratio: .975;
  display: flex; flex-direction: column; justify-content: center;
  padding: 2.8% 1.6% 1.6%;  /* % — от ширины; cqw в свойствах самого контейнера считались бы от окна */

}
/* «Сцена» с перспективой: cqw внутри площадки — доля её ширины, поэтому геометрия одинакова на всех страницах */
.court-stage { position: absolute; inset: 0; perspective: 139cqw; perspective-origin: 50% 0%; pointer-events: none; }
.court-floor {
  /* паркет целиком наклонён в перспективе */
  position: absolute; left: 2%; right: 2%; top: -8%; bottom: 3%;
  transform: rotateX(28deg); transform-origin: 50% 100%;  /* наклон пола */
  border-radius: 3px; box-shadow: 0 8px 18px rgba(0,0,0,.28);
  background:
    linear-gradient(180deg, rgba(60,30,5,.35) 0%, rgba(60,30,5,0) 38%),
    radial-gradient(60% 40% at 50% 70%, rgba(255,255,255,.2), transparent 70%),
    var(--grain),
    linear-gradient(90deg, var(--wood-1) 0 30px, var(--wood-2) 30px 60px, var(--wood-3) 60px 90px) 0 0 / 90px 100%;
}
.court-lines { position: absolute; left: 5%; right: 5%; top: 4%; bottom: 4%; border: 3px solid var(--court-line); border-radius: 2px; }
.court-circle { /* центральный круг на средней линии (верхний край) */
  position: absolute; left: 50%; top: -3px; width: 26%; aspect-ratio: 2; transform: translateX(-50%);
  border: 3px solid var(--court-line); border-top: 0; border-radius: 0 0 999px 999px;
}
.court-box { /* штрафная футзала — «D», покрашена */
  position: absolute; left: 50%; bottom: -3px; width: 56%; height: 22%; transform: translateX(-50%);
  border: 3px solid var(--court-line); border-bottom: 0; border-radius: 50% 50% 0 0 / 80% 80% 0 0;
  background: var(--paint), var(--grain), var(--court-blue);
}
.court-logo { /* логотип лиги водяным знаком: без перспективы, поверх паркета, под карточками */
  position: absolute; left: 50%; top: 39%; width: 50%; max-width: 350px; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: url(/static/img/league-logo.png) center / contain no-repeat; opacity: .45; pointer-events: none;
}
.court-spot { position: absolute; left: 50%; bottom: 29%; width: 7px; height: 7px; margin-left: -3px; border-radius: 50%; background: var(--court-line); }
.court-goal { position: absolute; left: 50%; bottom: -3px; width: 16%; height: 6px; transform: translateX(-50%); background: var(--court-line); }
/* единая раскладка площадки — как в сборке состава: карточки 22% ширины, верхняя пара плотнее (14%), нижняя шире (30%) */
.pitch-row { position: relative; display: flex; justify-content: center; gap: 14%; margin: 0 0 1cqw; }
.pitch-row:last-child { margin-bottom: 0; }
.pitch-row#field-bottom, .pitch-row#hero-bottom, .pitch-row.ts-bottom, .pitch-row.row-bottom { gap: 30%; }
.pitch .slot { --w: 22cqw; }  /* карточки на площадке — доля её ширины, везде одинаково */
.bench { margin-top: 12px; background: #1d2a22; border-radius: 12px; padding: 10px 10px 12px; }
.bench-title { color: #dfe7e2; font-weight: 600; margin-bottom: 8px; }
.bench-title span { font-weight: 400; font-size: .78rem; color: #9fb2a7; margin-left: 6px; }
.bench-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.slot { --w: 116px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fut-wrap { position: relative; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.slot.selected .fut-wrap { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px #ffb400); }
.slot.target .fut-wrap { filter: drop-shadow(0 0 4px #ffb400); cursor: pointer; animation: pulse 1.2s infinite; }
.slot[data-empty] .fut-wrap { filter: none; }
.pitch .fut-wrap { filter: drop-shadow(0 8px 6px rgba(40,20,0,.55)) drop-shadow(0 0 1px rgba(0,0,0,.6)); }
.pitch .slot.selected .fut-wrap { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px #ffb400); }
.pitch .slot.target .fut-wrap { filter: drop-shadow(0 0 4px #ffb400); }
.pitch .slot[data-empty] .fut-wrap { filter: none; }
.pitch .fut-card.empty { --edge: rgba(255,255,255,.8); --face: rgba(60,35,10,.28); }
@keyframes pulse { 50% { transform: scale(1.04); } }
.slot[data-empty] { cursor: pointer; }
.slot-actions { display: flex; gap: 3px; justify-content: center; }
.slot-actions button { padding: 1px 7px; font-size: .78rem; }

/* Форма карточки: срезанные верхние углы и заострённый низ, как у FUT */
.fut-card {
  --shape: polygon(14% 0, 86% 0, 100% 7%, 100% 86%, 50% 100%, 0 86%, 0 7%);
  --face: linear-gradient(160deg, #fff, #ccc); --edge: #888; --ink: #222; --line: rgba(0,0,0,.2);
  position: relative; width: var(--w); aspect-ratio: 0.7; padding: 3px;
  clip-path: var(--shape); background: var(--edge);
  font-size: calc(var(--w) * .138); color: var(--ink); user-select: none;  /* 116px → 16px, всё содержимое в em */
}
.fut-inner {
  position: relative; height: 100%; clip-path: var(--shape); background: var(--face);
  display: flex; flex-direction: column; align-items: center; padding: 8% 8% 13%; overflow: hidden;
}
.fut-inner::before { /* блик */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 45%, transparent 60%);
  pointer-events: none;
}
.fut-card.gold   { --edge: linear-gradient(160deg, #fff3b0, #8a6412); --ink: #3b2a05; --line: rgba(80,55,5,.35);
  --face: linear-gradient(160deg, #fcefa6 0%, #e6c35c 35%, #c99a2e 65%, #f1d77e 100%); }
.fut-card.silver { --edge: linear-gradient(160deg, #f4f6f8, #565e67); --ink: #1d2228; --line: rgba(30,36,42,.35);
  --face: linear-gradient(160deg, #dfe4e9 0%, #b3bcc5 35%, #8d97a2 65%, #c5ccd3 100%); }
.fut-card.bronze { --edge: linear-gradient(160deg, #f5cfa6, #6e3d17); --ink: #3a200b; --line: rgba(70,35,10,.35);
  --face: linear-gradient(160deg, #f1c69a 0%, #cf9055 35%, #a8672f 65%, #e2ad7a 100%); }
/* высший дивизион: королевский синий с золотом (как TOTY) */
.fut-card.royal { --edge: linear-gradient(160deg, #fff1a8, #c9962b 45%, #6b4a0e); --ink: #f6dc84; --line: rgba(246,220,132,.4);
  --face: radial-gradient(120% 90% at 50% 15%, #2f5bd3 0%, #173a9a 45%, #0b1f5c 80%, #08163f 100%); }
.fut-card.royal .fut-inner::before { background:
  radial-gradient(40% 25% at 50% 30%, rgba(255,220,120,.18), transparent 70%),
  linear-gradient(115deg, transparent 30%, rgba(255,240,190,.3) 45%, transparent 60%); }
/* 4-й дивизион: белая матовая, без блеска (плотная — не путается с пустым слотом) */
.fut-card.white { --edge: linear-gradient(160deg, #ffffff, #b8bec5); --ink: #2a2f35; --line: rgba(40,45,52,.22);
  --face: linear-gradient(160deg, #ffffff 0%, #f3f4f6 55%, #e6e8eb 100%); }
.fut-card.white .fut-inner::before { background: none; }
.fut-card.empty { --edge: rgba(255,255,255,.55); --face: rgba(255,255,255,.14); --ink: #fff; }
.on-bench .fut-card.empty { --edge: rgba(255,255,255,.35); --face: rgba(255,255,255,.06); }

.fut-side { position: absolute; left: 10%; top: 10%; display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1; z-index: 2; }
.fut-pos { font-size: .95em; font-weight: 800; }
.fut-pos.empty { visibility: hidden; }
.fut-div { font-size: .5em; font-weight: 800; padding: 2px 3px; border-radius: 3px; border: 1px solid currentColor; letter-spacing: .02em; }
.fut-photo { width: 58%; margin: 6% 0 0 18%; opacity: .55; }
.fut-photo svg { display: block; width: 100%; fill: var(--ink); }
.fut-name {  /* узкий шрифт; длинные фамилии подгоняет cards.js (мельче, затем сокращение с точкой) */
  width: 100%; text-align: center; font-weight: 800; text-transform: uppercase; font-size: .78em; letter-spacing: 0;
  font-family: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  border-top: 1px solid var(--line); padding-top: 3%; margin-top: 2%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fut-team { font-size: .56em; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fut-stats { display: flex; gap: 7%; justify-content: center; width: 100%; margin-top: 3%; border-top: 1px solid var(--line); padding-top: 3%; }
.fut-stats div { display: flex; flex-direction: column; align-items: center; font-size: .5em; font-weight: 600; line-height: 1.15; }
.fut-stats b { font-size: 1.45em; font-weight: 800; }
.fut-plus { margin-top: 28%; font-size: 2.4em; font-weight: 300; line-height: 1; opacity: .85; }
.fut-empty-pos { font-size: .68em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
/* капитан — в левом верхнем углу: правый занят наклейками событий */
.fut-cap {
  position: absolute; top: -6px; left: -6px; z-index: 2; width: 24px; height: 24px; line-height: 20px; text-align: center;
  border-radius: 50%; background: #14281d; color: #ffd479; font-weight: 800; font-size: .8rem; border: 2px solid #ffd479;
}

.tier-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.tier-dot.gold { background: linear-gradient(135deg, #fcefa6, #c99a2e); }
.tier-dot.silver { background: linear-gradient(135deg, #dfe4e9, #8d97a2); }
.tier-dot.bronze { background: linear-gradient(135deg, #f1c69a, #a8672f); }
.tier-dot.royal { background: linear-gradient(135deg, #4a78ec, #173a9a); }
.tier-dot.white { background: #f3f4f6; box-shadow: 0 0 0 1px #9aa3ad; }

@media (max-width: 520px) {
  .slot { --w: 96px; }  /* вне площадки (вторая четвёрка) */
}

/* Команда недели прошлого тура — чёрная «информ»-карточка, акцент цветом дивизиона */
.fut-card.totw { --face: radial-gradient(120% 80% at 50% 25%, #3a3a3a 0%, #151515 55%, #050505 100%); }
.fut-card.totw.gold   { --ink: #f3d77a; --line: rgba(243,215,122,.4); --edge: linear-gradient(160deg, #fff1a8, #b8872a 50%, #6b4a0e); }
.fut-card.totw.silver { --ink: #e3e7eb; --line: rgba(227,231,235,.35); --edge: linear-gradient(160deg, #fff, #9aa3ad 50%, #4b525a); }
.fut-card.totw.bronze { --ink: #e8b98a; --line: rgba(232,185,138,.4); --edge: linear-gradient(160deg, #f5cfa6, #a8672f 50%, #4a260c); }
.fut-card.totw.white  { --ink: #ffffff; --line: rgba(255,255,255,.35); --edge: linear-gradient(160deg, #ffffff, #b8bec5 50%, #5c636b); }
/* КН высшего: чёрная с синим сиянием изнутри и золотым текстом, кант из золота в синий */
.fut-card.totw.royal { --ink: #f6dc84; --line: rgba(246,220,132,.45);
  --edge: linear-gradient(160deg, #fff1a8 0%, #e2b745 30%, #3a6be0 65%, #0b1f5c 100%);
  --face: radial-gradient(110% 75% at 50% 22%, #24489e 0%, #0f1f45 40%, #070b16 70%, #030407 100%); }
.fut-card.totw .fut-inner::before {
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(255,255,255,.035) 9px 10px),
    linear-gradient(115deg, transparent 30%, rgba(255,255,255,.18) 45%, transparent 60%);
}
.fut-card.totw.royal .fut-inner::before {
  background:
    repeating-linear-gradient(45deg, transparent 0 9px, rgba(90,140,255,.07) 9px 10px),
    linear-gradient(115deg, transparent 30%, rgba(255,235,150,.22) 45%, transparent 60%);
}
.fut-card.totw .fut-photo { opacity: .7; }
.fut-ribbon {
  position: absolute; right: 9%; top: 10%; writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .38em; font-weight: 800; letter-spacing: .03em; line-height: 1; color: var(--ink); opacity: .9; z-index: 1;
  max-height: 40%; overflow: hidden; white-space: nowrap;
}
.totw-badge, .potd-badge, .pop-badge { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 3px; background: #111; color: #f3d77a; font-size: .68rem; font-weight: 800; vertical-align: 1px; }

/* Номер очерёдности автозамены у запасных полевых */
.fut-order {
  position: absolute; top: -6px; left: -6px; z-index: 2; width: 22px; height: 22px; line-height: 18px; text-align: center;
  border-radius: 50%; background: #fff; color: #1d2a22; font-weight: 800; font-size: .75rem; border: 2px solid #1d2a22;
}

/* Просмотр состава после тура */
.lineup-view { max-width: 720px; margin: 0 auto 16px; }
.slot.out .fut-wrap { opacity: .5; filter: grayscale(.7); }
.slot-caption { min-height: 1.3em; font-size: .78rem; font-weight: 600; text-align: center; color: #fff;
  background: rgba(20,30,25,.75); border-radius: 4px; padding: 1px 6px; max-width: calc(var(--w) + 20px); }
.slot-caption:empty { visibility: hidden; }
.slot-caption.good { background: #1f7a4d; }
.slot-caption.bad { background: #7a2b21; }
.lineup-total { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; }
.lineup-total .big { font-size: 1.8rem; font-weight: 800; }

/* Клик по карточке — выбор для замены */
.slot[data-swap] .fut-wrap { cursor: pointer; transition: transform .12s; }
.slot[data-swap]:not(.selected):not(.target) .fut-wrap:hover { transform: translateY(-3px); }

/* Фото игрока: виньетка растворяет фон снимка в цвете карточки */
.fut-photo.has-img { width: 58%; aspect-ratio: 1; margin: 2% 0 0 28%; opacity: 1; }
.fut-photo.has-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block;
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 42%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 70% at 50% 42%, #000 55%, transparent 100%);
}
.thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 4px; }
.file-btn { cursor: pointer; }
.photo-url { display: flex; gap: 3px; margin-top: 4px; }
.photo-url input { width: 150px; padding: 3px 6px; font-size: .8rem; }

.table-scroll { overflow-x: auto; }

/* История туров и переключение между турами */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 4px; }
.tile { margin-bottom: 12px; }
.tile .big { font-size: 1.7rem; font-weight: 800; }
.entry-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.tour-nav { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Главная-хаб в стиле меню FIFA: чёрный + жёлтый ---------- */
body.hub-page, body.console-page {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(242,194,27,.18), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(242,194,27,.10), transparent 60%),
    #0d0d0d;
  background-attachment: fixed; min-height: 100vh;
  color: #f1f1f1;
}
body.hub-page .flash, body.console-page .flash { color: var(--text); }
/* Хаб на весь экран под шапкой: сетка 5×3, как меню консоли */
body.hub-page { display: flex; flex-direction: column; height: 100vh; }
main.hub-main { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: none; box-sizing: border-box; padding: 16px 20px 10px; }
.hub {
  flex: 1; min-height: 0; display: grid; gap: 14px; grid-auto-flow: dense;
  grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  font-size: clamp(13px, 1.05vw, 21px);  /* всё содержимое плиток — в em и растёт вместе с экраном */
}
.hub .tile { overflow: hidden; }
.tile {
  --cut: 18px;
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; min-width: 0;
  color: #f1f1f1; text-decoration: none; outline: none;
  background: linear-gradient(160deg, #262626 0%, #171717 60%, #121212 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.tile::after { /* жёлтая полоса-акцент слева, как у плиток меню */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--league-yellow); opacity: .35; transition: opacity .15s;
}
.tile:hover, .tile:focus-visible {
  text-decoration: none; transform: scale(1.02); z-index: 1;
  background: linear-gradient(160deg, #2f2a14 0%, #1c1a10 60%, #141414 100%);
  box-shadow: inset 0 0 0 2px var(--league-yellow);
}
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }
.tile-hero { grid-column: span 2; grid-row: span 2; background: linear-gradient(160deg, #2b2610 0%, #181612 55%, #111 100%); }
.tile-hero:hover, .tile-hero:focus-visible { background: linear-gradient(160deg, #3a3212 0%, #1f1c12 55%, #141414 100%); }
.tile-hero::before { /* логотип лиги водяным знаком в углу главной плитки */
  content: ""; position: absolute; right: -8%; bottom: -10%; width: 55%; aspect-ratio: 1;
  background: url(/static/img/league-logo.png) center / contain no-repeat; opacity: .1; pointer-events: none;
}
.tile-hero > * { position: relative; }
.tile-wide { grid-column: span 2; }
.tile-label { font-size: .72em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--league-yellow); }
.tile-title { font-size: 1.9em; font-weight: 800; line-height: 1.1; text-transform: uppercase; }
.tile-title.small-title { font-size: 1.15em; text-transform: none; }
.tile-value { font-size: 2.8em; font-weight: 800; line-height: 1; }
.tile-value small { font-size: .32em; font-weight: 600; color: #bdbdbd; margin-left: 4px; }
.tile-meta, .tile-text { color: #cfcfcf; font-size: .95em; margin: 0; }
.tile-meta b { color: #fff; }
.tile-foot { margin-top: auto; color: #a8a8a8; font-size: .85em; }
.tile-cta { margin-top: 8px; align-self: flex-start; background: var(--league-yellow); color: #111; font-weight: 800; padding: .45em 1.1em;
  text-transform: uppercase; font-size: .9em; letter-spacing: .04em; }
.tile-alert { align-self: flex-start; background: rgba(242,194,27,.15); color: var(--league-yellow); border: 1px solid var(--league-yellow);
  padding: .25em .8em; font-weight: 700; font-size: .9em; }
.tile .countdown { color: var(--league-yellow); }
.tile-hero .countdown { display: block; font-size: 1.6em; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: .2em; }
.cd-part { white-space: nowrap; }
.tile-top { list-style: none; counter-reset: top; padding: 0; margin: auto 0 0; font-size: .9em; }
.tile-top li { counter-increment: top; display: flex; gap: 8px; padding: 2px 0; border-top: 1px solid rgba(255,255,255,.07); }
.tile-top li::before { content: counter(top); color: #9a9a9a; font-weight: 800; width: 1em; }
.tile-top li:nth-child(1)::before { color: #f2c21b; }
.tile-top li:nth-child(2)::before { color: #d5dbe1; }
.tile-top li:nth-child(3)::before { color: #d8955a; }
.tile-top li[value]::before { content: attr(value); width: auto; min-width: 1em; }
.tile-top li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .progress { background: rgba(255,255,255,.12); }
.tile .progress div { background: var(--league-yellow); }
.spark { width: 100%; flex: 1; min-height: 40px; margin-top: 8px; }
.spark polyline { fill: none; stroke: var(--league-yellow); stroke-width: 2; vector-effect: non-scaling-stroke; }
.link-like { color: var(--league-yellow); text-decoration: underline; cursor: pointer; }
.hub-cards { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.hub-cards .slot { --w: clamp(70px, 7.4vw, 150px); }
.tile-hero .hub-cards .slot { --w: clamp(86px, 7.6vw, 150px); }
.tile-totw .hub-cards { justify-content: flex-start; }
/* большой экран: карточки по высоте плитки, чтобы призыв внизу всегда был виден (высота слота ≈ 1.76 --w) */
@media (min-width: 1001px) and (min-height: 561px) {
  .tile-totw .hub-cards { flex: 1 1 0; min-height: 0; container-type: size; margin: 6px 0 4px; }
  /* только эта плитка: карточка без подписи (высота = --w / 0.7, с запасом под наклейки), пять в ряд по ширине */
  .tile-totw .hub-cards .slot { --w: min(170px, calc(100cqh / 1.46), calc((100cqw - 40px) / 5)); }
}
.hub-hint { color: #6d6d6d; font-size: .75rem; text-align: center; margin: 8px 0 0; }
/* На узких экранах — обычная прокрутка вместо сетки на весь экран */
@media (max-width: 1000px), (max-height: 560px) {
  body.hub-page { height: auto; min-height: 100vh; }
  .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(150px, auto); font-size: 14px; }
  .tile-wide3 { grid-column: span 2; }
}
@media (max-width: 560px) {
  .hub { grid-template-columns: minmax(0, 1fr); }
  .tile-hero, .tile-wide, .tile-wide3 { grid-column: auto; grid-row: auto; }
  .hub-hint { display: none; }
}

/* Команда недели на площадке */
.totw-pitch { min-height: 420px; }

/* Админка: команды недели */
.awards-division h3 { margin-top: 14px; }
.totw-block { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }
.totw-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.totw-head h3 { margin: 8px 0; }
.player-search { min-width: 280px; }

/* Лучший игрок дивизиона — чёрная карточка с жёлтым свечением цвета лиги */
.fut-card.potd {
  --ink: #ffe27a; --line: rgba(255,226,122,.45);
  --edge: linear-gradient(160deg, #fff4b8, #f2c21b 45%, #7a5a00);
  --face: radial-gradient(120% 80% at 50% 20%, #4a3d0c 0%, #1a1606 55%, #070602 100%);
}
.fut-card.potd .fut-inner::before {
  background:
    repeating-linear-gradient(45deg, transparent 0 9px, rgba(242,194,27,.06) 9px 10px),
    linear-gradient(115deg, transparent 30%, rgba(255,235,150,.25) 45%, transparent 60%);
}
.fut-card.potd .fut-photo { opacity: .75; }

/* Страница «Команда недели» */
.award-best { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.award-best .slot { --w: 130px; }
.award-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.award-grid > .card { flex: 1 1 440px; max-width: 620px; margin: 0; }
.award-grid h3 { margin-top: 0; }
.division-panel[hidden] { display: none; }
.group-row td { background: #f0f3f6; }
.no-match-form { margin: 0 0 10px; }
.awards-division.idle { opacity: .65; }
.potd-badge { background: linear-gradient(135deg, #fff1a8, #f2c21b); color: #111; }
.badge.warn { background: #fdecea; color: #8a1f14; }

/* Модальное окно подтверждения */
dialog.modal { border: 0; border-radius: 10px; padding: 20px 22px; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.modal::backdrop { background: rgba(0,0,0,.45); }
dialog.modal h3 { margin-top: 0; }

/* Главная плитка с поданным составом: текст слева (на фоне логотипа), площадка в цветах лиги справа */
.tile-hero.has-lineup > :not(.hero-court) { max-width: 44%; }
.tile-hero.has-lineup::before { right: auto; left: -12%; bottom: -14%; width: 52%; }
.hero-court { position: absolute; top: 14px; right: 14px; bottom: 14px; width: 54%; display: flex; align-items: center; pointer-events: none; }
.hero-court .pitch { width: 100%; }
/* На мини-составе — упрощённые карточки: без команды и цены, чтобы текст не наезжал */
.hero-court .fut-team, .hero-court .fut-stats { display: none; }
.hero-court .fut-name { margin-top: auto; padding-bottom: 6%; }
.tile-hero .tile-cta { margin-top: 10px; }
@media (max-width: 560px) {
  .tile-hero.has-lineup > :not(.hero-court) { max-width: none; }
  .hero-court { position: static; width: 100%; margin: 8px 0; }
}

/* Окно «Вход / Регистрация» в стиле хаба */
.auth-modal { background: #151515; color: #f1f1f1; width: min(400px, 92vw); padding: 22px 24px 24px; border-top: 3px solid var(--league-yellow); }
.auth-modal label { color: #bdbdbd; }
.auth-modal input { background: #222; color: #fff; border-color: #3a3a3a; }
.auth-modal button:not(.auth-close):not([data-tab]) { background: var(--league-yellow); color: #111; font-weight: 800; }
.auth-close { position: absolute; top: 8px; right: 10px; background: none; color: #999; font-size: 1.1rem; padding: 4px 8px; }
.auth-tabs { display: flex; gap: 6px; margin: 4px 26px 16px 0; }
.auth-tabs button { background: #262626; color: #cfcfcf; font-weight: 700; flex: 1; }
.auth-tabs button.active { background: var(--league-yellow); color: #111; }
.auth-panel[hidden] { display: none; }
.pop-badge { background: linear-gradient(135deg, #ff9a3c, #e8461e); color: #fff; }
.price-cell sup { color: var(--warn); font-weight: 800; margin-left: 1px; }

/* Экран сборки: карточки на поле такого же размера, как у второй четвёрки (22% ширины блока),
   площадка та же — ряды чуть плотнее; вторая четвёрка тоже меряется от своей ширины */
.builder .bench .slot { --w: 22cqw; }
.builder .bench-row { container-type: inline-size; gap: 3%; flex-wrap: nowrap; }
.builder .bench { padding-bottom: 20px; }

/* Кнопки C / ✕ — только у выбранной карточки, поверх (не сдвигают раскладку) */
.builder .slot { position: relative; }
.builder .slot .slot-actions {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); z-index: 3;
  visibility: hidden; opacity: 0; transition: opacity .12s;
  background: rgba(20,20,20,.85); padding: 3px 4px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.builder .slot.selected .slot-actions { visibility: visible; opacity: 1; }

/* Всплывающая подсказка (расшифровка цены) */
.tip-box { position: fixed; z-index: 1000; pointer-events: none; white-space: pre-line; max-width: 260px;
  background: #111; color: #f1f1f1; font-size: .8rem; line-height: 1.4; padding: 6px 10px; border-radius: 6px;
  border-left: 3px solid var(--league-yellow); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.tip-box[hidden] { display: none; }
[data-tip] { cursor: help; }

/* ---------- «Консольные» страницы (сборка состава и др.): тёмные панели в стиле главной ---------- */
.console-page main { max-width: 1400px; }
.console-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.console-title { font-size: 2rem; font-weight: 800; text-transform: uppercase; margin: 2px 0 0; color: #fff; letter-spacing: .01em; }
.console-deadline { text-align: right; }
.console-deadline .countdown { display: block; font-size: 1.5rem; font-weight: 800; color: var(--league-yellow); font-variant-numeric: tabular-nums; }
.panel {
  --cut: 18px; position: relative; padding: 16px 18px; margin-bottom: 16px; color: #f1f1f1;
  background: linear-gradient(160deg, #232323 0%, #171717 60%, #121212 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.panel::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--league-yellow); opacity: .6; }
.console-page .muted { color: #9a9a9a; }
.console-page .console-hint { color: #8a8a8a; }
.console-page .ok-text { color: #7bd88f; }
.console-page .warn-text { color: #ff6b5b; }
.console-page .flash.error { background: rgba(192,57,43,.18); border-color: rgba(255,107,91,.45); color: #ffb3aa; }

/* Бюджет: крупные показатели и полоса заполнения */
.console-page .budget-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; padding: 0 0 12px; background: none; margin: 0 0 8px;
  border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--league-yellow); }
.stat-value b { font-size: 1.7rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-value small { color: #9a9a9a; font-weight: 600; }
.budget-meter { grid-column: 1 / -1; height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.budget-meter div { height: 100%; width: 0; background: var(--league-yellow); transition: width .2s; }
.budget-meter div.over { background: #e74c3c; }

/* Вторая четвёрка и кнопки */
.console-page .bench { background: #0f0f0f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.console-page .bench-title { color: var(--league-yellow); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 800; }
.console-page .bench-title span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.console-page .actions button#save { background: var(--league-yellow); color: #111; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 10px 22px; }
.console-page .actions button#clear { background: #2a2a2a; color: #ddd; }
.console-page button.secondary { background: #2e2e2e; color: #e5e5e5; }

/* Список игроков */
.market-title { font-size: .85rem; margin-bottom: 10px; }
.console-page .filters input, .console-page .filters select { background: #1f1f1f; color: #eee; border-color: #3a3a3a; }
.console-page .filters input::placeholder { color: #8a8a8a; }
.console-page .filters label { color: #cfcfcf; }
.console-page .market-list { border-color: rgba(255,255,255,.08); background: #141414; }
.console-page .market-list::-webkit-scrollbar { width: 8px; }
.console-page .market-list::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
.console-page .market-list th { background: #1b1b1b; color: #9a9a9a; border-bottom-color: rgba(255,255,255,.08); }
.console-page .market-list td { border-bottom-color: rgba(255,255,255,.06); color: #eaeaea; }
.console-page .market-list td .muted { color: #8a8a8a; }
.console-page .market-list tbody tr:hover td { background: #1f1c10; }
.console-page tr.picked td { background: rgba(242,194,27,.12); }
.console-page .market-list button:not(.danger):not(:disabled) { background: var(--league-yellow); color: #111; font-weight: 800; }
.console-page .market-list button:disabled { background: #2a2a2a; color: #666; }
.console-page .price-cell sup { color: var(--league-yellow); }
.console-page .totw-badge { background: #000; box-shadow: inset 0 0 0 1px #f3d77a; }
.console-page #market-count { margin-bottom: 0; }
@media (max-width: 560px) { .console-deadline { text-align: left; } .console-title { font-size: 1.5rem; } }

/* ---------- Сборка состава: слева площадка и вторая четвёрка, справа информация и список игроков ---------- */
.console-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.col-left, .col-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.col-left .panel, .col-right .panel { margin-bottom: 0; }
.pitch-panel, .bench-panel { padding: 12px 12px 12px 16px; }
.console-page .bench-panel .bench { background: none; box-shadow: none; padding: 0; margin: 0; }
.info-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.info-top .console-title { font-size: 1.8rem; }
.info-panel .budget-bar { margin-bottom: 10px; }
.info-panel .flash { margin: 0 0 10px; }
.info-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.info-actions .actions { margin: 0; }
.info-actions #source-note { flex: 1; min-width: 160px; }
.help-dot { width: 24px; height: 24px; line-height: 20px; text-align: center; border-radius: 50%; border: 2px solid var(--league-yellow);
  color: var(--league-yellow); font-weight: 800; font-size: .85rem; flex: none; }
.market { display: flex; flex-direction: column; min-height: 0; }
@media (max-width: 1000px) { .console-layout { grid-template-columns: minmax(0, 1fr); } }

/* Большой экран (FullHD и т.п.): всё на одном экране без прокрутки страницы.
   Ширина площадки считается от высоты окна: шапка + отступы + вторая четвёрка ≈ 180px + 0.34 ширины. */
@media (min-width: 1400px) and (min-height: 800px) {
  /* только страница сборки (body.fit-screen): остальные страницы прокручиваются как обычно */
  body.fit-screen { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  body.fit-screen main { flex: 1; min-height: 0; width: 100%; max-width: none; box-sizing: border-box; padding: 14px 20px; }
  .fit-screen .console-layout {
    --pitch-w: min(700px, calc((100vh - 185px) * .745));
    height: 100%; grid-template-columns: calc(var(--pitch-w) + 28px) minmax(0, 1fr); align-items: stretch;
  }
  .fit-screen .console-layout .col-left { justify-content: flex-start; }
  .fit-screen .console-layout .pitch-panel .pitch { width: var(--pitch-w); }
  .fit-screen .console-layout .col-right { min-height: 0; }
  .fit-screen .console-layout .market { flex: 1; }
  .fit-screen .console-layout .market-list { flex: 1; max-height: none; min-height: 0; }
}

/* ======================================================================
   Консольная (тёмная) тема для всех страниц — как главная и сборка состава.
   Включается классом body.console-page (по умолчанию на всех страницах).
   ====================================================================== */
.console-page { color: #eaeaea; }
.console-page a { color: var(--league-yellow); }
.console-page h1 { font-size: 1.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: #fff; margin: .2em 0 .5em; }
.console-page h2 { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--league-yellow); margin: 0 0 .8em; }
.console-page h3 { color: #fff; }
.console-page h1 .muted, .console-page h1 small { text-transform: none; font-size: .55em; font-weight: 600; }

/* Плитки: .card получает вид плиток главной */
.console-page .card {
  --cut: 18px; position: relative; color: #eaeaea; border: 0; border-radius: 0;
  background: linear-gradient(160deg, #232323 0%, #171717 60%, #121212 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.console-page .card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--league-yellow); opacity: .6; }
.console-page details.card summary { color: #fff; }

/* Таблицы */
.console-page th { color: #9a9a9a; border-bottom-color: rgba(255,255,255,.1); }
.console-page td { border-bottom-color: rgba(255,255,255,.06); }
.console-page tbody tr:hover td { background: rgba(242,194,27,.05); }
.console-page tr.me td { background: rgba(242,194,27,.14); color: #fff; }
.console-page tr.group-row td, .console-page .group-row td { background: #1f1f1f; }
.console-page tr.counted td { background: transparent; }
.console-page tr.dimmed td { color: #7a7a7a; }

/* Поля ввода и кнопки */
.console-page input, .console-page select, .console-page textarea { background: #1f1f1f; color: #eee; border-color: #3a3a3a; }
.console-page input::placeholder { color: #8a8a8a; }
.console-page input:disabled { background: #191919; color: #8a8a8a; }
.console-page label { color: #bdbdbd; }
.console-page button, .console-page .button { background: var(--league-yellow); color: #111; font-weight: 700; }
.console-page button.secondary, .console-page .button.secondary { background: #2e2e2e; color: #e5e5e5; font-weight: 500; }
.console-page button.danger { background: #c0392b; color: #fff; }
.console-page button:disabled { background: #2a2a2a; color: #666; }
.console-page .auth-close { background: none; }

/* Вкладки, сообщения, прочее */
.console-page .tabs a { background: #242424; color: #d5d5d5; }
.console-page .tabs a:hover { background: #2f2a14; text-decoration: none; }
.console-page .tabs a.active { background: var(--league-yellow); color: #111; font-weight: 700; }
body.console-page .flash { background: #1c2230; border-color: #2c3950; color: #cfe0ff; }
.console-page .flash.ok { background: rgba(123,216,143,.1); border-color: rgba(123,216,143,.35); color: #b9f0c6; }
.console-page code { background: #262626; color: #f3d77a; }
.console-page .progress { background: rgba(255,255,255,.1); }
.console-page .progress div { background: var(--league-yellow); }
.console-page .badge.sub { background: rgba(123,216,143,.15); color: #9fe3b0; }
.console-page .badge.out { background: #2a2a2a; color: #9a9a9a; }
.console-page .badge.warn { background: rgba(231,76,60,.18); color: #ffb3aa; }
.console-page .badge { background: #3a3218; color: #f3d77a; }
.console-page .tile .big, .console-page .big { color: #fff; }
.console-page .slot-caption { color: #fff; }
/* шапка сохраняет свои цвета поверх общего «ссылки жёлтые» */
.console-page .topbar a { color: #e8e8e8; }
.console-page .topbar a:hover { color: var(--league-yellow); }
.console-page .topbar nav a.active { color: #111; }
.console-page .topbar .admin-link { color: var(--league-yellow); }
.console-page .topbar .admin-link.active { color: #111; }
.console-page .award-best h2 { font-size: 1.5rem; color: #fff; text-transform: none; letter-spacing: 0; margin: 2px 0 6px; }

/* Состав участника — та же раскладка, что у сборки */
.entry-layout .tour-nav { align-self: flex-start; }
.entry-layout .entry-table-title { margin: 4px 0 6px; }
.entry-layout .entry-table-title ~ .entry-table-title { margin-top: 18px; }
.entry-layout .budget-bar { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.small-stat { font-size: 1.1rem !important; }
/* вторая четвёрка — четыре в ряд и не крупнее карточек площадки (16% её ширины) */
.entry-layout .bench-row { container-type: inline-size; gap: 3%; flex-wrap: nowrap; }
.entry-layout .bench .slot { --w: 22cqw; }

/* Команды недели: все дивизионы на одной странице */
.totw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 12px; }
@media (max-width: 900px) { .totw-grid { grid-template-columns: minmax(0, 1fr); } }
.totw-grid .totw-card { margin: 0; max-width: none; }
.totw-card-head { margin-bottom: 8px; }
.totw-grid .award-best { display: block; }
.award-best-body { display: flex; gap: 16px; align-items: center; margin-top: 10px; }
.award-best-body .slot { --w: 120px; }
/* Площадки с подписями под карточками (команды недели, состав участника):
   подписи и карточки масштабируются от ширины площадки, чтобы всё помещалось */
.pitch .slot-caption { font-size: max(9px, 2.3cqw); line-height: 1.25; padding: .15em .55em; max-width: 30cqw; }
.totw-pitch .slot, .entry-layout .pitch .slot { gap: .6cqw; }

/* Шапка без меню: главная — это меню; на внутренних страницах «← Меню» (и Esc) */
.topbar { gap: 16px; }
.back-link { padding: 6px 14px; border-radius: 4px; background: #232323; color: #e8e8e8 !important; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.back-link:hover { background: var(--league-yellow); color: #111 !important; text-decoration: none; }
.account { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.account-name { display: flex; align-items: center; gap: 8px; }
.account-icon { width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%;
  background: var(--league-yellow); color: #111; font-weight: 800; font-size: .85rem; }
.account-logout { color: #9a9a9a !important; }
@media (max-width: 600px) {
  .topbar { padding: 8px 12px; gap: 10px; flex-wrap: nowrap; }
  .brand span { display: none; }            /* на телефоне — только логотип */
  .account-text { display: none; }          /* и только значок профиля */
  .account-register { display: none; }
}
/* Широкие таблицы на телефоне прокручиваются внутри плитки, а не всей страницей */
.console-page .card { overflow-x: auto; }
@media (max-width: 600px) { .console-page h1 { font-size: 1.4rem; } .console-page .card { padding: 14px 12px 14px 16px; } }
.entry-layout .col-right .panel { overflow-x: auto; }

/* ---------- Расписание и ввод результатов по матчам ---------- */
.sched-day h3 { margin: 14px 0 6px; color: var(--league-yellow); text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }
.sched-day:first-of-type h3 { margin-top: 4px; }
.sched-stadium { margin: 0 0 10px 0; }
.sched-stadium-name { font-weight: 700; font-size: .85rem; color: #cfcfcf; padding: 4px 0; }
.sched-table { width: 100%; }
.sched-time { width: 4em; font-variant-numeric: tabular-nums; color: #cfcfcf; }
.sched-status { width: 12em; white-space: nowrap; }
.sched-score { font-variant-numeric: tabular-nums; margin-right: 6px; }
.sched-table tr.next td { background: rgba(242,194,27,.1); }
.match-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.match-nav-arrows { margin-left: auto; display: flex; gap: 6px; }

.scoreboard { text-align: center; }
.sb-meta { color: #bdbdbd; font-size: .9rem; margin-bottom: 10px; }
.sb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.sb-team { font-size: 1.5rem; font-weight: 800; text-align: right; color: #fff; line-height: 1.15; }
.sb-team.away { text-align: left; }
.sb-team small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--league-yellow); }
.sb-score { display: flex; align-items: center; gap: 8px; font-size: 2rem; font-weight: 800; }
.sb-score input { width: 2.2em; font-size: 2rem; font-weight: 800; text-align: center; padding: 4px 0; }
.sb-pens { margin-top: 10px; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.sb-pens[hidden] { display: none; }
.sb-check { margin-top: 10px; font-size: .9rem; color: #9a9a9a; }
.sb-check.ok { color: #7bd88f; }
.sb-check.warn { color: #ffb86b; font-weight: 600; }
@media (max-width: 600px) { .sb-team { font-size: 1.05rem; } .sb-score input { font-size: 1.5rem; } }

.match-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.match-columns .card { margin-bottom: 0; }
@media (max-width: 1100px) { .match-columns { grid-template-columns: minmax(0, 1fr); } }
.side-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.side-head h2 { margin: 0 0 8px; }
.match-table { width: 100%; }
.match-table th { text-align: center; padding: 4px 3px; }
.match-table th:first-child { text-align: left; }
.match-table td { padding: 4px 3px; text-align: center; }
.match-table td.pname { text-align: left; }
.match-table td.pts { text-align: right; color: var(--league-yellow); font-weight: 700; cursor: help; }
.match-table input.ev { width: 2.8em; padding: 4px 2px; text-align: center; -moz-appearance: textfield; }
.match-table input.ev::-webkit-inner-spin-button { display: none; }
.match-table tbody.player:hover td { background: rgba(242,194,27,.05); }
.match-table tbody.not-played td:not(:first-child) { opacity: .35; }
.match-table tbody.is-gk > tr:first-child td { border-bottom: 0; }
.gk-tag { display: inline-block; font-size: .65rem; font-weight: 800; padding: 1px 4px; margin-right: 6px; border-radius: 3px;
  background: var(--league-yellow); color: #111; vertical-align: 1px; }
.picked-count { display: inline-block; min-width: 1.4em; margin-left: 6px; padding: 0 4px; border-radius: 8px; font-size: .7rem;
  text-align: center; background: #3a3218; color: #f3d77a; }

/* флажки КК / ЛИМ — квадратные кнопки */
.flag { display: inline-block; cursor: pointer; }
.flag input { position: absolute; opacity: 0; pointer-events: none; }
.flag span { display: inline-block; width: 1.9em; height: 1.9em; border-radius: 5px; background: #1f1f1f; box-shadow: inset 0 0 0 1px #3a3a3a; vertical-align: middle; }
.flag input:focus-visible + span { outline: 2px solid var(--league-yellow); }
.flag-red input:checked + span { background: #d63a2b; box-shadow: none; }
.flag-red span { border-radius: 3px; width: 1.3em; }
.flag-motm input:checked + span { background: var(--league-yellow); box-shadow: none; }
.flag-motm input:checked + span::after { content: "★"; color: #111; font-weight: 800; line-height: 1.9em; }
/* подсказки в пустых полях протокола: шапку таблицы при прокрутке не видно */
.match-table input.ev::placeholder { color: #5c5c5c; font-size: .8em; font-weight: 600; }
.flag span { text-align: center; }
.flag-red span::after, .flag-motm span::after { color: #5c5c5c; font-size: .6em; font-weight: 700; line-height: 3.17em; letter-spacing: -.02em; }
.flag-red span::after { content: "КК"; }
.flag-motm span::after { content: "ЛИМ"; }
.flag-red input:checked + span::after { content: none; }
.flag-motm input:checked + span::after { font-size: 1em; line-height: 1.9em; }

/* полоса вратаря под строкой */
.gk-strip { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 6px 10px; margin-bottom: 4px;
  background: rgba(242,194,27,.06); border-left: 3px solid var(--league-yellow); border-radius: 0 6px 6px 0; }
.gk-num { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.gk-num input { width: 2.8em; padding: 4px 2px; text-align: center; }
.stepper { display: inline-flex; align-items: center; }
.stepper input { border-radius: 0; }
.console-page .stepper .step { padding: 4px 8px; background: #2e2e2e; color: #eee; font-weight: 700; }
.stepper .step:first-child { border-radius: 5px 0 0 5px; }
.stepper .step:last-child { border-radius: 0 5px 5px 0; }
.chip { display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { padding: 4px 12px; border-radius: 14px; background: #1f1f1f; box-shadow: inset 0 0 0 1px #3a3a3a; font-size: .85rem; color: #cfcfcf; }
.chip input:checked + span { background: var(--league-yellow); color: #111; font-weight: 700; box-shadow: none; }
.chip input:focus-visible + span { outline: 2px solid #fff; }
.chip.bad input:checked + span { background: #e67e22; }
.match-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.match-actions p { flex-basis: 100%; margin: 4px 0 0; }
.sched-warn { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid #ffb86b; background: rgba(255,184,107,.08); color: #ffd3a3; }
/* вратарь: значок «ВР» — переключатель «стоял в воротах» */
.gk-on { cursor: pointer; }
.gk-on input { position: absolute; opacity: 0; pointer-events: none; }
.gk-on input:not(:checked) + .gk-tag { background: #2a2a2a; color: #777; box-shadow: inset 0 0 0 1px #444; }
.gk-on input:focus-visible + .gk-tag { outline: 2px solid #fff; }
.match-table tbody.not-played td:not(:first-child) { opacity: 1; }
.match-table tbody.not-played td input.ev, .match-table tbody.not-played td .flag, .match-table tbody.not-played .gk-strip,
.match-table tbody.not-played td.pts { opacity: .35; }
/* стадия плей-офф и нераспознанные команды расписания */
.stage-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 4px; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; background: #5a1f1f; color: #ffc9c0; vertical-align: 1px; }
.sched-table tr.unresolved td { background: rgba(255,184,107,.07); }
.team-fix { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
.team-fix-side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 26em; }
.team-fix-side input { width: 15em; padding: 4px 8px; }
.team-fix-dash { padding-top: 5px; }
.team-raw { color: #ffb86b; font-weight: 700; }
.console-page .team-fix .suggest { padding: 2px 8px; font-size: .78rem; font-weight: 500; background: #2e2a18; color: #f3d77a;
  box-shadow: inset 0 0 0 1px rgba(243,215,122,.35); }

/* ---------- Публичные страницы «Матчи» и протокол матча ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.fixtures-day h2 { color: var(--league-yellow); }
.fixtures-stadium { margin-bottom: 10px; }
.fixtures-stadium-name { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9a9a9a; margin: 6px 0 4px; }
.fixture { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) 4.6em minmax(0, 1fr) minmax(0, 13em); align-items: center; gap: 10px;
  padding: 7px 8px; color: #eaeaea; border-bottom: 1px solid rgba(255,255,255,.06); }
.fixture[hidden] { display: none; }
a.fixture:hover { background: rgba(242,194,27,.07); text-decoration: none; }
.fx-time { color: #9a9a9a; font-variant-numeric: tabular-nums; }
.fx-team { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-team.home { text-align: right; }
.fx-team.win { color: #fff; font-weight: 800; }
.fx-score { text-align: center; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; background: #0e0e0e;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); padding: 2px 0; }
.fx-score i { font-style: normal; margin: 0 3px; color: #777; }
.fixture.played .fx-score { background: var(--league-yellow); color: #111; box-shadow: none; }
.fixture.played .fx-score i { color: #111; }
.fixture.cancelled { opacity: .55; }
.fx-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.fx-meta .stage-tag { margin-left: 0; }
@media (max-width: 700px) {
  .fixture { grid-template-columns: 3em minmax(0, 1fr) 4em minmax(0, 1fr); font-size: .9rem; gap: 6px; }
  .fx-meta { grid-column: 2 / -1; }
}
.sb-final { font-size: 2.6rem; gap: 10px; }
.protocol td { vertical-align: middle; }
.protocol-events .ev-badge { margin: 2px 4px 2px 0; }
.ev-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: .78rem; font-weight: 700; background: #2a2a2a; color: #e5e5e5; }
.ev-badge.ev-goal { background: #1f3b26; color: #9fe3b0; }
.ev-badge.ev-yellow { background: #f2c21b; color: #111; }
.ev-badge.ev-red { background: #d63a2b; color: #fff; }
.ev-badge.ev-motm { background: #3a3218; color: #f3d77a; }
.ev-badge.ev-clean_sheet, .ev-badge.ev-pen_save { background: #1c2a3b; color: #b5d3ff; }

/* ---------- Хаб: плитки «Расписание» и «Результаты» ---------- */
.tile-wide3 { grid-column: span 3; }
.tile-fixtures { list-style: none; padding: 0; margin: 4px 0 0; font-size: .92em; }
.tile-fixtures li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center;
  padding: 3px 0; border-top: 1px solid rgba(255,255,255,.07); }
.tile-fixtures .t { color: #9a9a9a; font-variant-numeric: tabular-nums; }
.tile-fixtures .h { text-align: right; }
.tile-fixtures .h, .tile-fixtures .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-fixtures .s { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2.8em; text-align: center; }
.tile-fixtures .s.res { background: var(--league-yellow); color: #111; padding: 0 4px; }
.tile-fixtures.no-time li { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
/* LIVE: матч идёт по расписанию прямо сейчас */
.live-tag { display: inline-block; padding: 0 6px; border-radius: 3px; background: #e0262b; color: #fff; font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; line-height: 1.5; animation: live-pulse 1.6s ease-in-out infinite; vertical-align: 1px; }
@keyframes live-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .live-tag { animation: none; } }
.tile-fixtures.sched li { grid-template-columns: 8em minmax(0, 1fr) auto minmax(0, 1fr); row-gap: 0; padding: 4px 0; }
.tile-fixtures.sched .t { white-space: nowrap; font-size: .85em; }
.tile-fixtures.sched .t b { color: #fff; font-size: 1.1em; margin-right: 2px; }
.tile-fixtures.sched .where { grid-column: 2 / -1; font-size: .75em; color: #8a8a8a; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-fixtures .stage-tag { font-size: .62rem; padding: 0 4px; margin-left: 0; }
.fixture.live { background: rgba(224,38,43,.08); }
.hub .tile-fixtures { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.tile-fixtures li[hidden] { display: none; }
.tile-fixtures.sched li { line-height: 1.25; padding: 3px 0; }
.tile-fixtures.sched .stage-tag { line-height: 1.25; vertical-align: 0; }

/* ---------- Турнирные таблицы ---------- */
.console-head .view-switch { margin: 0; }
.standings-card h2 { margin-top: 0; }
.standings, .cross { width: 100%; font-variant-numeric: tabular-nums; }
.standings th, .standings td { text-align: center; }
.standings td.team, .standings th:nth-child(2), .cross td.team, .cross th:nth-child(2) { text-align: left; }
.standings td.team, .cross td.team { font-weight: 600; white-space: nowrap; }
.standings td.place, .cross td.place { color: #9a9a9a; width: 2em; }
.standings td.pts { font-weight: 800; color: #fff; font-size: 1.05em; }
.card-ico { display: inline-block; width: .65em; height: .9em; border-radius: 2px; vertical-align: -1px; }
.card-ico.yellow { background: #f2c21b; }
.card-ico.red { background: #d63a2b; }
.cross th, .cross td { text-align: center; padding: 4px 3px; min-width: 2.6em; }
.cross td.self { background: repeating-linear-gradient(135deg, #1b1b1b 0 6px, #232323 6px 12px); }
.cross .res { display: block; font-weight: 700; font-size: .85rem; border-radius: 3px; margin: 1px 0; }
.cross .res.w { background: rgba(123,216,143,.18); color: #9fe3b0; }
.cross .res.d { background: #2a2a2a; color: #ddd; }
.cross .res.l { background: rgba(231,76,60,.18); color: #ffb3aa; }
.disclaimer { margin: 24px 0 8px; padding: 10px 14px; border-left: 3px solid #555; color: #8a8a8a; font-size: .82rem; background: rgba(255,255,255,.03); }

/* плитка «Таблицы» */
.tile-table { list-style: none; padding: 0; margin: 4px 0 0; font-size: .9em; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.tile-table li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) 1.6em 2em; gap: 6px; padding: 2px 0; border-top: 1px solid rgba(255,255,255,.07); }
.tile-table .p { color: #9a9a9a; }
.tile-table .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-table .g { color: #8a8a8a; text-align: right; }
.tile-table b { text-align: right; }
.hub-hint a { color: #8a8a8a; text-decoration: underline; }
.phase-switch .chip span.on { background: var(--league-yellow); color: #111; font-weight: 700; box-shadow: none; }
.phase-switch a.chip:hover { text-decoration: none; }

/* ---------- Админка: деление дивизиона на этапы ---------- */
.split-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; margin: 10px 0; }
.split-group h3, .split-grid h3 { margin: 0 0 6px; }
.split-tiers td { padding: 3px 4px; border: 0; }
.split-tiers input.tier-n { width: 3.5em; }
.split-tiers input.tier-name { width: 11em; }
.split-teams { margin: 8px 0 0; padding-left: 1.8em; font-size: .9rem; }
.split-teams li { padding: 1px 6px; border-left: 3px solid transparent; }
.split-teams li span { display: inline-block; min-width: 12em; }
.split-teams li.tier-gold { border-left-color: #f2c21b; background: rgba(242,194,27,.08); }
.split-teams li.tier-silver { border-left-color: #c0c7cf; background: rgba(192,199,207,.07); }
.split-teams li.tier-bronze { border-left-color: #c47a3a; background: rgba(196,122,58,.08); }
.split-tiers tr.tier-gold b { color: #f2c21b; }
.split-tiers tr.tier-silver b { color: #c0c7cf; }
.split-tiers tr.tier-bronze b { color: #d8955a; }
.standings.compact td, .standings.compact th { padding: 3px 6px; }
.split-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.split-tiers td { white-space: nowrap; }
.row-form label.inline { flex-direction: row; align-items: center; gap: 6px; align-self: flex-end; padding-bottom: 8px; }
/* ручные корректировки таблицы */
.adj-mark { color: var(--league-yellow); font-weight: 800; margin-left: 2px; cursor: help; }
.adj-notes { list-style: none; padding: 0; margin: 10px 0 0; font-size: .82rem; color: #a8a8a8; }
.adj-notes li { padding: 2px 0; }
.adj-notes b { color: #ddd; }

/* ---------- Плитка «Статистика»: лучший игрок с матчевым фото в углу ---------- */
.tile-star > :not(.star-photo):not(.star-card) { position: relative; z-index: 1; max-width: 62%; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.tile-star > .tile-label:not(.star-photo):not(.star-card) { max-width: none; }
.star-photo {
  position: absolute; z-index: 0; pointer-events: none; width: auto; max-width: none;
  /* привязка к правому нижнему углу; сдвиг — в процентах размера самого фото, поэтому при любой форме
     плитки (десктоп почти квадратная, телефон — вытянутая) за краем остаётся одна и та же часть игрока */
  right: 0; bottom: 0; height: calc(100% * var(--s, 1));
  transform: translate(calc(1% * var(--x, 0)), calc(1% * var(--y, 0))) scaleX(var(--f, 1));
  filter: drop-shadow(0 0 14px rgba(242,194,27,.22));
}
.star-card { position: absolute; z-index: 0; right: 7%; bottom: 9%; --w: clamp(60px, 5.4vw, 116px); pointer-events: none; }
/* админка: редактор матчевого фото */
.action-editor { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .action-editor { grid-template-columns: 1fr; } }
.action-controls { display: flex; flex-direction: column; gap: 12px; }
.action-controls label { display: flex; flex-direction: column; gap: 4px; }
.action-controls label.inline { flex-direction: row; align-items: center; gap: 6px; }
.action-controls output { color: var(--league-yellow); font-weight: 700; margin-left: 6px; }
.action-controls input[type=range] { width: 100%; accent-color: var(--league-yellow); }
.action-previews { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.preview-hub { display: block; flex: none; }
.preview-hub .tile { height: 100%; box-sizing: border-box; }
.preview-laptop { width: 269px; height: 222px; font-size: 15px; }
.preview-fullhd { width: 365px; height: 315px; font-size: 20px; }
.preview-laptop .star-card { --w: 78px; }
.preview-fullhd .star-card { --w: 104px; }
/* телефон: плитка во всю ширину экрана (390 − поля), высота по содержимому, не меньше 150 — как на главной */
.preview-phone { width: 335px; min-height: 150px; font-size: 14px; display: flex; }
.preview-phone .tile { height: auto; flex: 1; }
.preview-phone-sm { width: 305px; }
.preview-phone .star-card { --w: 60px; }

/* Телефон: плитка «Расписание» — стадия и стадион переносятся под матч, а не обрезаются */
@media (max-width: 560px) {
  .tile-fixtures.sched li { grid-template-columns: 5.6em minmax(0, 1fr) auto minmax(0, 1fr); }
  .tile-fixtures.sched .where { grid-column: 1 / -1; text-align: left; white-space: normal; overflow: visible; }
  .tile-fixtures.sched .stage-tag { white-space: normal; }
}

/* ---------- Конструктор: игроки команд без матча в туре ---------- */
.idle-tag { color: #ff8a7a; font-weight: 700; }
.idle-warning { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid #ff6b5b; background: rgba(231,76,60,.12); color: #ffc9c0; font-size: .9rem; }
.idle-warning.hidden { display: none; }
.slot.idle .fut-card { filter: grayscale(.85) brightness(.75); }
.slot-idle { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-8deg); z-index: 3; white-space: nowrap;
  background: #d63a2b; color: #fff; font-size: max(9px, calc(var(--w, 100px) * .1)); font-weight: 800; padding: .15em .5em;
  text-transform: uppercase; letter-spacing: .03em; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.tile-hero .tile-alert.idle { color: #ffb3aa; border-color: #ff6b5b; background: rgba(231,76,60,.15); }
.slot.idle { position: relative; }

/* Стадия и стадион под матчем: в одну строку, если оба помещаются целиком, иначе стадион — на следующей строке */
.tile-fixtures.sched .where { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 6px;
  white-space: normal; overflow: hidden; }
.tile-fixtures.sched .where > * { white-space: nowrap; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .tile-fixtures.sched .where { justify-content: flex-start; } }

/* ---------- Трансляции ВК Видео ---------- */
.stream-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.stream-form input[name=link] { flex: 1 1 260px; padding: 4px 8px; font-size: .85rem; }
.stream-modal { width: min(960px, 96vw); padding: 0; border: 0; background: #0d0d0d; color: #eee; box-shadow: 0 0 0 1px rgba(242,194,27,.35), 0 20px 60px rgba(0,0,0,.7); }
.stream-modal::backdrop { background: rgba(0,0,0,.75); }
.stream-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.stream-title { flex: 1; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--league-yellow); font-size: .85rem; }
.stream-close { background: none !important; color: #ddd !important; font-size: 1.1rem; padding: 2px 8px; }
.stream-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-note { margin: 0; padding: 8px 14px; color: #8a8a8a; }
.stream-note a { color: #bdbdbd; text-decoration: underline; }
[data-stream].live-tag, .live-tag[data-stream] { cursor: pointer; }
.live-tag[data-stream]::after { content: " ▶"; }
.stream-btn { padding: 2px 8px; font-size: .75rem; margin-left: 8px; vertical-align: 1px; }
dialog.modal.stream-modal { width: min(960px, 96vw); max-width: none; padding: 0; border-radius: 0; }

/* ---------- Аватарки участников ---------- */
.avatar { display: inline-block; flex: none; border-radius: 50%; object-fit: cover; vertical-align: middle;
  aspect-ratio: 1; min-width: 0; min-height: 0; max-width: none; }  /* в колонке Safari растягивал картинку до исходной высоты */
.avatar-sm { width: 22px; height: 22px; font-size: .7rem; }
.avatar-md { width: 32px; height: 32px; font-size: .9rem; }
.avatar-lg { width: 88px; height: 88px; font-size: 2.2rem; }
.avatar-letter { display: inline-flex; align-items: center; justify-content: center; background: var(--league-yellow); color: #111; font-weight: 800; line-height: 1; }
.user-cell { white-space: nowrap; }
.user-cell .avatar { margin-right: 8px; }
.tile-top li .avatar { width: 1.3em; height: 1.3em; font-size: .65em; }
.account-avatar { object-fit: cover; padding: 0; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }

/* ---------- Админка: журнал ---------- */
.chip-row a.chip:hover { text-decoration: none; }
.chip-row .chip span.on { background: var(--league-yellow); color: #111; font-weight: 700; box-shadow: none; }
.log-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; height: 150px; margin: 8px 0 4px; }
.log-day { display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.log-bars { flex: 1; width: 70%; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.log-bar { width: 100%; min-height: 0; }
.log-bar.squads { background: var(--league-yellow); }
.log-bar.reg { background: #7bd88f; }
.log-total { font-size: .7rem; color: #cfcfcf; height: 1.1em; }
.log-label { font-size: .65rem; color: #8a8a8a; white-space: nowrap; }
.log-key { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin: 0 4px 0 10px; }
.log-key.reg { background: #7bd88f; margin-left: 0; }
.log-key.squads { background: var(--league-yellow); }
.log-table td { vertical-align: middle; }
.log-table .avatar { margin-right: 6px; }
.log-table tr.log-failed td { color: #ff8a7a; }
.log-table tr.log-admin td:nth-child(3) { color: var(--league-yellow); }
/* топ-3 на плитке «Таблица сезона»: аватарка не растягивается вместе с названием и стоит по центру строки */
.tile-top li { align-items: center; }
.tile-top li .avatar { flex: 0 0 auto; }

/* ---------- Конструктор: избранное, черновик, матчи тура ---------- */
.fav-col { width: 1.6em; padding-left: 10px !important; }
.add-col { width: 2em; padding-right: 0 !important; }
.console-page .market-list button.fav-btn:not(.danger):not(:disabled) { background: none; padding: 2px; line-height: 0; display: inline-flex; box-shadow: none; }
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: #8a8a8a; stroke-width: 1.8; stroke-linejoin: round; transition: fill .12s, stroke .12s, transform .12s; }
.fav-btn:hover svg { stroke: var(--league-yellow); }
.fav-btn.on svg { fill: var(--league-yellow); stroke: var(--league-yellow); filter: drop-shadow(0 0 4px rgba(242,194,27,.45)); }
.fav-btn:active svg { transform: scale(.85); }
.draft-banner { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--league-yellow); background: rgba(242,194,27,.1); color: #f3d77a; font-size: .9rem; }
.market-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.console-page .market-tab { background: #242424; color: #cfcfcf; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; padding: 6px 12px; }
.console-page .market-tab.active { background: var(--league-yellow); color: #111; }
.match-filter { margin: 0 0 8px; padding: 6px 10px; background: rgba(242,194,27,.1); border-left: 3px solid var(--league-yellow); font-size: .9rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.match-filter[hidden], .matches-view[hidden], #players-view[hidden] { display: none; }
.matches-view { max-height: 62vh; overflow: auto; }
.mv-day { color: var(--league-yellow); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin: 10px 0 2px; }
.mv-day:first-child { margin-top: 0; }
.mv-stadium { color: #9a9a9a; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 2px; }
.console-page .mv-match { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; text-align: left;
  background: none; color: #eaeaea; font-weight: 500; padding: 6px 6px; border-bottom: 1px solid rgba(255,255,255,.06); border-radius: 0; }
.console-page .mv-match:hover { background: rgba(242,194,27,.07); }
.console-page .mv-match.active { background: rgba(242,194,27,.15); }
.mv-time { color: #9a9a9a; font-variant-numeric: tabular-nums; }
.mv-teams { font-weight: 600; }
.mv-teams small { margin-left: 6px; font-weight: 400; }
.mv-teams .stage-tag { margin-left: 6px; }
.mv-right { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.mv-mine { font-size: .72rem; padding: 1px 6px; border-radius: 8px; background: #3a3218; color: #f3d77a; }
.mv-score { background: var(--league-yellow); color: #111; padding: 0 6px; font-variant-numeric: tabular-nums; }
button[hidden] { display: none !important; }

/* ---------- Выбор матча у игрока команды с несколькими матчами в туре ---------- */
.slot-match { position: relative; z-index: 2; margin-top: -2px; padding: .15em .55em; border-radius: 10px; cursor: pointer;
  font: 700 max(9px, calc(var(--w, 100px) * .1)) / 1.2 inherit; white-space: nowrap; max-width: calc(var(--w, 100px) * 1.15);
  overflow: hidden; text-overflow: ellipsis; background: var(--league-yellow); color: #111; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.console-page .slot-match { background: var(--league-yellow); color: #111; font-weight: 700; }
.console-page .slot-match.unset { background: rgba(17,17,17,.85); color: #f3d77a; box-shadow: inset 0 0 0 1.5px #f3d77a; outline: 1px dashed transparent; }
.match-warning { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--league-yellow); background: rgba(242,194,27,.1); color: #f3d77a; font-size: .9rem; }
.match-warning.hidden { display: none; }

/* ---------- Матчи вне фентези ---------- */
.offline-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; background: #2a2a2a; color: #b8b8b8; box-shadow: inset 0 0 0 1px #555; vertical-align: 1px; }
.sched-extra { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.sched-extra select { padding: 2px 6px; font-size: .8rem; }
.console-page button.offline-btn { background: #3a3a3a; color: #e5e5e5; box-shadow: inset 0 0 0 1px #777; font-weight: 700; }
/* вкладки «Игроки | Матчи тура»: содержимое растягивается на остаток панели, список прокручивается внутри */
#players-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.matches-view { flex: 1; min-height: 0; }
@media (min-width: 1400px) and (min-height: 800px) {
  .fit-screen .console-layout .matches-view { max-height: none; overflow: auto; }
}
.transfer-badge { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: .62rem; font-weight: 800; letter-spacing: .04em; background: #1c2a3b; color: #b5d3ff; box-shadow: inset 0 0 0 1px #4a78ec; vertical-align: 1px; cursor: help; }
/* плашка выбора матча — поверх карточки над нижним углом, не меняет высоту слота (карточки не смещаются) */
.slot { position: relative; }
.slot-match { position: absolute; left: 50%; top: calc(var(--w) / .7 * .92); transform: translate(-50%, -50%); margin-top: 0; }
/* плашка выбора матча масштабируется вместе с карточкой (как её шрифты), без минимального размера */
.slot-match { font-size: calc(var(--w, 100px) * .1); padding: .2em .6em; max-width: calc(var(--w, 100px) * 1.35); }
/* плашка сразу под строкой цена/очки (≈80% высоты), края — по краям карточки */
.slot-match { top: calc(var(--w, 100px) / .7 * .815); transform: translateX(-50%);
  font-size: calc(var(--w, 100px) * .1); padding: .2em .4em; width: var(--w, 100px); max-width: none;
  box-sizing: border-box; text-align: center; }

/* ---------- Главная плитка: состояния состава ---------- */
.hero-court.with-captions .pitch .slot { --w: 18cqw; gap: 2px; }  /* под карточками подписи «ещё не играл» — чуть меньше */
.hero-court.with-captions .pitch-row { margin-bottom: 1cqw; }
.hero-court .slot-caption { display: block; font-size: max(9px, 2.6cqw); margin-top: 2px; }
.hero-court.faded .fut-wrap { opacity: .45; filter: grayscale(.3); }
.slot-caption.wait { background: #333; color: #bdbdbd; }
.tile-score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tile-score b { font-size: 2.6em; font-weight: 800; line-height: 1; }
.tile-score span { color: #cfcfcf; }
.tile-alert.muted-alert { color: #cfcfcf; border-color: #555; background: rgba(255,255,255,.05); }
.live-dot { color: #e0262b; font-weight: 800; }
/* «Мои туры»: столбики очков по турам */
.tile .bars { flex: 1; display: flex; align-items: flex-end; gap: 5px; min-height: 0; margin-top: 6px; }
.tile .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.tile .bar i { display: block; width: 100%; background: rgba(242,194,27,.45); border-radius: 2px 2px 0 0; }
.tile .bar.cur i { background: var(--league-yellow); }
.tile .bar b { font-size: .62em; color: #eee; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.tile .bar span { font-size: .55em; color: #8a8a8a; margin-top: 3px; }
.tile .bar.cur span { color: var(--league-yellow); font-weight: 800; }
.tile-top li.me span { color: var(--league-yellow); font-weight: 700; }
/* «Расписание»: стадия и стадион — всегда отдельными строками; LIVE — рядом со временем */
.tile-fixtures.sched .where { flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 1px; }
@media (max-width: 560px) { .tile-fixtures.sched .where { align-items: flex-start; } }
.tile-fixtures.sched .t .live-tag { margin-left: 2px; }
/* Медали: 1–3 места в турнирных таблицах (плитка и страница «Таблицы») — цветом цифры, без кружков,
   чтобы номера стояли ровно в столбец */
.medal-1 .p, .medal-1 .medal, .medal.medal-1 { color: #f2c21b; font-weight: 800; }
.medal-2 .p, .medal-2 .medal, .medal.medal-2 { color: #d5dbe1; font-weight: 800; }
.medal-3 .p, .medal-3 .medal, .medal.medal-3 { color: #d8955a; font-weight: 800; }
/* плитка админки: напоминания */
.admin-reminders { list-style: none; padding: 0; margin: 4px 0 0; font-size: .85em; }
.admin-reminders li { padding: 3px 0 3px 14px; position: relative; color: #f3d77a; }
.admin-reminders li::before { content: "•"; position: absolute; left: 2px; color: var(--league-yellow); }

/* ---------- Плитка «Правила»: основа + «Знаете ли вы?» или таблица очков ---------- */
.rules-core { list-style: none; padding: 0; margin: 2px 0 0; font-size: .82em; color: #d5d5d5; line-height: 1.35; }
.rules-tip { margin-top: auto; padding: 6px 9px; background: rgba(242,194,27,.08); border-left: 3px solid var(--league-yellow);
  font-size: .76em; line-height: 1.3; color: #eee; }
.rules-tip small { display: block; color: var(--league-yellow); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8em; margin-bottom: 1px; }
.rules-tip b { color: #fff; }
/* Низ плитки: обычная подпись слева — «Сыграно 4 · Все результаты →» */
.tile-go .info::after { content: " · "; }
.tile-go .go { white-space: nowrap; }  /* не переносить «Вся / статистика» */
/* список сам прижат к низу (margin-top: auto) — призыв сразу под ним */
.tile-top + .tile-go, .rules-tip + .tile-go { margin-top: 6px; }
.rules-ptable { width: 100%; font-size: .72em; border-collapse: collapse; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rules-ptable th, .rules-ptable td { padding: 2px 3px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: center; }
.rules-ptable th:first-child, .rules-ptable td:first-child { text-align: left; }
.rules-ptable th { color: #9a9a9a; font-weight: 700; text-transform: none; }
.rules-ptable td b { color: #fff; }
.tips-table textarea { width: 100%; min-width: 280px; font: inherit; font-size: .9rem; }
.tips-table .tip-preview { font-size: .88rem; max-width: 380px; }
.tips-table .tip-preview b { color: #fff; }
/* «Статистика» без матчевого фото: FUT-карточка в правом нижнем углу (сильнее общего .slot { position: relative }) */
.tile-star .star-card.slot { position: absolute; right: 5%; bottom: 7%; }
/* «Статистика»: значки под именем — голы, передачи, старшее звание */
.star-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; font-size: .9em; }
.star-stats .ev-badge { font-size: .66em; }
.ev-badge.ev-assist { background: #23303f; color: #b5d3ff; }
.ev-badge.ev-potd { background: #3a3218; color: #ffe27a; box-shadow: inset 0 0 0 1px #f2c21b; }
.ev-badge.ev-totw { background: #111; color: #f3d77a; box-shadow: inset 0 0 0 1px #b8872a; }

/* ---------- Табы по турам (templates/_tour_tabs.html): «Сезон» слева, туры одной строкой с прокруткой ---------- */
.tour-tabs { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; min-width: 0; }
.tour-tabs a { flex: none; padding: 5px 11px; border-radius: 999px; background: #242424; color: #d5d5d5; font-size: .9rem;
  font-variant-numeric: tabular-nums; min-width: 2.3em; text-align: center; max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-tabs a:hover { background: #2f2a14; text-decoration: none; }
.tour-tabs a.active { background: var(--league-yellow); color: #111; font-weight: 700; }
.tour-tabs .tt-season { font-weight: 700; padding: 5px 14px; }
.tt-strip { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.tt-caption { color: #8a8a8a; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; flex: none; }
.tt-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; scroll-behavior: auto; }
.tt-scroll::-webkit-scrollbar { display: none; }
.tour-tabs .tt-arrow { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: #2a2a2a; color: #eee; font-size: 1.1rem; line-height: 1; box-shadow: none; }
.tour-tabs .tt-arrow:hover { background: #3a3a3a; }
.tt-arrow[hidden] { display: none !important; }
/* затухание у края, за которым есть ещё туры */
.tour-tabs.fade-left .tt-scroll { -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px); mask-image: linear-gradient(90deg, transparent, #000 24px); }
.tour-tabs.fade-right .tt-scroll { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.tour-tabs.fade-left.fade-right .tt-scroll { -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
@media (max-width: 600px) { .tt-arrow { display: none !important; } .tt-caption { display: none; } }

/* ---------- Фентези-таблица сезона ---------- */
.standings-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .standings-layout { grid-template-columns: minmax(0, 1fr); } }
.place-cell { white-space: nowrap; }
.place-cell .medal { display: inline-block; min-width: 1.3em; }
.move { font-size: .72em; font-weight: 700; margin-left: 4px; }
.move.up { color: #7bd88f; } .move.down { color: #ff8a7a; } .move.same { color: #6d6d6d; }
.console-page tr.me td:first-child { box-shadow: inset 3px 0 0 var(--league-yellow); }
.console-page tr.me .user-cell a { color: var(--league-yellow); font-weight: 700; }
.season-table .short { display: none; }
@media (max-width: 600px) {
  .season-table .opt, .season-table .muted.small, .season-table .full { display: none; }
  .season-table .short { display: inline; }
  .season-table th, .season-table td { padding-left: 4px; padding-right: 4px; }
  .season-table .user-cell .avatar { margin-right: 5px; }
}
/* пьедестал: 2 · 1 · 3, классический (templates/_podium.html) */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); justify-content: center; align-items: end; gap: 10px; margin: 4px 0 16px; }
.podium-col { display: flex; flex-direction: column; align-items: center; min-width: 0; color: #eaeaea; }
.podium-col:hover { text-decoration: none; }
.podium-col:hover .podium-step { background: linear-gradient(180deg, #332d16, #171717); }
.podium-col .avatar { width: 52px; height: 52px; align-self: center; font-size: 1.3rem; margin-bottom: 6px; box-shadow: 0 0 0 3px var(--bg, #0f0f0f), 0 0 0 5px var(--ring); }
.podium-col.c1 .avatar { width: 66px; height: 66px; font-size: 1.6rem; }
.podium-col.c1 { --ring: #f2c21b; } .podium-col.c2 { --ring: #d5dbe1; } .podium-col.c3 { --ring: #d8955a; }
.podium-name { color: #fff; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-col.me .podium-name { color: var(--league-yellow); }
.podium-pts { color: #a8a8a8; font-size: .85rem; margin-bottom: 8px; } .podium-pts b { color: #fff; font-size: 1.1rem; }
.podium-step { width: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #2a2a2a, #161616);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); border-top: 3px solid var(--ring); }
.podium-col.c1 .podium-step { height: 92px; } .podium-col.c2 .podium-step { height: 66px; } .podium-col.c3 .podium-step { height: 48px; }
.podium-place { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--ring); }
@media (max-width: 600px) {
  .podium { gap: 6px; }
  .podium-name { font-size: .85rem; }
  .podium-col .avatar { width: 42px; height: 42px; font-size: 1.05rem; } .podium-col.c1 .avatar { width: 52px; height: 52px; font-size: 1.3rem; }
  .podium-col.c1 .podium-step { height: 76px; } .podium-col.c2 .podium-step { height: 56px; } .podium-col.c3 .podium-step { height: 42px; }
}

/* ---------- Фентези-итоги тура: цифры, ссылки, составы тройки ---------- */
.console-page h2.section-title { margin: 28px 0 10px; }
.tour-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.tour-figures .fig { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: linear-gradient(160deg, #232323, #151515);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); border-left: 3px solid #3a3a3a; }
.tour-figures .fig.wide { grid-column: span 2; }
.tour-figures .fig.find { border-left-color: var(--league-yellow); }
.tour-figures small { color: var(--league-yellow); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tour-figures b { font-size: 1.35rem; color: #fff; }
.tour-figures .wide b { font-size: 1.05rem; }
.tour-figures span { color: #a8a8a8; font-size: .85rem; }
@media (max-width: 600px) { .tour-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tour-figures .fig.wide { grid-column: 1 / -1; }
  .tour-figures .fig { padding: 8px 10px; } .tour-figures b { font-size: 1.1rem; } }
.tour-links { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 16px; }
.top-squads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.top-squad { padding: 12px; margin: 0; }
.ts-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #eaeaea; }
.ts-head:hover { text-decoration: none; color: var(--league-yellow); }
.ts-head .medal { font-size: 1.3rem; font-weight: 800; min-width: 1em; }
.ts-head .ts-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-head b { font-size: 1.3rem; color: #fff; }
.ts-cost { color: #a8a8a8; font-size: .85rem; font-variant-numeric: tabular-nums; }
.top-squad .bench { margin-top: 10px; padding: 8px; }
.top-squad .bench-row { container-type: inline-size; gap: 3%; flex-wrap: nowrap; }
.top-squad .bench .slot { --w: 22cqw; }
.ts-bonus { margin-top: 6px; text-align: right; }
@media (max-width: 1000px) {
  /* телефон и планшет: составы листаются вбок, по одному на экран */
  .top-squads { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; }
  .top-squad { flex: 0 0 min(86%, 420px); scroll-snap-align: start; }
}

/* ---------- Рекорды сезона ---------- */
/* над таблицей, в одном стиле с «цифрами тура» */
.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 16px; }
.console-page .record.card { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px 14px; color: #eaeaea; clip-path: none;
  background: linear-gradient(160deg, #232323, #151515); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); border-left: 3px solid var(--league-yellow); }
.console-page .record.card:hover { text-decoration: none; background: linear-gradient(160deg, #2e2a18, #171717); }
.record small { color: var(--league-yellow); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.rec-value b { font-size: 1.35rem; color: #fff; }
.rec-value { color: #a8a8a8; }
.rec-who { color: #fff; font-weight: 700; font-size: 1.05rem; }
.rec-user { display: flex; align-items: center; gap: 6px; font-weight: 700; }

/* Итоги тура: таблица слева (место, % от максимума, место в сезоне), команда мечты справа — прилипает при прокрутке */
.tour-layout.with-dream { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
/* короткая таблица тянется до низа команды мечты; команда мечты — своей высоты, чтобы прилипать при прокрутке */
.tour-layout.with-dream > .dream-side { align-self: start; }
.tour-layout .card { margin-bottom: 0; }
.dream-side { position: sticky; top: 12px; }
.dream-side .top-squad { margin: 0; }
.dream-note { margin: 10px 2px 0; line-height: 1.4; }
.tour-table .pct { color: #cfcfcf; white-space: nowrap; }
.pct-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--league-yellow); opacity: .7; vertical-align: middle; margin-left: 6px; }
@media (max-width: 1000px) { .tour-layout.with-dream { grid-template-columns: minmax(0, 1fr); } .dream-side { position: static; max-width: 420px; } }
@media (max-width: 600px) { .pct-bar { display: none; } }

/* ---------- Статистика игроков ---------- */
/* топ-3 FUT-карточками пьедесталом 2 · 1 · 3 */
.card-podium { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 4px 0 16px; }
.card-podium .lc { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.card-podium .slot { --w: 104px; }
.card-podium .place-1 .slot { --w: 128px; }
.card-podium .val { color: #a8a8a8; font-size: .85rem; } .card-podium .val b { color: #fff; font-size: 1.05rem; }
.card-podium .place { font-size: 1.6rem; font-weight: 800; line-height: 1; }
@media (max-width: 600px) { .card-podium { gap: 8px; } .card-podium .slot { --w: 92px; } .card-podium .place-1 .slot { --w: 108px; } }
.stat-leaders { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 600px) { .stat-leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-leaders b { font-size: .95rem; } }
/* переключатель «Полевые / Вратари» */
.seg { display: inline-flex; gap: 4px; background: #1b1b1b; padding: 3px; border-radius: 999px; margin-bottom: 10px; }
.console-page .seg button { background: none; color: #cfcfcf; padding: 5px 14px; border-radius: 999px; font-weight: 700; box-shadow: none; }
.console-page .seg button.on { background: var(--league-yellow); color: #111; }
.stat-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.stat-filters input { flex: 1 1 180px; max-width: 260px; }
.console-page .stats-card { overflow-x: visible; }
.stat-scroll { overflow-x: auto; }
.stat-table { width: 100%; font-variant-numeric: tabular-nums; border-collapse: separate; border-spacing: 0; }
.stat-table th, .stat-table td { white-space: nowrap; }
.stat-table th.sortable { cursor: pointer; user-select: none; }
.stat-table th.sortable:hover { color: #fff; }
.stat-table th.sorted { color: var(--league-yellow); }
.stat-table th.sorted::after { content: " ▼"; font-size: .7em; }
.stat-table th.sorted.asc::after { content: " ▲"; }
.stat-table .zero { color: #555; }
/* имя закреплено слева при прокрутке таблицы вбок */
.stat-table .pname { position: sticky; left: 0; z-index: 1; background: #1b1b1b; }
.stat-table thead .pname { background: #1f1f1f; }
.stat-table .pteam { color: #bdbdbd; }
.tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.tdot.t-royal { background: #2f5bd3; } .tdot.t-gold { background: #e6c35c; } .tdot.t-silver { background: #8d97a2; }
.tdot.t-bronze { background: #cf9055; } .tdot.t-white { background: #f4f4f4; }
.aw { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: .72rem; font-weight: 700; margin-right: 3px; }
.aw.potd { background: #3a3218; color: #ffe27a; box-shadow: inset 0 0 0 1px #f2c21b; }
.aw.totw { background: #111; color: #f3d77a; box-shadow: inset 0 0 0 1px #b8872a; }
.aw.motm { background: #3a3218; color: #f3d77a; }
.stat-note { margin: 12px 0 0; }
#st-more { margin-top: 10px; }

/* значки под FUT-карточками топ-3 (как на плитке главной) */
.card-podium .stk { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 160px; margin: 2px 0; }
.card-podium .stk .ev-badge { font-size: .7rem; }
/* плашки лидеров: «и ещё N» — остальные делящие первое место, по наведению или нажатию */
.more-names { position: relative; color: #a8a8a8; font-weight: 600; font-size: .85em; border-bottom: 1px dotted #777; cursor: help; white-space: nowrap; }
.more-list { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; min-width: 180px; max-width: 280px; white-space: normal;
  padding: 8px 10px; background: #262626; color: #eee; font-size: .85rem; font-weight: 600; line-height: 1.35; border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); }
.more-names:hover .more-list, .more-names:focus .more-list { display: block; }
.stat-leaders .stk { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; } .stat-leaders .stk .ev-badge { font-size: .7rem; }

/* Наклейки событий тура на правом верхнем углу карточки (cards.js eventStickers); размеры — в долях ширины карточки */
.fut-stickers { position: absolute; top: calc(var(--w, 116px) * -.05); right: calc(var(--w, 116px) * -.1); z-index: 3; display: flex; flex-direction: column;
  align-items: flex-end; gap: calc(var(--w, 116px) * .03); pointer-events: none; }
.stk-dot { display: inline-flex; align-items: center; justify-content: center; min-width: calc(var(--w, 116px) * .27); height: calc(var(--w, 116px) * .2);
  padding: 0 calc(var(--w, 116px) * .05); border-radius: calc(var(--w, 116px) * .1); font-size: calc(var(--w, 116px) * .12); font-weight: 800; line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,.55); transform: rotate(6deg); white-space: nowrap; letter-spacing: .02em; }
.stk-dot:nth-child(2n) { transform: rotate(-4deg); } .stk-dot:nth-child(3n) { transform: rotate(3deg); }
.stk-dot.goal { background: #2d5a39; color: #c8f5d2; } .stk-dot.assist { background: #2c4a6e; color: #d6e8ff; }
.stk-dot.clean_sheet, .stk-dot.pen_save { background: #2a3b55; color: #cfe1ff; }
.stk-dot.motm { background: #f2c21b; color: #111; }
.stk-dot.potd { background: #fff3b0; color: #111; box-shadow: inset 0 0 0 1px #c99a2e, 0 2px 4px rgba(0,0,0,.55); }
.stk-dot.totw { background: #111; color: #f3d77a; box-shadow: inset 0 0 0 1px #b8872a, 0 2px 4px rgba(0,0,0,.55); }
.stk-dot.yellow { background: #f2c21b; color: #111; } .stk-dot.red { background: #d63a2b; color: #fff; }
.slot.out .fut-stickers { opacity: 1; }
/* четвёртое место в столбике — напротив фамилии: пропускаем, столбик продолжается ниже */
.fut-stickers .stk-dot:nth-child(4) { margin-top: calc(var(--w, 116px) * .23); }
.stat-leaders .more-line { margin-top: -2px; line-height: 1.2; }

/* Популярный игрок (50+ выборов за сезон): верх карточки — языки пламени, кромка огненная */
.fut-card.fire {
  --shape: polygon(0 13%, 4% 7%, 8% 11%, 13% 2%, 18% 9%, 24% 4%, 29% 10%, 35% 0, 41% 8%, 46% 3%, 50% 9%, 54% 3%, 59% 8%, 65% 0, 71% 10%, 76% 4%, 82% 9%,
    87% 2%, 92% 11%, 96% 7%, 100% 13%, 100% 86%, 50% 100%, 0 86%);
  --edge: linear-gradient(0deg, #8a1a00 0%, #ff4d00 55%, #ffb000 80%, #ffe36b 100%); padding: 4px;
}
.fut-card.fire .fut-inner { padding-top: 12%; }
.fut-wrap.hot .fut-body { filter: drop-shadow(0 -3px 8px rgba(255,110,0,.75)) drop-shadow(0 0 2px rgba(255,180,0,.8)); }
.stk-dot.fire { background: linear-gradient(160deg, #ffb000, #ff4d00); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.4); }

/* Исход матча: наклейка слева внизу, сразу под строкой с ценой и очками */
.fut-result { position: absolute; left: calc(var(--w, 116px) * -.1); top: calc(var(--w, 116px) * 1.1); z-index: 3; transform: rotate(-5deg); pointer-events: auto; }
.stk-dot.r-win { background: #2fa84f; color: #fff; } .stk-dot.r-draw { background: #9aa3ad; color: #111; } .stk-dot.r-loss { background: #d63a2b; color: #fff; }
.stk-dot.flag { border-radius: calc(var(--w, 116px) * .03) 0 0 calc(var(--w, 116px) * .03);
  clip-path: polygon(0 0, 100% 0, 90% 50%, 100% 100%, 0 100%); padding-right: calc(var(--w, 116px) * .14); box-shadow: none; }

/* Выбран только одним участником (бонус к очкам): тонкая фиолетовая кромка; тень исхода матча — как у остальных */
.fut-card.uniq-edge { --edge: linear-gradient(160deg, #c9b3ff, #6d3fd1 50%, #3a1d85) !important; padding: 3px; }

/* Пояснения к наклейкам (templates/_card_legend.html) */
.card-legend { margin: 12px 0; font-size: .85rem; color: #cfcfcf; }
.card-legend summary { cursor: pointer; color: var(--league-yellow); font-weight: 700; }
.card-legend ul { list-style: none; padding: 8px 0 0; margin: 0; display: grid; gap: 6px; }
.card-legend .stk-dot { --w: 120px; transform: none; vertical-align: middle; }
.legend-uniq { display: inline-block; width: 22px; height: 16px; border-radius: 3px; vertical-align: middle; border: 2px solid #6d3fd1; }
.legend-cap { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #14281d;
  color: #ffd479; font-weight: 800; font-size: .75rem; border: 2px solid #ffd479; vertical-align: middle; }

/* главная: в рассчитанном туре на карточках площадки видны очки (остальная строка статистики скрыта) */
.hero-court .fut-stats:not(:empty) { display: flex; }

/* плитка «Статистика»: внизу две строки — команда и очки, под ними «Вся статистика →» */
.star-foot { display: flex; flex-direction: column; gap: 1px; }
.star-foot .info, .star-foot .go { white-space: nowrap; }
.star-foot .go { color: #a8a8a8; }
.tile-star.no-team .star-foot .team, .tile-star.no-info .star-foot .info, .tile-star.no-stats .star-stats { display: none; }
.tile-star .tile-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* текст плитки не сжимается (иначе при нехватке места обрезалось имя): место освобождают команда и очки внизу (hub.js) */
.tile-star > .tile-label, .tile-star > .tile-meta, .tile-star > .tile-title, .tile-star > .star-stats, .tile-star > .star-foot { flex-shrink: 0; }

/* Ровные ряды плашек (templates/_balanced.html): --per — сколько в ряду; растягиваются на всю ширину, широкая — за две */
.balanced { display: flex; flex-wrap: wrap; gap: 10px; }
.balanced > * { box-sizing: border-box; min-width: 150px; flex: 1 1 calc((100% - (var(--per, 4) - 1) * 10px) / var(--per, 4)); }
.balanced > .wide { flex-basis: calc((100% - (var(--per, 4) - 1) * 10px) / var(--per, 4) * 2 + 10px); }
@media (max-width: 1000px) { .balanced { --per: 3 !important; } }
@media (max-width: 600px) { .balanced { --per: 2 !important; } .balanced > .wide { flex-basis: 100%; } .balanced > * { min-width: 120px; } }
/* плитка «Статистика»: строки плотнее, чтобы значки помещались без захода на фото */
.tile-star { gap: 3px; }
.tile-star .tile-meta { line-height: 1.2; }
.tile-star .star-stats { margin-top: 2px; gap: 3px; }
.tile-star .star-foot { margin-top: auto; padding-top: 2px; }

/* Состав участника: таблица девяти игроков (templates/entry.html) */
.entry-table { width: 100%; }
.entry-table tr.group td { border-top: 0; padding: 12px 6px 4px; color: var(--league-yellow); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.entry-table tr.group:first-child td { padding-top: 2px; }
.entry-table .who { display: flex; flex-direction: column; }
.entry-table .who b { font-weight: 700; }
.entry-table .sub { color: #9a9a9a; font-size: .78rem; }
.entry-table .ev { display: flex; flex-wrap: wrap; gap: 3px; }
.entry-table .stk-dot { --w: 108px; transform: none; box-shadow: none; }
.entry-table .price { color: #a8a8a8; }
.entry-table .formula { color: #cfcfcf; white-space: nowrap; }
.entry-table .total b { font-size: 1.05rem; }
.entry-table .incl { display: block; color: #b79cff; font-size: .68rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.entry-table .cap-b { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: #14281d; color: #ffd479;
  border: 1.5px solid #ffd479; font-size: .62rem; font-weight: 800; margin-left: 4px; vertical-align: 1px; }
.entry-table .tdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.entry-table tr.dimmed td { opacity: .5; }
.entry-note { margin: 8px 0 0; }
.entry-table .ph-only { display: none; }
@media (max-width: 700px) { .entry-table .pc-only { display: none; } .entry-table .ph-only { display: block; } .entry-table .sub.ph-only { display: block; } }
.f-bonus { color: #b79cff; font-weight: 700; }
.f-cap { color: var(--league-yellow); font-weight: 700; }

/* Состав участника на большом экране: площадка и вторая четвёрка помещаются в окно, как на странице сборки */
@media (min-width: 1400px) and (min-height: 800px) {
  .entry-layout { --pitch-w: min(700px, calc((100vh - 230px) * .745)); grid-template-columns: calc(var(--pitch-w) + 28px) minmax(0, 1fr); }
  .entry-layout .pitch-panel .pitch { width: var(--pitch-w); margin: 0 auto; }
}
/* Команды недели: площадка не выше окна */
.totw-pitch { max-width: calc((100vh - 230px) * .975); margin-left: auto; margin-right: auto; }

/* ---------- Мои фентези-туры ---------- */
.hist-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 14px; }
.hist-head .avatar { width: 64px; height: 64px; font-size: 1.6rem; }
.hist-head h1 { margin: 0; }
.hist-head .sub { color: #a8a8a8; } .hist-head .sub b { color: #fff; }
.hist-chart { position: relative; height: 230px; display: flex; align-items: flex-end; gap: 10px; padding: 24px 8px 48px; }
.hist-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; min-width: 0; color: #eaeaea; }
.hist-chart .col:hover { text-decoration: none; }
.hist-chart .bar { width: 70%; max-width: 46px; min-height: 2px; background: rgba(242,194,27,.55); border-radius: 3px 3px 0 0; }
.hist-chart .col:hover .bar, .hist-chart .col.best .bar { background: var(--league-yellow); }
.hist-chart .pts { font-weight: 800; font-size: .85rem; margin-bottom: 3px; }
.hist-chart .avg { position: absolute; left: 12%; right: 12%; border-top: 2px dashed rgba(255,255,255,.45); pointer-events: none; }
.hist-chart .lbl { position: absolute; bottom: -22px; color: #8a8a8a; font-size: .72rem; white-space: nowrap; }
.hist-chart .rank { position: absolute; bottom: -40px; font-size: .74rem; color: #cfcfcf; font-weight: 700; white-space: nowrap; }
.hist-chart .rank i { font-style: normal; font-size: .9em; } .hist-chart .rank i.up { color: #7bd88f; } .hist-chart .rank i.down { color: #ff8a7a; }
.legend-line { display: flex; gap: 16px; color: #a8a8a8; font-size: .78rem; margin-top: 4px; flex-wrap: wrap; }
.legend-line i { display: inline-block; width: 18px; vertical-align: middle; margin-right: 5px; }
.legend-line .lg-bar { border-top: 8px solid rgba(242,194,27,.55); } .legend-line .lg-avg { border-top: 2px dashed rgba(255,255,255,.6); }
.hist-table tr.link { cursor: pointer; }
.hist-table tr.link:hover td { background: rgba(242,194,27,.06); }
.hist-table .pct-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--league-yellow); opacity: .7; vertical-align: middle; margin-left: 6px; }
.hist-table .cap { color: #bdbdbd; } .hist-table .cap b { color: #fff; }
.fig.fact-link { color: inherit; } .fig.fact-link:hover { text-decoration: none; background: linear-gradient(160deg, #2e2a18, #171717); }
@media (max-width: 700px) { .hist-table .opt { display: none; } .hist-chart { gap: 4px; } .hist-chart .lbl, .hist-chart .rank { font-size: .64rem; } }
.hist-body { display: flex; flex-direction: column; }
.hist-body > .tour-figures { margin-bottom: 10px; }
.hist-body > .hist-facts { margin-bottom: 16px; }
@media (max-width: 700px) { .hist-body > .hist-facts { order: 10; margin-top: 6px; } }  /* телефон: факты — после таблицы */

/* Админка: конструктор картинок тура (templates/admin/share.html) */
.share-actions { display: flex; align-items: center; gap: 14px; margin: 10px 0 16px; }
.share-builder { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.share-item { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.share-item.off .share-preview { opacity: .35; }
.share-item-head { display: flex; justify-content: space-between; align-items: center; }
.share-preview { width: 300px; height: 375px; overflow: hidden; align-self: center; box-shadow: 0 0 0 1px #333; }
.share-preview iframe { width: 1080px; height: 1350px; border: 0; transform: scale(calc(300 / 1080)); transform-origin: 0 0; pointer-events: none; }
.share-fields { display: grid; gap: 6px; font-size: .85rem; }
.share-fields label { display: flex; flex-direction: column; gap: 2px; }
.share-fields .facts { border: 1px solid #333; padding: 6px 10px; display: grid; gap: 4px; }
.share-fields .facts label { flex-direction: row; gap: 6px; }

/* «Поделиться» на странице состава: предпросмотр сторис 1080×1920 */
.share-modal { background: #151515; color: #f1f1f1; width: min(420px, 94vw); border-top: 3px solid var(--league-yellow); position: relative; }
.story-preview { width: 216px; height: 384px; margin: 0 auto 12px; overflow: hidden; box-shadow: 0 0 0 1px #333; }
.story-preview iframe { width: 1080px; height: 1920px; border: 0; transform: scale(.2); transform-origin: 0 0; pointer-events: none; }
.share-opts { display: grid; gap: 8px; margin-bottom: 10px; font-size: .9rem; }
.share-opts label { display: flex; flex-direction: column; gap: 3px; } .share-opts label.inline { flex-direction: row; align-items: center; gap: 6px; }
.share-modal .actions { display: flex; gap: 8px; }
.share-modal .button.disabled { opacity: .5; pointer-events: none; }

/* ---------- Правила: шпаргалка и «как читать карточку» ---------- */
.rules-cheat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.rules-cheat .card { margin: 0; }
.rules-cheat ul { margin: 0; padding-left: 18px; color: #cfcfcf; line-height: 1.55; }
.rules-cheat ul b { color: #fff; }
@media (max-width: 900px) { .rules-cheat { grid-template-columns: minmax(0, 1fr); } }
.rules-anno .anno { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.rules-anno .anno-cards { display: flex; gap: 30px; padding: 10px 14px 0 8px; }
.rules-anno .anno-cards .slot { --w: 150px; }
.rules-anno ol { margin: 0; padding-left: 20px; color: #cfcfcf; line-height: 1.6; }
.rules-anno ol b { color: #fff; }
.rules-anno .anno-text .stk-dot { --w: 104px; transform: none; box-shadow: none; vertical-align: middle; }  /* только наклейки в тексте, не на карточках */
.rules-anno .anno-cards { flex-direction: column; gap: 22px; align-items: center; }
.rules-anno .anno-text h3 { color: var(--league-yellow); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 6px; }
.rules-anno .anno-text h3 + ul { margin: 0 0 16px; padding-left: 18px; color: #cfcfcf; line-height: 1.55; } .rules-anno .anno-text ul b { color: #fff; }
.legend-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 22px; }
.legend-groups small { display: block; color: #9a9a9a; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.legend-groups p { margin: 0 0 6px; color: #cfcfcf; }
.cap-dot { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #14281d; color: #ffd479;
  border: 1.5px solid #ffd479; font-size: .65rem; font-weight: 800; vertical-align: 1px; }
@media (max-width: 1100px) { .legend-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .rules-anno .anno-cards { flex-direction: row; } }
@media (max-width: 800px) { .rules-anno .anno { grid-template-columns: minmax(0, 1fr); } .rules-anno .anno-cards { justify-content: center; } }
.rules-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.rules-more .card { margin: 0; } .rules-more ul { margin: 0; padding-left: 18px; color: #cfcfcf; line-height: 1.55; } .rules-more ul b { color: #fff; }
@media (max-width: 900px) { .rules-more { grid-template-columns: minmax(0, 1fr); } }
.rules-faq { margin-top: 14px; }
.rules-faq details { border-top: 1px solid rgba(255,255,255,.07); padding: 10px 0; }
.rules-faq details:first-of-type { border-top: 0; }
.rules-faq summary { cursor: pointer; font-weight: 700; color: #fff; }
.rules-faq summary:hover { color: var(--league-yellow); }
.rules-faq p { color: #cfcfcf; margin: 8px 0 2px; line-height: 1.5; max-width: 900px; }
.sb-og { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 40px; margin-top: 8px; font-size: .8rem; color: #9a9a9a; }
.sb-og-side { display: flex; flex-direction: column; gap: 4px; }
.sb-og label { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.sb-og-side.away label { justify-content: flex-start; }
.sb-check.block { color: #ff7a66; font-weight: 700; }
.gk-num input.need { box-shadow: 0 0 0 2px #ff7a66; }
.sb-og input { width: 3.4em; padding: 3px 6px; text-align: center; }
/* ЖК в протоколе: кнопка с тремя состояниями */
.match-table .yc { width: 3.2em; padding: 4px 0; font-size: .8rem; font-weight: 800; border-radius: 4px; background: #1f1f1f; color: #5c5c5c;
  box-shadow: inset 0 0 0 1px #3a3a3a; }
.match-table .yc-1 { background: #f2c21b; color: #111; box-shadow: none; }
.match-table .yc-2 { background: #f2c21b; color: #111; box-shadow: inset -.55em 0 0 #d63a2b; }
/* протокол: ЖК и КК одной ширины и высоты */
.match-table .yc { width: 2.6rem; height: 1.9rem; padding: 0; font-size: .72rem; }
.match-table .flag-red span { width: 2.6rem; height: 1.9rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; }
.match-table .flag-red span::after { line-height: 1; }

/* ---------- Протоколы из сводки канала ---------- */
.summary-text { width: 100%; box-sizing: border-box; font: .85rem/1.4 ui-monospace, Menlo, monospace; }
.sm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 3px 0 6px; vertical-align: -1px; }
.sm-dot.ok, .summary-row.sm-ok { --sm: #4caf6a; }
.sm-dot.check, .summary-row.sm-check { --sm: #f2c21b; }
.sm-dot.none, .summary-row.sm-none { --sm: #e5533d; }
.sm-dot { background: var(--sm); }
.summary-match.unmatched { opacity: .75; }
.summary-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.summary-raw { font-size: .85rem; white-space: pre-wrap; word-break: break-word; }
.summary-pick { display: flex; gap: 8px 14px; align-items: end; flex-wrap: wrap; margin: 8px 0; }
.summary-pick label { display: flex; flex-direction: column; font-size: .85rem; }
.summary-pick select { max-width: 100%; }
.summary-score { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.summary-score input[type=number] { width: 3.2em; text-align: center; }
.summary-team { font-weight: 800; font-size: 1.1rem; }
.summary-side h3 { margin: 4px 0 6px; }
.summary-row { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; align-items: center;
  padding: 3px 6px; margin-bottom: 3px; border-left: 3px solid var(--sm); border-radius: 0 5px 5px 0; background: rgba(255,255,255,.03); }
.summary-row.sm-check, .summary-row.sm-none { background: color-mix(in srgb, var(--sm) 10%, transparent); }
.summary-row select { width: 100%; min-width: 0; padding: 3px 4px; }
.sm-code { font-size: .72rem; font-weight: 800; text-align: center; padding: 1px 0; border-radius: 3px; background: #2a2a2a; color: #ddd; }
.sm-code-goal { background: #1f4d33; color: #bff0cf; }
.sm-code-yellow { background: var(--league-yellow); color: #111; }
.sm-code-red { background: #d63a2b; color: #fff; }
.sm-code-motm { background: #3a3218; color: #f3d77a; }
.sm-raw { overflow-wrap: anywhere; }
@media (max-width: 600px) { .summary-row { grid-template-columns: 2.4em minmax(0, 1fr); } .summary-row select { grid-column: 1 / -1; } }

/* ---------- Заявка команды из файла ---------- */
.sm-dot.new, .summary-row-like.sm-new { --sm: #4a8fe0; }
.sm-dot.ok, .summary-row-like.sm-ok { --sm: #4caf6a; }
.sm-dot.check, .summary-row-like.sm-check { --sm: #f2c21b; }
.roster-mode { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.roster-table { width: 100%; }
.roster-table td { vertical-align: middle; padding: 4px 6px; }
.roster-table tr.summary-row-like td:first-child { border-left: 3px solid var(--sm); }
.roster-table tr.sm-check td, .roster-table tr.sm-new td { background: color-mix(in srgb, var(--sm) 8%, transparent); }
.roster-raw { font: .85rem ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.roster-pick { max-width: 100%; }
.roster-new-name { margin-top: 4px; width: 100%; max-width: 22em; box-sizing: border-box; }
@media (max-width: 700px) { .roster-table thead { display: none; } .roster-table tr { display: grid; grid-template-columns: 1fr auto; }
  .roster-table td.roster-raw { grid-column: 1 / -1; } }
.sb-pens input[type=number] { width: 3em; padding: 4px 2px; text-align: center; font-weight: 800; }
.sb-leg { margin-top: 8px; }

/* ---------- Сетка плей-офф ---------- */
.br-league { margin: 14px 0 8px; color: var(--league-yellow); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.br-scroll { overflow-x: auto; padding-bottom: 6px; }
.bracket { display: grid; grid-template-columns: repeat(var(--cols), 220px); gap: 0 26px; }
@media (max-width: 600px) { .bracket { grid-template-columns: repeat(var(--cols), 180px); gap: 0 20px; } }
.br-col { display: flex; flex-direction: column; }
.br-round { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #9a9a9a; margin-bottom: 8px; }
.br-ties { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.br-slot { position: relative; }
/* линии к соседним раундам: sl — слева, sr — справа */
.br-col.sr .br-slot::after { content: ""; position: absolute; right: -14px; top: 50%; width: 14px; border-top: 1px solid #444; }
.br-col.sl .br-slot::before { content: ""; position: absolute; left: -12px; top: 50%; width: 12px; border-top: 1px solid #444; }
.br-col .br-slot.br-third-in::before, .br-col .br-slot.br-third-in::after { content: none; }
.br-col.right .br-round { text-align: right; }
.br-col.center .br-round { text-align: center; }
.br-third-in { margin-top: 18px; }
.br-note { margin: -2px 0 10px; font-size: .78rem; color: #c9a86a; }
/* двусторонняя сетка — на широком экране, односторонняя — на телефоне */
.br-one, .br-one-only { display: none; }
@media (max-width: 900px) { .br-two { display: none; } .br-one { display: block; } .br-one-only { display: block; } }
.br-tie { background: #1b1b1b; border: 1px solid #2e2e2e; border-radius: 6px; overflow: hidden; font-size: .85rem; }
.br-tie.empty { opacity: .45; border-style: dashed; }
.br-team { display: flex; align-items: center; gap: 8px; padding: 5px 8px; }
.br-team + .br-team { border-top: 1px solid #2a2a2a; }
.br-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-goals { display: flex; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
.br-goals a { color: inherit; min-width: 1ch; text-align: center; }
.br-goals small { color: #9a9a9a; font-weight: 700; }
.br-team.win { background: rgba(242,194,27,.12); }
.br-team.win .br-name { font-weight: 800; color: #fff; }
.br-team.lose { color: #7a7a7a; }
.br-when { padding: 3px 8px 5px; font-size: .72rem; color: #9a9a9a; border-top: 1px solid #2a2a2a; }
.br-third { margin-top: 14px; max-width: 240px; }
.stage-edit { display: inline-block; vertical-align: middle; }
.stage-edit > summary { list-style: none; cursor: pointer; display: inline; }
.stage-edit > summary::-webkit-details-marker { display: none; }
.stage-edit[open] .stage-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.br-tie.planned { border-style: dashed; }
.br-team.unknown .br-name { color: #6a6a6a; }
.bracket-pairs { margin: 10px 0; padding-left: 2em; }
.bracket-pairs li { padding: 3px 0; }
.bracket-pairs li.pair-end { border-bottom: 1px dashed #444; padding-bottom: 8px; margin-bottom: 6px; }
.bracket-pairs select { max-width: 42%; }
.br-tie.bye { border-style: dotted; }
.br-tie.bye .br-team.unknown .br-name { font-style: italic; font-size: .78rem; }
.pair-move { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.console-page .pair-move .move { padding: 2px 8px; }
.bracket-pairs li.moved { background: rgba(242,194,27,.12); transition: background .3s; }
/* длинная сетка (с 1/16): колонки чуть уже, чтобы 5 раундов поместились без прокрутки */
.br-narrow .bracket { grid-template-columns: repeat(var(--cols), 200px); gap: 0 20px; }
.forfeit-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.forfeit-score input { width: 3.2em; text-align: center; }
