:root{
  /* Светлая тема (по умолчанию) */
  --bg:#f2f4f7;
  --surface:#ffffff;
  --surface-2:#edf0f4;
  --line:#d8dee6;
  --line-soft:#e4e8ee;
  --text:#1d2530;
  --muted:#5d6a7c;
  --dim:#8a94a3;
  --accent:#c07f18;        /* янтарный — только live */
  --accent-soft:rgba(214,146,40,.13);
  --win:#2f9e63;
  --lose:#c05a50;
  --pick:#3a6ea8;          /* спокойный синий — пики карт */
  --topbar-bg:rgba(255,255,255,.88);
  --shadow:0 1px 2px rgba(24,34,48,.05);
  --shadow-hover:0 4px 14px rgba(24,34,48,.08);
  --radius:12px;
  --radius-s:8px;
}
[data-theme="dark"]{
  --bg:#14181f;
  --surface:#1b212b;
  --surface-2:#222a36;
  --line:#2b3441;
  --line-soft:#242c38;
  --text:#e9edf2;
  --muted:#8d97a6;
  --dim:#5f6a7a;
  --accent:#e5a33f;
  --accent-soft:rgba(229,163,63,.12);
  --win:#6dbd8d;
  --lose:#c97b74;
  --pick:#5c8fc7;
  --topbar-bg:rgba(20,24,31,.92);
  --shadow:none;
  --shadow-hover:none;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Golos Text',system-ui,sans-serif;
  font-size:15px;
  line-height:1.5;
  min-height:100vh;
  overflow-x:clip;
}
body.drawer-open{overflow:hidden}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
:focus-visible{outline:2px solid var(--pick);outline-offset:2px;border-radius:4px}

/* ---------- Material Icons (self-hosted) ---------- */
@font-face{
  font-family:'Material Icons Round';
  font-style:normal;font-weight:400;font-display:block;
  src:url(/resources/fonts/material-icons-round.woff2) format('woff2');
}
.mi{
  font-family:'Material Icons Round';font-weight:normal;font-style:normal;
  font-size:18px;line-height:1;letter-spacing:normal;text-transform:none;
  display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;
  font-feature-settings:'liga';-webkit-font-smoothing:antialiased;user-select:none;
}
.search-pill .mi,.theme-btn .mi,.drawer-close .mi{font-size:17px}
.mini-link .mi{font-size:14px;vertical-align:-2px}

/* ---------- Шапка ---------- */
.topbar{
  border-bottom:1px solid var(--line-soft);
  background:var(--topbar-bg);
  backdrop-filter:blur(8px);
  position:sticky;top:0;z-index:50;
}
.topbar-inner{
  max-width:1240px;margin:0 auto;padding:0 24px;
  display:flex;align-items:center;gap:28px;height:60px;
}
.logo{
  font-family:'Unbounded',sans-serif;font-weight:600;font-size:17px;
  letter-spacing:.04em;display:flex;align-items:center;gap:9px;
}
.logo-dot{width:9px;height:9px;border-radius:50%;background:var(--accent);display:inline-block}
.games{display:flex;gap:4px;flex:1}
.game-tab{
  padding:7px 14px;border-radius:999px;color:var(--muted);
  font-weight:500;font-size:14px;transition:color .15s,background .15s;
}
.game-tab:hover{color:var(--text)}
.game-tab.active{background:var(--surface-2);color:var(--text)}
.top-actions{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:14px}
.search-pill{
  display:flex;align-items:center;gap:8px;padding:7px 14px;
  border:1px solid var(--line);border-radius:999px;color:var(--dim);
  font-size:13px;transition:border-color .15s;
}
.search-pill:hover{border-color:var(--muted)}
.avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#3b4a5e,#2a3442);
  display:grid;place-items:center;font-size:12px;font-weight:600;color:#eef1f5}
.theme-btn{
  width:34px;height:34px;border-radius:50%;border:1px solid var(--line);
  display:grid;place-items:center;font-size:15px;color:var(--muted);transition:.15s;
}
.theme-btn:hover{color:var(--text);border-color:var(--muted)}

/* ---------- Бургер ---------- */
.burger{
  display:none;width:38px;height:38px;border-radius:10px;
  flex-direction:column;justify-content:center;align-items:center;gap:5px;
}
.burger i{display:block;width:19px;height:2px;border-radius:2px;background:var(--text);transition:.2s}
.burger:hover i{background:var(--accent)}

/* ---------- Дровер ---------- */
.overlay{
  position:fixed;inset:0;background:rgba(13,18,26,.45);z-index:70;
  opacity:0;pointer-events:none;transition:opacity .25s;
}
.overlay.show{opacity:1;pointer-events:auto}
.drawer{
  position:fixed;top:0;bottom:0;left:0;z-index:80;
  width:min(304px,86vw);background:var(--surface);
  border-right:1px solid var(--line-soft);
  transform:translateX(-105%);transition:transform .28s cubic-bezier(.3,.8,.3,1);
  display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;
}
.drawer.open{transform:none}
@media (prefers-reduced-motion:reduce){
  .drawer{transition:none}
  .overlay{transition:none}
}
.drawer-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px;border-bottom:1px solid var(--line-soft);
}
.drawer-close{
  width:32px;height:32px;border-radius:8px;display:grid;place-items:center;
  color:var(--muted);font-size:17px;
}
.drawer-close:hover{background:var(--surface-2);color:var(--text)}
.drawer-label{
  padding:16px 18px 8px;font-size:11.5px;font-weight:600;
  text-transform:uppercase;letter-spacing:.09em;color:var(--dim);
}
.drawer-item{
  display:flex;align-items:center;gap:12px;padding:11px 18px;
  font-size:14.5px;font-weight:500;color:var(--muted);
}
.drawer-item:hover{background:var(--surface-2);color:var(--text)}
button.drawer-item{width:100%;text-align:left}
.drawer-item.active{color:var(--text);background:var(--surface-2);
  box-shadow:inset 3px 0 0 var(--accent)}
.drawer-item .di-badge{
  margin-left:auto;font-family:'JetBrains Mono',monospace;font-size:11px;
  color:var(--accent);background:var(--accent-soft);padding:1px 8px;border-radius:999px;
}
.drawer-item .di-logo{
  width:26px;height:26px;border-radius:7px;background:var(--surface-2);
  display:grid;place-items:center;font-size:10px;font-weight:600;flex:none;
}
.drawer-sep{height:13px;padding:10px 0 2px;background:var(--line-soft);background-clip:content-box}
.drawer-foot{
  margin-top:auto;border-top:1px solid var(--line-soft);
  padding:14px 18px calc(14px + env(safe-area-inset-bottom));
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.drawer-foot .who{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:500}

/* ---------- Подменю раздела ---------- */
.subnav{border-bottom:1px solid var(--line-soft)}
.subnav-inner{
  max-width:1240px;margin:0 auto;padding:0 24px;
  display:flex;gap:26px;overflow-x:auto;scrollbar-width:none;
}
.subnav-inner::-webkit-scrollbar{display:none}
.subnav a{
  padding:13px 2px;color:var(--muted);font-size:14px;font-weight:500;
  border-bottom:2px solid transparent;white-space:nowrap;transition:color .15s;
}
.subnav a:hover{color:var(--text)}
.subnav a.active{color:var(--text);border-bottom-color:var(--accent)}

/* ---------- Сетка ---------- */
.layout{
  max-width:1240px;margin:0 auto;padding:28px 24px 64px;
  display:grid;grid-template-columns:1fr 316px;gap:28px;align-items:start;
}
.layout main{display:flex;flex-direction:column;gap:22px;min-width:0}
.rows{display:flex;flex-direction:column;gap:7px}

/* ---------- Заголовок + фильтры ---------- */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:16px}
.page-head > div:first-child{display:flex;flex-direction:column;gap:4px}
h1{font-family:'Unbounded',sans-serif;font-weight:500;font-size:22px;letter-spacing:.01em}
.page-head .sub{color:var(--muted);font-size:14px}
.filters{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  padding:7px 15px;border:1px solid var(--line);border-radius:999px;
  font-size:13.5px;color:var(--muted);font-weight:500;transition:.15s;
}
.chip:hover{color:var(--text);border-color:var(--muted)}
.chip.active{background:var(--surface-2);border-color:var(--surface-2);color:var(--text)}
.chip.live-chip.active{background:var(--accent-soft);border-color:transparent;color:var(--accent)}

/* ---------- Лента дат ---------- */
.dates{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none}
.dates::-webkit-scrollbar{display:none}
.date-card{
  min-width:76px;padding:9px 0;text-align:center;border-radius:var(--radius-s);
  border:1px solid var(--line-soft);background:var(--surface);transition:.15s;
  display:flex;flex-direction:column;align-items:center;gap:2px;
}
.date-card:hover{border-color:var(--line)}
.date-card .dow{font-size:11.5px;color:var(--dim);text-transform:uppercase;letter-spacing:.07em}
.date-card .num{font-family:'JetBrains Mono',monospace;font-size:15px;font-weight:500}
.date-card.today{background:var(--surface-2);border-color:var(--pick)}
.date-card.today .dow{color:var(--pick)}

/* ---------- Группы матчей ---------- */
.group{display:flex;flex-direction:column;gap:10px}
.group + .group{padding-top:12px}
.group-head{display:flex;align-items:center;gap:12px}
.group-title{font-size:13px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.group-title.live{color:var(--accent);display:flex;align-items:center;gap:8px}
.pulse{width:7px;height:7px;border-radius:50%;background:var(--accent);position:relative}
.pulse::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:1px solid var(--accent);opacity:.5;animation:ring 1.8s ease-out infinite}
@keyframes ring{0%{transform:scale(.5);opacity:.7}100%{transform:scale(1.4);opacity:0}}
@media (prefers-reduced-motion:reduce){.pulse::after{animation:none;display:none}}
.group-line{flex:1;height:1px;background:var(--line-soft)}
.group-count{font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--dim)}

/* ---------- Карточка матча ---------- */
.match{
  background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--radius);
  padding:16px 20px;display:flex;flex-direction:column;gap:13px;
  box-shadow:var(--shadow);
  transition:border-color .15s, transform .15s, box-shadow .15s;
}
.match:hover{border-color:var(--line);transform:translateY(-1px);box-shadow:var(--shadow-hover)}
.match.is-live{border-color:rgba(229,163,63,.35)}
.match-top{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  font-size:12.5px;color:var(--dim);
}
.match-event{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.event-logo{width:16px;height:16px;border-radius:4px;background:var(--surface-2);flex:none;
  display:grid;place-items:center;font-size:9px;color:var(--muted);font-weight:600}
.match-event span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.match-meta{display:flex;align-items:center;gap:10px;flex:none;font-family:'JetBrains Mono',monospace;font-size:12px}
.bo{color:var(--dim)}
.live-badge{
  display:inline-flex;align-items:center;gap:6px;color:var(--accent);
  background:var(--accent-soft);padding:2px 9px;border-radius:999px;font-weight:500;
}
.live-badge .pulse{width:6px;height:6px}
.star{color:var(--dim);font-size:15px;transition:color .15s}
.star:hover{color:var(--accent)}
.star.on{color:var(--accent)}

.match-body{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:18px}
.team{display:flex;align-items:center;gap:12px;min-width:0}
.team.right{flex-direction:row-reverse;text-align:right}
.team-logo{
  width:38px;height:38px;border-radius:10px;flex:none;
  display:grid;place-items:center;font-weight:600;font-size:13px;color:#eef1f5;
}
.team-info{min-width:0}
.team-name{font-weight:600;font-size:15.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-rank{font-size:12px;color:var(--dim);font-family:'JetBrains Mono',monospace}
.team.dimmed .team-name{color:var(--muted)}

.center{min-width:96px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:2px}
.score{font-family:'JetBrains Mono',monospace;font-size:22px;font-weight:600;letter-spacing:.06em;display:flex;align-items:baseline;justify-content:center;gap:4px}
.score .to{color:var(--dim)}
.score .lead{color:var(--text)}
.score .trail{color:var(--muted)}
.time-big{font-family:'JetBrains Mono',monospace;font-size:19px;font-weight:500}
.center .note{font-size:11.5px;color:var(--dim)}
.center .note.map-live{color:var(--accent)}

/* ---------- Полоса вето / карт ---------- */
.maps{display:flex;gap:6px;flex-wrap:wrap}
.map{
  font-family:'JetBrains Mono',monospace;font-size:11.5px;
  padding:4px 10px;border-radius:6px;border:1px solid var(--line-soft);
  color:var(--dim);display:inline-flex;align-items:center;gap:7px;
}
.map .ms{font-weight:600}
.map.done{background:var(--surface-2);border-color:transparent;color:var(--muted)}
.map.done .w{color:var(--win)}
.map.done .l{color:var(--lose)}
.map.playing{border-color:rgba(229,163,63,.45);color:var(--accent);background:var(--accent-soft)}
.map.upcoming{border-style:dashed}
.map.decider{border-color:var(--line);color:var(--muted)}

/* ---------- Прогноз ---------- */
.forecast{display:flex;flex-direction:column;gap:5px}
.forecast-bar{height:4px;border-radius:2px;background:var(--surface-2);overflow:hidden;display:flex}
.forecast-bar i{display:block;height:100%;background:var(--pick);opacity:.75}
.forecast-labels{display:flex;justify-content:space-between;font-family:'JetBrains Mono',monospace;
  font-size:11px;color:var(--dim)}

/* ---------- Завершённые ---------- */
.match.done-match{opacity:.82}
.match.done-match:hover{opacity:1}

/* ---------- Сайдбар ---------- */
.side{display:flex;flex-direction:column;gap:20px;position:sticky;top:84px}
.panel{background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow)}
.panel h3{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);padding-bottom:14px}

.featured .f-event{font-size:12px;color:var(--dim);display:flex;gap:8px;align-items:center;padding-bottom:12px}
.f-teams{display:flex;align-items:center;justify-content:space-between;padding-bottom:4px}
.f-team{display:flex;flex-direction:column;align-items:center;gap:8px;width:84px}
.f-team .team-logo{width:46px;height:46px;font-size:15px}
.f-team b{font-size:13.5px;font-weight:600;text-align:center}
.f-vs{font-family:'JetBrains Mono',monospace;color:var(--dim);font-size:13px;text-align:center}
.f-vs .t{font-size:17px;color:var(--text);font-weight:500}
.f-note{font-size:12.5px;color:var(--muted);text-align:center;padding-top:10px;line-height:1.55}

.rank-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--line-soft)}
.rank-row:last-child{border-bottom:none}
.rank-num{font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--dim);width:18px}
.rank-row .team-logo{width:28px;height:28px;border-radius:8px;font-size:10px}
.rank-name{flex:1;font-weight:500;font-size:14px}
.rank-pts{font-family:'JetBrains Mono',monospace;font-size:12.5px;color:var(--muted)}
.delta{font-size:11px;font-family:'JetBrains Mono',monospace;width:28px;text-align:right}
.delta.up{color:var(--win)}
.delta.dn{color:var(--lose)}
.delta.eq{color:var(--dim)}

.mini-link{display:block;text-align:center;font-size:13px;color:var(--pick);padding-top:12px;font-weight:500}
.mini-link:hover{text-decoration:underline}
.sect .mini-link{padding-top:0}

/* ---------- Логотипы команд (плейсхолдеры) ---------- */
.tl-navi{background:linear-gradient(135deg,#3d3a2a,#2b2920)}
.tl-faze{background:linear-gradient(135deg,#4a2f2f,#332222)}
.tl-spirit{background:linear-gradient(135deg,#2b3a4d,#202b38)}
.tl-vita{background:linear-gradient(135deg,#3e3a26,#2c2a1e)}
.tl-g2{background:linear-gradient(135deg,#3a3a3f,#26262b)}
.tl-mouz{background:linear-gradient(135deg,#2f2f45,#222234)}
.tl-vp{background:linear-gradient(135deg,#45341f,#31261a)}
.tl-astr{background:linear-gradient(135deg,#42303c,#2e222b)}
.tl-liq{background:linear-gradient(135deg,#24404a,#1c2e35)}
.tl-falc{background:linear-gradient(135deg,#2e4433,#213127)}
.tl-hero{background:linear-gradient(135deg,#403040,#2b212b)}
.tl-eter{background:linear-gradient(135deg,#2c3d3d,#212e2e)}

footer{border-top:1px solid var(--line-soft);color:var(--dim);font-size:13px}
.footer-inner{max-width:1240px;margin:0 auto;padding:22px 24px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}

/* ---------- Адаптив ---------- */
@media (max-width:1000px){
  .layout{grid-template-columns:1fr}
  .side{position:static;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
}
@media (max-width:640px){
  body{padding-bottom:64px} /* место под нижнюю навигацию */

  /* Шапка: бургер · логотип · поиск · аватар. Игры и подменю — в дровере */
  .burger{display:flex}
  .topbar-inner{padding:0 12px 0 8px;gap:8px;height:56px}
  .logo{font-size:16px;flex:1}
  .games{display:none}
  .subnav{display:none}
  .theme-btn{display:none}
  .top-actions{gap:8px}
  .search-pill{padding:0;border:none;width:36px;height:36px;justify-content:center;font-size:17px}
  .search-pill span{display:none}
  .avatar{width:30px;height:30px}

  .layout{padding:16px 14px 40px;gap:20px}
  .layout main{gap:16px}
  h1{font-size:19px}
  .filters{width:100%;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap;padding-bottom:2px}
  .filters::-webkit-scrollbar{display:none}
  .chip{flex:none;padding:6px 13px;font-size:13px}
  .date-card{min-width:64px;padding:7px 0}

  /* Компактная карточка матча */
  .match{padding:12px;border-radius:10px;gap:10px}
  .match-top{font-size:11.5px;gap:8px}
  .match-meta{gap:7px;font-size:11px}
  .live-badge{padding:2px 7px}
  .match-body{gap:6px}
  .team{gap:8px}
  .team-logo{width:28px;height:28px;border-radius:8px;font-size:10px}
  .team-name{font-size:13px}
  .team-rank{display:none}
  .center{min-width:58px}
  .score{font-size:16px;letter-spacing:.03em}
  .time-big{font-size:14.5px}
  .center .note{font-size:10px;white-space:nowrap}
  .maps{gap:5px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
    margin-left:-12px;margin-right:-12px;padding:0 12px}
  .maps::-webkit-scrollbar{display:none}
  .map{font-size:10.5px;padding:3px 8px;flex:none;white-space:nowrap}
  .forecast-labels{font-size:9.5px}

  .panel{padding:15px 16px}
  .footer-inner{padding:18px 16px;flex-direction:column;gap:4px}
}

/* ---------- Нижняя навигация (мобильные) ---------- */
.bottomnav{
  display:none;position:fixed;left:0;right:0;bottom:0;z-index:60;
  background:var(--topbar-bg);backdrop-filter:blur(10px);
  border-top:1px solid var(--line-soft);
  padding:6px 8px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:5px 0;color:var(--dim);font-size:10.5px;font-weight:500;border-radius:8px;
}
.bottomnav a .mi{font-size:21px}
.bottomnav a.active{color:var(--text)}
.bottomnav a.active .mi{color:var(--accent)}
@media (max-width:640px){
  .bottomnav{display:flex}
}

/* ---------- SEO-блок ---------- */
.seo-wrap{max-width:1240px;margin:0 auto;padding:0 24px 42px}
.seo-block{background:var(--surface);border:1px solid var(--line-soft);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px 24px;color:var(--muted);font-size:14px;line-height:1.65;display:flex;flex-direction:column;gap:10px}
.seo-block h2{font-family:'Golos Text',sans-serif;font-size:15.5px;font-weight:600;color:var(--text)}
.seo-block a{color:var(--pick)}
.seo-block a:hover{text-decoration:underline}
.seo-block details{display:flex;flex-direction:column;gap:10px}
.seo-block summary{cursor:pointer;color:var(--pick);font-weight:500;font-size:13.5px;list-style:none;align-self:flex-start}
.seo-block summary::-webkit-details-marker{display:none}
.seo-block summary::after{content:"expand_more";font-family:'Material Icons Round';font-size:15px;vertical-align:-3px;padding-left:2px}
.seo-block details[open] summary::after{content:"expand_less"}
@media (max-width:640px){.seo-wrap{padding:0 14px 34px}.seo-block{padding:16px 14px}}

/* ---------- Доработки: disabled-разделы, живые логотипы, пагинация ---------- */
.disabled{opacity:.45;cursor:not-allowed}
.subnav a.disabled:hover{color:var(--muted)}
.game-tab.disabled:hover{color:var(--dim)}
.drawer-item.disabled:hover{background:transparent}
.bottomnav a.disabled:hover{color:var(--dim)}
.search-pill:disabled{opacity:.55;cursor:not-allowed}
.search-pill:disabled:hover{border-color:var(--line)}

.team-logo.has-img{background:var(--surface-2)}
.team-logo img{width:78%;height:78%;object-fit:contain}
.event-logo img{width:100%;height:100%;object-fit:contain;border-radius:inherit}
.p-ava.has-img{background:var(--surface-2);overflow:hidden}
.p-ava img{width:100%;height:100%;object-fit:cover;border-radius:50%}

.pager{display:flex;align-items:center;justify-content:center;gap:10px;
  font-family:'JetBrains Mono',monospace;font-size:12.5px;color:var(--dim)}
.pager a,.pager .pg-off{padding:6px 14px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-weight:500}
.pager a:hover{color:var(--text);border-color:var(--muted)}
.pager .pg-off{opacity:.4;cursor:not-allowed}

.empty-note{padding:26px;text-align:center;color:var(--dim);font-size:14px;
  background:var(--surface);border:1px dashed var(--line);border-radius:var(--radius)}
