/* Global redesign supplied in "Глобальный редизайн проекта.zip".
   The production DOM and API-driven renderers stay in place; this layer maps the
   supplied visual system onto them without shipping the prototype's mock data. */

:root {
  --bg: #06070c;
  --panel-hi: #151824;
  --panel-lo: #0a0b11;
  --panel-inset: #08090e;
  --panel-inset-hi: #12141d;
  --edge: rgba(255, 255, 255, .08);
  --edge-gold: rgba(233, 180, 84, .30);
  --edge-light: rgba(233, 180, 84, .50);
  --gold: #e9b454;
  --gold-bright: #f7d89a;
  --text: #eef0f4;
  --text-dim: #7a7e8c;
  --ally: #4fbf86;
  --enemy: #e05b4f;
  --good: #4fbf86;
  --bad: #e05b4f;
  --radius: 10px;
  --page: 1560px;
  --font-display: "Oswald", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

@keyframes redesign-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes redesign-sweep {
  0% { transform: translateX(-130%); }
  55%, 100% { transform: translateX(410%); }
}
@keyframes redesign-glow {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}
@keyframes redesign-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes forecast-stability-glow {
  0%, 100% {
    opacity: .62;
    box-shadow: 0 0 2px currentColor;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 5px currentColor, 0 0 12px currentColor;
  }
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(72,64,140,.20), transparent 60%),
    radial-gradient(70% 40% at 80% 100%, rgba(20,40,60,.25), transparent 70%),
    #06070c;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
body::before, body::after { content: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #242835; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.topbar {
  min-height: 74px;
  height: auto;
  padding: 12px 28px;
  gap: 10px 24px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(12,13,19,.96), rgba(7,8,12,.88));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233,180,84,.16);
  box-shadow: 0 18px 40px -28px rgba(0,0,0,.9);
}
.brand { min-width: 220px; gap: 13px; }
.brand-mark { width: 34px; height: 38px; filter: drop-shadow(0 0 9px rgba(233,180,84,.24)); }
.brand-copy { display: flex; flex-direction: column; gap: 4px; }
h1 {
  color: #f2f3f6;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 2.4px;
  text-shadow: none;
}
.brand-tagline {
  color: #6f7484;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2.1px;
  white-space: nowrap;
}
.tabs {
  flex: 1 1 430px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-btn {
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #777c8b;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.8px;
  transition: color .18s, border-color .18s, background .18s;
}
.tab-btn::after { content: none; }
.tab-btn .ico { width: 15px; height: 15px; }
.tab-btn:hover:not(.locked):not(.active) { color: var(--gold-bright); background: rgba(233,180,84,.04); }
.tab-btn.active {
  color: var(--gold-bright);
  border-color: rgba(233,180,84,.25);
  background: rgba(233,180,84,.08);
  box-shadow: inset 0 -1px 0 rgba(233,180,84,.45);
  text-shadow: none;
}
.controls { gap: 10px; }
.controls .field, .controls label.field { gap: 0; }
.controls .field > label { display: none; }
.dropdown-trigger, .lang-toggle, .btn-ghost {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 3px;
  background: rgba(255,255,255,.025);
  color: #a8adbd;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.4px;
}
.dropdown-trigger { min-width: 190px; padding: 7px 11px; }
.lang-toggle { padding: 7px 10px; }
button::before { content: none; }
button:hover:not(:disabled) {
  filter: none;
  color: var(--gold-bright);
  border-color: rgba(233,180,84,.5);
  box-shadow: none;
}
button:active:not(:disabled) { transform: none; }

.dropdown {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px;
  background: #10121b;
  box-shadow: 0 22px 50px rgba(0,0,0,.65);
}
.dropdown .option { padding: 8px 10px; color: #c9cbd4; }
.dropdown .option.active, .dropdown .option:hover { background: rgba(233,180,84,.10); }

.site-intro {
  position: relative;
  z-index: 1;
  padding: 54px 28px 0;
  text-align: center;
  animation: redesign-rise .55s both;
}
.site-intro h2 {
  margin: 0;
  color: #f4f5f8;
  font-family: var(--font-display);
  font-size: clamp(46px, 7vw, 96px);
  font-weight: 600;
  line-height: .98;
  letter-spacing: 6px;
}
.site-intro h2 em { color: var(--gold); font-style: normal; }
.site-intro p {
  max-width: 620px;
  margin: 18px auto 0;
  color: #7a7e8c;
  font-size: 13.5px;
  line-height: 1.7;
}
.data-ticker {
  position: relative;
  z-index: 1;
  margin-top: 44px;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
}
.data-ticker-track {
  display: flex;
  width: max-content;
  padding: 10px 0;
  animation: redesign-marquee 42s linear infinite;
}
.data-ticker-group {
  display: flex;
  flex: 0 0 auto;
  min-width: 100vw;
  align-items: center;
  justify-content: space-around;
}
.data-ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 28px;
  color: #676c7b;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-ticker-track span::after { content: "◆"; margin-left: 28px; color: rgba(233,180,84,.45); font-size: 7px; }
.data-ticker-track b { color: var(--gold); font-weight: 500; }
.data-ticker-track i { font-style: normal; }
.data-ticker-track b.ticker-live { display: inline-flex; align-items: center; gap: 6px; color: var(--enemy); }
.data-ticker-track b.ticker-live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--enemy);
  animation: redesign-glow 1.8s ease-in-out infinite;
}

main { max-width: var(--page); padding: 30px 28px 64px; }
#draft-view > *, #items-view > *, #candy-view > * { margin-bottom: 20px; }
.draft-mode-toolbar {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 22px !important;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.35));
}
.rec-mode-tab, .rec-view-btn {
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #777c8b;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.rec-mode-tab.active, .rec-view-btn.active {
  color: var(--gold-bright);
  border-color: rgba(233,180,84,.28);
  background: rgba(233,180,84,.10);
  box-shadow: none;
}

.board {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(280px, .84fr) minmax(330px, 1fr);
  gap: 20px;
  align-items: start;
}
.panel, .recommendations, #candy-result:not(:empty) {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: linear-gradient(180deg, #151824, #0a0b11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 30px 60px -50px #000;
}
.panel { padding: 20px; }
.panel::before, .recommendations::before, .draft-breakdown::before { content: none !important; }
.team.enemy { background: linear-gradient(180deg, #1c1519, #0a0b11); }
.panel > h2, #draft-view .board > .panel > h2, .rec-col > h2, .draft-breakdown > h2 {
  position: static;
  top: auto;
  transform: none;
  justify-content: flex-start;
  min-width: 0;
  max-width: none;
  min-height: 30px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #eef0f4;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-shadow: none;
}
.panel > h2::before, .panel > h2::after { content: none; }
.team > h2 .ico {
  width: 30px;
  height: 30px;
  padding: 7px;
  border: 1px solid rgba(79,191,134,.45);
  border-radius: 3px;
  background: rgba(79,191,134,.08);
  color: var(--ally);
}
.team.enemy > h2 .ico { border-color: rgba(224,91,79,.45); background: rgba(224,91,79,.08); color: var(--enemy); }
.team > h2 > span { display: flex; flex-direction: column; gap: 3px; }
.team > h2 b { font-weight: 500; }
.team > h2 small { color: #5f6472; font-family: var(--font-mono); font-size: 8px; font-weight: 400; letter-spacing: 2px; }
.team > h2::after {
  content: "" !important;
  display: block;
  flex: 1;
  height: 1px;
  margin-left: 2px;
  background: linear-gradient(90deg, rgba(79,191,134,.55), transparent);
}
.team.enemy > h2::after { background: linear-gradient(90deg, rgba(224,91,79,.55), transparent); }
.slots { gap: 8px; }
.slot {
  /* Used to be a fixed 58px row (icon + name + controls, one line) - items moved inline
     under that row (see .slot-body/.item-slots-inline below, and app.js's renderSlots)
     need a second line's worth of room, so this is min-height only now, growing with
     however many item slots a hero has filled in. */
  min-height: 74px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.25));
  box-shadow: none;
  align-items: stretch;
}
/* The hero-search dropdown (.dropdown, styles.css) is an absolutely-positioned child of
   .slot that intentionally overflows below it - .slot's own overflow:hidden above (there
   to crop the portrait image to the row's rounded corners) would clip it invisible while
   editing, so undo that just for the editing state. Same problem one level down: an item
   slot's own dropdown (.item-slot .item-dropdown-anchor, styles.css) is also an
   absolutely-positioned child nested inside the hero .slot, not the hero slot's own
   .editing state - .slot:has(...) catches it without app.js needing a separate marker
   class for "one of my item slots is open". */
.slot.editing, .slot:has(.item-slot.editing) { overflow: visible; }
.slot:not(.filled)::before { content: "+"; position: static; width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.16); border-radius: 3px; color: #8d92a2; font-family: var(--font-mono); }
.slot .placeholder { color: #8d92a2; font-family: var(--font-display); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.slot:hover { border-color: rgba(233,180,84,.38); box-shadow: none; }
.team.ally .slot.filled { border-color: rgba(79,191,134,.25); background: linear-gradient(90deg, rgba(79,191,134,.10), rgba(255,255,255,.02)); }
.team.enemy .slot.filled { border-color: rgba(224,91,79,.25); background: linear-gradient(90deg, rgba(224,91,79,.10), rgba(255,255,255,.02)); }
/* !important on width/height: styles.css's body.draft-page .slot img.hero-icon (higher
   specificity, 28x26px small icon) still targets this exact element for the legacy
   compact layout - without forcing these two properties, the row silently squashes the
   portrait crop down to a 26px-tall sliver instead of filling the row. */
.slot img.hero-icon, body.draft-page .slot img.hero-icon {
  width: 86px !important;
  height: auto !important;
  align-self: stretch;
  margin: -8px 0 -8px -12px;
  border-radius: 4px 0 0 4px;
  object-fit: cover;
  background: rgba(0,0,0,.28);
  flex: 0 0 86px;
}
.slot .hero-name { color: #eef0f4; font-family: var(--font-display); font-size: 14px; font-weight: 400; letter-spacing: 1.2px; text-transform: uppercase; }
.slot select { max-width: 104px; height: 32px; border-color: rgba(255,255,255,.10); border-radius: 3px; background: rgba(0,0,0,.28); color: #8d92a2; font-family: var(--font-mono); font-size: 8px; }
.me-btn, .clear-btn { border-color: rgba(255,255,255,.14); border-radius: 3px; background: transparent; box-shadow: none; color: #7a7e8c; font-family: var(--font-mono); }
.me-btn.active { border-color: rgba(233,180,84,.45); background: rgba(233,180,84,.12); color: var(--gold-bright); }
.slot input { height: 38px; border: 0; background: transparent; color: var(--text); font-family: var(--font-display); letter-spacing: 1px; }

.slot-body { display: flex; flex-direction: column; justify-content: center; gap: 7px; flex: 1; min-width: 0; }
.slot-row { display: flex; align-items: center; gap: 7px; }
.item-slots-inline { display: flex; flex-wrap: wrap; gap: 5px; }
.position-cycle-btn {
  min-width: 42px;
  height: 23px;
  padding: 0 7px;
  border: 1px solid rgba(233,180,84,.6);
  border-radius: 3px;
  background: rgba(233,180,84,.18);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .8px;
  white-space: nowrap;
  transition: color .12s, background .12s, border-color .12s, transform .09s cubic-bezier(.2,.8,.3,1);
}
.position-cycle-btn:hover { border-color: rgba(233,180,84,.85); background: rgba(233,180,84,.26); }
.position-cycle-btn:active { transform: scale(.94); }

.draft-probability-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 34px 28px 30px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(24,52,40,.85), #08090e 78%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 40px 80px -60px #000;
  text-align: center;
  animation: redesign-rise .6s .12s both;
}
.draft-probability-card::before { content: ""; position: absolute; top: 0; left: 0; width: 26%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: redesign-sweep 5.5s linear infinite; }
.probability-kicker { color: #6f7484; font-family: var(--font-mono); font-size: 9px; letter-spacing: 2.8px; text-transform: uppercase; }
.probability-value { display: flex; justify-content: center; align-items: baseline; margin: 14px 0 4px; color: var(--gold); font-family: var(--font-display); text-shadow: 0 0 42px rgba(233,180,84,.35); }
.probability-value strong { font-size: clamp(58px, 7vw, 96px); font-weight: 600; line-height: 1; letter-spacing: -1px; }
.probability-value span { margin-left: 2px; font-size: 30px; opacity: .55; }
.probability-value span[hidden] { display: none; }
.probability-scale { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--text-dim); font-family: var(--font-mono); font-size: 8px; letter-spacing: 1.4px; }
.probability-scale > span:first-child { color: var(--ally); }
.probability-scale > span:last-child { color: var(--enemy); }
.probability-scale i { flex: 1; height: 5px; overflow: hidden; border-radius: 3px; background: var(--enemy); box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.probability-scale i b { display: block; width: 50%; height: 100%; background: var(--ally); transition: width .35s ease; }
.draft-probability-card p { max-width: 400px; margin: 20px auto 18px; color: #7a7e8c; font-size: 12.5px; line-height: 1.65; }

.empty-draft-hint { padding: 12px; border: 1px dashed rgba(255,255,255,.10); background: rgba(255,255,255,.02); color: #6f7484; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.1px; }
.recommendations { padding: 28px 0 0; border: 0; background: transparent; box-shadow: none; }
.draft-section-tabs {
  position: static;
  inset: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  height: auto;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}
.recommendations-heading { display: flex; flex-direction: column; gap: 5px; }
.recommendations-heading h2 { margin: 0; color: #f2f3f6; font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: 3.4px; text-transform: uppercase; }
.recommendations-heading h2 em { color: var(--gold); font-style: normal; }
.draft-section-tabs .rec-view-toggle { margin: 0; padding: 3px; gap: 2px; border: 1px solid rgba(255,255,255,.10); border-radius: 3px; background: rgba(0,0,0,.3); }
.rec-columns { grid-template-columns: minmax(0, 2fr) minmax(270px, .75fr); gap: 20px; }
.rec-col { padding: 18px 20px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: linear-gradient(180deg, #12141d, #0a0b11); }
.rec-col.pick { padding: 0; border: 0; background: transparent; }
.rec-col > h2 { margin-bottom: 14px; color: #eef0f4; font-size: 14px; }
.rec-col.pick > h2 { display: none; }
.rec-col.avoid > h2::before { content: ""; width: 8px; height: 8px; background: var(--enemy); transform: rotate(45deg); }
.rec-list { gap: 8px; }
#pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.rec-item {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: linear-gradient(180deg, #141724, #0a0b11);
  box-shadow: 0 24px 46px -40px #000;
}
.rec-item:hover { border-color: rgba(233,180,84,.4); box-shadow: 0 24px 46px -40px #000; }
.rec-item > img { width: 100%; height: 122px; border-radius: 0; object-fit: cover; }
.rec-item .rec-body { min-width: 0; padding: 11px 13px 13px; }
.rec-item .rec-top { align-items: flex-start; flex-wrap: wrap; }
.rec-item .name { flex: 1; color: #eef0f4; font-family: var(--font-display); font-size: 15px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; }
.rec-item .score { position: absolute; top: 10px; right: 10px; padding: 4px 8px; border: 1px solid rgba(233,180,84,.35); border-radius: 3px; background: rgba(8,9,14,.82); color: var(--gold) !important; font-family: var(--font-mono); font-size: 10px; }
.rec-bar-track { margin-top: 9px; background: rgba(255,255,255,.06); }
.rec-item .breakdown { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.quick-draft-btn {
  width: 100%;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(79,191,134,.30);
  border-radius: 3px;
  background: rgba(79,191,134,.10);
  color: var(--ally);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}
.quick-draft-btn:hover { border-color: rgba(79,191,134,.55) !important; background: rgba(79,191,134,.18) !important; color: #75d6a6 !important; }
.badge { border-color: rgba(255,255,255,.12); border-radius: 2px; background: transparent; color: #8d92a2; font-family: var(--font-mono); font-size: 7px; letter-spacing: .7px; text-transform: uppercase; }
#avoid-list .rec-item { display: flex; min-height: 52px; border-radius: 5px; }
#avoid-list .rec-item > img { width: 64px; height: 50px; filter: grayscale(.35); }
#avoid-list .rec-item .rec-body { padding: 8px 10px; }
#avoid-list .rec-item .score { position: static; margin-left: auto; border: 0; background: transparent; color: var(--enemy) !important; }
#avoid-list .rec-item .rec-bar-track { display: none; }
.rec-role-columns { width: 100%; grid-column: 1 / -1; gap: 14px; }
.rec-role-col { padding: 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: linear-gradient(180deg, #12141d, #0a0b11); }
.rec-role-title { width: 100%; padding-bottom: 9px; border-bottom: 1px solid rgba(255,255,255,.07); color: var(--gold); font-family: var(--font-display); letter-spacing: 1.4px; }

.draft-breakdown { margin-top: 34px; background: linear-gradient(180deg, #12141d, #0a0b11); }
.draft-breakdown > h2::before { content: ""; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
#breakdown-summary { border: 0; background: transparent; }
.win-estimate { display: none; }
.insight { border-color: rgba(255,255,255,.07); border-radius: 5px; background: rgba(255,255,255,.02); }
.breakdown-card, .item-card, .recipe-row, .candy-result-step, .item-slot { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.02); box-shadow: none; }
.breakdown-card:hover { border-color: rgba(233,180,84,.28); box-shadow: none; }

.view-hero, .tournament-hero {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(28,24,52,.85), #08090e 78%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.view-hero h2, .tournament-hero-info h2 { color: #f2f3f6; font-family: var(--font-display); letter-spacing: 2.8px; }
.view-hero p { color: #7a7e8c; }
.view-hero-mark { border-color: rgba(233,180,84,.28); background: rgba(233,180,84,.08); color: var(--gold); }
.view-hero-stat { border-color: rgba(233,180,84,.22); background: rgba(0,0,0,.22); }
.view-hero-stat span, .view-hero-stat strong { font-family: var(--font-mono); }

.item-rec-section, .item-grid-section { background: linear-gradient(180deg, #12141d, #0a0b11); }
.item-rec-section > h2 { display: none; }
.item-recommendation-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.item-recommendation-column { min-width: 0; padding: 2px 0; }
.item-recommendation-column + .item-recommendation-column { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.07); }
.item-recommendation-column > h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 14px;
  color: #eef0f4;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2.3px;
  text-transform: uppercase;
}
.item-recommendation-column > h2:not(:first-child) { margin-top: 24px; }
.item-recommendation-column > h2::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; background: var(--gold); transform: rotate(45deg); }
.item-rules-column > h2:first-child::before { background: var(--ally); }
.items-my-hero { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid rgba(233,180,84,.22); border-radius: 6px; background: linear-gradient(90deg, rgba(233,180,84,.10), rgba(255,255,255,.02)); }
.items-my-hero img { width: 96px; height: 66px; border-radius: 4px; object-fit: cover; }
.items-my-hero span { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.items-my-hero strong { color: #eef0f4; font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; }
.items-my-hero small { color: var(--gold); font-family: var(--font-mono); font-size: 8px; letter-spacing: 1.3px; text-transform: uppercase; }
.item-rec-panel h2, .chart-title { color: #eef0f4; font-family: var(--font-display); letter-spacing: 1.8px; }
.item-card { border-radius: 5px; }
.item-card .item-wr { color: var(--gold); font-family: var(--font-mono); }
.item-grid-row { border-radius: 5px; background: rgba(255,255,255,.018); }
.item-slot { border-style: solid; border-radius: 4px; }

.candy-hero { background: linear-gradient(180deg, rgba(24,52,40,.72), #08090e 78%); }
.candy-columns { gap: 20px; }
.candy-block:first-child { background: linear-gradient(180deg, #151824, #0a0b11); }
.candy-block:last-child { background: linear-gradient(180deg, #1c1519, #0a0b11); }
.candy-grid { display: grid; grid-template-columns: repeat(5, minmax(76px, 1fr)); gap: 10px; }
.candy-cell { width: auto; padding: 12px 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 6px; background: rgba(255,255,255,.02); }
.candy-cell img { width: 34px; height: 34px; }
.candy-cell .candy-label { color: #7a7e8c; font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }
.candy-cell input, .recipe-mini input { border-color: rgba(255,255,255,.10); border-radius: 4px; background: rgba(0,0,0,.35); color: #eef0f4; font-family: var(--font-mono); }
.recipe-row { border-radius: 6px; }
.candy-actions button { border-color: rgba(233,180,84,.45); background: linear-gradient(180deg, rgba(233,180,84,.3), rgba(233,180,84,.1)); color: var(--gold-bright); }

.tournament-layout { gap: 20px; }
.admin-tournament, .tournament-accuracy { background: linear-gradient(180deg, #12141d, #0a0b11); }
.tournament-card { border-radius: 6px; }
.tournament-hero-featured { border-color: rgba(233,180,84,.22); background: rgba(0,0,0,.22); }
.tournament-hero-countdown, .tournament-hero-score, .funnel-value { color: var(--gold); font-family: var(--font-mono); }
.funnel-row { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.02); }

input, select { outline: none; }
input:focus, select:focus { border-color: rgba(233,180,84,.45) !important; }
select option { background: #0e1018; color: #d8dae2; }
.status { color: #7a7e8c; font-family: var(--font-mono); font-size: 10px; }
.info-tip { border-color: rgba(255,255,255,.14); color: #7a7e8c; }

/* The former theme forced the draft into one viewport and compacted every
   component. The supplied redesign is a scrollable editorial layout, so undo
   those high-specificity draft-page rules explicitly. */
body.draft-page { height: auto; overflow: auto; }
body.draft-page main {
  display: block;
  height: auto;
  padding: 30px 28px 64px;
}
body.draft-page #draft-view {
  display: block;
  min-height: 0;
}
body.draft-page #draft-view > * { margin-bottom: 20px; }
body.draft-page .board { gap: 20px; }
body.draft-page #draft-view .board > .panel {
  padding: 20px;
  border-color: rgba(255,255,255,.07);
  background: linear-gradient(180deg, #151824, #0a0b11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 30px 60px -50px #000;
}
body.draft-page #draft-view .board > .team.enemy {
  border-color: rgba(255,255,255,.07);
  background: linear-gradient(180deg, #1c1519, #0a0b11);
}
body.draft-page #draft-view .board > .panel > h2 { margin: 0 0 18px; font-size: 15px; letter-spacing: 2.4px; }
body.draft-page #draft-view .board > .panel > h2::after { content: ""; }
body.draft-page .slots { gap: 8px; }
body.draft-page .slot { min-height: 74px; padding: 8px 12px; overflow: hidden; align-items: stretch; }
body.draft-page .slot.editing, body.draft-page .slot:has(.item-slot.editing) { overflow: visible; }
body.draft-page .recommendations {
  display: block;
  min-height: 0;
  padding: 28px 0 0;
  overflow: visible;
}
body.draft-page .rec-columns { height: auto; min-height: 0; align-items: start; }
body.draft-page .rec-col { display: block; min-height: 0; }
body.draft-page .rec-list { min-height: 0; overflow: visible; padding-right: 0; }
body.draft-page .rec-item { min-height: 0; padding: 0; }
body.draft-page .rec-item > img { width: 100%; height: 122px; }
body.draft-page #avoid-list .rec-item > img { width: 64px; height: 50px; }
body.draft-page .draft-breakdown {
  display: block;
  min-height: 0;
  padding: 20px;
  overflow: visible;
  background: linear-gradient(180deg, #12141d, #0a0b11);
}
body.draft-page .draft-breakdown > h2 { display: flex; }
body.draft-page .draft-breakdown #breakdown-status { margin: 0 0 10px; }
body.draft-page #breakdown-summary { display: flex; }
body.draft-page #breakdown-list { display: block; }
body.draft-page .win-estimate { display: none; }
body.draft-page .insight-list { display: flex; min-height: 0; max-height: none; overflow: visible; }
body.draft-page .insight { padding: 11px 14px 12px; }
body.draft-page .insight-title { font-size: 15px; }
body.draft-page .insight-detail { display: block; overflow: visible; font-size: 14px; line-height: 1.42; }
body.draft-page .breakdown-card { min-height: 54px; margin-bottom: 8px; padding: 8px 12px; }
body.draft-page .breakdown-card img { width: 38px; height: 38px; }
body.draft-page .breakdown-card .name { font-size: 17px; }
body.draft-page .breakdown-card .status { font-size: 12px; }
body.draft-page .breakdown-card .score { font-size: 18px; }

@media (max-width: 1180px) {
  .board { grid-template-columns: 1fr 1fr; }
  .draft-probability-card { grid-column: 1 / -1; grid-row: 2; min-height: 0; }
  .rec-columns { grid-template-columns: 1fr; }
  #avoid-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .topbar { padding: 10px 14px; }
  .brand { min-width: auto; }
  .tabs { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .controls { margin-left: auto; }
  .controls .field { display: none; }
  .site-intro { padding-top: 38px; }
  .site-intro h2 { font-size: clamp(40px, 12vw, 68px); }
  main, body.draft-page main { padding: 24px 14px 50px; }
  .board, .candy-columns, .tournament-layout { grid-template-columns: 1fr; }
  .item-recommendation-layout { grid-template-columns: 1fr; }
  .item-recommendation-column + .item-recommendation-column { padding-top: 20px; padding-left: 0; border-top: 1px solid rgba(255,255,255,.07); border-left: 0; }
  .draft-probability-card { grid-column: auto; grid-row: auto; order: 2; }
  .team.enemy { order: 3; }
  .draft-section-tabs { align-items: flex-start; flex-direction: column; gap: 14px; }
  #pick-list, #avoid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-role-columns { overflow-x: auto; }
}
@media (max-width: 560px) {
  .brand-tagline { display: none; }
  .tab-btn { padding: 0 10px; }
  .tab-btn { font-size: 10px; }
  .tab-btn .ico { display: none; }
  .site-intro h2 { letter-spacing: 3px; }
  .site-intro p { font-size: 12px; }
  .data-ticker { margin-top: 30px; }
  .draft-mode-toolbar { width: 100%; }
  .draft-mode-toolbar .rec-mode-tab { flex: 1; padding-inline: 7px; }
  #pick-list, #avoid-list { grid-template-columns: 1fr; }
  .candy-grid { grid-template-columns: repeat(3, 1fr); }
  .slot select { max-width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Hero identity stays consistent before and after a draft pick: use the
   compact square logo in search results as well as in the filled slot. */
.slot .dropdown .option { min-height: 44px; }
.slot .dropdown .option img {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(233,180,84,.34);
  border-radius: 50%;
  object-fit: cover;
}

/* Role matrix */
body.draft-page .recommendations.role-view {
  width: min(2180px, calc(100vw - 56px));
  margin-left: 50%;
  transform: translateX(-50%);
}
body.draft-page .recommendations.role-view .rec-columns {
  grid-template-columns: minmax(0, 3fr) minmax(450px, 1.08fr);
  gap: 24px;
}
body.draft-page .recommendations.role-view #pick-list,
body.draft-page .recommendations.role-view #avoid-list { display: block; }
body.draft-page .recommendations.role-view .rec-role-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 1fr));
  align-items: start;
  gap: 14px;
  overflow: visible;
}
body.draft-page .recommendations.role-view .rec-role-col {
  min-width: 0;
  padding: 14px 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20,22,32,.94), rgba(9,10,15,.94));
}
body.draft-page .recommendations.role-view .rec-role-title {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-align: center;
}
body.draft-page .recommendations.role-view .rec-icon-cell { gap: 4px; }
body.draft-page .recommendations.role-view .rec-icon-cell img {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(233,180,84,.5);
  border-radius: 50%;
  object-fit: cover;
}
body.draft-page .recommendations.role-view .rec-icon-bar-track {
  width: 48px;
  height: 4px;
}
body.draft-page .recommendations.role-view .rec-col.avoid { padding: 18px; }
body.draft-page .recommendations.role-view .rec-col.avoid .rec-role-columns { gap: 8px; }
body.draft-page .recommendations.role-view .rec-col.avoid .rec-role-col { padding-inline: 4px; }

/* Items: two independent editorial panels, matching the supplied layout. */
body.items-page .site-intro h2,
body.tournament-page .site-intro h2 {
  display: block;
  max-width: calc(100vw - 40px);
  margin-inline: auto;
  color: #f4f5f8;
  font-size: clamp(54px, 5.2vw, 98px);
  text-align: center;
  white-space: nowrap;
}
body.items-page .site-intro h2 em,
body.tournament-page .site-intro h2 em { color: inherit; }
#items-view .items-hero,
#items-view .item-grid-section { display: none; }
#items-view .item-rec-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#items-view .item-recommendation-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
#items-view .item-recommendation-column,
#items-view .item-recommendation-column + .item-recommendation-column {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: linear-gradient(180deg, #151824, #0a0b11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 32px 70px -58px #000;
}
#items-view .item-recommendation-column > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 16px;
  letter-spacing: 2px;
}
#items-view .item-recommendation-column > h2::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--gold);
  transform: rotate(45deg);
}
#items-view .item-rules-column > h2:nth-of-type(2) { margin-top: 28px; }
#items-view .item-rules-column > h2:nth-of-type(2)::before { background: var(--ally); }
#items-view .items-my-hero {
  min-height: 82px;
  padding: 12px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.015);
}
#items-view .items-my-hero img { width: 58px; height: 58px; object-fit: cover; }
#items-view .item-rules-column .rule-group {
  display: block;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}
#items-view .item-rules-column .rule-reason { margin-bottom: 10px; }
#items-view .item-rules-column .rule-group .item-card {
  display: inline-flex;
  width: auto;
  min-width: 0;
  margin: 0 6px 0 0;
  padding: 5px 8px 5px 5px;
  vertical-align: middle;
}
#items-view .item-rules-column .rule-group .item-card img { width: 38px; height: 30px; }
#items-view .item-rules-column .rule-group .item-name { font-size: 12px; }
#items-view .item-stats-column .item-card {
  display: grid;
  grid-template-columns: 52px minmax(120px, 1fr) minmax(90px, 180px) 62px 78px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 9px 12px;
}
#items-view .item-stats-column .item-card img {
  width: 52px;
  height: 38px;
  border-radius: 4px;
  object-fit: cover;
}
#items-view .item-stats-column .item-name { font-size: 14px; }
.item-winrate-bar {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #252832;
}
.item-winrate-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #976918, #efbd59);
}
#items-view .item-stats-column .item-wr { color: var(--gold); text-align: right; }
#items-view .item-stats-column .status { text-align: right; }

/* The International: featured game first, four equal information panels below. */
body.tournament-page main { max-width: 2060px; }
#tournament-view .tournament-hero {
  min-height: 268px;
  padding: 28px 34px;
  border-color: rgba(233,180,84,.16);
  background: linear-gradient(135deg, rgba(27,22,52,.95), rgba(9,10,16,.98));
}
#tournament-view .tournament-hero-top { display: block; }
#tournament-view .tournament-hero-info h2 { display: none; }
#tournament-view .tournament-hero-info { min-width: 0; }
#tournament-view .tournament-hero-info .status {
  color: var(--enemy);
  letter-spacing: 3px;
}
#tournament-view .tournament-hero-featured {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#tournament-view #tournament-hero-stream { display: none; }
#tournament-view .tournament-hero-label { margin-top: 6px; text-align: left; }
#tournament-view .tournament-hero-match {
  justify-content: center;
  gap: 28px;
  margin: 28px auto 8px;
}
#tournament-view .tournament-hero-match .team-name {
  color: #f1f1f5;
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 44px);
  letter-spacing: 2px;
}
#tournament-view .tournament-hero-score {
  font-size: clamp(34px, 4vw, 54px);
  white-space: nowrap;
}
#tournament-view .tournament-hero-series { text-align: center; }
.tournament-featured-forecast { max-width: 680px; margin: 26px auto 0; }
.tournament-featured-forecast > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #8b8f9d;
  font: 11px var(--font-mono);
  letter-spacing: 1.5px;
}
.tournament-featured-forecast em {
  font-style: normal;
  color: #858997;
}
.tournament-featured-forecast > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--enemy);
}
.tournament-featured-forecast > i b {
  display: block;
  height: 100%;
  background: var(--ally);
}
#tournament-view #tournament-overview-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
}
/* Kept in the DOM only so renderTournamentGroup()/the completed-title tally still have
   somewhere to write on the public site (admin.html reads the same ids for its own,
   untouched stacked layout) - never shown here, see index.html's comment on this block. */
#tournament-view .admin-tournament.hidden { display: none; }

#tournament-view .tournament-accuracy,
#tournament-view .tournament-recent {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: linear-gradient(180deg, #151824, #0a0b11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
#tournament-view .tournament-accuracy > .chart-title { display: none; }
#tournament-view .tournament-accuracy-toolbar,
.admin-tournament .tournament-accuracy-toolbar {
  width: fit-content;
  margin: 0 0 14px auto !important;
}
#tournament-view .tournament-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
#tournament-view .tournament-recent-head h2 {
  margin: 0;
  color: #edf0f5;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}
#tournament-view .tournament-recent-head .all-matches-link {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  border-style: solid;
}
/* Forecast-accuracy: a full-width row of 4 KPI tiles (big number, small label+bar
   underneath) directly below the featured-match hero card, matching the mockup. */
#tournament-accuracy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1px;
  background: rgba(255,255,255,.06);
}
.stat-tile {
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, #151824, #0a0b11);
}
.stat-tile-label {
  color: #6f7484;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.stat-tile-value {
  margin: 7px 0 8px;
  color: #f7d89a;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: .5px;
}
.stat-tile-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #252832;
}
.stat-tile-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #976918, #efbd59);
}

/* Match details live outside the narrow completed-match column. */
body.tournament-modal-open { overflow: hidden; }
.tournament-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3,4,9,.74);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.tournament-modal.hidden { display: none; }
.tournament-modal-dialog {
  width: min(1500px, 100%);
  max-height: min(880px, calc(100vh - 56px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(233,180,84,.3);
  border-radius: 16px;
  outline: none;
  background: linear-gradient(145deg, #17192a, #090a10 72%);
  box-shadow: 0 34px 100px rgba(0,0,0,.68), inset 0 1px 0 rgba(255,255,255,.09);
  animation: tournament-modal-in .18s ease-out both;
}
@keyframes tournament-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.tournament-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.tournament-modal-heading { min-width: 0; }
.tournament-modal-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
  font: 10px var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.tournament-modal-heading h2 {
  display: block;
  margin: 0;
  color: #f2f3f6;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: 1.5px;
  overflow-wrap: anywhere;
}
.tournament-modal-meta {
  margin-top: 8px;
  color: #858997;
  font-size: 12px;
}
.tournament-modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  color: #c6c8d0;
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}
.tournament-modal-close:hover {
  border-color: rgba(233,180,84,.48);
  color: var(--gold);
  background: rgba(233,180,84,.08);
}
.tournament-modal-body {
  min-height: 140px;
  padding: 22px 24px 26px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(233,180,84,.34) transparent;
}
.tournament-modal .tournament-collapse-btn { display: none; }
.tournament-modal .tournament-columns { gap: 24px; }
.tournament-modal .tournament-player { font-size: 12px; padding-block: 5px; }
.tournament-modal .tournament-player img.hero-icon-sm { width: 28px; height: 28px; }
.tournament-modal .tournament-items { width: 128px; }
.tournament-modal .tournament-items img { width: 19px; height: 19px; }
.tournament-modal .tournament-win-estimate,
.tournament-modal .tournament-market-predictions { padding: 12px 14px; }

/* ── modal forecast-evolution card grid ("Как менялся прогноз") ──────────── */
.forecast-evolution-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: #eef0f4;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.mobile-forecast-summary { display: none; }
.forecast-hit-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.forecast-hit-badge.good { color: var(--good); }
.forecast-hit-badge.bad { color: var(--bad); }
.win-probability-chart-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0, rgba(114,212,255,.055), transparent 44%),
    rgba(0,0,0,.34);
}
.win-probability-chart {
  display: block;
  width: 100%;
  height: auto;
}
.win-probability-team {
  position: absolute;
  z-index: 1;
  left: 14px;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
}
.win-probability-team-radiant { top: 10px; color: #85dc69; }
.win-probability-team-dire { bottom: 31px; color: #ff786a; }
.win-probability-current {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  max-width: 72%;
  padding-left: 10px;
  background: linear-gradient(90deg, transparent, rgba(4,5,9,.78) 18%);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.bet-reliability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-mono);
}
.bet-reliability span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7d8493;
  font-size: 8px;
  letter-spacing: .7px;
  text-transform: uppercase;
}
.bet-reliability span i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 4px currentColor;
}
.bet-reliability strong {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .6px;
}
.bet-reliability.good span,
.bet-reliability.good strong { color: var(--good); }
.bet-reliability.good span i {
  animation: forecast-stability-glow 2.6s ease-in-out infinite;
}
.bet-reliability.bad span,
.bet-reliability.bad strong { color: var(--bad); }
.bet-reliability small { color: #8d92a2; }
.desktop-bet-reliability-detail {
  min-height: 12px;
  margin-top: 7px;
  color: #777e8d;
  font: 9px var(--font-mono);
  letter-spacing: .35px;
  text-align: right;
}
.win-probability-current > span {
  color: #697080;
  font-size: 8px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.win-probability-current > strong {
  overflow: hidden;
  color: #d8e7ef;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
}
.win-probability-grid {
  stroke: rgba(255,255,255,.075);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.win-probability-grid.is-middle { stroke: rgba(255,255,255,.22); }
.win-probability-y-label,
.win-probability-x-label {
  fill: #555c6d;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .5px;
}
.win-probability-line {
  fill: none;
  stroke: #72d4ff;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(114,212,255,.26));
}
.win-probability-hover-point {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}
.win-probability-current-dot {
  fill: #d8f5ff;
  stroke: #72d4ff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(114,212,255,.8));
}
.tournament-market-predictions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,.07) !important;
  background: transparent !important;
}
.tournament-market-card {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  background: rgba(0,0,0,.22);
}
.tournament-market-card span {
  display: block;
  margin-bottom: 6px;
  color: #8d92a2;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tournament-market-card strong {
  display: block;
  color: #f1c66d;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .6px;
}
.tournament-modal .tournament-win-estimate { padding: 18px 20px; }

/* Live match: the broadcast dictates side placement, so Radiant is on the
   left and Dire is on the right. The iframe is a sibling rather than
   part of the refreshed scoreboard, which prevents Twitch from restarting. */
.tournament-live-stage {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(500px, 1.7fr) minmax(280px, .8fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}
.tournament-live-stage > .tournament-twitch {
  min-width: 0;
  min-height: 430px;
  margin: 0;
}
.tournament-live-stage > .tournament-twitch iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  border-color: rgba(255,255,255,.10);
  border-radius: 8px;
  background: #030407;
}
.tournament-live-side {
  min-width: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
}
.tournament-live-side-radiant { border-top: 2px solid rgba(75,201,126,.7); }
.tournament-live-side-dire { border-top: 2px solid rgba(255,96,85,.7); }
.tournament-live-side .tournament-side-title {
  align-items: center;
  gap: 10px;
  min-height: 26px;
  margin-bottom: 9px;
  color: #eef0f4;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tournament-live-side .tournament-side-title strong {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 21px;
  font-weight: 500;
}
.tournament-live-side .tournament-player {
  min-width: 0;
  padding-block: 6px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.tournament-live-side .tournament-player:last-child { border-bottom: 0; }
.tournament-live-side .tournament-items { width: 128px; }
.tournament-live-side-dire .tournament-side-title,
.tournament-live-side-dire .tournament-player {
  flex-direction: row-reverse;
}
.tournament-live-side-dire .tournament-side-title,
.tournament-live-side-dire .tournament-player .nick { text-align: right; }
.tournament-live-side-dire .tournament-player .kda { text-align: right; }
.tournament-live-side-dire .tournament-items { justify-content: flex-start; }
.tournament-live-side .meta {
  max-height: 34px;
  overflow: hidden;
  color: #666d7c;
  font-size: 9px;
  line-height: 1.4;
}

/* ── "Все матчи" page ──────────────────────────────────────────────────── */
.all-matches-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border: 1px dashed rgba(233,180,84,.3);
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.all-matches-link:hover { border-color: rgba(233,180,84,.6); background: rgba(233,180,84,.08); }

.tournament-matches-page { margin-top: 30px; }
.tournament-matches-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.all-matches-back {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .8px;
  cursor: pointer;
  transition: color .15s;
}
.all-matches-back:hover { color: var(--gold); }
.tournament-matches-total {
  color: #6f7484;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tournament-matches-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.tournament-matches-filters .draft-mode-toolbar { width: auto; }
.tournament-matches-search { flex: 1 1 200px; min-width: 160px; }
.tournament-matches-search input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
  color: #eef0f4;
  font-family: var(--font-body);
  font-size: 13px;
}
.tournament-matches-search input:focus { outline: none; border-color: rgba(233,180,84,.5); }

.tournament-matches-table {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  overflow: hidden;
}
.tournament-matches-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 70px minmax(0, 1fr) 90px;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: #dfe1e8;
  font-size: 12px;
}
.tournament-matches-row:last-child { border-bottom: 0; }
.tournament-matches-row.tournament-matches-head {
  color: #6f7484;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: rgba(255,255,255,.03);
}
.tournament-matches-row:not(.tournament-matches-head) { cursor: pointer; transition: background .12s; }
.tournament-matches-row:not(.tournament-matches-head):hover { background: rgba(233,180,84,.06); }
.tournament-matches-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tournament-matches-row .forecast-correct { color: var(--good); }
.tournament-matches-row .forecast-wrong { color: var(--bad); }

/* The full list keeps the four forecast stages visible. On narrower screens it scrolls
   horizontally instead of squeezing team names and percentages into unreadable cells. */
#tournament-matches-table { overflow-x: auto; }
.tournament-all-row {
  grid-template-columns: 130px minmax(220px, 1.3fr) 70px repeat(4, minmax(90px, .7fr)) 140px;
  min-width: 1010px;
}

/* Recent-matches panel uses the same forecast stages in a more compact grid. */
.tournament-recent-row {
  grid-template-columns: 60px minmax(0, 1.3fr) 60px repeat(4, minmax(0, 0.85fr)) 70px;
}

.tournament-matches-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.tournament-matches-page-label {
  color: #8d92a2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .6px;
}

/* ── footer / contact form ─────────────────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  padding: 22px 24px 34px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.015), transparent);
}
.footer-contact-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,.25);
  cursor: pointer;
}
.footer-contact-link:hover {
  color: var(--gold-bright);
  text-decoration-color: var(--gold);
}
.contact-hint {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact-field input,
.contact-field textarea {
  font-family: var(--font-body, inherit);
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 4px;
  padding: 10px 12px;
  resize: vertical;
}
.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: rgba(233,180,84,.5);
}
.contact-counter {
  align-self: flex-end;
  font-size: 8px;
  color: #5f6472;
}
.contact-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

@media (max-width: 720px) {
  .tournament-modal {
    padding: 0;
    place-items: stretch;
    background: #05060b;
  }
  .tournament-modal-dialog {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }
  .tournament-modal-header {
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  }
  .tournament-modal-eyebrow { display: none; }
  .tournament-modal-heading h2 {
    font-size: 19px;
    line-height: 1.08;
    letter-spacing: .7px;
  }
  .tournament-modal-meta {
    margin-top: 5px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tournament-modal-close {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 23px;
  }
  .tournament-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 10px max(14px, env(safe-area-inset-bottom));
  }
  .tournament-modal .tournament-scoreboard { order: -10; }
  .tournament-modal .tournament-win-estimate {
    margin: 0;
    padding: 10px;
  }
  .mobile-forecast-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2px 10px;
    margin-bottom: 9px;
    padding: 9px 10px;
    border: 1px solid rgba(233,180,84,.28);
    border-left: 3px solid var(--gold);
    border-radius: 7px;
    background: rgba(233,180,84,.07);
  }
  .mobile-forecast-summary > span {
    grid-column: 1 / -1;
    color: #8d92a2;
    font: 8px var(--font-mono);
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }
  .mobile-forecast-summary > strong {
    min-width: 0;
    overflow: hidden;
    color: #f2f3f6;
    font: 17px var(--font-display);
    letter-spacing: .5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-forecast-summary > b {
    color: var(--gold);
    font: 24px var(--font-display);
  }
  .mobile-forecast-summary .bet-reliability {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    margin-top: 5px;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .mobile-forecast-summary .bet-reliability span {
    font-size: 8px;
    letter-spacing: .8px;
  }
  .mobile-forecast-summary .bet-reliability strong {
    font-size: 9px;
    letter-spacing: .7px;
  }
  .mobile-forecast-summary .bet-reliability small {
    grid-column: 1 / -1;
    font: 8px/1.35 var(--font-mono);
    letter-spacing: .25px;
  }
  .desktop-bet-reliability-detail { display: none; }
  .forecast-evolution-head {
    margin-bottom: 7px;
    font-size: 10px;
    letter-spacing: 1.3px;
  }
  .forecast-hit-badge { display: none; }
  .win-probability-chart-shell { overflow: hidden; }
  .win-probability-chart { width: 100%; max-width: none; }
  .win-probability-current { display: none; }
  .win-probability-team {
    left: 8px;
    font-size: 7px;
  }
  .win-probability-team-radiant { top: 6px; }
  .win-probability-team-dire { bottom: 18px; }
  .win-probability-y-label { display: none; }
  .tournament-modal .tournament-market-predictions,
  .tournament-modal .tournament-twitch,
  .tournament-modal .tournament-items,
  .tournament-modal .tournament-player .kda,
  .tournament-modal .tournament-columns .meta,
  .tournament-modal .tournament-live-side .meta { display: none; }
  .tournament-modal .tournament-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }
  .tournament-modal .tournament-side-title {
    gap: 5px;
    min-width: 0;
    font-size: 10px;
  }
  .tournament-modal .tournament-side-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tournament-modal .tournament-player {
    gap: 4px;
    min-width: 0;
    padding-block: 3px;
    font-size: 10px;
  }
  .tournament-modal .tournament-player img.hero-icon-sm {
    width: 23px;
    height: 23px;
  }
  .tournament-modal .tournament-live-stage {
    order: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
  }
  .tournament-modal .tournament-live-side-radiant,
  .tournament-modal .tournament-live-side-dire {
    grid-column: auto;
    grid-row: auto;
    padding: 8px;
  }
}

@media (max-width: 1160px) {
  .tournament-live-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tournament-live-stage > .tournament-twitch {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .tournament-live-side-radiant { grid-column: 1; grid-row: 2; }
  .tournament-live-side-dire { grid-column: 2; grid-row: 2; }
}

@media (max-width: 720px) {
  .tournament-live-stage { grid-template-columns: 1fr; }
  .tournament-live-stage > .tournament-twitch {
    grid-column: 1;
    grid-row: 1;
    min-height: 260px;
  }
  .tournament-live-stage > .tournament-twitch iframe { min-height: 260px; }
  .tournament-live-side-radiant { grid-column: 1; grid-row: 2; }
  .tournament-live-side-dire { grid-column: 1; grid-row: 3; }
}

@media (max-width: 1380px) {
  body.draft-page .recommendations.role-view .rec-columns { grid-template-columns: 1fr; }
  body.draft-page .recommendations.role-view .rec-col.avoid .rec-role-columns { grid-template-columns: repeat(5, minmax(84px, 1fr)); }
  #tournament-view .tournament-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #items-view .item-stats-column .item-card { grid-template-columns: 46px minmax(100px, 1fr) 80px 58px; }
  #items-view .item-stats-column .item-card img { width: 46px; }
  #items-view .item-stats-column .status { display: none; }
}
@media (max-width: 820px) {
  body.draft-page .recommendations.role-view {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
  body.draft-page .recommendations.role-view .rec-role-columns,
  body.draft-page .recommendations.role-view .rec-col.avoid .rec-role-columns {
    grid-template-columns: repeat(5, minmax(78px, 1fr));
    overflow-x: auto;
  }
  #items-view .item-recommendation-layout,
  #tournament-view .tournament-layout { grid-template-columns: 1fr; }
  #items-view .item-recommendation-column + .item-recommendation-column {
    padding: 20px;
    border: 1px solid rgba(255,255,255,.09);
  }
}
@media (max-width: 560px) {
  body.items-page .site-intro h2,
  body.tournament-page .site-intro h2 {
    font-size: clamp(34px, 10vw, 52px);
    white-space: normal;
  }
  #items-view .item-stats-column .item-card { grid-template-columns: 44px minmax(0, 1fr) 56px; }
  #items-view .item-stats-column .item-winrate-bar { display: none; }
  #tournament-view .tournament-hero { padding: 22px 16px; }
  #tournament-view .tournament-hero-match { gap: 10px; }
}
