:root {
  --bg: #0c0f13;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --surface-3: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text: #eef1f4;
  --muted: #8c96a3;
  --gold: #f0bf55;
  --ally: #7fd13b;
  --enemy: #f0503f;
  --ban: #a3acb8;
  --good: #8fe04a;
  --bad: #ff6b58;
  --str: #f0604a;
  --agi: #62dd72;
  --int: #52bdf2;
  --all: #b995f7;
  /* Segoe UI Variable — системный шрифт Windows 11; на остальных системах берётся их собственный */
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r: 10px;       /* скругление панелей и карточек */
  --r-s: 7px;      /* скругление кнопок, полей, предметов */
  --skew: 9deg;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 10% -240px, rgba(127, 209, 59, .11), transparent 70%),
    radial-gradient(1100px 520px at 90% -240px, rgba(240, 80, 63, .11), transparent 70%),
    radial-gradient(1000px 520px at 50% 115%, rgba(240, 191, 85, .05), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 12px),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img.broken { visibility: hidden; }

.good { color: var(--good); }
.bad { color: var(--bad); }
.flat { color: var(--muted); }
.muted { color: var(--muted); }
.star { color: var(--gold); margin-left: 4px; }

/* ---------- шапка ---------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line);
}
/* Логотип: знак-щит с вырезанными DD (см. index.html), короткое имя и под ним полное — с подсвеченными буквами,
   из которых складывается сокращение */
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; cursor: pointer; border-radius: var(--r-s); transition: opacity .12s; }
.brand:hover { opacity: .85; }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.brand-mark { width: 44px; height: 44px; flex: none; margin: -2px 0; filter: drop-shadow(0 3px 10px rgba(255, 190, 80, .22)); }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.brand-name { font: 700 24px/1 var(--display); letter-spacing: -.025em; }
.brand-name b {
  font-weight: 800;
  background: linear-gradient(90deg, #5cc42a 0%, #9be23c 40%, #ffe680 50%, #ff8b3e 60%, #ea3a30 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* разрядка подобрана так, чтобы строка была той же ширины, что и короткое имя над ней */
.brand-full { font: 600 9px/1 var(--font); letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.brand-full b { font-weight: 700; color: var(--text); }
.data-info { flex: 1; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bracket select { margin-left: 6px; }

select, .search {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 7px 11px;
  transition: border-color .12s, background .12s;
}
select option { background: #171c22; }
select:focus, .search:focus { outline: none; border-color: var(--gold); background: var(--surface-2); }
.search::placeholder { color: var(--muted); }

.btn {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-s);
  padding: 7px 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .12s, border-color .12s, filter .12s;
}
.btn:hover { background: var(--surface-3); }
.btn.small { padding: 5px 11px; font-size: 12px; }
.btn.on { background: rgba(240, 191, 85, .16); color: var(--gold); }
.btn.ally { background: #4f9a23; color: #fff; }
.btn.ally:hover { background: #5bb028; }
.btn.enemy { background: rgba(240, 80, 63, .16); color: #ff9285; }
.btn.enemy:hover { background: rgba(240, 80, 63, .26); }
.btn.ban { background: var(--surface-2); color: #cfd5dc; }
.btn.gold { background: rgba(240, 191, 85, .16); color: var(--gold); }
.btn.live { background: rgba(143, 224, 74, .14); color: var(--good); }
.btn.live::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good);
}

/* ---------- доска драфта ---------- */

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.team h2, .bans h2 {
  font: 700 11px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 8px;
}
.team.ally h2 { color: var(--ally); }
.team.enemy h2 { color: var(--enemy); text-align: right; }
.slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; padding: 0 9px; }

/* слоты наклонены, как портреты в верхней полосе Dota; содержимое выровнено обратно */
.slot {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 88px;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .12s;
}
.team.ally .slot { transform: skewX(calc(-1 * var(--skew))); }
.team.enemy .slot { transform: skewX(var(--skew)); }
.slot-in {
  position: absolute; inset: 0 -10px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .18); font: 700 20px var(--display);
}
.team.ally .slot-in { transform: skewX(var(--skew)); }
.team.enemy .slot-in { transform: skewX(calc(-1 * var(--skew))); }
.slot.empty { border-style: dashed; border-color: var(--line-2); }
.team.ally .slot.next { border-color: var(--ally); }
.team.ally .slot.next .slot-in { color: var(--ally); }
.team.enemy .slot.next { border-color: var(--enemy); }
.team.enemy .slot.next .slot-in { color: var(--enemy); }
.team.ally .slot.filled { border-color: var(--ally); }
.team.enemy .slot.filled { border-color: var(--enemy); }
.slot.active { outline: 2px solid var(--gold); outline-offset: 2px; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 16px 3px;
  font: 600 11px var(--font); color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, .88));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slot-me {
  position: absolute; top: 4px; left: 18px;
  padding: 1px 7px; border-radius: 999px;
  background: var(--gold); color: #000;
  font: 700 10px var(--font); text-transform: uppercase; letter-spacing: .04em;
}
.slot-x {
  position: absolute; top: 4px; right: 18px;
  width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .75); color: #fff;
  font: 14px/1 var(--font);
  opacity: 0; transition: opacity .12s;
}
.slot:hover .slot-x { opacity: 1; }
.slot-x:hover { background: var(--enemy); }

.verdict { align-self: end; text-align: center; padding-bottom: 6px; }
.verdict-hint { font-size: 12px; color: var(--muted); }
.verdict-nums { display: flex; justify-content: space-between; align-items: baseline; }
.verdict-nums b { font: 700 26px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.verdict-nums span { font-size: 11px; color: var(--muted); }
.bar { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--enemy); overflow: hidden; }
.bar-ally { height: 100%; background: var(--ally); border-radius: 999px 0 0 999px; transition: width .25s; }

.tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.auto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex: 1; min-width: 0; }
.auto .mode { padding: 5px 11px; font-size: 12px; }
.auto-status { font-size: 12px; }
.auto-preview { flex-basis: 100%; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }

.bans { display: flex; align-items: center; gap: 10px; }
.bans h2 { margin: 0; color: var(--ban); }
.ban-slots { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; }
.ban-slots .ban {
  position: relative; width: 50px; height: 28px;
  border-radius: 5px; overflow: hidden; cursor: pointer;
}
.ban-slots .ban img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.7); }
.ban-slots .ban::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent 46%, var(--enemy) 46%, var(--enemy) 54%, transparent 54%);
}

/* ---------- основная область ---------- */

main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(380px, 1fr);
}
.side { order: 1; }
.picker { order: 2; }

.picker {
  display: flex; flex-direction: column; min-height: 0;
  padding: 12px 18px 0;
  border-left: 1px solid var(--line);
}
.picker-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.picker-label { color: var(--muted); font-size: 12px; }

/* переключатели-сегменты */
.modes { display: flex; padding: 3px; gap: 2px; background: var(--surface); border-radius: 9px; }
.mode {
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 5px 12px;
  color: var(--muted);
  font-weight: 600;
  transition: background .12s, color .12s;
}
.mode:hover { color: var(--text); }
.mode.on { background: var(--surface-3); color: var(--text); }
.mode.ally.on { background: rgba(127, 209, 59, .2); color: var(--good); }
.mode.enemy.on { background: rgba(240, 80, 63, .2); color: var(--bad); }
.mode.pool.on { background: rgba(240, 191, 85, .18); color: var(--gold); }
.search { flex: 1; min-width: 160px; }
.hint { margin: 8px 0 2px; font-size: 11px; color: var(--muted); }

.grid { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 12px; }
.group h3 {
  display: flex; align-items: center; gap: 7px;
  font: 700 11px/1 var(--font); text-transform: uppercase; letter-spacing: .09em;
  margin: 14px 0 7px; color: var(--muted);
}
.group h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.attr-str::before { color: var(--str); }
.attr-agi::before { color: var(--agi); }
.attr-int::before { color: var(--int); }
.attr-all::before { color: var(--all); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 4px; }

.tile {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface);
  transition: transform .08s, opacity .12s;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-name {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 2px; font-size: 10px; line-height: 1.1; color: var(--muted);
}
.tile:hover { transform: scale(1.14); z-index: 2; border-color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .7); }
.tile.dim { opacity: .12; }
.tile.taken img { filter: grayscale(1) brightness(.4); }
.tile.taken.ally { border-color: var(--ally); }
.tile.taken.enemy { border-color: var(--enemy); }
.tile.taken.ban::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent 47%, var(--enemy) 47%, var(--enemy) 53%, transparent 53%);
}
.tile-star { display: none; position: absolute; top: 0; left: 3px; color: var(--gold); font-size: 11px; text-shadow: 0 0 3px #000; }
.tile.pooled .tile-star { display: block; }
.tile-score {
  position: absolute; right: 0; bottom: 0;
  padding: 0 4px;
  font-size: 10px; font-weight: 700;
  background: rgba(0, 0, 0, .8);
  border-top-left-radius: 5px;
}
.tile-score:empty { display: none; }

/* ---------- панель советов и билда ---------- */

.side { min-height: 0; overflow-y: auto; padding: 0 20px 20px; }

.tabs {
  position: sticky; top: 0; z-index: 3;
  display: flex; gap: 4px;
  margin: 0 -20px 12px; padding: 10px 20px;
  background: rgba(12, 15, 19, .88);
  backdrop-filter: blur(10px);
}
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: transparent; border: 0; border-radius: 999px;
  color: var(--muted);
  font: 600 14px/1 var(--display);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab.on { color: #0c0f13; background: var(--text); }
.tab.hero { padding: 4px 14px 4px 5px; }
.tab.hero img { width: 40px; height: 24px; object-fit: cover; border-radius: 999px; }
.tab.hero span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

.lead { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.foot { color: var(--muted); font-size: 11px; margin-top: 14px; }

.filters { margin-bottom: 12px; font-size: 12px; }
.pos-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 8px; }
.pill {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600;
  color: var(--muted);
  transition: background .12s, color .12s, border-color .12s;
}
.pill:hover { color: var(--text); border-color: var(--line-2); }
.pill.on { border-color: transparent; color: #0c0f13; background: var(--gold); }
.pill.rare:not(.on) { opacity: .55; border-style: dashed; }    /* позиция, на которой героя почти не берут */
.opt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--muted); }
.opt-row label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.opt-row input { accent-color: var(--gold); }
.needs { margin-left: auto; }
.needs b { color: var(--gold); font-weight: 600; }

.who {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 12px; padding: 9px 14px;
  background: rgba(240, 191, 85, .1); border-radius: var(--r);
  color: var(--gold); font-weight: 600;
}
.who-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 12px 3px 3px;
  background: var(--surface-2); border: 0; border-radius: 999px;
  color: var(--text); font-size: 12px; font-weight: 600;
}
.who-btn:hover { background: var(--surface-3); }
.who-btn img { width: 44px; height: 26px; object-fit: cover; border-radius: 999px; }

/* крупные карточки лучших вариантов */
.cards { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; cursor: pointer;
  transition: border-color .12s, background .12s, transform .12s;
}
.card:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.card.first { border-color: rgba(240, 191, 85, .7); background: linear-gradient(rgba(240, 191, 85, .1), var(--surface) 55%); }
.card-img { position: relative; aspect-ratio: 16 / 8; background: #000; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-img::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); }
.card-rank {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px);
  font: 700 13px var(--display); color: var(--text);
}
.card.first .card-rank { background: var(--gold); color: #000; }
.card-score {
  position: absolute; right: 12px; bottom: 7px; z-index: 1;
  font: 700 32px/1 var(--display); letter-spacing: -.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
  font-variant-numeric: tabular-nums;
}
.card-score small { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.card-body { flex: 1; padding: 11px 13px 4px; }
.card-title { font: 700 17px/1.2 var(--display); letter-spacing: -.01em; margin-bottom: 7px; }
.card-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 4px; }
.card-line > span:first-child { font-size: 11px; color: var(--muted); margin-right: 2px; }
.card .btn { margin: 7px 13px 13px; }

.pos { margin-left: 7px; font: 400 11px var(--font); letter-spacing: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding-right: 6px;
  font-size: 11px; font-weight: 600;
  background: var(--surface-2); border-radius: 4px; overflow: hidden;
}
.chip img { width: 28px; height: 16px; object-fit: cover; }
.sep { width: 1px; background: var(--line-2); margin: 0 2px; }
.notes { font-size: 11px; color: var(--muted); margin-top: 3px; }
.fill { color: var(--gold); }

.rec {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 6px 9px;
  border-radius: var(--r-s);
  cursor: pointer;
  transition: background .12s;
}
.rec:hover { background: var(--surface-2); }
.rec-img { width: 78px; height: 44px; object-fit: cover; border-radius: 5px; }
.rec-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-score { font: 700 18px var(--display); letter-spacing: -.02em; text-align: right; min-width: 60px; font-variant-numeric: tabular-nums; }
.rec-score small { font-size: 11px; font-weight: 500; letter-spacing: 0; }
.list-h { margin: 18px 0 6px; font: 700 13px var(--display); color: var(--bad); }
.empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12px; }
.empty.big { grid-column: 1 / -1; font-size: 15px; padding: 60px 20px; line-height: 1.8; }

/* ---------- карточка героя и билд ---------- */

.hero-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-big { width: 178px; height: 100px; object-fit: cover; border-radius: var(--r); }
.hero-info { flex: 1; min-width: 180px; }
.hero-head h2 { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; }
.hero-head .muted { font-size: 12px; }
.hero-wr { margin-top: 4px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }

.block { margin-top: 18px; }
.block h3 {
  display: flex; justify-content: space-between; align-items: baseline;
  font: 700 17px var(--display); letter-spacing: -.01em;
  margin-bottom: 10px;
}
.block h4 {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.lane { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 12px; }
.rule-who { display: inline-flex; gap: 3px; }
.rule-who img { width: 36px; height: 20px; object-fit: cover; border-radius: 4px; }

.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.stage {
  display: flex; flex-direction: column; gap: 5px;
  padding: 11px;
  background: var(--surface); border-radius: var(--r);
}
.stage h4 { margin: 0 0 4px; font: 700 14px var(--display); color: var(--text); }
.stage h4 span { font: 500 11px var(--font); color: var(--muted); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 5px; }
.item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 5px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--r-s);
}
.item > img { grid-row: 1 / 3; width: 52px; height: 38px; object-fit: cover; border-radius: 5px; background: #000; }
.item-name { font-size: 13px; font-weight: 600; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-share { height: 3px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.item-share i { display: block; height: 100%; background: var(--muted); border-radius: 999px; }
.item.sit { border-color: rgba(240, 191, 85, .65); background: rgba(240, 191, 85, .1); }
.item-why { font-size: 11px; line-height: 1.2; color: var(--gold); }
.item-who { display: inline-flex; gap: 1px; margin-left: 2px; vertical-align: -2px; }
.item-who img { width: 21px; height: 12px; object-fit: cover; border-radius: 2px; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 28px; }
.mu { display: grid; grid-template-columns: 40px 130px 1fr 54px; align-items: center; gap: 8px; padding: 3px 0; }
.mu img { width: 40px; height: 22px; object-fit: cover; border-radius: 4px; }
.mu-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-bar { position: relative; height: 6px; background: var(--surface-2); border-radius: 999px; }
.mu-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.mu-bar i { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.mu-bar i.good { background: var(--good); }
.mu-bar i.bad { background: var(--bad); }
.mu-val { text-align: right; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.minis { display: flex; flex-wrap: wrap; gap: 5px; }
.mini {
  width: 62px; padding: 0;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-s);
  overflow: hidden; font-size: 11px; font-weight: 600;
  transition: border-color .12s, background .12s;
}
.mini:hover { border-color: var(--line-2); background: var(--surface-2); }
.mini img { display: block; width: 100%; height: 34px; object-fit: cover; }
.mini span { display: block; padding: 2px 0; }
.mini.taken img { filter: grayscale(1) brightness(.6); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  padding: 10px 20px; border-radius: 999px;
  background: var(--text); color: #0c0f13; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  z-index: 10;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- подсказка для новых посетителей ---------- */

.intro {
  margin-bottom: 14px; padding: 16px 18px;
  background: linear-gradient(135deg, rgba(127, 209, 59, .1), rgba(240, 80, 63, .08));
  border: 1px solid var(--line); border-radius: var(--r);
}
.intro h3 { font: 700 19px var(--display); letter-spacing: -.01em; margin-bottom: 8px; }
.kicker { margin-bottom: 5px; font: 700 10px/1 var(--font); letter-spacing: .17em; text-transform: uppercase; color: var(--gold); }
.intro ol { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; color: #cfd5dc; }
.intro b { color: var(--text); }

/* ---------- скиллы и таланты ---------- */

.small { font-size: 12px; font-weight: 400; letter-spacing: 0; }
.sk-row { display: flex; flex-wrap: wrap; gap: 5px; }
.sk {
  position: relative; width: 46px; height: 46px;
  border-radius: var(--r-s); overflow: hidden;
  background: var(--surface-2); border: 1px solid transparent;
}
.sk img { width: 100%; height: 100%; object-fit: cover; }
.sk b { position: absolute; left: 0; bottom: 0; padding: 0 5px; font-size: 11px; background: rgba(0, 0, 0, .8); border-top-right-radius: 6px; }
.sk.ult { border-color: var(--gold); }
.sk.tal { display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 20px; }
.prio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.prio { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.prio img { width: 24px; height: 24px; border-radius: 5px; }
.prio-row i { color: var(--muted); font-style: normal; }
.tal-tree { display: flex; flex-direction: column; gap: 5px; }
.tal-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 8px; align-items: stretch; }
.tal-opt {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 7px 11px;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-s);
}
.tal-row .tal-opt:first-child { text-align: right; }
.tal-opt.best { border-color: rgba(240, 191, 85, .65); background: rgba(240, 191, 85, .1); }
.tal-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.tal-stat { font-size: 11px; color: var(--muted); }
.tal-lvl {
  align-self: center; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font: 700 14px var(--display); color: var(--gold);
}

/* ---------- аккаунт и «Мои матчи» ---------- */

.account { position: relative; display: flex; }
.acc-chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.acc-chip.on { background: var(--surface-3); }
.acc-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30;
  width: 300px; padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  background: #151a21; border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.acc-menu-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 10px; }
.acc-menu-head .acc-big { width: 48px; height: 48px; border-radius: 12px; font-size: 20px; }
.acc-menu-head b { display: block; font: 700 16px/1.2 var(--display); }
.acc-menu-head span { font-size: 12px; }
.acc-menu-stats { display: flex; gap: 6px; padding: 0 4px 8px; }
.acc-menu-stats div { flex: 1; padding: 7px 9px; background: var(--surface); border-radius: var(--r-s); }
.acc-menu-stats b { display: block; font: 700 18px/1.1 var(--display); }
.acc-menu-stats span { font-size: 11px; color: var(--muted); }
.acc-menu-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 10px; background: transparent; border: 0; border-radius: var(--r-s); text-align: left;
}
.acc-menu-item:hover { background: var(--surface-2); }
.acc-menu-item b { font-weight: 600; }
.acc-menu-item span { font-size: 12px; color: var(--muted); }
.acc-menu-item.danger b { color: var(--bad); }

/* всё, по чему можно перейти к герою или матчу */
[data-hero] { cursor: pointer; }
img[data-hero], .fav-hero[data-hero], .stat[data-hero], .mu[data-hero] { transition: filter .12s, background .12s, transform .12s; }
img[data-hero]:hover { filter: brightness(1.25); }
.fav-hero[data-hero]:hover, .stat[data-hero]:hover { background: var(--surface-2); transform: translateY(-2px); }
.mu[data-hero] { border-radius: 5px; margin: 0 -6px; padding: 3px 6px; }
.mu[data-hero]:hover { background: var(--surface); }
.match[data-acc] { cursor: pointer; transition: background .12s; }
.match[data-acc]:hover { background: var(--surface-2); }
button.pat { border: 1px solid transparent; text-align: left; cursor: pointer; transition: background .12s, border-color .12s; }
button.pat:hover { background: var(--surface-2); }
button.pat.on { border-color: #ff9d4d; background: rgba(255, 157, 77, .1); }
.acc-chip {
  display: flex; align-items: center; gap: 8px; max-width: 200px;
  padding: 3px 12px 3px 3px;
  background: var(--surface-2); border: 0; border-radius: 999px; font-weight: 600;
}
.acc-chip:hover { background: var(--surface-3); }
.acc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.noava { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); font-weight: 700; text-transform: uppercase; }
.acc-big { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; font-size: 28px; }
.acc-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.acc-head h2 { font: 700 24px/1.15 var(--display); letter-spacing: -.02em; }
.acc-empty { max-width: 540px; margin: 24px auto; padding: 26px; background: var(--surface); border-radius: var(--r); }
.acc-empty h3 { font: 700 20px var(--display); letter-spacing: -.01em; }
.acc-empty ul { margin: 12px 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; color: #cfd5dc; }
.tab.last { margin-left: auto; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border-radius: var(--r); }
.stat > span { font-size: 12px; color: var(--muted); }
.stat b { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; }
.stat b em { font-style: normal; font-size: 18px; color: var(--muted); }
.stat small { font-size: 12px; color: var(--muted); }
.stat .stat-hero { display: flex; align-items: center; gap: 8px; font-size: 17px; letter-spacing: -.01em; }
.stat-hero img { width: 50px; height: 28px; border-radius: 5px; object-fit: cover; }
.form { display: flex; gap: 3px; margin-top: 6px; }
.form i { flex: 1; max-width: 10px; height: 10px; border-radius: 3px; }
.form i.w { background: var(--good); }
.form i.l { background: var(--bad); opacity: .7; }

.block h3 .btn { font: 600 12px var(--font); letter-spacing: 0; }
.fav { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.fav-hero {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding-bottom: 5px; background: var(--surface); border-radius: var(--r-s); overflow: hidden; font-size: 12px;
}
.fav-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.fav-hero b { font-weight: 600; margin-top: 3px; }

.matches { display: flex; flex-direction: column; gap: 4px; }
.match {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 26px 96px 104px 76px auto;
  align-items: center; gap: 12px;
  padding: 5px 10px 5px 5px;
  background: var(--surface); border-radius: var(--r-s);
  border-left: 3px solid var(--bad);
}
.match.win { border-left-color: var(--good); }
.match > img { width: 78px; height: 44px; object-fit: cover; border-radius: 5px; }
.match-main { display: flex; flex-direction: column; min-width: 0; }
.match-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-main span { font-size: 12px; }
.match-res { font-weight: 700; }
.match.win .match-res { color: var(--good); }
.match.loss .match-res { color: var(--bad); }
.match-kda { display: flex; flex-direction: column; font-size: 13px; font-variant-numeric: tabular-nums; }
.match-kda small { color: var(--muted); font-size: 11px; }

.modal-back {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(5, 7, 10, .7); backdrop-filter: blur(6px);
}
.modal-back[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px;
  background: #151a21; border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.modal h2 { font: 700 22px var(--display); letter-spacing: -.02em; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface-2); font-size: 18px; line-height: 1; }
.modal-x:hover { background: var(--surface-3); }
.btn.steam { display: block; padding: 11px; text-align: center; text-decoration: none; background: #1b2838; border-color: #2a475e; color: #fff; font-size: 15px; }
.btn.steam:hover { background: #2a475e; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.find { display: flex; gap: 8px; }
.found-list { display: flex; flex-direction: column; gap: 4px; }
.found {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-s); text-align: left;
}
.found:hover { border-color: var(--gold); }
.found-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.legal { padding: 5px 20px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; }
.legal b { color: var(--text); font-weight: 600; }
.legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.legal a:hover { color: var(--text); }

/* ---------- разбор матча ---------- */

.g-S { color: #ffd166; }
.g-A { color: var(--good); }
.g-B { color: #62c4ff; }
.g-C { color: #ff9d4d; }
.g-D { color: var(--bad); }

.rv-back { margin-bottom: 12px; }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.rv-grade {
  flex: none; width: 76px; height: 76px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid currentColor;
  font: 800 44px/1 var(--display); letter-spacing: -.03em;
  box-shadow: 0 0 28px -8px currentColor;
}
.rv-hero { width: 128px; height: 72px; object-fit: cover; border-radius: var(--r); }
.rv-head h2 { font: 700 24px/1.15 var(--display); letter-spacing: -.02em; }
.rv-res { margin-left: 8px; font-size: 15px; letter-spacing: 0; }
.rv-head.win .rv-res { color: var(--good); }
.rv-head.loss .rv-res { color: var(--bad); }
.rv-titles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rv-title { padding: 2px 10px; border-radius: 999px; background: rgba(240, 191, 85, .14); color: var(--gold); font-size: 12px; font-weight: 600; }

.rv-list { display: flex; flex-direction: column; gap: 5px; }
.rv-item {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 9px 12px; background: var(--surface); border-radius: var(--r-s);
}
.rv-item > i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.rv-item.bad > i { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.rv-item.warn > i { background: #ff9d4d; }
.rv-item.good > i { background: var(--good); }
.rv-item b { display: block; font-size: 14px; }
.rv-item.bad b { color: #ffb0a5; }
.rv-item span { font-size: 12px; color: #c3cad3; }
.rv-pics { display: flex; gap: 4px; }
.rv-pics img { width: 46px; height: 26px; object-fit: cover; border-radius: 4px; }

.rv-bar { height: 4px; margin: 5px 0 2px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rv-bar i { display: block; height: 100%; background: var(--muted); border-radius: 999px; }
.rv-bar i.hi { background: var(--good); }
.rv-bar i.lo { background: var(--bad); }

.flow { display: block; width: 100%; height: 120px; background: var(--surface); border-radius: var(--r); }
.flow-legend { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; }

.rv-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rv-team { display: flex; gap: 4px; }
.rv-team img { width: 64px; height: 36px; object-fit: cover; border-radius: 5px; opacity: .85; }
.rv-team img.me { opacity: 1; outline: 2px solid var(--gold); outline-offset: 1px; }
.rv-inv { display: flex; flex-wrap: wrap; gap: 5px; }
.rv-inv img { width: 56px; height: 41px; object-fit: cover; border-radius: 5px; }

.pats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.pat { display: flex; flex-direction: column; gap: 2px; padding: 10px 13px; background: var(--surface); border-radius: var(--r); }
.pat b { font: 700 20px/1.1 var(--display); letter-spacing: -.02em; color: #ff9d4d; }
.pat.grade b { font-size: 26px; }
.pat span { font-size: 12px; color: #c3cad3; }

.match-grade { width: 26px; text-align: center; font: 800 17px/1 var(--display); }
.match-grade:not([class*="g-"]) { color: var(--line-2); }
.mine { color: #62c4ff; }

/* ---------- прогресс, цели, советник по пулу ---------- */

.prog { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding: 8px 10px 4px; background: var(--surface); border-radius: var(--r); }
.prog-bar { flex: 1; max-width: 34px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.prog-bar i { width: 100%; border-radius: 4px 4px 2px 2px; background: currentColor; opacity: .85; }
.prog-bar.loss i { opacity: .4; }
.prog-bar b { font: 700 11px/1 var(--display); }
.goals { display: flex; flex-direction: column; gap: 4px; }
.goal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px 11px; background: var(--surface); border-radius: var(--r-s); color: var(--muted); }
.goal.on { color: var(--text); }
.goal label { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 200px; cursor: pointer; }
.goal input { accent-color: var(--gold); }
.goal-step { display: flex; gap: 3px; }
.goal-step .pill { padding: 0 9px; }
.goal-dots { display: flex; gap: 3px; }
.goal-dots i { width: 9px; height: 9px; border-radius: 50%; }
.goal-dots i.ok { background: var(--good); }
.goal-dots i.no { background: var(--bad); opacity: .6; }
.goal > b { min-width: 58px; text-align: right; font-variant-numeric: tabular-nums; }
.advice { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 5px; }
.advice-hero {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 5px 9px 5px 5px; background: var(--surface); border-radius: var(--r-s); transition: background .12s;
}
.advice-hero:hover { background: var(--surface-2); }
.advice-hero > img { width: 78px; height: 44px; object-fit: cover; border-radius: 5px; }

.rv-times { display: flex; flex-direction: column; gap: 3px; }
.rv-time { display: grid; grid-template-columns: 46px minmax(0, 1fr) 54px 54px; align-items: center; gap: 10px; padding: 3px 10px 3px 3px; background: var(--surface); border-radius: var(--r-s); font-variant-numeric: tabular-nums; }
.rv-time img { width: 46px; height: 34px; object-fit: cover; border-radius: 4px; }
.rv-time b { font-size: 13px; }
.rv-time span { text-align: right; font-weight: 600; }
.rv-time.late span:first-of-type { color: #ff9d4d; }
.rv-time.early span:first-of-type { color: var(--good); }
.block h4 span { font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------- тренажёр драфта ---------- */

.tr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.tr-stats { display: flex; gap: 6px; }
.tr-stats div { padding: 6px 12px; background: var(--surface); border-radius: var(--r-s); text-align: center; }
.tr-stats b { display: block; font: 700 18px/1.1 var(--display); }
.tr-stats span { font-size: 11px; color: var(--muted); }
.tr-task h2 { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; }
.tr-task p { margin: 4px 0 12px; font-size: 14px; }
.tr-task p b { color: var(--text); }
.tr-teams { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 16px; }
.tr-label { display: block; margin-bottom: 5px; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .09em; }
.tr-teams .rv-team img { width: 84px; height: 47px; opacity: 1; }
.tr-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tr-opt {
  position: relative; display: flex; flex-direction: column; gap: 5px; padding: 0 0 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; text-align: left;
  transition: transform .12s, border-color .12s, background .12s;
}
.tr-opt:not(:disabled):hover { transform: translateY(-3px); border-color: var(--gold); background: var(--surface-2); }
.tr-opt:disabled { cursor: default; }
.tr-opt > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tr-opt > b { padding: 2px 12px 0; font: 700 16px var(--display); }
.tr-key {
  position: absolute; top: 8px; left: 8px; z-index: 1; min-width: 24px; padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, .7); font: 700 12px var(--display); text-align: center;
}
.tr-score { padding: 0 12px; font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.tr-why { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0 12px; }
.tr-why > span:first-child { font-size: 11px; color: var(--muted); }
.tr-tag { padding: 0 12px; font-size: 12px; font-weight: 600; }
.tr-opt.best { border-color: var(--good); background: rgba(143, 224, 74, .08); }
.tr-opt.best .tr-tag { color: var(--good); }
.tr-opt.wrong { border-color: var(--bad); background: rgba(255, 107, 88, .08); }
.tr-opt.wrong .tr-tag { color: var(--bad); }
.tr-opt.dim { opacity: .6; }
.tr-result {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin-top: 14px; padding: 12px 16px; background: var(--surface); border-radius: var(--r);
}
.tr-result b { font: 700 18px var(--display); }
.tr-result span { flex: 1; color: var(--text); }
.link { padding: 0; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 11px; }
.link:hover { color: var(--text); }

/* ---------- мета ---------- */

.tier { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tier-name { font: 800 30px/1.2 var(--display); text-align: center; }
.tier-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 5px; }
.tier-hero {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 4px; background: var(--surface); border-radius: var(--r-s); transition: background .12s;
}
.tier-hero:hover { background: var(--surface-2); }
.tier-hero img { grid-row: 1 / 3; width: 64px; height: 36px; object-fit: cover; border-radius: 5px; }
.tier-hero b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-hero span { font-size: 11px; color: var(--muted); }
.tier-hero i { font-style: normal; font-weight: 600; }

/* ---------- второй экран ---------- */

.room-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.room-live { font-size: 13px; }
.room-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.qr-box { align-self: center; width: 220px; padding: 0; border-radius: 12px; overflow: hidden; background: #fff; }
.qr { display: block; width: 100%; height: auto; }

/* устройство-зритель: драфт приходит с другого устройства, поэтому менять его здесь нечем */
body.viewer .picker, body.viewer .auto, body.viewer .bans, body.viewer .slot-x, body.viewer .nav,
body.viewer #resetBtn, body.viewer #compactBtn, body.viewer [data-act="take"], body.viewer [data-act="to-ban"] { display: none; }
body.viewer main { grid-template-columns: minmax(0, 1fr); }
body.viewer .slot { cursor: pointer; }

/* мини-окно поверх игры (класс pip, а не mini: .mini — это кнопки героев шириной 62px) */
body.pip { display: block; height: auto; min-height: 100%; padding: 10px 12px 14px; overflow-y: auto; font-size: 13px; }
body.pip h3 { margin: 10px 0 6px; font: 700 16px var(--display); }
body.pip h4 { margin: 9px 0 5px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
body.pip .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-draft { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.mini-draft > b { font: 700 15px var(--display); }
.mini-team { display: flex; flex-wrap: wrap; gap: 3px; }
.mini-team img { width: 36px; height: 20px; object-fit: cover; border-radius: 3px; }
.mini-draft .mini-team:last-child { justify-content: flex-end; }
.mini-rec { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px 0; }
.mini-rec img { width: 64px; height: 36px; object-fit: cover; border-radius: 5px; }
.mini-rec span { font: 700 16px var(--display); }

/* ---------- разделы сайта ---------- */

[hidden] { display: none !important; }

.nav { flex: 1; display: flex; gap: 2px; min-width: 0; margin-left: 4px; }
.nav a {
  padding: 8px 13px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font: 600 14px/1 var(--display); white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.on { color: #0c0f13; background: var(--text); }
a.btn { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }

/* вне драфта нет доски и сетки героев: страница раздела занимает всю ширину */
body:not([data-view="draft"]) .board,
body:not([data-view="draft"]) .picker,
body:not([data-view="draft"]) #compactBtn,
body:not([data-view="draft"]) #resetBtn { display: none; }
body:not([data-view="draft"]) main { display: block; }
body:not([data-view="draft"]) .side { height: 100%; padding: 0 20px 28px; }
.page { max-width: 1120px; margin: 0 auto; padding-top: 18px; }
.page-head { margin-bottom: 14px; }
.page-head h2 { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; }
.page-head .lead { margin: 4px 0 0; }
.page-head.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.page-head.row .search { max-width: 380px; }
.back { color: var(--muted); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--text); }
.more { margin-left: auto; padding-left: 12px; font: 600 12px var(--font); letter-spacing: 0; color: var(--gold); text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.block h3 .small { margin-left: 10px; margin-right: auto; }

/* главная */
.hero-banner {
  padding: 34px 32px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background:
    radial-gradient(620px 260px at 10% 0, rgba(127, 209, 59, .17), transparent 70%),
    radial-gradient(620px 260px at 90% 0, rgba(240, 80, 63, .17), transparent 70%),
    var(--surface);
}
.hero-banner h2 { max-width: 760px; font: 800 36px/1.1 var(--display); letter-spacing: -.03em; }
.hero-banner p { max-width: 660px; margin: 12px 0 20px; color: #cfd5dc; font-size: 15px; line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.big { padding: 11px 22px; font-size: 15px; border-radius: 10px; }
.btn.gold.big { background: var(--gold); color: #17120a; }
.btn.gold.big:hover { background: var(--gold); filter: brightness(1.08); }
.hero-banner { padding: 24px 28px; }
.hero-banner h2 { font-size: 30px; }
.hero-banner p { margin: 8px 0 16px; font-size: 14px; }

/* герой дня */
.feature {
  position: relative; display: block; overflow: hidden; min-height: 300px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 16px; color: inherit; text-decoration: none;
  background: linear-gradient(100deg, #12161c 35%, #1a1f27);
  transition: border-color .15s;
}
.feature:hover { border-color: rgba(240, 191, 85, .5); }
.feature-art {
  position: absolute; right: -40px; top: -30px; height: 140%; max-width: 70%; object-fit: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%);
  opacity: .9; transition: transform .4s;
}
.feature:hover .feature-art { transform: scale(1.03); }
.feature-body { position: relative; max-width: 520px; padding: 24px 28px; }
.feature h3 { font: 800 34px/1.1 var(--display); letter-spacing: -.03em; margin-bottom: 8px; }
.feature p { color: #cfd5dc; margin-bottom: 12px; }
.feature-row { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; }
.feature-row span { width: 96px; flex: none; font-size: 12px; color: var(--muted); }
.feature-row img { width: 54px; height: 30px; object-fit: cover; border-radius: 4px; }
.feature-row img.home-item { width: 40px; height: 30px; }
.more-link { display: inline-block; margin-top: 8px; color: var(--gold); font-weight: 600; }

/* подборки */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.home-card { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.home-card h3 { font: 700 17px var(--display); letter-spacing: -.01em; margin-bottom: 2px; }
.home-card .lead { margin-bottom: 10px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.pick-row .pics { display: flex; align-items: center; gap: 4px; flex: none; }
.pick-row .pics img { width: 48px; height: 27px; object-fit: cover; border-radius: 4px; }
.pick-row .pics i { font-style: normal; color: var(--muted); }
.pick-row a { color: var(--text); text-decoration: none; }
.pick-row a:hover { text-decoration: underline; text-underline-offset: 3px; }
a.tier-hero { color: inherit; text-decoration: none; }
.how ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: #cfd5dc; }
.how b { color: var(--text); }

/* каталог героев */
.cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 6px; }
.cat-hero {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-s);
  color: inherit; text-decoration: none;
  transition: border-color .12s, background .12s, transform .12s;
}
.cat-hero:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.cat-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.cat-hero b { padding: 6px 9px 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-hero span { padding: 0 9px 7px; font-size: 11px; font-weight: 600; }

/* страница героя */
.article p { max-width: 800px; margin-bottom: 8px; color: #cfd5dc; font-size: 14px; line-height: 1.55; }
.article p b { color: var(--text); }
.article a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.article a:hover { text-decoration-color: var(--gold); }
.mu-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.legal #dataInfo { margin-left: 6px; }

/* поддержка */
.legal .support-link { margin-left: 10px; color: var(--gold); text-decoration: none; font-weight: 600; white-space: nowrap; }
.legal .support-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.sup-text {
  width: 100%; min-height: 130px; resize: vertical; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
  color: var(--text); font: inherit;
}
.sup-text:focus { outline: none; border-color: var(--gold); background: var(--surface-2); }
.sup-opt { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; }
.sup-opt input { margin-top: 2px; accent-color: var(--gold); }
.sup-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sup-row .btn[disabled] { opacity: .6; cursor: default; }

/* ---------- компактный вид: без сетки героев, всё главное крупно ---------- */

body.compact main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
body.compact .picker { order: 0; padding: 10px 20px; border-left: 0; border-bottom: 1px solid var(--line); }
body.compact .grid, body.compact .hint, body.compact .data-info { display: none; }
body.compact .data-info + .bracket { margin-left: auto; }
body.compact .slot { max-height: 70px; }
body.compact .rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 0 14px; }

/* ---------- узкое окно ---------- */

@media (max-width: 1150px) {
  body { height: auto; min-height: 100%; }
  .topbar { flex-wrap: wrap; gap: 6px 12px; }
  .brand { flex: 1; }
  .data-info { order: 3; flex-basis: 100%; white-space: normal; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .team.enemy h2 { text-align: left; }
  .verdict { order: 3; }
  .tools { order: 4; }
  main, body.compact main { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .picker { order: 0; border-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
  .grid { max-height: 46vh; }
  .side { overflow: visible; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  body.compact .rows { grid-template-columns: minmax(0, 1fr); }
  .tabs { overflow-x: auto; }
  .match { grid-template-columns: 62px minmax(0, 1fr) 26px auto auto; }
  .match > img { width: 62px; height: 35px; }
  .match .match-kda, .match .match-res { display: none; }
  .rv-item { grid-template-columns: 10px minmax(0, 1fr); }
  .rv-pics { grid-column: 2; }
  .tab.last { margin-left: 0; }
  .bracket select { max-width: 170px; }
  .nav { order: 5; flex-basis: 100%; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  body:not([data-view="draft"]) .side { height: auto; }
  .hero-banner { padding: 22px 18px; }
  .hero-banner h2 { font-size: 26px; }
  .feature-art { opacity: .35; max-width: 100%; right: -80px; }
  .feature h3 { font-size: 28px; }
  .mu-two { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-banner h2 { font-size: 23px; }
  .cta .btn { flex: 1; justify-content: center; }
  .cat { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .nav a { padding: 8px 10px; font-size: 13px; }
}
