/* Синяя линия. Восток = синий, Запад = красный. Светлая и тёмная темы: по устройству или выбор вручную (кнопка в шапке). */
:root {
  --bg: #EDF1F6; --surface: #FFFFFF; --surface-2: #F4F7FB; --ink: #0E1A2B; --muted: #586A80; --line: #D3DCE6;
  --blue: #1D4F9F; --on-blue: #FFFFFF; --red: #C8102E; --live: #D9263F; --good: #14804A; --bad: #C0352B;
  --f-display: 'Bahnschrift', 'Arial Narrow', 'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  --f-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --ice-a: #EAF3FB; --ice-b: #B8D3E9; --ice-blue: rgba(29, 79, 159, .30); --ice-red: rgba(200, 16, 46, .24); --ice-edge: rgba(29, 79, 159, .22); --ice-haze: #FFFFFF;
  color-scheme: light dark; --top-h: 64px; --bot-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A111B; --surface: #111B29; --surface-2: #0D1621; --ink: #E7EEF6; --muted: #8FA2B8; --line: #22334A;
    --blue: #7FA8EE; --on-blue: #0A111B; --red: #FF5C70; --live: #FF5C70; --good: #4CC38A; --bad: #FF7A6E;
    --ice-a: #1F3652; --ice-b: #132338; --ice-blue: rgba(127, 168, 238, .26); --ice-red: rgba(255, 92, 112, .22); --ice-edge: rgba(127, 168, 238, .20); --ice-haze: #111B29;
    --ice-img: url('/icons/ice-dark.svg'); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0A111B; --surface: #111B29; --surface-2: #0D1621; --ink: #E7EEF6; --muted: #8FA2B8; --line: #22334A;
    --blue: #7FA8EE; --on-blue: #0A111B; --red: #FF5C70; --live: #FF5C70; --good: #4CC38A; --bad: #FF7A6E;
    --ice-a: #1F3652; --ice-b: #132338; --ice-blue: rgba(127, 168, 238, .26); --ice-red: rgba(255, 92, 112, .22); --ice-edge: rgba(127, 168, 238, .20); --ice-haze: #111B29;
    --ice-img: url('/icons/ice-dark.svg'); color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--f-body); min-height: 100vh; min-height: 100dvh;
  padding-bottom: 40px; }
h1, h2, h3, h4, p { margin: 0; }
h2 { font: 800 24px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; text-wrap: balance; }
h3 { font: 700 18px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
h4 { font: 600 12px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: var(--on-blue); padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }

/* шапка и навигация */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-left, 0px)) 0 max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding-bottom: 8px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand .ring { fill: none; stroke: var(--blue); stroke-width: 2.5; }
.brand .cl { stroke: var(--red); stroke-width: 2.5; }
.brand .dot { fill: var(--red); }
.brand b { display: block; font: 800 28px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.brand small { display: block; font: 500 12px var(--f-mono); color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.tabs { display: flex; gap: 2px; }
.tab { padding: 12px 14px; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }

.bottom { display: none; }
@media (max-width: 880px) {
  .top-in { padding-bottom: 8px; align-items: center; }
  .brand { padding-bottom: 0; }
  .brand b { font-size: 24px; }
  .tabs { display: none; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .bottom { display: grid; grid-template-columns: repeat(7, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); }
  .bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; text-decoration: none; color: var(--muted); font: 600 10px var(--f-body); letter-spacing: -.2px; border-radius: 8px; }
  .bottom svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bottom a[aria-current="page"] { color: var(--blue); }
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left, 0px)) 0 max(16px, env(safe-area-inset-right, 0px)); }
.panel { display: flex; flex-direction: column; gap: 16px; }
.banner, .demo { max-width: 1080px; margin: 12px auto 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: 500 13px/1.4 var(--f-body); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.banner, .demo { width: calc(100% - 32px); }
.banner { flex-wrap: wrap; }
.banner > span:first-child { flex: 1 1 220px; min-width: 0; }
.banner .tcell { flex-wrap: wrap; }
.demo { font: 500 12px/1.4 var(--f-mono); color: var(--muted); }

.note { font: 400 12px/1.4 var(--f-mono); color: var(--muted); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 6px; padding: 28px 16px; text-align: center; color: var(--muted); }
.err { background: var(--surface); border: 1px solid var(--bad); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.skeleton { height: 120px; border-radius: 6px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .live::before { animation: none !important; } }
.btn { appearance: none; border: 0; background: var(--blue); color: var(--on-blue); border-radius: 6px; padding: 0 16px; min-height: 44px; font: 600 14px var(--f-body); cursor: pointer; }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
.linkbtn { appearance: none; background: none; border: 0; padding: 8px 0; min-height: 36px; color: var(--blue); font: 600 13px var(--f-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* табло дня */
.board { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px 16px 22px; }
.board::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--blue) 0 22%, transparent 22% 48.5%, var(--red) 48.5% 51.5%, transparent 51.5% 78%, var(--blue) 78%); }
.board h2 { font-size: clamp(30px, 7vw, 54px); line-height: 1; }
.counts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font: 500 12px var(--f-mono); color: var(--muted); }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 1 0 58px; text-align: center; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 8px; min-height: 52px; cursor: pointer; font: 500 11px var(--f-mono); color: var(--muted); text-transform: uppercase; }
.day b { display: block; font: 700 20px/1.1 var(--f-display); color: var(--ink); }
.day[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.day[aria-pressed="true"] b { color: var(--on-blue); }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gh { display: flex; justify-content: space-between; gap: 8px; font: 500 12px var(--f-mono); color: var(--muted); }
.gh .live { color: var(--live); font-weight: 600; }
.gh .live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 6px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.trow:first-of-type { border-top: 0; }
.trow .sc { font: 800 28px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.trow.lose .sc, .trow.lose .nm { color: var(--muted); }
.trow.win .nm { font-weight: 600; }
.tcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { flex: none; position: relative; width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.logo img { width: 33px; height: 33px; object-fit: contain; opacity: 0; position: relative; }
.logo img.ok { opacity: 1; }
.logo > span { position: absolute; inset: 0; display: grid; place-items: center; }
.logo.sm { width: 28px; height: 28px; border-radius: 5px; } .logo.sm img { width: 23px; height: 23px; }
.logo.lg { width: 56px; height: 56px; border-radius: 8px; } .logo.lg img { width: 46px; height: 46px; }
.logo > span { font: 800 11px var(--f-display); color: #0E1A2B; letter-spacing: .02em; }
.logo.sm > span { font-size: 10px; } .logo.lg > span { font-size: 16px; }
.logo.E { border-color: var(--blue); } .logo.W { border-color: var(--red); }
.det { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.det table { width: 100%; border-collapse: collapse; font: 400 13px var(--f-mono); font-variant-numeric: tabular-nums; }
.det th { font-weight: 500; color: var(--muted); font-size: 11px; padding: 0 0 4px; text-align: center; }
.det th:first-child, .det td:first-child { text-align: left; }
.det td { padding: 3px 0; text-align: center; border-top: 1px solid var(--line); }
.goal { display: grid; grid-template-columns: 44px 36px minmax(0, 1fr); gap: 6px; font-size: 13px; padding: 2px 0; }
.goal .t { font: 400 12px var(--f-mono); color: var(--muted); } .goal .a { color: var(--muted); font-size: 12px; }
.goal b { font: 600 12px var(--f-mono); }

/* управление */
.bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; background: var(--surface); max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { appearance: none; background: none; border: 0; padding: 0 14px; min-height: 44px; cursor: pointer; font: 600 13px var(--f-body); color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); }
.ctrl { display: flex; flex-direction: column; gap: 4px; font: 500 12px var(--f-mono); color: var(--muted); min-width: 0; }
.ctrl select, .ctrl input { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; min-height: 44px; font: 400 16px var(--f-body); color: var(--ink); max-width: 100%; }
.legend { display: flex; gap: 14px; font: 500 12px var(--f-mono); color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--blue); vertical-align: -2px; margin-right: 5px; }
.legend i.W { border-color: var(--red); }

/* таблицы */
.sect { display: flex; flex-direction: column; gap: 8px; }
.tablewrap { overflow: auto; max-height: calc(100vh - var(--top-h) - var(--bot-h) - 24px); max-height: calc(100dvh - var(--top-h) - var(--bot-h) - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; -webkit-overflow-scrolling: touch; }
/* таблица без горизонтальной прокрутки: шапка липнет к странице под верхней панелью */
.tablewrap.pg { overflow: visible; max-height: none; }
.st thead th { position: sticky; top: 0; z-index: 3; }
.tablewrap.pg .st thead th { top: var(--top-h); }
.st thead tr:first-child th { height: 30px; }
.st thead tr:nth-child(2) th { top: 30px; }
table.st { width: 100%; border-collapse: collapse; font: 400 13px var(--f-mono); font-variant-numeric: tabular-nums; }
.st th { font: 500 11px var(--f-mono); color: var(--muted); padding: 8px 6px; text-align: right; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.st td { padding: 6px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.st tr:last-child td { border-bottom: 0; }
.st th.l, .st td.l { text-align: left; }
.st td.rk { color: var(--muted); padding-left: 12px; width: 44px; text-align: left; }
.st th:first-child { padding-left: 12px; text-align: left; }
.st td.tm { font-family: var(--f-body); font-weight: 500; font-size: 14px; }
.st td.tm .tcell { gap: 8px; }
.st td.pts { font-weight: 600; color: var(--ink); }
.st td.pos { color: var(--good); } .st td.neg { color: var(--bad); }
.st tr.in td.rk { box-shadow: inset 3px 0 0 var(--good); }
.st tr.cut td { border-bottom: 2px solid var(--red); }
.st tr.link { cursor: pointer; }
.st .ab { display: none; }
@media (max-width: 560px) { .hm { display: none; } .st .full { display: none; } .st .ab { display: inline; } .st td, .st th { padding-inline: 4px; } }

/* архив */
.arch { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 70px; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.arow:last-child { border-bottom: 0; }
.arow .tcell.r { justify-content: flex-end; }
.arow .sc { font: 800 22px/1 var(--f-display); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.arow .stt { font: 500 11px var(--f-mono); color: var(--muted); text-align: right; }
.arow .w { font-weight: 600; } .arow .l { color: var(--muted); }
@media (max-width: 560px) { .arow { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } .arow .stt { grid-column: 1 / -1; text-align: center; } .arow .nm { display: none; } }

/* игроки */
.pgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .pgrid { grid-template-columns: 320px minmax(0, 1fr); align-items: start; } .back { display: none !important; } }
@media (max-width: 859px) { .pgrid.has-detail .plist { display: none; } .pgrid:not(.has-detail) .pdetail { display: none; } }
.plist { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.tg { appearance: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; font: 600 11px var(--f-mono); color: var(--muted); min-height: 64px; }
.tg[aria-pressed="true"] { border-color: var(--blue); color: var(--ink); }
.pitems { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; max-height: 520px; overflow-y: auto; }
.pitems h4 { padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.pl { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 48px; text-decoration: none; border-bottom: 1px solid var(--line); }
.pl:last-child { border-bottom: 0; }
.pl[aria-current="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--blue); }
.pl .no { font: 800 18px/1 var(--f-display); width: 30px; color: var(--muted); flex: none; }
.pl .pn { font-weight: 600; } .pl .pm { font: 400 12px var(--f-mono); color: var(--muted); }
.pdetail { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.phead { display: flex; gap: 16px; flex-wrap: wrap; }
.photo { width: 120px; aspect-ratio: 4 / 5; flex: none; position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.photo img, .photo svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .sil { fill: var(--line); }
.photo .jn { position: absolute; right: 6px; bottom: 4px; font: 800 28px/1 var(--f-display); color: var(--ink); text-shadow: 0 0 6px var(--surface); }
.pinfo { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 220px; }
.pinfo h2 { font-size: 34px; }
.bio { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 16px; margin: 0; }
.bio dt { font: 500 11px var(--f-mono); color: var(--muted); text-transform: uppercase; }
.bio dd { margin: 0; font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.tile { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--surface-2); }
.tile b { display: block; font: 800 30px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.tile span { font: 500 11px var(--f-mono); color: var(--muted); }
.back { align-self: flex-start; }

/* чаты */
.chats { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .chats { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } .tsel { display: none !important; } }
@media (max-width: 859px) { .tlist { display: none !important; } }
.tlist { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px; max-height: 600px; overflow-y: auto; }
.tl { appearance: none; background: none; border: 0; border-radius: 4px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: 40px; cursor: pointer; text-align: left; }
.tl[aria-pressed="true"] { background: var(--surface-2); outline: 1px solid var(--line); }
.cpane { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; min-width: 0; }
.chd { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chd .meta { margin-left: auto; font: 500 12px var(--f-mono); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dotc.on { background: var(--good); }
.rules { font: 400 12px/1.4 var(--f-mono); color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.msgs { height: min(480px, 56dvh); min-height: 260px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 560px; }
.msg .who { font: 500 11px var(--f-mono); color: var(--muted); }
.msg .who b { color: var(--ink); font-weight: 600; }
.msg p { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin-top: 2px; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; }
.msg.me p { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.cform { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.cform input { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; min-height: 44px; font-size: 16px; min-width: 0; }

/* кнопка-строка архива */
.arow-wrap { border-bottom: 1px solid var(--line); }
.arow-wrap:last-child { border-bottom: 0; }
.arow-wrap .arow { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; min-height: 56px; text-decoration: none; }
.arow-wrap .arow:hover { background: var(--surface-2); }
.arow-wrap .det { padding: 0 12px 12px; border-top: 0; }
a.day { text-decoration: none; display: block; }
a.tg { text-decoration: none; }
a.tl { text-decoration: none; color: inherit; }
.st td.tm a { text-decoration: none; }

.pickbar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; }
.pickbar .nm { font-weight: 600; flex: 1; }

a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a.tcell, .pinfo a.tcell { text-decoration: none; }
@media (max-width: 480px) { .seg button { padding: 0 10px; } }

/* аккаунт */
.acct { align-self: center; margin-left: auto; max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 0 14px; min-height: 40px; display: inline-flex; align-items: center; margin-bottom: 8px; }
.acct[aria-current="page"] { border-color: var(--blue); color: var(--blue); }
@media (min-width: 881px) { .tabs { margin-left: auto; } .acct { margin-left: 0; } }
@media (max-width: 880px) { .acct { margin-bottom: 0; } }
.authbox, .acc { max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.aform { display: flex; flex-direction: column; gap: 14px; }
.aform .btn { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font: 600 13px var(--f-body); }
.inp { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; min-height: 44px; font: 400 16px var(--f-body); color: var(--ink); width: 100%; min-width: 0; }
.pw { display: flex; align-items: center; gap: 8px; }
.pw .linkbtn { flex: none; min-width: 5.5em; }
.hint { font: 400 12px/1.4 var(--f-mono); color: var(--muted); }
.ferr { color: var(--bad); font-weight: 500; min-height: 0; }
.ferr:empty { display: none; }
.okmsg { background: var(--surface); border: 1px solid var(--good); color: var(--ink); border-radius: 6px; padding: 10px 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.check label { font-size: 13px; line-height: 1.45; }
.check a { color: var(--blue); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.codes { margin: 0; padding: 14px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 6px; font: 500 18px/1.8 var(--f-mono); letter-spacing: .08em; user-select: all; overflow-x: auto; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.danger { background: var(--bad); color: #fff; align-self: flex-start; }
.cprompt { padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); color: var(--muted); }
a.btn.ghost { color: var(--blue); }
.foot { max-width: 1080px; margin: 28px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 12px/1.4 var(--f-mono); color: var(--muted); }
.foot a { color: var(--blue); }
.doc { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 14px; }
.doc h2 { font-size: 30px; } .doc h3 { margin-top: 10px; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc .todo { background: var(--surface); border: 1px dashed var(--red); border-radius: 6px; padding: 10px 14px; }
.doc mark { background: transparent; color: var(--red); font-weight: 600; }

/* логотипы: 40 px в списках, 28 px в таблицах, 88 px (64 px на телефоне) на странице матча */
.logo.xl { width: 112px; height: 112px; border-radius: 16px; } .logo.xl img { width: 96px; height: 96px; }
.logo.xl > span { font-size: 26px; }

/* страница матча */
.gboard { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 16px; margin: 4px 0 8px; }
.gside { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-width: 0; }
.gname { font: 700 17px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; overflow-wrap: anywhere; }
.gname:hover { text-decoration: underline; }
.gside.lose .gname { color: var(--muted); }
.gmid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gscore { display: flex; align-items: center; gap: 10px; font: 800 56px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.gsep { color: var(--muted); font-weight: 400; }
.gstat { font: 500 13px var(--f-mono); color: var(--muted); text-align: center; }
.gstat .live { color: var(--live); font-weight: 600; }
.gstat .live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 6px; animation: pulse 1.4s ease-in-out infinite; }
.gmeta { text-align: center; font: 500 12px var(--f-mono); color: var(--muted); }
.gactions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; margin: 4px 0 8px; }
.gdet { border-top: 0; padding-top: 0; font-size: 14px; }
@media (max-width: 560px) {
  .logo.xl { width: 76px; height: 76px; border-radius: 12px; } .logo.xl img { width: 64px; height: 64px; } .logo.xl > span { font-size: 19px; }
  .gboard { padding: 14px 8px; gap: 6px; }
  .gscore { font-size: 38px; gap: 6px; }
  .gname { font-size: 13px; }
}

/* вкладки матча, удаления, составы */
.gtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 4px; }
.gtabs a { padding: 10px 16px; text-decoration: none; font: 600 14px var(--f-display); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 3px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.gtabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }
.blk { display: flex; flex-direction: column; gap: 4px; }
.goal.pen b { color: var(--red); }
.lus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lu { display: flex; flex-direction: column; gap: 10px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.luh { display: flex; align-items: center; gap: 10px; font: 700 16px var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.coach { font-size: 13px; color: var(--muted); } .coach b { color: var(--ink); font-weight: 600; }
.lug { display: flex; flex-direction: column; gap: 4px; }
.lut { width: 100%; border-collapse: collapse; font-size: 13px; }
.lut td { padding: 4px 4px; border-top: 1px solid var(--line); vertical-align: baseline; }
.lut td.n { width: 28px; font: 500 12px var(--f-mono); color: var(--muted); text-align: right; }
.lut td.nm { overflow-wrap: anywhere; } .lut .pos { color: var(--muted); font-size: 11px; font-family: var(--f-mono); }
.lut td.st { text-align: right; font: 400 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
@media (max-width: 720px) { .lus { grid-template-columns: minmax(0, 1fr); } }
.lut td.nm { text-align: left; } .lut td.n { text-align: right; }

.fatal { position: fixed; left: 8px; right: 8px; bottom: 72px; z-index: 60; background: var(--surface); border: 1px solid var(--bad); color: var(--ink); border-radius: 8px; padding: 10px 14px; display: flex; gap: 12px; justify-content: space-between; align-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.goal .n { font: 600 12px var(--f-mono); color: var(--blue); }
.st tr.move td, .st tr.trade td { background: var(--surface-2); } .st .mv { color: var(--blue); font-weight: 700; }

/* статистика матча */
.cmps { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.cmp { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 2px 8px; align-items: baseline; }
.cmp.hd b { font: 700 13px var(--f-mono); } .cmp.hd b:last-child { text-align: right; }
.cmp .v { font: 600 14px var(--f-mono); font-variant-numeric: tabular-nums; } .cmp .v:last-of-type { text-align: right; }
.cmp .lb { text-align: center; font-size: 13px; color: var(--muted); }
.cmp .bar { grid-column: 1 / -1; display: flex; gap: 3px; height: 5px; }
.cmp .bar .a, .cmp .bar .h { flex: 1; background: var(--surface-2); border-radius: 3px; overflow: hidden; display: flex; }
.cmp .bar .a { justify-content: flex-end; } .cmp .bar i { display: block; height: 100%; background: var(--blue); } .cmp .bar .h i { background: var(--red); }
.pst { font-size: 12px; } .pst td, .pst th { padding: 5px 6px; white-space: nowrap; } .pst td.l { overflow-wrap: normal; }

/* ---- флаги, пометки голов, три звезды (v1.2) ---- */
.flag { display: inline-block; flex: none; width: 20px; height: 13px; border: 1px solid var(--line, rgba(128,128,128,.4)); border-radius: 2px; overflow: hidden; vertical-align: -2px; line-height: 0; }
.flag svg { display: block; width: 100%; height: 100%; }
.flag.lg { width: 28px; height: 19px; vertical-align: -3px; }
.flag.txt { width: auto; height: auto; padding: 0 4px; font-size: 11px; line-height: 1.4; }
.cty { display: flex; align-items: center; gap: 6px; }
.lat { margin: -4px 0 8px; color: var(--muted); font-size: 13px; }
#namesBtn { display: block; margin: 0 0 8px; padding: 0; background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; color: var(--muted); }
.gt { margin-left: 6px; padding: 1px 6px; border-radius: 8px; font-size: 12px; background: rgba(128,128,128,.18); white-space: nowrap; }
.gt.pp { background: rgba(46,160,67,.2); }
.gt.sh { background: rgba(210,153,34,.25); }
.gt.en { outline: 1px dashed rgba(128,128,128,.6); }
.stars { margin: 12px 0; padding: 12px 14px; border: 1px solid rgba(128,128,128,.3); border-radius: 12px; }
.stars h4 { margin: 0 0 8px; }
.stars ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.star { display: flex; align-items: center; gap: 10px; min-width: 0; position: relative; padding-top: 14px; }
.star .sn { position: absolute; top: 0; left: 0; font-size: 12px; color: #d4a017; letter-spacing: 1px; }
.star .sph { flex: none; width: 48px; height: 48px; border-radius: 50%; background: rgba(128,128,128,.2); overflow: hidden; }
.star .sph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.star .sw { display: flex; flex-direction: column; min-width: 0; }
.star .sw b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star .sm, .star .sl { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .stars ol { grid-template-columns: 1fr; } }

/* ---- v1.3: подсветка строк, ссылки на игроков, трансляция ---- */
.plink { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
.plink:hover, .plink:focus-visible { color: var(--blue); border-bottom-style: solid; }
.star .sw b a { color: inherit; }
@media (hover: hover) {
  .st tbody tr:hover td, .lut tr:hover td { background: rgba(60, 130, 220, .14); }
  .cmps .cmp:not(.hd):hover { background: rgba(60, 130, 220, .14); border-radius: 4px; }
  .det .goal:hover { background: rgba(60, 130, 220, .10); border-radius: 4px; }
}
.st tbody tr:focus-within td, .lut tr:focus-within td { background: rgba(60, 130, 220, .14); }
.cmp { padding: 3px 4px; }

.watch { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.watch h4 { margin: 0 0 8px; }
.watch ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.watch li > a, .watch li > span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font-size: 13px; text-decoration: none; color: var(--ink); }
.watch li > a:hover { border-color: var(--blue); color: var(--blue); }

.lvb { font: 500 12px var(--f-mono); color: var(--muted); }
.lvb.on { color: #1f9d55; }
.gboard.flash { animation: goalflash 1.2s ease-out 3; }
@keyframes goalflash { 0% { box-shadow: 0 0 0 0 rgba(224, 60, 60, .65); } 100% { box-shadow: 0 0 0 18px rgba(224, 60, 60, 0); } }
@media (prefers-reduced-motion: reduce) { .gboard.flash { animation: none; outline: 2px solid var(--red); } }
.gname .flag { display: block; margin: 0 auto 4px; }
@media (max-width: 560px) { .gname { font-size: 13px; overflow-wrap: normal; word-break: normal; hyphens: auto; } }

/* ---- почта и защита от ботов (v1.4) ---- */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- карточка игрока: статистика, фильтры карьеры (v1.4) ---- */
.pstats h5 { margin: 14px 0 6px; font: 600 13px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pstats .st td.l, .pstats .st th.l { text-align: left; }
.kd { margin-left: 6px; padding: 1px 6px; border-radius: 8px; font: 500 11px var(--f-mono); background: rgba(128, 128, 128, .18); color: var(--muted); white-space: nowrap; }
.kd.national { background: rgba(200, 16, 46, .15); }
.kd.junior { background: rgba(60, 130, 220, .15); }
.kd.farm { background: rgba(210, 153, 34, .2); }
.pstatus { margin: 0; padding: 10px 12px; border-left: 4px solid var(--muted); background: var(--surface-2); border-radius: 4px; font-size: 14px; }
.pstatus.ret { border-left-color: var(--red); }
.pstatus.out { border-left-color: #d29922; }

/* v1.5: счёт после гола, дом/гости, видео */
.goal.g4 { grid-template-columns: 44px 52px minmax(0, 1fr) auto; align-items: baseline; }
.goal b { display: flex; flex-direction: column; line-height: 1.1; }
.role { font: 500 9px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.role.home { color: var(--blue); }
.goal .sv { display: flex; gap: 8px; align-items: baseline; justify-content: flex-end; white-space: nowrap; }
.goal .sc { font: 600 13px var(--f-mono); color: var(--muted); }
.goal .sc .on { color: var(--ink); font-weight: 700; }
.goal .vid { font-size: 12px; text-decoration: none; color: var(--blue); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.goal .vid:hover { background: var(--surface-2); }
.luh .role { margin-left: 6px; }
.cmp.hd b { display: flex; flex-direction: column; align-items: center; }
.brole { display: block; font: 500 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; margin-top: 2px; }
@media (max-width: 560px) {
  .goal.g4 { grid-template-columns: 40px 44px minmax(0, 1fr); }
  .goal.g4 .sv { grid-column: 3; justify-content: flex-start; }
}

/* v1.7: номер игры и части сезона */
.gseq { display: block; margin-top: 4px; font: 500 12px var(--f-mono); color: var(--muted); text-align: center; }
.gkind { margin: 0 0 8px; font: 600 12px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; }
.atype { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 4px; font: 600 10px var(--f-mono); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.atype.t3 { color: var(--ink); border-color: var(--ink); }

/* v1.8: серия плей-офф, режим «команда», обсуждение матча */
.gseries { margin: 8px 0 0; text-align: center; font: 600 14px var(--f-body); }
.gseries .when { font-weight: 400; color: var(--muted); }
.agroup { margin: 14px 12px 4px; font: 600 12px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.arow.trow { grid-template-columns: 56px minmax(0, 1fr) auto minmax(0, 1fr); }
.trow .tdate { font: 500 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.trow .ha { display: none; }
.trow .stt { line-height: 1.4; }
.trow .sc.w { color: var(--ink); } .trow .sc.l { color: var(--muted); }
.daynav { display: inline-flex; align-items: flex-end; gap: 8px; }
.daynav[hidden] { display: none; }
@media (max-width: 560px) { .arow.trow { grid-template-columns: 54px minmax(0, 1fr) auto; } .trow .nm { display: inline; } .trow .stt { grid-column: 1 / -1; text-align: left; } .trow .ha { display: none; } }
.mstrip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scrollbar-width: thin; }
.mstrip a { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); text-decoration: none; font: 500 12px var(--f-mono); }
.mstrip a b { font: 700 13px var(--f-body); }
.mstrip a[aria-current="true"] { border-color: var(--blue); }
.mstrip .lab { font: 600 11px var(--f-mono); color: var(--muted); align-self: center; }

/* v1.9: видео матча */
.video { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.video h4 { margin: 0 0 8px; }
.vframe { aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.vframe:empty { display: none; }
.vplayer { width: 100%; height: 100%; border: 0; display: block; }
.vact { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 0; }

/* v1.10: афиша, блоки событий */
.logo.xs { width: 22px; height: 22px; border-radius: 4px; } .logo.xs img { width: 18px; height: 18px; } .logo.xs > span { font-size: 8px; }
.blk-goals, .blk-pen { padding: 10px 12px; margin: 14px 0; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; background: var(--surface); }
.blk-pen { border-left-color: var(--red); background: var(--surface); }
.blk-goals > h4, .blk-pen > h4 { margin: 0 0 4px; font: 800 15px var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.blk-goals > h4 { color: var(--blue); } .blk-pen > h4 { color: var(--red); }
.perlab { margin: 10px -4px 4px; padding: 3px 10px; width: fit-content; border-radius: 999px; font: 700 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--blue); color: var(--on-blue); }
.blk-pen .perlab { background: var(--red); color: var(--on-blue); }
.goal.g4 { grid-template-columns: 44px 78px minmax(0, 1fr) auto; }
.goal b.tm { flex-direction: row; align-items: center; gap: 6px; }
.goal b.tm .ab { display: flex; flex-direction: column; line-height: 1.1; }
.goal.pen { grid-template-columns: 44px 78px minmax(0, 1fr); align-items: center; }
@media (max-width: 560px) { .goal.g4, .goal.pen { grid-template-columns: 40px 70px minmax(0, 1fr); } .goal.g4 .sv { grid-column: 3; } }

/* афиша на общем табло */
.gboard.has-duel { grid-template-columns: minmax(110px, 1fr) minmax(0, 1.3fr) auto minmax(0, 1.3fr) minmax(110px, 1fr); align-items: center; }
.gboard .pcard { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--ink); text-decoration: none; min-width: 0; }
.gboard .pcard.empty { visibility: hidden; }
.pph { position: relative; width: 104px; height: 104px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 3px solid var(--line); display: grid; place-items: center; font: 800 26px var(--f-display); color: var(--muted); }
.pcard.away .pph { border-color: var(--red); } .pcard.home .pph { border-color: var(--blue); }
.pph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; background: var(--surface-2); }
.pph img.ok { opacity: 1; }
.pname { font: 800 15px/1.15 var(--f-display); }
.pstat { display: flex; flex-direction: column; align-items: center; gap: 1px; font: 500 11px/1.3 var(--f-mono); color: var(--muted); }
.pstat .pnote { font-style: italic; color: var(--blue); }
.pcard:hover .pname { text-decoration: underline; }
.pmode { grid-column: 1 / -1; display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.pmode button { font: 600 12px var(--f-body); padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.pmode button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
@media (max-width: 640px) {
  .gboard.has-duel { grid-template-columns: 1fr auto 1fr; grid-template-areas: "sa mid sh" "pa . ph" "pm pm pm"; row-gap: 10px; }
  .gboard.has-duel > .gside.away { grid-area: sa; } .gboard.has-duel > .gside.home { grid-area: sh; } .gboard.has-duel > .gmid { grid-area: mid; }
  .gboard.has-duel > .pcard.away { grid-area: pa; } .gboard.has-duel > .pcard.home { grid-area: ph; } .gboard.has-duel > .pmode { grid-area: pm; }
  .pph { width: 76px; height: 76px; } .pname { font-size: 14px; }
}

/* v1.12: перстни, вратарь в афише */
.rings .ringlist { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 6px 0; padding: 0; }
.rings .ringlist li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-left: 4px solid #d29922; border-radius: 8px; background: var(--surface); }
.rings .ringlist b { font: 700 14px var(--f-mono); }
.rings .ringlist span { color: var(--muted); font-size: 14px; }
.psub { font: 600 11px/1.2 var(--f-mono); color: var(--red); }

/* v1.13: вся лига по этапам */
.st.wide { min-width: 980px; }
.st.wide .tm { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.st.wide thead th.l { left: 0; z-index: 4; }
.st.wide th.grp { text-align: center; font: 700 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; border-left: 2px solid var(--line); }
.st.wide th.g-pre { color: var(--muted); } .st.wide th.g-reg { color: var(--blue); } .st.wide th.g-po { color: var(--red); }
.st.wide .gs { border-left: 2px solid var(--line); }
.st.wide td.dim { color: var(--muted); opacity: .6; }
.srtb { appearance: none; background: none; border: 0; padding: 4px 2px; cursor: pointer; font: inherit; color: inherit; }
.srtb:hover { text-decoration: underline; }
th[aria-sort="descending"] .srtb { color: var(--blue); font-weight: 800; }
th[aria-sort="descending"] .srtb::after { content: ' ▾'; }
.ctrl[hidden], .btn[hidden] { display: none; }

/* v1.14: игроки лиги, крупные логотипа */
.plbar { align-items: flex-end; margin-bottom: 8px; }
.st.wide.plt { min-width: 720px; }
.st.wide td.dim { color: var(--muted); }
.trd { margin-left: 4px; color: var(--muted); font-size: 12px; }
/* крупнее логотипы команд */
.logo.xl { width: 144px; height: 144px; border-radius: 20px; } .logo.xl img { width: 124px; height: 124px; }
.logo.lg { width: 72px; height: 72px; } .logo.lg img { width: 60px; height: 60px; }
.logo.xs { width: 30px; height: 30px; } .logo.xs img { width: 25px; height: 25px; }
.st .logo.sm, .luh .logo.sm, .tl .logo.sm { width: 38px; height: 38px; border-radius: 7px; } .st .logo.sm img, .luh .logo.sm img, .tl .logo.sm img { width: 32px; height: 32px; }
.arow .logo { width: 52px; height: 52px; } .arow .logo img { width: 44px; height: 44px; }
.logo.sm > span, .logo.xs > span { font-size: 11px; }
@media (max-width: 640px) {
  .logo.xl { width: 104px; height: 104px; } .logo.xl img { width: 88px; height: 88px; }
  .arow .logo { width: 44px; height: 44px; } .arow .logo img { width: 37px; height: 37px; }
  .goal.g4 { grid-template-columns: 40px 78px minmax(0, 1fr); }
}

/* фото игрока при наведении в составах */
.phtip { position: fixed; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 22px rgba(0,0,0,.28); pointer-events: none; }
.phtip[hidden] { display: none; }
.phtip-i { position: relative; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font: 800 20px var(--f-display); color: var(--muted); flex: none; }
.phtip-i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; }
.phtip-i img.ok { opacity: 1; }
.phtip b { font: 700 14px var(--f-display); max-width: 180px; }

/* счётчик посещений */
.vbars { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin: 12px 0; padding: 8px; background: var(--surface-2); border-radius: 8px; }
.vbars i { flex: 1 1 0; min-width: 1px; background: var(--blue); border-radius: 2px 2px 0 0; }

/* значок болельщика, выбор значка, кто онлайн */
.fanb { --fan: #5b7aa6; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--fan); border-radius: 10px; background: #fff; overflow: hidden; }
.fanb .logo { border: 0; background: transparent; width: 32px; height: 32px; }
.fanb .logo img { width: 26px; height: 26px; }
.fanb > img { width: 32px; height: 32px; border-radius: 50%; }
.fanb.xs { width: 24px; height: 24px; border-width: 2px; border-radius: 6px; }
.fanb.xs .logo { width: 18px; height: 18px; } .fanb.xs .logo img { width: 15px; height: 15px; } .fanb.xs .logo > span { font-size: 7px; }
.fanb.xs > img { width: 18px; height: 18px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg .mbody { min-width: 0; }
.msg p { border-left: 3px solid var(--fan, var(--line)); }
.msg.me { flex-direction: row-reverse; }
.msg.me p { border-left-color: var(--blue); border-right: 3px solid var(--fan, var(--blue)); }
.onl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; font: 500 12px var(--f-mono); color: var(--muted); }
.onl:empty { display: none; }
.onl .onc { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.fpick { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.fplab { font: 600 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fpg { display: flex; flex-wrap: wrap; gap: 6px; }
.fpt { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.fpt .logo { border: 0; width: 30px; height: 30px; } .fpt .logo img { width: 24px; height: 24px; }
.fpt img { border-radius: 50%; }
.fpt[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.favnow { display: flex; align-items: center; gap: 10px; }

/* новости */
.newsw { width: min(760px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.news, .newsf { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.news h3 { font: 800 20px/1.2 var(--f-display); }
.news .nmeta { font: 500 12px var(--f-mono); color: var(--muted); }
.news .nbody { white-space: pre-line; overflow-wrap: anywhere; }
.newsf input, .newsf textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); width: 100%; }

.dead { color: var(--dim, #889); font-weight: 400; margin-left: 2px; cursor: help; }

/* Лёд со стороны вратаря: вид из-за ворот вдоль площадки (разметка в icons/ice-*.svg), уходит к дальней синей и красной линиям. */
:root { --ice-img: url('/icons/ice-light.svg'); }
.game, .gboard { position: relative; isolation: isolate; overflow: hidden; perspective: 380px; perspective-origin: 50% 20%; }
.game::before, .gboard::before {
  content: ""; position: absolute; z-index: -2; left: 50%; width: 1300px; margin-left: -650px; bottom: -4px; height: 900px;
  transform-origin: 50% 100%; transform: rotateX(66deg); pointer-events: none;
  background: var(--ice-img) center / 100% 100% no-repeat;
}
.game::after, .gboard::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, var(--ice-haze) 0%, var(--ice-haze) 10%, transparent 48%, transparent 72%, color-mix(in srgb, var(--ice-haze) 45%, transparent) 100%);
}
.tn { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tpos { font: 500 11px var(--f-mono); color: var(--muted); }
.gpos { display: block; font: 500 12px/1.3 var(--f-body); color: var(--ink); text-align: center; max-width: 24ch; }
.seg.multi { display: flex; flex-wrap: wrap; align-self: flex-start; align-content: flex-start; overflow: visible; width: fit-content; }
.awards .awlist { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 6px 0; padding: 0; }
.awards .awlist li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding: 6px 12px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; background: var(--surface); cursor: help; }
.awards .awlist b { font: 600 14px var(--f-body); }
.awards .awn { font: 700 13px var(--f-mono); color: var(--blue); }
.awards .awy { flex-basis: 100%; font: 500 11px var(--f-mono); color: var(--muted); }
.awards .awa { font: 400 13px var(--f-body); color: var(--muted); }
.injs { margin: 12px 0; }
.injg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
@media (max-width: 640px) { .injg { grid-template-columns: 1fr; } }
.injc h5 { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font: 700 14px var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.injc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.injc li { font-size: 13px; line-height: 1.4; }
.injc .ist { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 4px; font: 600 11px var(--f-mono); color: #fff; background: var(--muted); }
.injc .ist.out { background: var(--bad); } .injc .ist.ir { background: #7a3b8f; } .injc .ist.dtd { background: #b7791f; }
.injc .iin { color: var(--muted); }

/* переключатель темы */
.hbtns { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; }
.thm { align-self: center; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.thm:hover { border-color: var(--blue); }
.thm svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 880px) { :root { --bot-h: 76px; } .hbtns { padding-bottom: 0; } }
@media (max-width: 880px) {
  .top-in { flex-wrap: nowrap; gap: 8px; }
  .brand { min-width: 0; gap: 8px; }
  .brand svg { width: 28px; height: 28px; }
  .brand b { font-size: 21px; white-space: nowrap; }
  .acct { max-width: 6.5em; }
}

/* Афиша матча: фото арены и портреты команд. Афиша всегда тёмная, как плакат, в обеих темах. */
.gboard {
  --ink: #E7EEF6; --muted: #B4C3D6; --line: rgba(255, 255, 255, .22); --surface: rgba(10, 17, 27, .72); --surface-2: rgba(10, 17, 27, .6);
  --blue: #8DB3F2; --red: #FF6B7E; --good: #4CC38A; --bad: #FF7A6E; color: var(--ink);
  border-color: rgba(255, 255, 255, .16); perspective: none; background: #0A111B;
}
.gboard::before {
  inset: 0; left: 0; width: auto; height: auto; margin: 0; bottom: 0; transform: none;
  background: url('/icons/arena.webp') 50% 58% / cover no-repeat;
}
.gboard::after {
  background: radial-gradient(ellipse at 50% 55%, rgba(6, 12, 20, .15) 0%, rgba(6, 12, 20, .55) 70%, rgba(6, 12, 20, .8) 100%),
    linear-gradient(to bottom, rgba(6, 12, 20, .45), rgba(6, 12, 20, .1) 40%, rgba(6, 12, 20, .6));
}
.gboard .gscore { text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.gboard .gname, .gboard .gpos, .gboard .gstat, .gboard .brole { text-shadow: 0 1px 6px rgba(0, 0, 0, .75); }
.gboard .gstat { color: #D5DFEC; } .gboard .gstat .live { color: #FF8A9A; }

/* v1.25: FAQ, обратная связь, прогнозы, значки, сводка чатов */
.newsw.wide { width: min(980px, 100%); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.faql { display: flex; flex-direction: column; gap: 8px; }
.faqi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.faqi summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; cursor: pointer; font-weight: 600; list-style: none; }
.faqi summary::-webkit-details-marker { display: none; }
.faqi summary::before { content: "+"; flex: none; width: 1em; font: 700 16px var(--f-mono); color: var(--blue); }
.faqi[open] summary::before { content: "−"; }
.faqi summary span { flex: 1; }
.faqi summary small { color: var(--muted); font: 500 11px var(--f-mono); white-space: nowrap; }
.faqi .fa { padding: 0 14px 14px 36px; display: flex; flex-direction: column; gap: 8px; }
.newsf select, .faqed select, .newsw .newsf select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); width: 100%; }
.faqed { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
.faqed input, .faqed textarea, .fbi textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); width: 100%; }
.sim { display: flex; flex-direction: column; gap: 6px; }
.fbl { display: flex; flex-direction: column; gap: 10px; }
.fbi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.fbi.fresh { border-color: var(--blue); box-shadow: inset 3px 0 0 var(--blue); }
.fbh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fbt { white-space: pre-line; overflow-wrap: anywhere; }
.fbans { background: var(--surface-2); border-left: 3px solid var(--good); border-radius: 6px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.fbans p { white-space: pre-line; overflow-wrap: anywhere; }
.chip { font: 600 11px var(--f-mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.new { color: var(--red); border-color: var(--red); } .chip.answered { color: var(--good); border-color: var(--good); }
.acct.has-news { position: relative; }
.acct.has-news::after { content: ""; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }

.pred { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.pred:empty { display: none; }
.pbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pbtns .btn[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); border-color: var(--blue); }
.pshare { display: flex; width: min(420px, 100%); height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); }
.pshare i { display: block; min-width: 2px; flex-basis: 0; } .pshare .a { background: var(--red); } .pshare .h { background: var(--blue); }
.pres { font-weight: 600; } .pres.hit { color: var(--good); } .pres.miss { color: var(--bad); }
.pgrid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pst { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.pst b { font: 800 24px/1.1 var(--f-display); } .pst span { font: 500 11px var(--f-mono); color: var(--muted); text-align: center; }
.pr-hit { color: var(--good); } .pr-miss { color: var(--bad); } .pr-open, .pr-void { color: var(--muted); }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); opacity: .55; filter: grayscale(.9); }
.bcard.got { opacity: 1; filter: none; border-color: var(--good); }
.bcard .bi { font-size: 28px; line-height: 1.2; } .bcard .bp { font: 600 11px var(--f-mono); color: var(--blue); }
.bdg { display: inline-block; margin-left: 4px; font-size: 13px; line-height: 1; cursor: help; }

.csort { margin-bottom: 4px; } .csort button { font-size: 12px; padding: 0 8px; }
.tl .cnt { margin-left: auto; display: flex; gap: 6px; font: 500 11px var(--f-mono); color: var(--muted); white-space: nowrap; }
.tl .cnt .on { color: var(--good); }
.hotg { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.hotg:empty { display: none; }
.hotg .hg { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 4px; text-decoration: none; color: inherit; font: 600 13px var(--f-mono); }
.hotg .hg:hover { background: var(--surface-2); } .hotg .m { color: var(--muted); font-weight: 500; }
/* кнопка темы не должна переносить шапку на вторую строку */
@media (min-width: 881px) { .tab { padding: 12px 11px; } .top-in { gap: 12px; } }
@media (min-width: 881px) and (max-width: 1000px) { .tab { padding: 12px 6px; font-size: 13px; } .brand b { font-size: 21px; } .brand svg { width: 28px; height: 28px; } .brand { gap: 8px; } .acct { max-width: 7em; } .top-in { gap: 6px; } }

/* v1.26: профиль участника, ник-ссылка в чате */
.msg .who a.nk { color: inherit; text-decoration: none; }
.msg .who a.nk:hover, .msg .who a.nk:focus-visible { text-decoration: underline; }
.pinfo { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; overflow-wrap: anywhere; }
.plab { min-width: 96px; color: var(--muted); font: 500 12px var(--f-mono); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.ubadges { display: flex; flex-wrap: wrap; gap: 8px; }
.ubadge { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: help; }

/* v1.26: карточки матчей дня — фото на фоне, как у афиши (тёмные в обеих темах) */
.game {
  --ink: #E7EEF6; --muted: #B4C3D6; --line: rgba(255, 255, 255, .2); --surface: rgba(10, 17, 27, .7);
  --blue: #8DB3F2; --red: #FF6B7E; --good: #4CC38A; --bad: #FF7A6E; color: var(--ink);
  border-color: rgba(255, 255, 255, .14); perspective: none; background: #0A111B; transition: border-color .15s;
}
.game::before { inset: 0; left: 0; width: auto; height: auto; margin: 0; bottom: 0; transform: none; background: url('/icons/card.webp') 74% 50% / cover no-repeat; }
.game::after { background: linear-gradient(90deg, rgba(6, 12, 20, .84) 0%, rgba(6, 12, 20, .64) 50%, rgba(6, 12, 20, .32) 100%); }
.game.st-final::after { background: linear-gradient(90deg, rgba(6, 12, 20, .93) 0%, rgba(6, 12, 20, .84) 55%, rgba(6, 12, 20, .7) 100%); }
.game.st-live { border-color: rgba(255, 107, 126, .6); box-shadow: inset 3px 0 0 var(--red); }
.game:hover, .game:focus-within { border-color: rgba(141, 179, 242, .6); }
.game .nm, .game .sc { text-shadow: 0 1px 6px rgba(0, 0, 0, .75); }
.game .gh .live { color: #FF8A9A; }

/* талисманы на афише матчей плей-офф */
.mascot { display: block; width: auto; max-width: 100%; height: clamp(150px, 26vw, 230px); object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.mascot.away { transform: rotate(-2deg); } .mascot.home { transform: rotate(2deg); }
@media (max-width: 560px) { .mascot { height: 120px; } }
