/* ===========================================================================
   Трекер сезона КХЛ — оформление.

   Направление: «ледовая арена в ночи». Тёмный бродкаст-интерфейс, стеклянные
   панели, свет прожекторов по льду, красный акцент как сигнальный фонарь за
   воротами. Тема одна и намеренно тёмная, поэтому все цвета заданы явно,
   без расчёта на настройки системы.

   Контрасты проверены против фона #050810 и поверхности #121b26:
   весь текст ≥5:1, светлый край шкалы вероятностей 2.03:1.
   =========================================================================== */

@property --fill {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

:root {
  color-scheme: dark;

  --plane:   #050810;
  --surface: #121b26;
  --raised:  #1b2733;

  --ink:     #eef4f8;
  --ink-2:   #a9b8c4;
  --muted:   #7f909f;

  --rule:        #22303d;
  --rule-strong: #2c3c4b;

  --goal:      #ff4256;
  --goal-soft: rgba(255, 66, 86, .13);
  --ice:       #4fd8ff;
  --ice-soft:  rgba(79, 216, 255, .12);
  --good:      #35d07f;
  --good-soft: rgba(53, 208, 127, .13);
  --warn:      #ffb02e;

  /* Шкала вероятности: один тон, светлее = больше шансов. */
  --p1: #1d4f7a;
  --p2: #2a6fa8;
  --p3: #3a90d0;
  --p4: #62b4ea;
  --p5: #9ad6f7;

  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --disp: Oswald, "IBM Plex Sans", system-ui, sans-serif;

  --glass: rgba(18, 27, 38, .72);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -26px rgba(0,0,0,.9);
}

* { box-sizing: border-box; }

/* Свой display у элемента перебивает браузерное правило для [hidden],
   поэтому атрибут нужно усилить явно — иначе скрытое остаётся видимым. */
[hidden] { display: none !important; }

html { scrollbar-color: var(--rule-strong) var(--plane); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--plane);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================== фон-арена ============================== */

.arena {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Два широких пятна света, медленно плывущих по «льду». */
.beam {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  will-change: transform;
}
.beam-1 {
  width: 62vw; height: 62vw;
  top: -26vw; left: -14vw;
  background: radial-gradient(circle at 50% 50%, rgba(79,216,255,.24), transparent 66%);
  animation: drift-1 34s ease-in-out infinite alternate;
}
.beam-2 {
  width: 52vw; height: 52vw;
  top: 18vh; right: -16vw;
  background: radial-gradient(circle at 50% 50%, rgba(255,66,86,.18), transparent 66%);
  animation: drift-2 44s ease-in-out infinite alternate;
}
@keyframes drift-1 {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(9vw, 7vh, 0) scale(1.14); }
}
@keyframes drift-2 {
  from { transform: translate3d(0,0,0) scale(1.08); }
  to   { transform: translate3d(-8vw, -6vh, 0) scale(.94); }
}

/* Блик, идущий за курсором: положение задаёт app.js. */
.spec {
  position: absolute;
  width: 46vw; height: 46vw;
  left: 0; top: 0;
  margin: -23vw 0 0 -23vw;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.055), transparent 62%);
  transform: translate3d(50vw, 40vh, 0);
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

/* Зерно: лёд не бывает идеально гладким. */
.grain {
  position: absolute;
  inset: -50%;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

@media (prefers-reduced-motion: reduce) {
  .beam, .spec { animation: none; transition: none; }
}

/* ================================ шапка ================================ */

.masthead {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: linear-gradient(to bottom, rgba(5,8,16,.95), rgba(5,8,16,.78));
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.masthead-in {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 11px 9px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--goal); }
/* Метка сайта — эмблема клуба. Картинку подставляет logos.css, как и
   остальным логотипам, поэтому здесь только размер. */
.mark-crest {
  width: 24px; height: 24px; flex: none;
  background: center / contain no-repeat;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, .55));
}

.tabs { position: relative; display: flex; flex-wrap: wrap; gap: 2px; }
.tabs a {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 7px;
  white-space: nowrap;
  transition: color .22s ease;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--plane); font-weight: 500; }

/* Пилюля активной вкладки переезжает между ссылками, а не перерисовывается. */
.tab-pill {
  position: absolute;
  z-index: 0;
  top: 0; left: 0;
  height: 100%;
  border-radius: 7px;
  background: var(--ice);
  box-shadow: 0 0 18px -4px rgba(79,216,255,.6);
  opacity: 0;
  transition: transform .34s cubic-bezier(.34,1.32,.5,1), width .34s cubic-bezier(.34,1.32,.5,1), height .34s ease, opacity .2s;
}

.masthead-right { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.freshness {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
}
#logoutForm { margin: 0; }

.rail { height: 2px; background: var(--rule); }
.rail-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ice), var(--goal));
  box-shadow: 0 0 10px rgba(79,216,255,.6);
  transition: width 1.4s cubic-bezier(.22,.61,.36,1);
}

/* =============================== каркас =============================== */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 0 72px;
}

.loading, .error-box {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding: 60px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.error-box { color: var(--goal); }
.spin {
  width: 13px; height: 13px;
  border: 2px solid var(--rule-strong);
  border-top-color: var(--ice);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================ герой ================================ */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 32px;
  align-items: center;
  padding: 44px 0 30px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.hero-title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(38px, 8vw, 78px);
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 0 0 22px;
}
.hero-title .hot {
  color: transparent;
  background: linear-gradient(100deg, var(--ice) 8%, #b9e8ff 40%, var(--goal) 92%);
  -webkit-background-clip: text;
  background-clip: text;
}

.countdown { display: grid; gap: 6px; }
.cd-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-clock { display: flex; gap: 14px; align-items: baseline; }
.cd-unit { display: flex; align-items: baseline; gap: 3px; }
.cd-unit b {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cd-unit i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-game { font-size: 14px; color: var(--ink-2); margin: 2px 0 0; }

.hero-side {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.hero-side .crest { display: block; width: 58px; height: 58px; flex: none; background: center / contain no-repeat; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
.hero-side .who { display: grid; gap: 1px; }
.hero-side .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero-side .n { font-family: var(--disp); font-weight: 600; font-size: 21px; line-height: 1.15; }
.hero-side .t { font-size: 13px; color: var(--ink-2); }
.hero-side .v { font-family: var(--disp); font-weight: 700; font-size: 34px; line-height: 1; color: var(--ice); font-variant-numeric: tabular-nums; }

/* ============================= плитки чисел ============================= */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 12px;
}
.stat {
  position: relative;
  padding: 14px 16px 13px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
}
.stat:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.stat .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.stat .v {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.05;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat .sub { font-size: 12.5px; color: var(--ink-2); }

/* ============================= типографика ============================= */

.sec {
  font-family: var(--disp);
  font-weight: 500;
  font-size: clamp(21px, 3vw, 29px);
  line-height: 1.12;
  letter-spacing: .005em;
  margin: 46px 0 7px;
  text-wrap: balance;
}
.view > .sec:first-child { margin-top: 34px; }
.note { color: var(--ink-2); font-size: 14px; max-width: 78ch; margin: 0 0 18px; }
.note strong { color: var(--ink); font-weight: 600; }
.legend { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; max-width: 96ch; }
.sub-head {
  font-family: var(--disp); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-2); margin: 0 0 10px;
}

/* =============================== панели =============================== */

.panel {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel.pad { padding: 17px; }
.panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin: 0;
  padding: 13px 17px 11px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.west { background: var(--ice); box-shadow: 0 0 9px var(--ice); }
.dot.east { background: var(--goal); box-shadow: 0 0 9px var(--goal); }

.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; }

.chart { width: 100%; height: 340px; }
#chartProjection { height: 460px; }
#chartScatter, #chartOdds { height: 400px; }

/* ================================ таблицы ================================ */

.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th {
  position: sticky; top: 0; z-index: 2;
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  padding: 10px 10px 8px;
  white-space: nowrap;
  background: #16202c;
  border-bottom: 1px solid var(--rule-strong);
}
table.grid th.l, table.grid td.l { text-align: left; }
table.grid td {
  padding: 7px 10px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-2);
}
table.grid td.l { font-family: var(--sans); font-size: 13.5px; color: var(--ink); white-space: normal; }
table.grid td.strong { color: var(--ink); font-weight: 600; }
table.grid td.dim { color: var(--muted); }
table.grid tbody tr { transition: background .15s ease; }
table.grid tbody tr:hover td { background: rgba(79,216,255,.05); }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tr.cut td { border-bottom: 2px solid var(--ice); box-shadow: 0 1px 12px -6px var(--ice); }

table.sortable th { cursor: pointer; user-select: none; transition: color .15s ease; }
table.sortable th:hover { color: var(--ink); }
table.sortable th.sorted { color: var(--ice); }
table.sortable th.sorted::after { content: " ▾"; }
table.sortable th.sorted.asc::after { content: " ▴"; }

/* Логотипы — фоновые картинки по классу logo-<id>. Классы описаны один раз
   (logos.css локально, встроенные картинки в публичной версии), поэтому
   тысяча строк матчей не тащит по копии картинки в каждую ячейку. */
.crest-sm {
  display: inline-block;
  width: 17px; height: 17px;
  vertical-align: -4px;
  margin-right: 7px;
  background: center / contain no-repeat;
  flex: none;
}

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: 1px;
}
.pill.zone { background: var(--good-soft); color: var(--good); }
.pill.hot  { background: var(--goal-soft); color: var(--goal); }
.pill.cool { background: var(--ice-soft);  color: var(--ice); }
.pill.dim  { background: var(--raised);    color: var(--muted); }

/* ================================= матчи ================================= */

.game {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 3px 14px;
  align-items: center;
  padding: 10px 17px;
  border-bottom: 1px solid var(--rule);
  transition: background .18s ease;
}
.game:last-child { border-bottom: 0; }
.game:hover { background: rgba(79,216,255,.04); }
.game .when { font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.3; }
.game .who { font-size: 13.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.game .who .vs { color: var(--muted); }
.game .sc {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  transition: color .2s ease, text-shadow .2s ease;
}
/* Сигнальный фонарь: наведение на счёт даёт красную вспышку. */
.game:hover .sc { color: var(--goal); text-shadow: 0 0 16px rgba(255,66,86,.75); }
.game .sc.pending {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  text-shadow: none;
}
.game:hover .sc.pending { color: var(--ice); text-shadow: 0 0 12px rgba(79,216,255,.6); }
.game .per { font-family: var(--mono); font-size: 10.5px; color: var(--muted); grid-column: 2 / -1; }

/* ======================== полосы вероятностей ======================== */

.oddsbars { padding: 14px 17px 16px; display: grid; gap: 5px; }
.obar {
  display: grid;
  grid-template-columns: 122px 1fr 62px;
  gap: 11px;
  align-items: center;
  cursor: default;
}
.obar .nm {
  display: flex; align-items: center;
  font-family: var(--disp); font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.obar .track {
  position: relative;
  height: 15px;
  background: rgba(255,255,255,.05);
  border-radius: 0 5px 5px 0;
  overflow: hidden;
}
.obar .fill {
  height: 100%;
  width: var(--fill);
  border-radius: 0 5px 5px 0;
}
/* Плавное наполнение — только когда анимация действительно возможна.
   На скрытой вкладке переход не стартует, и с ним полоса навсегда
   осталась бы пустой: значение --fill застыло бы на начальном нуле. */
.anim-on .obar .fill {
  transition: --fill 1.1s cubic-bezier(.22,.61,.36,1);
}
/* Блик, пробегающий по заполненной части. */
.anim-on .obar .fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.28) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: sheen 4.5s ease-in-out infinite;
}
@keyframes sheen {
  0%, 62% { transform: translateX(-100%); }
  85%, 100% { transform: translateX(220%); }
}
.obar:hover .track { box-shadow: 0 0 0 1px var(--rule-strong); }
.obar .val {
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: right;
}
.obar .val b { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .obar .fill::after { animation: none; }
  .obar .fill { transition: none; }
}

.method { padding: 0 17px 17px; margin-top: 18px; }
.method .panel-head { margin: 0 -17px 4px; }
.method p { font-size: 14px; color: var(--ink-2); margin: 12px 0 0; max-width: 84ch; }
.method p.caveat { color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 15px; }
.method strong { color: var(--ink); }
.method span { font-family: var(--mono); font-size: 13px; color: var(--ice); }

/* ================================ фильтры ================================ */

.filters { display: flex; flex-wrap: wrap; gap: 11px 16px; align-items: end; margin-bottom: 16px; }
.filters label {
  display: grid; gap: 4px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.filters-count { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-bottom: 8px; }

select, input[type="text"], input[type="search"] {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--raised);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 7px 9px;
  min-width: 136px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
select:hover, input:hover { border-color: #3d5164; }
select:focus, input:focus { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(79,216,255,.14); outline: none; }

.field { display: grid; gap: 4px; margin-bottom: 11px; }
.field > label { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select { width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

button {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--plane);
  background: var(--ice);
  border: 1px solid var(--ice);
  border-radius: 8px;
  padding: 8px 15px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(79,216,255,.8); filter: brightness(1.06); }
button:active { transform: translateY(0); }
button.ghost { background: transparent; color: var(--ink-2); border-color: var(--rule-strong); }
button.ghost:hover { color: var(--ink); border-color: #3d5164; box-shadow: none; }
button.small { font-size: 12px; padding: 5px 10px; }
button.link {
  background: none; border: 0; color: var(--goal);
  padding: 0 2px; font-size: 12px; text-decoration: underline; cursor: pointer;
}
button.link:hover { transform: none; box-shadow: none; filter: brightness(1.2); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

.row-actions { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin: 3px 0 15px; }
.save-state { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.save-state.ok { color: var(--good); }
.save-state.bad { color: var(--goal); }

.empty { color: var(--muted); font-size: 13px; padding: 18px 17px; margin: 0; }

/* ================================ раскрытие ================================ */

/* Стартовое состояние здесь НЕ задаётся намеренно: блоки должны быть видны
   сами по себе. Прятать их перед появлением скрипт будет только если
   анимация реально может проиграть — иначе на фоновой вкладке, где браузер
   не выдаёт кадров, половина страницы осталась бы невидимой. */
.reveal-armed [data-reveal] { opacity: 0; transform: translateY(18px); }

/* ================================ подсказка ================================ */

#tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: #0b111a;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 260px;
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.95);
  opacity: 0;
  transition: opacity .12s ease;
}
#tip.on { opacity: 1; }
#tip b { font-family: var(--disp); font-weight: 500; font-size: 14px; display: block; color: var(--ink); }
#tip .num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ================================= подвал ================================= */

footer {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--muted);
}
footer p { margin: 0 0 6px; }
footer code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--raised);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink-2);
}

/* ============================== адаптив ============================== */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-side { justify-self: start; }
}
@media (max-width: 620px) {
  .wrap, .masthead-in { padding-inline: 16px; }
  .masthead-right { width: 100%; margin-inline-start: 0; justify-content: space-between; }
  .obar { grid-template-columns: 92px 1fr 54px; gap: 9px; }
  .obar .nm { font-size: 13px; }
  .field-row { grid-template-columns: 1fr; }
  .game { grid-template-columns: 50px 1fr auto; }
  .cd-unit b { font-size: 26px; }
  .chart { height: 300px; }
  #chartProjection { height: 560px; }
}

.readonly-note {
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed var(--rule-strong);
  border-radius: 9px;
}
.readonly-note code {
  font-family: var(--mono); font-size: 12px;
  background: var(--raised); padding: 1px 5px; border-radius: 4px;
}

/* ============================== мой клуб ============================== */

/* Карточка клуба наверху «Обзора». Слева — кто мы и как идём,
   справа — ближайший матч с отсчётом. */
.club-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px 28px;
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px solid var(--rule-strong);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(79,216,255,.10), transparent 55%),
    var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.club-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.club-crest {
  width: 84px; height: 84px; flex: none;
  background: center / contain no-repeat;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.65));
}
.club-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ice); margin: 0 0 2px;
}
.club-name {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(28px, 4.4vw, 40px); line-height: 1;
  text-transform: uppercase; letter-spacing: .01em; margin: 0;
}
.club-meta { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }

.club-kpis { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; }
.club-kpi .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted); display: block;
}
.club-kpi .v {
  font-family: var(--disp); font-weight: 600; font-size: 24px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.club-kpi .v.hot { color: var(--good); }

/* Полоска формы: каждая игра — фишка с исходом, счётом и соперником.
   Цвет дублируется буквой, так что исход читается и без цвета. */
.form-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--raised);
  font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--ink-2); white-space: nowrap;
}
.chip b {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 20px; padding: 0 4px;
  border-radius: 5px; font-size: 10.5px; font-weight: 600; color: var(--plane);
}
.chip.w b   { background: var(--good); }
.chip.l b   { background: var(--goal); }
.chip.otl b { background: var(--warn); }
.chip .crest-sm { margin-right: 0; }

.club-next {
  display: grid; align-content: center; gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: rgba(5, 8, 16, .45);
}
.club-next .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.club-next .vs {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--disp); font-size: 20px; font-weight: 500; line-height: 1.15;
}
.club-next .vs .crest-sm { width: 28px; height: 28px; margin: 0; }
.club-next .when { font-size: 13px; color: var(--ink-2); }
.club-next .cd-clock b { font-size: 28px; }
.club-link {
  justify-self: start;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none; color: var(--ice);
  border-bottom: 1px solid rgba(79,216,255,.35); padding-bottom: 1px;
}
.club-link:hover { border-bottom-color: var(--ice); }

/* Кнопки «смотреть»: трансляции живут у правообладателя, мы только ведём. */
.club-next-links { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.watch-go {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 66, 86, .45); border-radius: 8px;
  background: var(--goal-soft);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--goal); text-decoration: none; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.watch-go:hover { background: rgba(255, 66, 86, .2); border-color: var(--goal); color: var(--ink); }
.watch-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 12px 0 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.watch-line .dim { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12.5px; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 0; }

/* Страница клуба */
.club-head { display: flex; align-items: center; gap: 18px; padding: 34px 0 20px; }
.club-head .club-crest { width: 72px; height: 72px; }

.club-calendar { max-height: 560px; overflow-y: auto; }
.club-roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }

.club-pick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--rule);
}
.club-pick label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.club-pick-note { font-size: 12px; color: var(--muted); }

.num-badge {
  display: inline-block; min-width: 24px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}

/* «Свои» строки подсвечены во всех таблицах и списках. */
table.grid tr.mine td { background: rgba(79,216,255,.07); }
table.grid tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--ice); }
.game.mine { box-shadow: inset 3px 0 0 var(--ice); background: rgba(79,216,255,.05); }
.obar.mine .nm { color: var(--ice); font-weight: 500; }

@media (max-width: 860px) {
  .club-hero { grid-template-columns: 1fr; padding: 18px; }
}
@media (max-width: 620px) {
  .club-crest { width: 64px; height: 64px; }
  .club-kpi .v { font-size: 21px; }
}

/* Фото в составе клуба и строка, к которой перешли с крыла. */
.ava {
  display: inline-block;
  width: 30px; height: 30px;
  margin: -6px 10px -6px 0;
  vertical-align: middle;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--raised);
  object-fit: cover;
  object-position: 50% 22%;
}
.inj-note { font-size: 12px; color: var(--muted); margin-top: 3px; max-width: 70ch; }

/* ================================ крылья ================================ */

/* На вкладке клуба свободные поля по бокам широкого экрана — ему. Слева
   лента портретов, справа снимки с матчей вперемешку с фактами о клубе.
   Ленты плывут навстречу друг другу; положение каждый кадр задаёт app.js.
   Колонка контента — 1240 px; крыло занимает середину свободного поля. */
.wings { display: none; }

@media (min-width: 1500px) {
  .wings {
    display: block;
    position: fixed;
    left: 0; right: 0;
    top: var(--mast-h, 64px);
    bottom: 0;
    z-index: 1;                                   /* над ареной, под шапкой */
    pointer-events: none;
    --side: calc((100% - 1240px) / 2);
    --w: min(calc(var(--side) - 48px), 250px);
    --gap: 16px;
  }
}

.wing {
  position: absolute;
  top: 0; bottom: 0;
  width: var(--w);
  overflow: hidden;
  pointer-events: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 70px, #000 calc(100% - 110px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 70px, #000 calc(100% - 110px), transparent 100%);
}
.wing-l { left:  calc((var(--side) - var(--w)) / 2); }
.wing-r { right: calc((var(--side) - var(--w)) / 2); }

/* Вход на вкладку клуба: крылья выезжают снизу и проявляются. */
.wing, .wing-edge { animation: wing-in .9s cubic-bezier(.2,.8,.2,1) both; }
.wing-r, .edge-r { animation-delay: .1s; }
@keyframes wing-in {
  from { opacity: 0; translate: 0 40px; }
  to   { opacity: 1; translate: 0 0; }
}

.wing-track { will-change: transform; padding-top: 18px; }

/* Корешок по внешнему краю: название клуба мелкой разрядкой. */
.wing-edge {
  position: absolute;
  top: 0; bottom: 0;
  width: 14px;
  writing-mode: vertical-rl;
  display: grid; place-items: center;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--mono); font-size: 10px; line-height: 14px;
  letter-spacing: .5em; text-transform: uppercase;
  color: rgba(255, 66, 86, .5);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.edge-l { left:  calc((var(--side) - var(--w)) / 4 - 7px); transform: rotate(180deg); }
.edge-r { right: calc((var(--side) - var(--w)) / 4 - 7px); }

/* ---- портрет ---- */
.pcard, .acard, .fact {
  position: relative;
  margin: 0 0 var(--gap);
  border-radius: 16px;
  border: 1px solid var(--rule-strong);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), border-color .35s, box-shadow .45s;
}
.pcard, .acard { cursor: pointer; background: var(--raised); }

.pcard img, .acard img {
  display: block;
  width: 100%;
  object-fit: cover;
  transition: filter .45s, transform 1.4s cubic-bezier(.2,.8,.2,1);
}
.pcard img { aspect-ratio: 1; filter: saturate(.8) brightness(.9); }

/* Низ портрета уходит в темноту — на ней номер и фамилия. */
.pcard::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 58%;
  background: linear-gradient(to top, rgba(5,8,16,.96) 8%, rgba(5,8,16,.55) 52%, transparent);
  pointer-events: none;
}
.pno {
  position: absolute; left: 11px; bottom: 40px; z-index: 1;
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(30px, calc(var(--w) * .28), 64px); line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .8);
  transition: color .35s, -webkit-text-stroke-color .35s;
}
.pname {
  position: absolute; left: 12px; right: 10px; bottom: 11px; z-index: 1;
  margin: 0;
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(13px, calc(var(--w) * .07), 17px); line-height: 1.1;
  text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pname small {
  display: block; margin-top: 3px;
  font-family: var(--mono); font-weight: 400; font-size: 10px;
  letter-spacing: .04em; text-transform: none; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis;
}
.ptag {
  position: absolute; top: 9px; right: 9px; z-index: 1;
  padding: 2px 7px; border-radius: 6px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: rgba(255, 66, 86, .88);
  box-shadow: 0 4px 14px -4px rgba(255, 66, 86, .8);
}
.pcard.hurt img { filter: grayscale(.85) brightness(.7); }

.pcard:hover, .acard:hover {
  transform: translateY(-3px) scale(1.035);
  border-color: rgba(255, 66, 86, .65);
  box-shadow: 0 0 0 1px rgba(255, 66, 86, .3), 0 22px 44px -14px rgba(255, 66, 86, .5);
}
.pcard:hover img { filter: none; transform: scale(1.06); }
.pcard:hover .pno { color: var(--goal); -webkit-text-stroke-color: var(--goal); }

/* Блик по карточке при наведении — как свет прожектора по стеклу. */
.pcard::before, .acard::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: 2;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent);
  transform: skewX(-18deg) translateX(0);
  pointer-events: none;
  opacity: 0;
}
.pcard:hover::before, .acard:hover::before { animation: glint .9s ease-out; }
@keyframes glint {
  0%   { opacity: 1; transform: skewX(-18deg) translateX(0); }
  100% { opacity: 0; transform: skewX(-18deg) translateX(420%); }
}

/* ---- снимок с матча ---- */
.acard img { aspect-ratio: 3 / 2; }
.acard:hover img { transform: scale(1.09); }
.acard figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 10px 8px;
  background: linear-gradient(to top, rgba(5,8,16,.92), transparent);
  font-family: var(--sans); font-size: 12px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acard figcaption b {
  font-family: var(--disp); font-weight: 700; font-size: 15px;
  color: var(--goal); margin-right: 7px;
}

/* ---- факт о клубе ---- */
.fact {
  display: grid; justify-items: center; gap: 4px;
  padding: 18px 12px 16px;
  text-align: center;
  background:
    radial-gradient(130% 110% at 50% 0%, rgba(255, 66, 86, .17), transparent 62%),
    var(--glass);
}
.fact .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.fact .v {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(16px, calc(var(--w) * .1), 25px); line-height: 1.12;
  text-transform: uppercase; letter-spacing: .02em;
}
.fact.good .v { color: var(--good); }
.fact .club-crest { width: min(62%, 120px); height: auto; aspect-ratio: 1; margin-bottom: 6px; }
.fact.crest { padding-top: 22px; }
.fact.crest .v { font-size: clamp(18px, calc(var(--w) * .12), 30px); }

/* Кубок — золотом, с бегущим отблеском. */
.fact.gold {
  border-color: rgba(244, 199, 90, .45);
  background:
    radial-gradient(130% 110% at 50% 0%, rgba(244, 199, 90, .2), transparent 62%),
    var(--glass);
}
.fact.gold .k { color: #d9b765; }
.fact.gold .v {
  background: linear-gradient(100deg, #b98a2c 0%, #ffe39a 38%, #fff7da 50%, #ffe39a 62%, #b98a2c 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: gold-shine 6s linear infinite;
}
@keyframes gold-shine {
  from { background-position: 100% 0; }
  to   { background-position: -160% 0; }
}

/* Узкое поле (ноутбук с масштабом 125 %): только портреты и номера. */
@media (min-width: 1500px) and (max-width: 1719px) {
  .pname small, .acard figcaption, .fact .k { display: none; }
  .pno { bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .wing, .wing-edge { animation: none; }
  .fact.gold .v { animation: none; }
  .pcard:hover::before, .acard:hover::before { animation: none; }
  .pcard, .acard, .pcard img, .acard img { transition: none; }
}

/* ================================ помним ================================ */

/* Пока открыта вкладка памяти, весь сайт меняет облик: вместо бирюзы
   и красного — тьма, слоновая кость и тёплый свет свечи. Цвета заданы
   токенами, поэтому шапка, вкладки и полоса сезона перекрашиваются сами. */
body { transition: background-color 1.2s ease, color 1.2s ease; }
body.mourning {
  --plane:   #09090a;
  --surface: #151413;
  --raised:  #1c1b19;
  --ink:     #efe9dd;
  --ink-2:   #bdb5a7;
  --muted:   #8f887c;
  --rule:        #2a2723;
  --rule-strong: #3b3731;
  --ice:       #d9c49a;
  --ice-soft:  rgba(217, 196, 154, .12);
  --goal:      #d9c49a;
  --goal-soft: rgba(217, 196, 154, .12);
  --glass: rgba(21, 20, 19, .72);
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --candle: 255, 196, 120;
}

.beam { transition: opacity 1.4s ease; }
body.mourning .beam { opacity: 0; }

/* Тёплое пятно сверху, как от свечи, и затемнение по краям. */
.arena::before, .arena::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.arena::before {
  left: 50%; top: -30vh;
  width: 110vw; height: 100vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 196, 120, .10), transparent 62%);
}
.arena::after {
  inset: 0;
  box-shadow: inset 0 0 22vw rgba(0, 0, 0, .85);
}
body.mourning .arena::before, body.mourning .arena::after { opacity: 1; }

body.mourning .masthead { background: linear-gradient(to bottom, rgba(9, 9, 10, .96), rgba(9, 9, 10, .8)); }
body.mourning .mark-crest { filter: grayscale(.85) drop-shadow(0 0 7px rgba(var(--candle), .4)); }
body.mourning .tab-pill { box-shadow: 0 0 18px -4px rgba(var(--candle), .55); }
body.mourning .rail-fill { box-shadow: 0 0 10px rgba(var(--candle), .5); }

/* ---- заглавие ---- */
.memorial { padding-bottom: 40px; font-variant-numeric: lining-nums; }
.mem-hero {
  text-align: center;
  padding: 64px 0 34px;
}
.mem-date {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(18px, 2.4vw, 24px); letter-spacing: .06em;
  color: var(--ice); margin: 0;
}
.mem-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(64px, 11vw, 132px); line-height: .95;
  letter-spacing: .05em;
  margin: 6px 0 18px;
  color: var(--ink);
  text-shadow: 0 0 40px rgba(var(--candle), .18);
}
.mem-lead {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(19px, 2.3vw, 24px); line-height: 1.45;
  color: var(--ink-2);
  max-width: 40ch; margin: 0 auto;
  text-wrap: balance;
}

.mem-count {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 56px;
  margin: 44px auto 0;
}
.mem-count div { display: grid; justify-items: center; gap: 4px; }
.mem-count b {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(48px, 6vw, 68px); line-height: 1;
  color: var(--ice);
}
.mem-count span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); line-height: 1.5;
}

/* ---- свеча ---- */
.candle { position: relative; width: 22px; height: 118px; margin: 0 auto 30px; }
.candle .wax {
  position: absolute; left: 0; bottom: 0;
  width: 22px; height: 72px;
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(90deg, #b8ad98, #f2ead9 42%, #d9cfbc 60%, #a89c86);
  box-shadow: inset 0 -12px 18px rgba(0, 0, 0, .35), 0 0 30px rgba(var(--candle), .12);
}
.candle .wax::before {                     /* фитиль */
  content: ""; position: absolute; left: 50%; top: -9px;
  width: 2px; height: 10px; margin-left: -1px;
  border-radius: 1px; background: #2c251d;
}
.candle .flame {
  position: absolute; left: 50%; bottom: 79px;
  width: 14px; height: 32px; margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 82%, #fffaf0 0%, #ffe3a6 28%, #ffb35c 58%, rgba(255, 140, 60, 0) 76%);
  transform-origin: 50% 100%;
  animation: flicker 3.4s ease-in-out infinite;
}
.candle .glow {
  position: absolute; left: 50%; bottom: 58px;
  width: 220px; height: 220px; margin-left: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--candle), .30), rgba(var(--candle), .08) 38%, transparent 68%);
  animation: candle-glow 3.4s ease-in-out infinite;
  pointer-events: none;
}
.candle.small { transform: scale(.72); margin-bottom: 8px; }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(-1deg); }
  18%      { transform: scale(.95, 1.06) rotate(1.6deg); }
  37%      { transform: scale(1.04, .95) rotate(-.6deg); }
  58%      { transform: scale(.97, 1.04) rotate(1deg); }
  79%      { transform: scale(1.02, .97) rotate(-1.6deg); }
}
@keyframes candle-glow {
  0%, 100% { opacity: .82; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.07); }
}

/* ---- рассказ ---- */
.mem-story {
  max-width: 62ch; margin: 26px auto 10px;
  padding: 26px 0 8px;
  border-top: 1px solid var(--rule);
  font-size: 15.5px; line-height: 1.75; color: var(--ink-2);
  text-align: center;
}
.mem-story p { margin: 0 0 14px; }

/* ---- разделы ---- */
.mem-group { margin-top: 70px; }
.mem-sec {
  display: flex; align-items: center; gap: 22px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: .03em;
  color: var(--ink); margin: 0 0 8px;
}
.mem-sec::before, .mem-sec::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule-strong));
}
.mem-sec::after { background: linear-gradient(90deg, var(--rule-strong), transparent); }
.mem-sub, .mem-role {
  text-align: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  margin: 26px 0 22px;
}
.mem-sub { letter-spacing: .04em; text-transform: none; font-family: var(--sans); font-size: 14px; }

/* ---- портреты: фотографии в арочных рамках, как на мемориальной стене ---- */
/* Ряды по центру: неполный ряд (два вратаря) не жмётся к левому краю. */
.mem-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 40px 26px;
}
.mem-card { margin: 0; width: 176px; text-align: center; }
.mem-photo {
  position: relative;
  padding: 7px;
  border: 1px solid rgba(217, 196, 154, .32);
  border-radius: 999px 999px 14px 14px;
  background: linear-gradient(180deg, #1d1b18, #121110);
  box-shadow: 0 24px 40px -26px #000;
  transition: border-color .8s ease, box-shadow .8s ease;
}
.mem-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 320 / 340;
  object-fit: cover;
  border-radius: 999px 999px 9px 9px;
  filter: grayscale(1) contrast(.94) brightness(.9);
  transition: filter 1.2s ease;
}
/* Мягкая виньетка по краям снимка. */
.mem-photo::after {
  content: "";
  position: absolute; inset: 7px;
  border-radius: 999px 999px 9px 9px;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.mem-num {
  position: absolute; right: -6px; bottom: -14px; z-index: 1;
  min-width: 42px; padding: 0 6px;
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: 30px; line-height: 1.15;
  color: var(--ice);
  background: var(--plane);
  border-radius: 20px;
}
.mem-card:hover .mem-photo {
  border-color: rgba(var(--candle), .7);
  box-shadow: 0 0 40px -8px rgba(var(--candle), .35), 0 24px 40px -26px #000;
}
.mem-card:hover .mem-photo img { filter: grayscale(.55) sepia(.25) contrast(.96) brightness(.98); }

.mem-card figcaption, .mem-person { display: grid; justify-items: center; align-content: start; gap: 2px; }
.mem-card figcaption { margin-top: 20px; }
.mem-name {
  font-family: var(--serif); font-weight: 500;
  font-size: 21px; line-height: 1.15; color: var(--ink);
  text-wrap: balance;
}
.mem-years {
  font-family: var(--serif); font-style: italic;
  font-size: 17px; color: var(--ice);
}
.mem-meta {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: var(--muted); line-height: 1.6;
}
.mem-note { font-size: 12.5px; color: var(--ink-2); font-style: italic; }

/* ---- тренеры, сотрудники, экипаж ---- */
.mem-people {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 30px 22px;
}
.mem-person { width: 220px; text-align: center; padding: 6px 4px; }
.mem-medal {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 12px;
  border-radius: 50%;
  border: 1px solid rgba(217, 196, 154, .35);
  background: radial-gradient(circle at 50% 35%, #25221e, #121110);
  font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: .04em;
  color: var(--ice);
  box-shadow: 0 0 30px -12px rgba(var(--candle), .4);
}
.mem-person .mem-name { font-size: 19px; }

/* ---- память ---- */
.mem-timeline {
  list-style: none; margin: 30px auto 0; padding: 0;
  max-width: 760px;
  position: relative;
}
.mem-timeline::before {
  content: ""; position: absolute; left: 150px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(transparent, var(--rule-strong) 8%, var(--rule-strong) 92%, transparent);
}
.mem-timeline li {
  position: relative;
  display: grid; grid-template-columns: 150px 1fr; gap: 0 30px;
  padding: 12px 0;
}
.mem-timeline li::before {                  /* огонёк на линии */
  content: ""; position: absolute; left: 146px; top: 20px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #ffd79a;
  box-shadow: 0 0 10px 2px rgba(var(--candle), .6);
}
.mem-when {
  font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.3;
  color: var(--ice); text-align: right;
}
.mem-timeline p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-2); }

/* ---- финал ---- */
.mem-end { text-align: center; margin: 90px 0 20px; }
.mem-end p {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(34px, 5vw, 52px); letter-spacing: .04em;
  color: var(--ink); margin: 0;
  text-shadow: 0 0 36px rgba(var(--candle), .2);
}

/* ---- проявление из темноты ---- */
.lit-armed [data-lit] {
  opacity: 0;
  filter: brightness(.2) blur(2px);
  transform: translateY(14px);
  transition: opacity 1.6s ease, filter 1.8s ease, transform 1.6s cubic-bezier(.2,.8,.2,1);
}
.lit-armed [data-lit].lit { opacity: 1; filter: none; transform: none; }

@media (max-width: 620px) {
  .mem-hero { padding-top: 40px; }
  .mem-grid { gap: 32px 16px; }
  .mem-card { width: calc(50% - 8px); }
  .mem-person { width: calc(50% - 11px); }
  .mem-name { font-size: 18px; }
  .mem-num { font-size: 24px; min-width: 34px; bottom: -12px; }
  .mem-count { gap: 18px 30px; }
  .mem-timeline::before { left: 4px; }
  .mem-timeline li { grid-template-columns: 1fr; padding-left: 26px; }
  .mem-timeline li::before { left: 0; top: 18px; }
  .mem-when { text-align: left; margin-bottom: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .candle .flame, .candle .glow { animation: none; }
  .lit-armed [data-lit] { opacity: 1; filter: none; transform: none; transition: none; }
}

/* ============================= лист матча ============================= */

/* Разбор сыгранного матча поверх страницы: голы, числа, отчёт клуба
   и пресс-конференция. Открывается щелчком по строке матча. */
tr.openable { cursor: pointer; }
tr.openable:hover td { background: rgba(79, 216, 255, .08); }
.open-hint {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ice); opacity: .5;
  white-space: nowrap; transition: opacity .2s;
}
tr.openable:hover .open-hint { opacity: 1; }

body.sheet-open { overflow: hidden; }

.sheet { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 22px; }
.sheet-back {
  position: absolute; inset: 0;
  background: rgba(3, 5, 10, .78);
  backdrop-filter: blur(7px);
}
.sheet-card {
  position: relative;
  width: min(780px, 100%);
  max-height: min(88vh, 940px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 28px 34px;
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(27, 39, 51, .98), rgba(9, 14, 22, .99));
  box-shadow: 0 40px 90px -30px #000;
}
.sheet-x {
  position: sticky; top: -2px; z-index: 3;
  display: block;
  width: 34px; height: 34px; margin: -6px -10px -28px auto;
  border: 1px solid var(--rule-strong); border-radius: 50%;
  background: var(--raised); color: var(--ink-2);
  font-size: 19px; line-height: 1; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.sheet-x:hover { color: var(--ink); border-color: var(--goal); background: var(--goal-soft); }

/* ---- шапка ---- */
.sheet-head { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.sheet-meta {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 16px;
}
.sheet-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.s-team {
  display: grid; justify-items: center; gap: 9px;
  font-family: var(--disp); font-weight: 500; font-size: 17px;
  text-transform: uppercase; letter-spacing: .02em; line-height: 1.1;
}
.s-crest {
  width: 58px; height: 58px;
  background: center / contain no-repeat;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .6));
}
.s-num b {
  font-family: var(--disp); font-weight: 700; font-size: clamp(34px, 7vw, 46px);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.s-num i {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted);
}
.sheet-tag {
  display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; align-items: center;
  margin: 16px 0 0; font-size: 12.5px; color: var(--ink-2);
}

.sheet-sec {
  font-family: var(--disp); font-weight: 500; font-size: 19px;
  text-transform: uppercase; letter-spacing: .05em;
  margin: 28px 0 12px; color: var(--ink);
}

/* ---- голы ---- */
.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.goal {
  display: grid; grid-template-columns: 76px 52px 1fr auto;
  align-items: center; gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--rule); border-radius: 12px;
  background: var(--surface);
}
.goal.mine {
  border-color: rgba(79, 216, 255, .3);
  background: rgba(79, 216, 255, .07);
  box-shadow: inset 3px 0 0 var(--ice);
}
.g-when b { display: block; font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.g-when i {
  font-family: var(--mono); font-style: normal; font-size: 9px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.g-score {
  font-family: var(--disp); font-weight: 600; font-size: 20px;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.g-who b { font-family: var(--disp); font-weight: 500; font-size: 16.5px; }
.g-who b i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); }
.g-tally { display: block; font-family: var(--mono); font-style: normal; font-size: 10.5px; color: var(--muted); }
.g-ass { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.g-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--warn); border: 1px solid rgba(255, 176, 46, .35);
  border-radius: 6px; padding: 3px 7px; white-space: nowrap;
}

/* ---- матч в числах ---- */
.sheet-stats { display: grid; gap: 12px; }
.sheet-stat {
  display: grid; grid-template-columns: 58px 1fr 58px; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums;
}
.sheet-stat b:first-of-type { text-align: right; color: var(--ice); }
.sheet-stat b:last-of-type { text-align: left; color: var(--ink-2); }
.s-mid { display: grid; gap: 5px; justify-items: center; }
.s-mid i { font-family: var(--sans); font-style: normal; font-size: 11.5px; color: var(--muted); }
.s-bar { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.s-bar u {
  display: block; height: 100%; text-decoration: none;
  background: linear-gradient(90deg, var(--ice), rgba(79, 216, 255, .45));
  transition: width .9s cubic-bezier(.22,.61,.36,1);
}

/* ---- отчёт и пресс-конференция ---- */
.sheet-text h3 { font-family: var(--disp); font-weight: 500; font-size: 22px; line-height: 1.2; margin: 0 0 6px; }
.sheet-text .lead { color: var(--ink); font-size: 14.5px; margin: 0 0 16px; }
.sheet-text p { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); margin: 0 0 12px; }
.sheet-text .speaker {
  font-family: var(--disp); font-weight: 500; font-size: 16px;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ice);
  margin: 22px 0 8px;
}
.sheet-text .ask { color: var(--muted); font-style: italic; }
.sheet-text .qhead {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin: 20px 0 8px;
}
.sheet-text .say { padding-left: 14px; border-left: 2px solid var(--rule-strong); }
.talk .say { border-left-color: rgba(79, 216, 255, .35); }

@media (max-width: 620px) {
  .sheet { padding: 0; }
  .sheet-card {
    width: 100%; max-height: 100vh; height: 100%;
    border: 0; border-radius: 0; padding: 16px 16px 34px;
  }
  .goal { grid-template-columns: 62px 44px 1fr; gap: 8px; padding: 10px 12px; }
  .g-tag { grid-column: 3; justify-self: start; }
  .s-crest { width: 46px; height: 46px; }
  .s-team { font-size: 14px; }
  .sheet-stat { grid-template-columns: 46px 1fr 46px; font-size: 12px; }
}

/* =========================== карточка игрока =========================== */

/* Та же шторка, что у разбора матча. Сверху — снимок с матча в полутьме,
   портрет, номер и имя; дальше анкета, цифры, голы и биография. */
.pl-head {
  position: relative;
  display: flex; align-items: flex-end; gap: 18px;
  margin: -24px -28px 0; padding: 70px 28px 20px;
  border-radius: 20px 20px 0 0;
  background: radial-gradient(120% 100% at 0% 0%, rgba(79, 216, 255, .12), transparent 60%);
  overflow: hidden;
}
.pl-head.has-bg::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--pl-bg) center 30% / cover no-repeat;
  opacity: .42;
  filter: saturate(.9);
}
.pl-head::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(9, 14, 22, .15), rgba(12, 19, 28, .92) 78%, rgba(18, 27, 38, 1));
}
.pl-head > * { position: relative; z-index: 1; }
.pl-face {
  flex: none;
  width: 116px; height: 116px;
  border-radius: 50%;
  object-fit: cover; object-position: 50% 20%;
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 16px 36px -12px #000, 0 0 0 6px rgba(255, 66, 86, .25);
  background: var(--raised) center / 70% no-repeat;
}
.pl-id { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.pl-no {
  font-family: var(--disp); font-weight: 700; font-size: 44px; line-height: .9;
  color: transparent; -webkit-text-stroke: 1.5px var(--goal);
}
.pl-name {
  font-family: var(--disp); font-weight: 700; font-size: clamp(26px, 5vw, 36px);
  line-height: 1.02; text-transform: uppercase; margin: 0;
}
.pl-role {
  margin: 0; display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--ink-2);
}

.pl-facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px; margin: 0 -28px; padding: 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--rule);
}
.pl-fact { background: rgba(18, 27, 38, 1); padding: 11px 16px; }
.pl-fact dt {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.pl-fact dd { margin: 3px 0 0; font-size: 14px; color: var(--ink); }
.pl-note {
  margin: 14px 0 0; padding: 10px 14px;
  border-left: 3px solid var(--goal); border-radius: 0 8px 8px 0;
  background: var(--goal-soft); font-size: 13px; color: var(--ink-2);
}

.pl-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pl-stat {
  display: grid; gap: 2px; padding: 11px 13px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
}
.pl-stat span {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.pl-stat b { font-family: var(--disp); font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; }
.pl-stat.hot { border-color: rgba(79, 216, 255, .35); background: rgba(79, 216, 255, .07); }
.pl-stat.hot b { color: var(--ice); }
.pl-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.pl-count { font-family: var(--mono); font-style: normal; font-size: 13px; color: var(--muted); margin-left: 6px; }

.pl-moments { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pl-moment {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) max-content max-content;
  align-items: center; gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.pl-moment:hover { border-color: rgba(79, 216, 255, .4); background: rgba(79, 216, 255, .06); }
.pm-day { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.pm-vs { display: flex; align-items: center; gap: 2px; font-size: 14px; }
.pm-kind {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
}
.pm-kind.goal { background: var(--good-soft); color: var(--good); }
.pm-kind.assist { background: var(--ice-soft); color: var(--ice); }
.pm-when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pl-source { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 16px; }

@media (max-width: 620px) {
  .pl-head { margin: -16px -16px 0; padding: 60px 16px 18px; gap: 14px; border-radius: 0; }
  .pl-face { width: 88px; height: 88px; }
  .pl-no { font-size: 34px; }
  .pl-facts { margin: 0 -16px; grid-template-columns: 1fr 1fr; }
  .pl-fact { padding: 10px 14px; }
  .pl-moment { grid-template-columns: 54px minmax(0, 1fr) max-content; }
  .pm-when { grid-column: 2 / -1; }
}

/* ============================ новости клуба ============================ */

/* Под карточкой клуба на «Обзоре» — три свежих заголовка строкой. */
.hero-news {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  margin: 12px 2px 0;
}
.hn-k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ice);
}
.hn-item {
  display: inline-flex; gap: 8px; align-items: baseline; min-width: 0;
  font-size: 13.5px; color: var(--ink-2); text-decoration: none;
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.hn-item time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.hn-item:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }

.news-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.news-card {
  display: grid; grid-template-rows: auto 1fr;
  border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  background: var(--surface); cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
}
.news-card:hover, .news-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(79, 216, 255, .35);
  box-shadow: 0 22px 40px -26px #000;
  outline: none;
}
.news-card img, .news-noimg {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--raised);
}
.news-noimg { display: grid; place-items: center; }
.news-noimg .crest { width: 64px; height: 64px; opacity: .5; }
.news-body { padding: 12px 14px 16px; display: grid; gap: 6px; align-content: start; }
.news-body time { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted); }
.news-body h3 { margin: 0; font-family: var(--disp); font-weight: 500; font-size: 18px; line-height: 1.2; }
.news-body p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.news-more { grid-column: 1 / -1; justify-self: center; }
.news-cover {
  display: block; width: calc(100% + 56px); max-width: none;
  margin: -24px -28px 16px; aspect-ratio: 16 / 8; object-fit: cover;
  border-radius: 20px 20px 0 0;
}

/* ============================ что нужно клубу ============================ */

.needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.needs:empty { display: none; }
.need {
  padding: 16px 18px;
  border: 1px solid var(--rule-strong); border-radius: 16px;
  background: var(--glass);
}
.need-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.need-top .k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.need-top b { font-family: var(--disp); font-weight: 600; font-size: 26px; color: var(--ink); }
.need-bar {
  position: relative; height: 8px; margin: 10px 0 12px;
  border-radius: 4px; background: var(--raised); overflow: visible;
}
.need-bar u {
  display: block; height: 100%; border-radius: 4px; text-decoration: none;
  background: linear-gradient(90deg, #2a78d6, #3987e5);
}
/* Засечка — где обычно проходит черта. */
.need-bar i {
  position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px;
  background: var(--ink-2); border-radius: 1px;
}
.need-main { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.5; }
.need-main b { font-family: var(--disp); font-size: 17px; }
.need-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

/* ============================ превью матча ============================ */

.pv-vs {
  font-family: var(--mono) !important; font-size: 12px !important; font-weight: 500 !important;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ice);
}
.pv-bar { display: flex; height: 14px; gap: 2px; border-radius: 7px; overflow: hidden; }
.pv-bar span { min-width: 2px; }
.pv-bar .w,   .pv-legend .w i   { background: #3987e5; }
.pv-bar .otw, .pv-legend .otw i { background: #86b6ef; }
.pv-bar .otl, .pv-legend .otl i { background: #f0a3a3; }
.pv-bar .l,   .pv-legend .l i   { background: #e66767; }
.pv-legend {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 16px;
  font-size: 13px; color: var(--ink-2);
}
.pv-legend li { display: flex; align-items: center; gap: 8px; }
.pv-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pv-legend b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.pv-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.pv-head, .pv-row {
  display: grid; grid-template-columns: 1fr minmax(90px, auto) 1fr; gap: 12px; align-items: center;
}
.pv-head { margin-bottom: 6px; }
.pv-head b { font-family: var(--disp); font-weight: 500; font-size: 15px; text-transform: uppercase; }
.pv-head b:first-child, .pv-row b:first-child { text-align: right; }
.pv-cmp { display: grid; gap: 1px; border-radius: 12px; overflow: hidden; background: var(--rule); }
.pv-row { padding: 9px 14px; background: var(--surface); }
.pv-row b { font-weight: 500; font-size: 14px; }
.pv-row span {
  text-align: center; font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

.pv-meet { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.pv-meet li { padding: 8px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.pv-meet li.openable { cursor: pointer; }
.pv-meet li.openable:hover { border-color: rgba(79, 216, 255, .35); }

.pv-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 26px; }
.pv-side {
  padding: 14px 16px 16px;
  border: 1px solid var(--rule); border-radius: 14px; background: rgba(5, 8, 16, .35);
}
.pv-team {
  display: flex; align-items: center; gap: 4px; margin: 0 0 4px;
  font-family: var(--disp); font-weight: 500; font-size: 18px; text-transform: uppercase;
}
.pv-k {
  margin: 14px 0 6px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.pv-side .form-strip { margin: 0; }
.pv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pv-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.pv-list li[data-player] { cursor: pointer; }
.pv-list li[data-player]:hover b { color: var(--ice); }
.pv-list b { font-weight: 500; }
.pv-list span { color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }

/* ============================ вратари в матче ============================ */

#periodsTable { padding: 0 18px 16px; margin: 0; }

.sheet-goalies { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sheet-goalies li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
  font-size: 14px;
}
.sheet-goalies li.mine { border-color: rgba(79, 216, 255, .3); box-shadow: inset 3px 0 0 var(--ice); }
.sheet-goalies span { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }

button.watch-go { cursor: pointer; font: inherit; font-family: var(--mono); font-size: 11px; }
.pv-open { border-color: rgba(79, 216, 255, .45); background: var(--ice-soft); color: var(--ice); }
.pv-open:hover { background: rgba(79, 216, 255, .2); border-color: var(--ice); color: var(--ink); }

@media (max-width: 620px) {
  .news-cover { width: calc(100% + 32px); margin: -16px -16px 14px; border-radius: 0; }
  .pv-head, .pv-row { grid-template-columns: 1fr 76px 1fr; gap: 8px; }
  .pv-row { padding: 8px 10px; }
  .pv-row b { font-size: 13px; }
}

/* ============================ игра в прогнозы ============================ */

.bet { padding: 14px 16px; border: 1px solid var(--rule-strong); border-radius: 14px; background: rgba(5, 8, 16, .35); }
.bet-row {
  display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 12px;
}
.bet-team { display: flex; align-items: center; gap: 4px; font-family: var(--disp); font-size: 16px; text-transform: uppercase; }
.bet-row .bet-team:first-child { justify-content: flex-end; text-align: right; }
.bet-num { display: grid; grid-template-columns: 34px 46px 34px; align-items: center; }
.bet-num b, .bet-fixed {
  text-align: center; font-family: var(--disp); font-weight: 700; font-size: 34px;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.bet-num button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--rule-strong); background: var(--raised); color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer; transition: border-color .2s, background .2s;
}
.bet-num button:hover { border-color: var(--ice); background: var(--ice-soft); }
.bet-colon { font-family: var(--disp); font-size: 30px; color: var(--muted); }
.bet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; margin-top: 14px; }
.bet-save { border-color: rgba(79, 216, 255, .45); background: var(--ice-soft); color: var(--ice); }
.bet-save:hover { background: rgba(79, 216, 255, .2); border-color: var(--ice); color: var(--ink); }
.bet-state { font-size: 12.5px; color: var(--muted); }
.bet-state.ok { color: var(--good); }
.bet-state.bad { color: var(--warn); }
.bet .pv-hint { text-align: center; }

.bet-tiles { margin-top: 0; }
.bet-next { list-style: none; margin: 0; padding: 4px 0; }
.bet-next li {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 17px; border-top: 1px solid var(--rule); font-size: 14px;
}
.bet-next li:first-child { border-top: 0; }
.bet-next li.openable { cursor: pointer; }
.bet-next li.openable:hover { background: rgba(79, 216, 255, .06); }
.bet-mine { font-family: var(--disp); font-size: 17px; color: var(--ice); }
.hero-bet { font-size: 13px; color: var(--ink-2); }
.hero-bet b { font-family: var(--disp); font-size: 16px; color: var(--ice); }

@media (max-width: 620px) {
  .bet-row { grid-template-columns: 1fr auto 1fr; row-gap: 8px; }
  .bet-row .bet-team { grid-column: 1 / -1; justify-content: center !important; }
  .bet-row .bet-team:last-child { order: 5; }
  .bet-colon { order: 3; }
  .bet-num[data-side="h"], .bet-row > .bet-fixed:nth-of-type(1) { order: 2; justify-self: end; }
  .bet-num[data-side="a"] { order: 4; justify-self: start; }
  .bet-next li { grid-template-columns: 54px 1fr auto; }
  .bet-next li .open-hint { display: none; }
}

/* Соперник в прогнозах — Claude. */
.bet-claude {
  margin: 12px 0 0; text-align: center; font-size: 13.5px; color: var(--ink-2);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px;
}
.bet-claude b { font-family: var(--disp); font-size: 20px; color: #d95926; }
.bet-claude span { font-size: 11.5px; color: var(--muted); }
.bet-rival { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }

.bet-duel {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 16px 20px; margin-bottom: 8px;
  border: 1px solid var(--rule-strong); border-radius: 16px; background: var(--glass);
}
.bd-side { display: grid; gap: 2px; }
.bd-side.rival { text-align: right; justify-items: end; }
.bd-side .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bd-side b { font-family: var(--disp); font-weight: 700; font-size: 44px; line-height: 1; color: #3987e5; }
.bd-side.rival b { color: #d95926; }
.bd-side i { font-style: normal; font-size: 12px; color: var(--ink-2); }
.bd-mid {
  text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-2);
}
.bet-note { margin: 0 0 16px; }

/* ============================ портреты лиги ============================ */

.face-sprite { display: inline-block; background-color: #fff; background-repeat: no-repeat; }
.pl-face.face-sprite { display: block; }

/* ============================== сегодня ============================== */

.hero-today {
  margin: 10px 2px 0; display: grid; gap: 4px;
  font-size: 13.5px; color: var(--ink-2);
}
.hero-today p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ht-k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--warn);
}
.p-link, .ht-more { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.p-link:hover, .ht-more:hover { border-bottom-color: var(--ice); }

/* ============================== рекорды ============================== */

.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.rc-list { list-style: none; margin: 0; padding: 4px 0; }
.rc-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: baseline;
  padding: 10px 17px; border-top: 1px solid var(--rule);
}
.rc-list li:first-child { border-top: 0; }
.rc-list li.openable { cursor: pointer; }
.rc-list li.openable:hover { background: rgba(79, 216, 255, .06); }
.rc-k { font-size: 13px; color: var(--ink-2); }
.rc-list b { font-family: var(--disp); font-weight: 600; font-size: 20px; text-align: right; }
.rc-d { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.rc-list.bday li { grid-template-columns: 76px 1fr auto; }
.rc-list.bday .rc-d { grid-column: auto; }

/* ============================== история ============================== */

.hs-hero { padding: 40px 0 10px; }
.hs-title {
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  font-size: clamp(38px, 7vw, 76px); line-height: .95; margin: 6px 0 24px;
}
.hs-count { display: flex; flex-wrap: wrap; gap: 18px 48px; margin-bottom: 22px; }
.hs-count div { display: grid; gap: 4px; }
.hs-count b { font-family: var(--disp); font-weight: 700; font-size: 56px; line-height: 1; color: var(--ink); }
.hs-count .gold b {
  background: linear-gradient(100deg, #b98a2c, #ffe39a 45%, #fff3c9 55%, #b98a2c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hs-count span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }

.hs-day { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hs-day li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); font-size: 14.5px;
}

.timeline { list-style: none; margin: 10px 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 96px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--rule-strong), var(--rule-strong));
}
.timeline li {
  position: relative; display: grid; grid-template-columns: 80px 1fr auto; gap: 0 34px;
  align-items: start; padding: 12px 0;
}
.timeline li::before {
  content: ""; position: absolute; left: 91px; top: 17px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--raised); border: 2px solid var(--rule-strong);
}
.tl-year { font-family: var(--mono); font-size: 13px; color: var(--ink-2); text-align: right; padding-top: 1px; }
.tl-body b { font-family: var(--disp); font-weight: 500; font-size: 18px; line-height: 1.25; }
.tl-body p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.tl-kind { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.tl-gold::before   { background: #f2c14e !important; border-color: #f2c14e !important; box-shadow: 0 0 12px rgba(242, 193, 78, .55); }
.tl-silver::before { background: #c9d1d9 !important; border-color: #c9d1d9 !important; }
.tl-bronze::before { background: #c98a4b !important; border-color: #c98a4b !important; }
.tl-cup::before    { background: var(--ice) !important; border-color: var(--ice) !important; }
.tl-memory::before { background: #0b0b0c !important; border-color: #d9c49a !important; }
.tl-gold .tl-body b { color: #f2c14e; }
.tl-memory .tl-body b { color: #d9c49a; }

.aw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.aw-list { list-style: none; margin: 0; padding: 6px 0 10px; }
.aw-list li { padding: 6px 17px; font-size: 13.5px; color: var(--ink-2); }
.aw-list .aw-sub {
  padding-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}

.legends {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.legends li {
  display: grid; gap: 2px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
}
.legends b { font-family: var(--disp); font-weight: 500; font-size: 17px; }
.legends span { font-size: 12.5px; color: var(--muted); }
.legends li.bday { border-color: rgba(255, 176, 46, .55); box-shadow: inset 3px 0 0 var(--warn); }

@media (max-width: 620px) {
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; padding-left: 28px; gap: 2px; }
  .timeline li::before { left: 1px; }
  .tl-year { text-align: left; }
  .tl-kind { display: none; }
  .hs-count b { font-size: 44px; }
}

/* ========================= звёзды матча и форма ========================= */

.stars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: star; }
.stars li {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px;
  padding: 11px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
}
.stars li.mine { border-color: rgba(79, 216, 255, .3); background: rgba(79, 216, 255, .07); box-shadow: inset 3px 0 0 var(--ice); }
.star-no {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-family: var(--disp); font-weight: 700; font-size: 17px;
  color: var(--plane); background: linear-gradient(140deg, #ffe39a, #c9a14a);
}
.stars li:nth-child(2) .star-no { background: linear-gradient(140deg, #e6ebf0, #9aa7b4); }
.stars li:nth-child(3) .star-no { background: linear-gradient(140deg, #e0a877, #b27444); }
.star-who b { font-family: var(--disp); font-weight: 500; font-size: 16.5px; }
.star-who i {
  display: flex; align-items: center; gap: 3px; font-style: normal;
  font-size: 12px; color: var(--muted);
}
.star-line { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); text-align: right; }

.pl-form tbody tr { cursor: pointer; }
.pl-form tbody tr:hover td { background: rgba(79, 216, 255, .07); }

@media (max-width: 620px) {
  .stars li { grid-template-columns: 30px 1fr; row-gap: 4px; }
  .star-line { grid-column: 2; text-align: left; }
}

/* ======================= путь к Кубку Гагарина ======================= */

.po-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.po-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 11px; border: 1px solid var(--rule); border-radius: 9px;
  background: var(--surface); color: var(--ink-2);
  font: inherit; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.po-chip:hover { border-color: var(--rule-strong); color: var(--ink); }
.po-chip i {
  font-style: normal; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #d8ab48;
}
.po-chip.on { border-color: rgba(242, 193, 78, .55); background: rgba(242, 193, 78, .1); color: var(--ink); }
.po-chip.on i { color: #ffe39a; }

.stat .v.gold {
  background: linear-gradient(100deg, #b98a2c, #ffe39a 45%, #fff3c9 55%, #b98a2c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Путь по раундам — лесенка сверху вниз, слева линия сезона. */
.po-path { list-style: none; margin: 14px 0 0; padding: 0 0 0 26px; display: grid; gap: 12px; position: relative; }
.po-path::before {
  content: ""; position: absolute; left: 6px; top: 22px; bottom: 22px; width: 2px; background: var(--rule-strong);
}
.po-round {
  position: relative; padding: 14px 16px 13px;
  border: 1px solid var(--rule); border-radius: 14px; background: var(--surface);
}
.po-round::before {
  content: ""; position: absolute; left: -26px; top: 22px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--raised); border: 2px solid var(--rule-strong);
}
.po-round.won::before { background: var(--good); border-color: var(--good); }
.po-round.lost::before { background: var(--goal); border-color: var(--goal); }
.po-round.cup { border-color: rgba(242, 193, 78, .5); }
.po-round.cup::before { background: #f2c14e; border-color: #f2c14e; box-shadow: 0 0 12px rgba(242, 193, 78, .55); }

.po-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.po-name {
  flex: 0 0 100%;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.po-rival { display: inline-flex; align-items: center; gap: 7px; font-family: var(--disp); font-weight: 500; font-size: 19px; }
.po-score {
  margin-left: auto; font-family: var(--disp); font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums;
}
.po-round.won .po-score { color: var(--good); }
.po-round.lost .po-score { color: var(--goal); }

.po-games { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0 0; padding: 0; }
.po-game {
  display: grid; gap: 1px; min-width: 84px; padding: 7px 10px 6px;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--raised);
}
.po-game b { font-family: var(--mono); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.po-game.w b { color: var(--good); }
.po-game.l b { color: var(--goal); }
.po-game span { font-size: 10.5px; color: var(--ink-2); }
.po-game i { font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.po-game.openable { cursor: pointer; }
.po-game.openable:hover { border-color: rgba(79, 216, 255, .45); }

.po-cup {
  margin: 12px 0 0; font-family: var(--disp); font-weight: 600; font-size: 15px;
  letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(100deg, #b98a2c, #ffe39a 45%, #fff3c9 55%, #b98a2c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 620px) {
  .po-path { padding-left: 20px; }
  .po-path::before { left: 3px; }
  .po-round::before { left: -20px; }
  .po-game { min-width: 76px; }
}

/* ============================= живой счёт ============================= */

.live-strip {
  position: sticky; top: 56px; z-index: 60;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 auto; padding: 8px 20px;
  border-bottom: 1px solid rgba(255, 66, 86, .3);
  background: linear-gradient(180deg, rgba(38, 10, 16, .96), rgba(20, 8, 12, .96));
  backdrop-filter: blur(10px);
}
.live-label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--goal);
}
.live-strip ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; }
.live-strip li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.live-strip li.mine { color: var(--ink); }
.live-strip li.mine b { color: var(--ice); }
.live-strip b { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.live-team { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.live-strip i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--goal);
  box-shadow: 0 0 0 0 rgba(255, 66, 86, .6); animation: live-pulse 1.8s infinite;
}
@keyframes live-pulse {
  70% { box-shadow: 0 0 0 7px rgba(255, 66, 86, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 66, 86, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
@media (max-width: 620px) {
  .live-strip { top: 52px; padding: 7px 16px; gap: 8px; }
  .live-strip ul { gap: 4px 14px; }
  .live-strip li { font-size: 12.5px; }
}

/* Ссылка на первоисточник под чужим текстом. */
.source { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.source a {
  font-family: var(--mono); font-size: 12px; color: var(--ice); text-decoration: none;
}
.source a:hover { text-decoration: underline; }

/* Имя лидера в шапке «Обзора» — такая же ссылка на карточку, как в таблицах. */
.hero-side .n .p-link { color: inherit; text-decoration: none; }
.hero-side .n .p-link:hover { text-decoration: underline; }

/* =============================== прогноз =============================== */

.fc-hero { padding: 40px 0 8px; }
.fc-title {
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 5.4vw, 58px); line-height: 1; margin: 6px 0 8px;
}
.fc-when { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 22px; }

.fc-pick {
  display: grid; justify-items: center; gap: 6px;
  padding: 22px 18px 20px; margin-bottom: 18px;
  border: 1px solid var(--rule); border-radius: 18px;
  background: var(--glass); backdrop-filter: blur(8px);
}
.fc-score { display: flex; align-items: center; gap: 22px; }
.fc-score b {
  font-family: var(--disp); font-weight: 700; font-size: clamp(34px, 6vw, 54px);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.fc-crest { display: block; width: 52px; height: 52px; background: center / contain no-repeat; }
.fc-k {
  margin: 0; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.fc-chance { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.fc-chance b { color: var(--ink); font-variant-numeric: tabular-nums; }

.fc-notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.fc-notes li {
  display: grid; grid-template-columns: 132px 1fr; gap: 0 20px; align-items: start;
  padding: 14px 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface);
}
.fc-note-k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding-top: 3px;
}
.fc-notes p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.fc-bet { max-width: 560px; }

@media (max-width: 620px) {
  .fc-notes li { grid-template-columns: 1fr; gap: 4px; }
  .fc-score { gap: 14px; }
  .fc-crest { width: 40px; height: 40px; }
}
