/* Hockey Stats — хоккейные элементы поверх общей дизайн-системы (hstats.css).
   Новые цвета — только через переменные, иначе светлая тема сломается. */
:root { --pen: #ff7b00; --pen-rgb: 255,123,0; }
:root[data-theme="light"] { --pen: #c95f00; --pen-rgb: 201,95,0; }

/* логотипы клубов */
.clogo { width: 34px; height: 34px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px;
  background: rgba(var(--line-rgb),.06); border: 1px solid var(--line2); font-family: var(--cond); font-weight: 800; font-size: 12px; color: var(--text2); overflow: hidden; }
.clogo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.clogo.xs { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; margin-right: 8px; }
.clogo.lg { width: 96px; height: 96px; border-radius: 22px; font-size: 30px; border-color: var(--line3); box-shadow: 0 0 0 6px var(--ball-dim), 0 20px 40px -18px rgba(0,0,0,.8); }
.clogo.xl { width: 120px; height: 120px; border-radius: 26px; font-size: 36px; background: rgba(var(--line-rgb),.05); }
.mteam .tn { overflow: hidden; text-overflow: ellipsis; }
.jn { display: inline-flex; min-width: 26px; height: 22px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 6px; font-family: var(--cond);
  font-weight: 800; font-size: 13px; background: rgba(var(--line-rgb),.08); color: var(--text2); margin-right: 6px; font-variant-numeric: tabular-nums; }
.posb { font-family: var(--cond); font-size: 12px; font-weight: 700; letter-spacing: .6px; color: var(--glass); }

/* форма с овертаймами */
.form .ot { opacity: .78; box-shadow: inset 0 0 0 1px currentColor; }
.cmp-v.best { color: var(--ball); }

/* герой главной: площадка */
.hero-rink { width: 100%; max-width: 520px; height: auto; justify-self: center; filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)); }
.hero-rink .ln { stroke: rgba(var(--glass-rgb),.5); stroke-width: 1.4; fill: none; }
.hero-rink rect.ln { fill: url(#rk-ice); }
.hero-rink .blue { stroke: rgba(var(--t1-rgb),.75); stroke-width: 4; }
.hero-rink .red { stroke: rgba(var(--bad-rgb),.65); stroke-width: 3; stroke-dasharray: 6 4; }
.hero-rink .goal-line { stroke: rgba(var(--bad-rgb),.5); stroke-width: 1.4; }
.hero-rink .crease { fill: rgba(var(--t1-rgb),.18); stroke: rgba(var(--bad-rgb),.55); stroke-width: 1.2; }
.hero-rink .net { fill: none; stroke: var(--text2); stroke-width: 1.4; }
.hero-rink .dotc { fill: rgba(var(--t1-rgb),.9); } .hero-rink .dotr { fill: rgba(var(--bad-rgb),.8); }
.hero-rink .trail { fill: none; stroke: var(--ball); stroke-width: 1.4; stroke-dasharray: 3 6; opacity: .5; }
.hero-rink .puck { fill: var(--text); filter: drop-shadow(0 0 6px var(--ball)); }
.hero-rink .p1 { fill: var(--t1); } .hero-rink .p2 { fill: var(--t2); }
.hero-rink .pl-dot { animation: bob 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-rink .pl-dot:nth-of-type(2n) { animation-delay: -1.3s; }
@media (prefers-reduced-motion: reduce) { .hero-rink .pl-dot { animation: none; } .hero-rink .puck { display: none; } }

/* табло игры */
.gboard { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 24px; align-items: center; padding: 30px 32px; border: 1px solid var(--line2);
  border-radius: calc(var(--r) + 6px); background: radial-gradient(600px 240px at 0% 50%, rgba(var(--t1-rgb),.12), transparent 70%),
  radial-gradient(600px 240px at 100% 50%, rgba(var(--t2-rgb),.12), transparent 70%), linear-gradient(165deg, var(--hero1), var(--hero2)); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.gboard .gb-team { display: flex; align-items: center; gap: 18px; min-width: 0; }
.gboard .gb-team.r { flex-direction: row-reverse; text-align: right; }
.gboard .gb-name { font-family: var(--cond); font-size: clamp(22px, 2.6vw, 34px); font-weight: 800; text-transform: uppercase; line-height: 1.05; letter-spacing: .5px; overflow-wrap: anywhere; }
.gboard .gb-sub { font-size: 13px; color: var(--text3); margin-top: 4px; }
.gboard .gb-score { text-align: center; }
.gboard .gb-nums { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: var(--cond); font-weight: 800; font-size: clamp(54px, 7vw, 86px); line-height: .95; font-variant-numeric: tabular-nums; }
.gboard .gb-nums .w { color: var(--ball); text-shadow: 0 0 30px var(--ball-glow); } .gboard .gb-nums .l { color: var(--text3); }
.gboard .gb-nums .sep { font-size: .55em; color: var(--text3); }
.gboard .gb-st { font-family: var(--cond); font-size: 14px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text2); margin-top: 8px; }
.gboard .gb-clock { font-family: var(--cond); font-size: 30px; font-weight: 800; color: var(--ball); font-variant-numeric: tabular-nums; }
.gboard .gb-pp { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(var(--pen-rgb, 255,123,0),.15); color: var(--pen); font-family: var(--cond); font-weight: 800; letter-spacing: 1px; font-size: 13px; }
.gboard .stripe1, .gboard .stripe2 { position: absolute; top: 0; bottom: 0; width: 5px; }
.gboard .stripe1 { left: 0; background: var(--t1); } .gboard .stripe2 { right: 0; background: var(--t2); }

/* счёт по периодам */
.ptab td, .ptab th { text-align: center; }
.ptab td:first-child, .ptab th:first-child { text-align: left; }
.ptab .tot { font-weight: 800; color: var(--ball); font-family: var(--cond); font-size: 17px; }

/* протокол голов */
.gl { display: grid; grid-template-columns: 64px 26px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); }
.gl:last-child { border-bottom: 0; }
.gl .t { font-family: var(--cond); font-weight: 700; color: var(--text3); font-variant-numeric: tabular-nums; }
.gl .who { min-width: 0; }
.gl .who b { font-weight: 700; }
.gl .ast { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl .sc { font-family: var(--cond); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.gl.t-home .sc { color: var(--t1); } .gl.t-away .sc { color: var(--t2); }
.gl .gt { font-family: var(--cond); font-size: 11px; font-weight: 800; letter-spacing: .8px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; background: rgba(var(--line-rgb),.1); color: var(--text2); }
.gl .gt.PP { background: rgba(var(--ball-rgb),.16); color: var(--ball); } .gl .gt.SH { background: rgba(var(--good-rgb),.16); color: var(--good); }
.gl .gt.EN { background: rgba(var(--violet-rgb),.16); color: var(--violet); } .gl .gt.GWG { background: rgba(var(--t2-rgb),.18); color: var(--t2); }
.ph { font-family: var(--cond); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text3); padding: 14px 6px 4px; }
.ph:first-child { padding-top: 0; }
.pen-row .sc { color: var(--pen) !important; font-size: 15px; }

/* три звезды */
.stars { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.star { text-align: center; padding: 16px 10px; border: 1px solid var(--line2); border-radius: var(--r); background: rgba(var(--line-rgb),.03); min-width: 0; }
.star .n { font-family: var(--cond); font-weight: 800; font-size: 13px; letter-spacing: 2px; color: var(--ball); }
.star .ava { margin: 8px auto; width: 56px; height: 56px; font-size: 20px; }
.star .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star .ln { font-size: 12px; color: var(--text3); }
@media (max-width: 560px) { .stars { grid-template-columns: 1fr; } .star { display: flex; gap: 12px; align-items: center; text-align: left; } .star .ava { margin: 0; } }

/* турнирная таблица */
.stand td.pos { width: 34px; font-family: var(--cond); font-weight: 800; color: var(--text3); }
.stand tr.po td.pos { color: var(--ball); }
.stand tr.cut td { border-bottom: 2px dashed rgba(var(--ball-rgb),.45); }
.stand td.pts { font-family: var(--cond); font-weight: 800; font-size: 18px; color: var(--ball); }
.stand tr.me td { background: rgba(var(--ball-rgb),.06); }

/* ход игры */
.flow .l1 { stroke: var(--t1); } .flow .l2 { stroke: var(--t2); }
.flow polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.flow .gm1 { fill: var(--t1); } .flow .gm2 { fill: var(--t2); }
.flow .pm { stroke: var(--line2); stroke-dasharray: 3 4; }

/* карточки лидеров */
.lcard .lead { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.lcard .lead .big { margin-left: auto; font-family: var(--cond); font-size: 34px; font-weight: 800; color: var(--ball); line-height: 1; font-variant-numeric: tabular-nums; }
.lcard .rest { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; }
.lcard .rest .num { font-weight: 700; color: var(--text2); }

/* столбики очков по играм */
.chart rect.bar { fill: rgba(var(--ball-rgb),.75); }
.chart rect.bar.z { fill: rgba(var(--line-rgb),.18); }
.spark { width: 160px; height: 36px; }
.spark polyline { fill: none; stroke: var(--ball); stroke-width: 1.6; }
th.sortable a { color: inherit; } th.sortable a:hover, th.on { color: var(--ball); }
.legend-i { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
.legend-i i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.home-hero .hero-rink { order: 2; }
@media (max-width: 860px) {
  .gboard { grid-template-columns: 1fr; text-align: center; padding: 24px 18px; }
  .gboard .gb-team, .gboard .gb-team.r { flex-direction: column; text-align: center; }
  .gl { grid-template-columns: 54px 22px minmax(0,1fr) auto; gap: 8px; }
}
