/* LADDERON — дизайн-система. Основная тема светлая, дополнительная тёмная. */
:root {
  --bg: #f3f4f6;
  --bg2: #eceef1;
  --card: #ffffff;
  --card2: #f8f9fb;
  --line: #e3e6ea;
  --line2: #d4d8de;
  --text: #121418;
  --text2: #4b5260;
  --muted: #8a909c;
  --accent: #fe5303;
  --accent-2: #ff7a3d;
  --accent-soft: #fff1ea;
  --ok: #16a34a;
  --ok-soft: #e8f7ee;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --info: #2563eb;
  --info-soft: #eaf1fe;
  --warn: #d97706;
  --warn-soft: #fef5e6;
  --gold: #d4a017;
  --silver: #9aa3ad;
  --bronze: #b8723c;
  --shadow: 0 1px 2px rgba(16, 20, 28, .05), 0 4px 16px rgba(16, 20, 28, .04);
  --shadow-lg: 0 10px 40px rgba(16, 20, 28, .14);
  --r: 10px;
  --r-sm: 7px;
  --hdr: 64px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Inter', sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d0e11;
  --bg2: #121418;
  --card: #16181d;
  --card2: #1b1e24;
  --line: #252932;
  --line2: #323743;
  --text: #eceef2;
  --text2: #b3b9c4;
  --muted: #7c8391;
  --accent-soft: #2a1709;
  --ok-soft: #0f2318;
  --bad-soft: #2a1213;
  --info-soft: #0f1a30;
  --warn-soft: #2a1d08;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.5 var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }
p { margin: 0 0 .8em; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.accent { color: var(--accent) !important; }
.pad { padding: 16px; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Шапка ---------- */
#header { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--line); }
.hdr { max-width: 1440px; margin: 0 auto; height: var(--hdr); display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 30px; width: auto; display: block; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav > a, .nav .dd-btn { padding: 8px 11px; border-radius: var(--r-sm); font-weight: 600; color: var(--text2); background: none; border: 0; cursor: pointer; white-space: nowrap; position: relative; }
.nav > a:hover, .nav .dd-btn:hover { color: var(--text); background: var(--bg); }
.nav > a.active { color: var(--text); }
.nav > a.active::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: -13px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn.burger { display: none; }
.game-switch { display: flex; background: var(--bg); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.game-switch button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; cursor: pointer; color: var(--text2); font-family: var(--display); letter-spacing: .04em; font-size: 14px; }
.game-switch button.active { background: var(--text); color: var(--card); }
.online { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--text2); }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; position: relative; flex-shrink: 0; }
.icon-btn:hover { border-color: var(--line2); background: var(--bg); }
.bell sup { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 999px; }
.dd { position: relative; }
.dd-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; max-height: 70vh; overflow: auto; }
.dd-menu.right { left: auto; right: 0; }
.dd.open .dd-menu { display: block; }
.dd-menu a, .dd-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; border: 0; background: none; cursor: pointer; font-weight: 500; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--bg); color: var(--text); }
.user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 3px 6px; border-radius: var(--r-sm); }
.user-btn:hover { background: var(--bg); }
.u-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.u-meta small { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.ban-bar { background: var(--bad); color: #fff; text-align: center; padding: 6px; font-weight: 600; }
.ban-bar a { text-decoration: underline; }

/* ---------- Каркас страниц ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 24px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.layout-left { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.gap { gap: 10px; }
.grow { flex: 1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h3, .card-head h4 { margin: 0; }
.card-head a.more { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

/* ---------- Кнопки и формы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--card); font-weight: 700; cursor: pointer; white-space: nowrap; line-height: 1.2; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { border-color: var(--text2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #e84a00; border-color: #e84a00; color: #fff; }
.btn.dark { background: var(--text); color: var(--card); border-color: var(--text); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.xs { padding: 3px 8px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.lg { padding: 13px 22px; font-size: 15px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.form .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.search-input { font-size: 16px; padding: 12px 14px; }
.search-res { margin-top: 10px; display: flex; flex-direction: column; }
.search-res a { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 6px; }
.search-res a:hover { background: var(--bg); }

/* ---------- Элементы ---------- */
.ava, .tlogo { display: inline-flex; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--bg2); position: relative; }
.tlogo { border-radius: 8px; }
.ava img, .tlogo img { width: 100%; height: 100%; object-fit: cover; }
.ava b, .tlogo b { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-family: var(--display); letter-spacing: .02em; }
.ava.on::after { content: ''; position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 7px; min-height: 7px; border-radius: 50%; background: var(--ok); border: 2px solid var(--card); }
.ava.prem-pro { box-shadow: 0 0 0 2px var(--gold); }
.ava.prem-semi { box-shadow: 0 0 0 2px var(--accent); }
.ulink, .tlink { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.ulink .nick, .tlink span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prem-tag { font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 3px; background: var(--accent); color: #fff; letter-spacing: .04em; }
.prem-tag.pro { background: var(--gold); }
.lvl { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0; font-family: var(--display); }
.lvl.l1 { background: #9aa3ad; } .lvl.l2 { background: #22a35a; } .lvl.l3 { background: #e6a700; } .lvl.l4 { background: #fe5303; } .lvl.l5 { background: #c81e1e; }
.plaque { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; line-height: 1.3; }
.plaque.pro { background: linear-gradient(135deg, #f6d36b, #c99412); color: #2a1d00; }
.plaque.semi { background: linear-gradient(135deg, #e7ebef, #a9b2bc); color: #1c232b; }
.plaque.am { background: linear-gradient(135deg, #e7a86f, #a8622c); color: #fff; }
.plaque.new { background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.danger { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.muted { background: var(--bg2); color: var(--muted); }
.badge.live { background: var(--accent-soft); color: var(--accent); }
.badge.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.game-tag { font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: var(--text); color: var(--card); }
.game-tag.fc { background: #16a34a; color: #fff; }
.game-tag.nhl { background: #2563eb; color: #fff; }
.staff-tag { font-size: 9px; font-weight: 800; background: var(--accent); color: #fff; padding: 1px 4px; border-radius: 3px; }
.score { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: .02em; white-space: nowrap; }
.score i { font-style: normal; color: var(--muted); margin: 0 3px; }
.score.win { color: var(--ok); }
.score.loss { color: var(--bad); }
.delta { font-weight: 800; font-size: 12px; }
.delta.up, .trend.up { color: var(--ok); }
.delta.down, .trend.down { color: var(--bad); }
.trend { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.award-img { display: inline-block; background-repeat: no-repeat; flex-shrink: 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-ico { font-size: 34px; font-family: var(--display); font-weight: 800; color: var(--line2); margin-bottom: 6px; }
.loader { display: flex; gap: 6px; justify-content: center; padding: 60px 0; }
.loader span { width: 10px; height: 10px; background: var(--accent); border-radius: 2px; animation: ld 1s infinite ease-in-out; transform: rotate(45deg); }
.loader span:nth-child(2) { animation-delay: .15s; } .loader span:nth-child(3) { animation-delay: .3s; }
@keyframes ld { 0%, 80%, 100% { opacity: .2; transform: rotate(45deg) scale(.7); } 40% { opacity: 1; transform: rotate(45deg) scale(1); } }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--text2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: var(--card); padding: 6px 12px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 13px; }
.pill.active { background: var(--text); color: var(--card); border-color: var(--text); }

/* ---------- Таблицы ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card2); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--card2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.rank { font-family: var(--display); font-weight: 800; font-size: 18px; width: 34px; text-align: center; color: var(--text2); }
.rank.r1 { color: var(--gold); } .rank.r2 { color: var(--silver); } .rank.r3 { color: var(--bronze); }
.pts { font-family: var(--display); font-weight: 800; font-size: 18px; }
.group-row td { background: var(--bg) !important; font-family: var(--display); font-weight: 800; letter-spacing: .08em; color: var(--muted); padding: 6px 12px; font-size: 13px; }
tr.me td { background: var(--accent-soft) !important; }

/* ---------- Матчи ---------- */
.match-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 90px minmax(0, 1fr) 110px; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: var(--card2); color: inherit; }
.mr-meta { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.mr-meta small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mr-team { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.mr-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-team.right { justify-content: flex-end; text-align: right; }
.mr-score { text-align: center; }
.mr-time { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.mr-time small { color: var(--muted); }

/* ---------- Главная ---------- */
.hero { position: relative; border-radius: 14px; overflow: hidden; background: #111; min-height: 300px; display: flex; color: #fff; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s; }
.hero-slide.on { opacity: 1; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,0) 85%); }
.hero-in { position: relative; z-index: 2; padding: 34px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; max-width: 620px; }
.hero-in h1 { font-size: 46px; margin: 0; }
.hero-in > .badge { align-self: flex-start; }
.hero-in p { color: #d9dce2; margin: 0; font-size: 15px; }
.hero-dots { position: absolute; z-index: 3; right: 20px; bottom: 18px; display: flex; gap: 6px; }
.hero-dots button { width: 26px; height: 4px; border-radius: 2px; border: 0; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.hero-dots button.on { background: var(--accent); }
.stat-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat-strip > div { background: var(--card); padding: 14px 16px; }
.stat-strip b { display: block; font-family: var(--display); font-size: 28px; line-height: 1; }
.stat-strip span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.season-box { background: #14161b; color: #fff; border-radius: var(--r); padding: 18px; display: flex; align-items: center; gap: 16px; }
.season-box .big { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; color: var(--accent); }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--card2); }
.mini-row .grow { min-width: 0; }

/* ---------- Турниры ---------- */
.tour-card { overflow: hidden; display: flex; flex-direction: column; }
.tour-card .cover { aspect-ratio: 16/9; background: #111 center/cover no-repeat; position: relative; }
.tour-card .cover .badge { position: absolute; top: 10px; left: 10px; }
.tour-card .tc-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tour-card h3 { margin: 0; font-size: 21px; }
.tc-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text2); font-size: 13px; }
.tc-meta b { color: var(--text); }
.progress { height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }
.tour-hero { border-radius: 14px; overflow: hidden; position: relative; min-height: 260px; background: #111 center/cover; color: #fff; display: flex; align-items: flex-end; }
.tour-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,.1)); }
.tour-hero > div { position: relative; z-index: 2; padding: 28px; width: 100%; }
.tour-hero h1 { font-size: 44px; margin: 6px 0; }

.bracket { display: flex; gap: 28px; overflow-x: auto; padding: 8px 4px 16px; }
.b-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 230px; }
.b-round h4 { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.b-match { background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); display: block; }
.b-match:hover { border-color: var(--accent); color: inherit; }
.b-team { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-weight: 600; font-size: 13px; }
.b-team + .b-team { border-top: 1px solid var(--line); }
.b-team span.n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-team b { font-family: var(--display); font-size: 16px; min-width: 18px; text-align: right; }
.b-team.win { background: var(--ok-soft); }
.b-team.win b { color: var(--ok); }
.b-team.lose { opacity: .55; }
.b-st { font-size: 10px; text-align: center; padding: 2px; color: var(--muted); background: var(--card2); border-top: 1px solid var(--line); text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }

/* ---------- Профиль / команда ---------- */
.profile-hero { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.profile-hero .banner { height: 120px; background: linear-gradient(120deg, #15171c 0%, #2a2d35 55%, var(--accent) 140%); position: relative; }
.profile-hero .banner::after { content: ''; position: absolute; inset: 0; background: url('/img/emblem-dark.png') right 30px center / auto 150% no-repeat; opacity: .07; }
.ph-in { display: flex; gap: 20px; padding: 0 24px 20px; align-items: flex-end; margin-top: -48px; position: relative; flex-wrap: wrap; }
.ph-in .ava, .ph-in .tlogo { border: 4px solid var(--card); box-shadow: var(--shadow); }
.ph-name { flex: 1; min-width: 220px; padding-bottom: 4px; }
.ph-name h1 { margin: 0; font-size: 36px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-name .row { color: var(--text2); }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.kpis > div { background: var(--card); padding: 12px 16px; }
.kpis b { display: block; font-family: var(--display); font-size: 24px; line-height: 1.1; }
.kpis span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.shelf { display: flex; flex-wrap: wrap; gap: 14px; }
.shelf-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; text-align: center; font-size: 11px; color: var(--text2); font-weight: 600; }
.shelf-item small { color: var(--muted); font-weight: 400; }
.roster-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.roster-item:last-child { border-bottom: 0; }
.role-tag { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--bg2); color: var(--text2); letter-spacing: .05em; }
.role-tag.cl { background: var(--accent); color: #fff; }
.role-tag.zcl { background: var(--text); color: var(--card); }
.feed-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item time { color: var(--muted); font-size: 12px; white-space: nowrap; margin-left: auto; }
.wall-post { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.wall-post:last-child { border-bottom: 0; }
.wall-post p { margin: 6px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- Матч ---------- */
.match-hero { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.mh-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mh-team h2 { margin: 0; font-size: 26px; }
.mh-center { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.mh-score { font-family: var(--display); font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: .02em; }
.mh-score i { font-style: normal; color: var(--muted); margin: 0 6px; }
.veto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.veto-map { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16/10; border: 2px solid var(--line); background: linear-gradient(135deg, #2b2f38, #14161b); color: #fff; display: flex; align-items: flex-end; padding: 8px; cursor: default; text-align: left; }
.veto-map b { font-family: var(--display); font-size: 17px; text-transform: uppercase; letter-spacing: .04em; position: relative; z-index: 1; }
.veto-map small { position: absolute; top: 7px; right: 7px; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; z-index: 1; }
.veto-map.ban { opacity: .4; filter: grayscale(1); }
.veto-map.ban small { background: var(--bad); }
.veto-map.pick { border-color: var(--ok); }
.veto-map.pick small { background: var(--ok); }
.veto-map.decider { border-color: var(--accent); }
.veto-map.decider small { background: var(--accent); }
.veto-map.can { cursor: pointer; border-color: var(--accent); }
.veto-map.can:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.step-list { display: flex; gap: 6px; flex-wrap: wrap; }
.step { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: var(--bg2); color: var(--muted); }
.step.done { background: var(--ok-soft); color: var(--ok); }
.step.cur { background: var(--accent); color: #fff; }
.callout { border-radius: var(--r); padding: 14px 16px; background: var(--info-soft); color: var(--text); border: 1px solid transparent; }
.callout.warn { background: var(--warn-soft); }
.callout.bad { background: var(--bad-soft); }
.callout.ok { background: var(--ok-soft); }
.callout.accent { background: var(--accent-soft); }
.score-input { display: flex; align-items: center; gap: 10px; }
.score-input input { width: 80px; text-align: center; font-family: var(--display); font-size: 24px; font-weight: 800; }

/* ---------- Чат ---------- */
.chat { display: flex; flex-direction: column; height: 420px; }
.chat.compact { height: 100%; }
.chat-list { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { padding: 4px 0; }
.msg-head { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.msg-head time { color: var(--muted); font-size: 11px; }
.msg-act { border: 0; background: none; cursor: pointer; opacity: 0; font-size: 12px; color: var(--muted); padding: 0 2px; }
.msg:hover .msg-act { opacity: 1; }
.msg-text { padding-left: 28px; white-space: pre-wrap; word-wrap: break-word; }
.msg.sys { font-size: 12px; color: var(--text2); background: var(--bg); border-radius: 6px; padding: 6px 10px; display: flex; gap: 8px; justify-content: space-between; }
.msg.sys time { color: var(--muted); }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-login { padding: 12px; text-align: center; border-top: 1px solid var(--line); color: var(--muted); }
.chat-login a { color: var(--accent); font-weight: 700; }
#chat-dock { position: fixed; right: 20px; bottom: 20px; z-index: 40; }
.chat-fab { background: var(--text); color: var(--card); border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow-lg); display: flex; gap: 6px; align-items: center; }
.chat-panel { position: absolute; right: 0; bottom: 58px; width: 380px; height: 520px; max-height: calc(100vh - 120px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-panel-head { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.chat-chs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.chat-chs button { border: 0; background: var(--bg); padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.chat-chs button.active { background: var(--accent); color: #fff; }
.chat-panel-body { flex: 1; min-height: 0; }
.dialogs { display: flex; flex-direction: column; }
.dialogs a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dialogs a.active, .dialogs a:hover { background: var(--card2); }

/* ---------- Кубки ---------- */
.award-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 14px; position: relative; }
.award-card h4 { margin: 0; font-size: 15px; }
.award-card p { font-size: 12px; color: var(--muted); margin: 0; }
.award-card .holders { font-size: 11px; font-weight: 700; color: var(--text2); }
.award-card.mine::before { content: 'ЕСТЬ'; position: absolute; top: 10px; right: 10px; background: var(--ok); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.award-card.locked .award-img { filter: grayscale(.85); opacity: .55; }

/* ---------- Модалка / тосты ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(10, 12, 16, .55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; backdrop-filter: blur(2px); }
.modal { background: var(--card); border-radius: 14px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 18px; }
#toasts { position: fixed; top: 76px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { background: var(--text); color: var(--card); padding: 11px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); font-weight: 600; transition: opacity .4s, transform .4s; border-left: 4px solid var(--ok); }
.toast.error { border-left-color: var(--bad); }
.toast.info { border-left-color: var(--accent); }
.toast.out { opacity: 0; transform: translateX(20px); }

/* ---------- Авторизация ---------- */
.auth-wrap { max-width: 980px; margin: 30px auto; display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.auth-side { background: #121419 url('/img/emblem-dark.png') right -60px bottom -40px / 70% no-repeat; color: #fff; padding: 40px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.auth-side h2 { font-size: 36px; margin: 0; }
.auth-side li { margin-bottom: 6px; color: #cfd3da; }
.auth-form { padding: 40px; }
.steam-btn { background: #171a21; color: #fff; border-color: #171a21; }
.steam-btn:hover { background: #2a475e; color: #fff; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Админка ---------- */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - var(--hdr)); }
.admin-nav { background: var(--card); border-right: 1px solid var(--line); padding: 16px 10px; position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); overflow-y: auto; }
.admin-nav h4 { font-size: 12px; color: var(--muted); padding: 10px 10px 4px; margin: 0; }
.admin-nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 6px; font-weight: 600; color: var(--text2); }
.admin-nav a:hover { background: var(--bg); color: var(--text); }
.admin-nav a.active { background: var(--accent-soft); color: var(--accent); }
.admin-nav a sup { background: var(--accent); color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 6px; }
.admin-main { padding: 24px; min-width: 0; }
.kpi-card { padding: 16px; }
.kpi-card b { font-family: var(--display); font-size: 32px; line-height: 1; display: block; }
.kpi-card span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi-card.alert b { color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars small { font-size: 10px; color: var(--muted); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bg2); font-size: 12px; font-weight: 600; }
.chip label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--bg2); padding: 10px; border-radius: 6px; word-break: break-all; font-size: 12px; }
pre.code { white-space: pre-wrap; }

/* ---------- Подвал ---------- */
#footer { border-top: 1px solid var(--line); background: var(--card); }
.ftr { max-width: 1440px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.ftr nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
:root[data-theme="dark"] .ftr-logo { content: url('/img/emblem-dark.png'); }
.news-body { white-space: pre-wrap; font-size: 15px; line-height: 1.65; }

/* ---------- Адаптив (базовый; полная мобильная версия — отдельно) ---------- */
@media (max-width: 1200px) {
  .nav > a, .nav .dd-btn { padding: 8px 8px; }
  .u-meta { display: none; }
  .layout-side { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1024px) {
  .icon-btn.burger { display: inline-flex; }
  .nav { display: none; position: absolute; top: var(--hdr); left: 0; right: 0; background: var(--card); flex-direction: column; align-items: stretch; padding: 10px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav > a.active::after { display: none; }
  .layout-side, .layout-left, .g3, .g4 { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav h4 { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 16px 16px 60px; }
  .hdr { padding: 0 12px; gap: 8px; }
  .brand img { height: 22px; }
  .game-switch, .online { display: none; }
  .hero-in h1 { font-size: 32px; }
  .match-row { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); }
  .mr-meta, .mr-time { display: none; }
  .match-hero { grid-template-columns: 1fr; }
  .mh-score { font-size: 46px; }
  .chat-panel { width: calc(100vw - 32px); }
  #chat-dock { right: 16px; bottom: 16px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
