/* Турниры: общий стиль страниц управления (поверх control.css) */
main.tour { max-width: 1280px; }
.t-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
.t-head h1 { margin: 0; font: 800 28px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .01em; }
.t-head .cat { color: var(--muted); font-weight: 700; }
.t-head .grow { flex: 1; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--panel2); color: var(--muted); }
.pill.live { background: #dc2626; color: #fff; }
.pill.final { background: rgba(34, 197, 94, .15); color: var(--green); }

.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.form-row input, .form-row select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); min-width: 0; }
.form-row input[type=color] { padding: 2px; width: 48px; height: 38px; }

.mlist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mday { margin: 14px 0 2px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.mrow { display: grid; grid-template-columns: 110px 1fr auto 1fr auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.mrow .when { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.mrow .when b { color: var(--fg); font-size: 15px; }
.mrow .tm { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.mrow .tm.away { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.mrow .tm:not(.away) { justify-content: flex-end; text-align: right; } /* хозяева — вплотную к счёту, как и гости */
.mrow .tm img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.mrow .tm i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mrow .tm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .sc { font: 800 24px/1 var(--cond); text-align: center; min-width: 76px; }
.mrow .sc small { display: block; margin-top: 3px; font: 600 11px Inter, sans-serif; }
.mrow .act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 380px; }
@media (max-width: 900px) {
  .mrow { grid-template-columns: 1fr auto 1fr; }
  .mrow .when { grid-column: 1 / -1; }
  .mrow .act { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
}

.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tcard { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; }
.tcard.on { border-color: var(--accent); }
.tcard .lg { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.tcard .lg img { width: 30px; height: 30px; object-fit: contain; }
.tcard b { display: block; }
.tcard small { color: var(--muted); }

.ed { margin-top: 14px; }
.ed-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ed-img { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ed-img .img { width: 56px; height: 56px; border-radius: 10px; background: var(--panel2) center/contain no-repeat; flex: none; }
.ed-img .img.round { border-radius: 50%; background-size: cover; background-position: top; }
.plist { width: 100%; border-collapse: collapse; margin-top: 12px; }
.plist td, .plist th { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.plist th { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; }
.plist input:not([type=checkbox]):not([type=radio]) { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); }
.plist td.num { width: 64px; }
.plist td.ph { width: 56px; }
.plist .thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--panel2) top/cover no-repeat; cursor: pointer; display: grid; place-items: center; color: var(--muted); font-size: 18px; }

table.std { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.std th, table.std td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: center; }
table.std th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; }
table.std td.l, table.std th.l { text-align: left; }
table.std td.tm { display: flex; align-items: center; gap: 8px; font-weight: 700; }
table.std td.tm img { width: 24px; height: 24px; object-fit: contain; }
table.std td.tm i { width: 10px; height: 10px; border-radius: 50%; }
table.std td.b { font-weight: 800; }

.leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.ldb { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ldb h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.ldb div { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; }
.ldb div span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldb div small { color: var(--muted); }
.ldb div b { font-variant-numeric: tabular-nums; }

.links { display: flex; flex-direction: column; gap: 8px; }
.links .link { display: grid; grid-template-columns: 200px 1fr auto; gap: 8px; align-items: center; }
.links .link input { padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); font-size: 12px; }
@media (max-width: 700px) { .links .link { grid-template-columns: 1fr auto; } .links .link span { grid-column: 1 / -1; } }
.warn { color: var(--accent); font-size: 12.5px; }

/* узкий экран: в таблице оставляем главное */
@media (max-width: 560px) { table.std .opt { display: none; } table.std th, table.std td { padding: 6px 4px; } }

/* группы и сетка плей-офф */
.grp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.grp h3 { margin: 0 0 6px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.bracket { display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 10px; }
.br-col { display: flex; flex-direction: column; min-width: 220px; flex: 1; }
.br-col h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.br-col h4.third { margin-top: 18px; }
.br-col h4.third ~ .bm + .bm { margin-top: 12px; }
.br-ms { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; flex: 1; }
.bm { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; color: inherit; text-decoration: none; }
a.bm[href]:hover { border-color: var(--accent); }
.bm.live { border-color: #dc2626; }
.bm-t { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-weight: 600; font-size: 13.5px; }
.bm-t img, .bm-t i { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; flex: none; }
.bm-t i { background: var(--panel2); }
.bm-t span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-t b { font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }
.bm-t.win { font-weight: 800; }
.bm-t.win b { color: var(--accent); }
.bm-t.tbd { color: var(--muted); font-style: italic; font-weight: 500; }
.bm small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
/* телефон: поля и селекты не шире экрана */
@media (max-width: 560px) {
  .form-row label, .form-row select, .form-row input { max-width: 100%; min-width: 0 !important; }
  .form-row select { width: 100%; }
  .p-lang select, .p-hero select { max-width: 140px; }
}
@media (max-width: 560px) { .p-hero { flex-wrap: wrap; } }

/* согласие на персональные данные в форме команды */
.pdc { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 10px; font-size: 13px; line-height: 1.4; }
.pdc label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.pdc input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--accent, #ffb020); }
.pdc-n { display: block; margin: 8px 0 0 28px; width: calc(100% - 28px); max-width: 360px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: inherit; font: inherit; }
.pdc-s { margin: 6px 0 0 28px; color: var(--muted); font-size: 12px; }
.pdc-s a { color: var(--accent, #ffb020); }
.pdc.ok { border-color: rgba(34,197,94,.45); }
.pdc.need { border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,.35); }

/* форма на матч */
.kit { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.kit-h { font-weight: 700; font-size: 13px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kit-row > b { min-width: 0; flex: 1 1 100%; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-row .btn.on { outline: 2px solid var(--accent); }
.kit-sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; border: 1px solid rgba(255,255,255,.35); }
.kit .warn { margin: 0; }

/* ------------------------------------------------------------ боковое меню кабинетов (B.sideNav) */
.snav { position: fixed; left: 0; top: 0; bottom: 0; width: 232px; z-index: 30; background: #0e1118; border-right: 1px solid var(--line);
  padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; box-sizing: border-box; }
.snav-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; padding: 4px 10px; }
.snav-who { font-size: 12px; color: var(--muted); padding: 4px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; line-height: 1.35; overflow-wrap: anywhere; }
.snav-who b { color: var(--fg); display: block; font-size: 13px; }
.snav-list { display: flex; flex-direction: column; gap: 2px; }
.snav-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--fg); font: 600 14px/1.2 inherit; text-align: left; cursor: pointer; text-decoration: none; }
.snav-it i { font-style: normal; width: 20px; text-align: center; flex: none; }
.snav-it span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.snav-it .s { display: none; }
.snav-it:hover { background: rgba(255, 255, 255, .04); }
.snav-it.on { background: rgba(255, 176, 32, .14); color: var(--accent); }
.snav-it small { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--panel2); padding: 1px 7px; border-radius: 999px; }
.snav-it small:empty { display: none; }
.snav-it.ext { color: var(--muted); font-weight: 500; font-size: 13px; }
.snav-it[hidden] { display: none; }
.snav-grp { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.has-snav { padding-left: 232px; }
body.has-snav header.top .brand, body.has-snav header.top .tabs { display: none; }
body.has-snav header.top { min-height: 52px; box-sizing: border-box; }
@media (max-width: 760px) {
  body.has-snav { padding-left: 0; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-snav header.top .brand { display: flex; }
  .snav { top: auto; right: 0; width: auto; height: auto; min-height: 62px; flex-direction: row; padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
  .snav-brand, .snav-who, .snav-grp, .snav-it.ext { display: none; }
  .snav-list { flex-direction: row; gap: 0; width: 100%; justify-content: space-around; }
  .snav-it { flex-direction: column; gap: 2px; width: auto; flex: 1 1 0; min-width: 64px; padding: 6px 4px; font-size: 11px; text-align: center; justify-content: center; }
  .snav-it i { font-size: 19px; width: auto; }
  .snav-it span { max-width: 100%; white-space: nowrap; line-height: 1.35; padding-bottom: 1px; }
  .snav-it .l { display: none; } .snav-it .s { display: block; }
  .snav-it small { display: none; }
}
body.has-snav [data-sec][hidden] { display: none !important; }

.tcard-w { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tcard-w .tcard { width: 100%; }
.tcard-link { border: 0; background: rgba(255, 176, 32, .12); color: var(--accent); border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; text-align: center; }
.tcard-link:hover { background: rgba(255, 176, 32, .22); }

/* команды этого возраста из других турниров */
.catbox { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin: 0 0 14px; background: rgba(255, 176, 32, .04); }
.cat-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.cat-h .hint { margin: 0; font-size: 12.5px; }
.cat-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 6px; }
.cat-i { display: flex; align-items: center; gap: 10px; background: var(--panel2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.cat-i .lg { width: 34px; height: 34px; border-radius: 8px; flex: none; display: grid; place-items: center; overflow: hidden; }
.cat-i .lg img { width: 100%; height: 100%; object-fit: contain; }
.cat-i .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cat-i .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-i .nm small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-i .nm b em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 12px; }
.cat-i .nm .here { color: var(--accent); }
.catdlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; padding: 0; }
.catdlg::backdrop { background: rgba(0, 0, 0, .6); }
.catdlg form { display: flex; flex-direction: column; gap: 10px; padding: 16px; max-height: calc(100vh - 34px); box-sizing: border-box; }
.catdlg h3 { margin: 0; font-size: 18px; }
.catdlg h3 small { color: var(--muted); font-weight: 600; font-size: 13px; }
.catdlg .hint { margin: 0; }
.cd-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cd-list { overflow: auto; flex: 1; min-height: 120px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; align-content: start; }
.cd-p { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel2); border-radius: 9px; cursor: pointer; min-width: 0; }
.cd-p input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.cd-p .ph { width: 30px; height: 30px; border-radius: 50%; background: #2a3142 center / cover no-repeat; flex: none; }
.cd-p b { width: 24px; text-align: center; font-variant-numeric: tabular-nums; flex: none; }
.cd-p .pn { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 14px; }
.cd-p .pn small { color: var(--muted); font-size: 11px; }
.cd-p.busy { opacity: .6; }
.cd-p.busy .pn small { color: var(--accent); }
.cd-foot { display: flex; justify-content: flex-end; gap: 8px; }

/* имя игрока — ссылка на его страницу */
.plink { color: inherit; text-decoration: none; }
.plink:hover { color: var(--accent); text-decoration: underline; }

/* партнёры турнира внизу публичных страниц */
.partners { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin: 28px 0 6px; padding: 16px; border-top: 1px solid var(--line); }
.partners span { width: 100%; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.partners img { height: 54px; max-width: 170px; object-fit: contain; background: #fff; border-radius: 10px; padding: 6px 12px; }
/* донаты на странице матча */
.dnp { display: flex; gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 14px 16px; margin: 16px 0; flex-wrap: wrap; }
.dnp .dn-rows { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dnp h3 { margin: 0; font-size: 17px; } .dnp h3 small { color: var(--muted); font-weight: 600; }
.dnp .dn-r { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dnp .dn-r small { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; min-width: 110px; }
.dnp .dn-r b { font-size: 18px; font-variant-numeric: tabular-nums; }
.dnp .dn-banks { display: flex; flex-wrap: wrap; gap: 5px; }
.dnp .dn-qr svg { width: 130px; height: 130px; background: #fff; border-radius: 10px; display: block; }
.bank { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.bank.img { background: #fff; color: #222; } .bank.img img { height: 18px; max-width: 70px; object-fit: contain; } .bank.img i { font-style: normal; }

/* статистика матча на странице матча */
.cmp { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 16px 0; }
.cmp-h { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 8px; }
.cmp-h span { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cmp-h b:last-child { text-align: right; }
.cmp-r { display: grid; grid-template-columns: 84px 1fr minmax(120px, 190px) 1fr 84px; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cmp-r .v { font-weight: 700; } .cmp-r .v.r { text-align: right; } .cmp-r .v.w { color: var(--fg); } .cmp-r .v:not(.w) { color: var(--muted); }
.cmp-r .v small { font-size: 11px; color: var(--muted); font-weight: 600; }
.cmp-r .l { text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cmp-r .cb { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; display: flex; }
.cmp-r .cb.h { justify-content: flex-end; } .cmp-r .cb.h i { background: var(--hc); } .cmp-r .cb.a i { background: var(--ac); }
.cmp-r .cb i { display: block; height: 100%; border-radius: 3px; }
.cmp-n { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
@media (max-width: 560px) { .cmp-r { grid-template-columns: 62px 1fr 110px 1fr 62px; gap: 6px; } .cmp-r .l { font-size: 11px; } .cmp-r .v small { display: block; } }
/* комментаторы: список профилей */
.cm-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel2); }
.cm-row.open { border-color: var(--accent); }
.cm-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-ed { margin-top: 12px; }

/* сбор на странице матча */
.dnp .dn-goal { margin: 10px 0 4px; }
.dnp .gl-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.dnp .gl-top span { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dnp .gl-bar { height: 10px; margin-top: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.dnp .gl-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); min-width: 10px; }

/* перекрёстная таблица («шахматка») под таблицей турнира */
.xt-panel { margin-top: 10px; padding: 0; }
details.xt > summary { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: 8px; user-select: none; }
details.xt > summary::-webkit-details-marker { display: none; }
details.xt > summary::before { content: '▸'; transition: transform .2s; display: inline-block; }
details.xt[open] > summary::before { transform: rotate(90deg); }
.grp details.xt { margin: 8px -4px 0; border-top: 1px solid var(--line); }
.grp details.xt > summary { padding: 10px 4px 4px; }
details.xt .tbl-wrap { margin: 0; padding: 0 12px 14px; }
table.xtab { border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13.5px; min-width: 100%; }
table.xtab th, table.xtab td { border: 1px solid var(--line); padding: 5px 6px; text-align: center; vertical-align: middle; }
table.xtab th { color: var(--muted); font-size: 11.5px; font-weight: 700; }
table.xtab th.l, table.xtab td.l { text-align: left; }
table.xtab td.tm { white-space: nowrap; font-weight: 700; }
table.xtab td.tm > * { vertical-align: middle; }
table.xtab td.tm img, table.xtab td.tm .xb { width: 26px; height: 26px; margin-right: 8px; }
table.xtab td.tm img { object-fit: contain; }
table.xtab .xb { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); flex: none; }
table.xtab .xh { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; color: var(--fg, #fff); font-size: 12px; letter-spacing: .03em; }
table.xtab .xh img, table.xtab .xh .xb { width: 32px; height: 32px; }
table.xtab .xh img { object-fit: contain; }
table.xtab .xh .xb { font-size: 15px; }
table.xtab td.self { background: repeating-linear-gradient(45deg, transparent 0 5px, var(--line) 5px 6px); }
table.xtab .xs { display: block; padding: 2px 4px; border-radius: 5px; font-weight: 800; color: inherit; text-decoration: none; white-space: nowrap; }
table.xtab .xs + .xs { margin-top: 3px; }
table.xtab .xs.w { background: rgba(34, 197, 94, .18); color: #4ade80; }
table.xtab .xs.l { background: rgba(239, 68, 68, .16); color: #f87171; }
table.xtab .xs.d { background: rgba(148, 163, 184, .16); }
/* идущий матч — цветом акцента турнира, чтобы не путать с красным «поражением» */
table.xtab .xs.live { background: rgba(255, 176, 32, .14); background: color-mix(in srgb, var(--accent) 16%, transparent); color: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
table.xtab .xs.live small { display: block; margin-top: 1px; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--accent); animation: xtlive 1.4s ease-in-out infinite; }
@keyframes xtlive { 50% { opacity: .45; } }
table.xtab .xs.sched { color: var(--muted); font-weight: 700; font-size: 12.5px; background: rgba(148, 163, 184, .08); }
table.xtab .xs.sched small { display: block; font-size: 11px; font-weight: 600; opacity: .85; }
table.xtab .xs sup { font-size: 9.5px; margin-left: 2px; }
table.xtab a.xs:hover { outline: 1px solid currentColor; }

/* единоборства: категории — призёры и сетка */
.wcat { margin-top: 12px; }
.wcat-h { display: flex; align-items: baseline; gap: 10px; }
.wcat-h h3 { margin: 0; font-size: 18px; }
.wcat-h small { color: var(--muted); }
.medals { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 10px; font-weight: 700; }
.md { display: flex; align-items: center; gap: 6px; }
.md-n { display: inline-flex; align-items: center; gap: 6px; }
.md-n img { width: 20px; height: 20px; object-fit: contain; }
.md-n i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.mat-links { display: grid; gap: 8px; }
.mat-links .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wcat-kg { margin: -2px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.wcat-kg b { color: var(--fg); font-weight: 600; white-space: nowrap; }
.grp-assign .kg { width: 70px; padding: 5px 8px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); color: var(--fg); font: inherit; }
#wcatBox .grp-assign { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grp-assign .over { color: #ef4444; font-size: 12px; font-weight: 700; }

/* подсказки зрителей (родителей) по хайлайтам: метка и блок «проверьте поправки» */
.pill.warn { background: #fbbf24; color: #111; text-decoration: none; }
a.pill.warn:hover { filter: brightness(1.08); }
.hl-sug-note { border: 1px solid rgba(251, 191, 36, .55); background: rgba(251, 191, 36, .08); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.hl-sug-note .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* страница матча: статистика и донаты в один ряд (компьютер); донаты — узкая карточка справа */
.cd-row { display: block; }
.cd-row.with-dn { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 14px; align-items: start; } /* те же колонки, что «видео + ход игры» */
.cd-row.with-dn #cmpBox:empty { display: none; }
.cd-row.with-dn #cmpBox:empty + #dnBox { grid-column: 1 / -1; }
.dnp.dn-side { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin: 16px 0; }
.dnp.dn-side .dn-banks { display: flex; flex-wrap: wrap; gap: 5px; }
.dnp.dn-side h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.dnp.dn-side .dn-r { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.dnp.dn-side .dn-r small { min-width: 0; font-size: 11px; }
.dn-num { background: none; border: 0; padding: 0; color: var(--fg); font: 800 17px Inter, sans-serif; font-variant-numeric: tabular-nums; cursor: pointer; text-align: left; }
.dn-num i { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.dn-num:hover, .dn-num:hover i { color: var(--accent); }
.dn-tip { color: var(--muted); font-size: 11.5px; }
.dn-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.dnp.dn-side .dn-qr svg { width: 92px; height: 92px; border-radius: 8px; }
.dnp.dn-side .dn-qr { flex: none; display: block; line-height: 0; }
/* полосы статистики — тоньше и мягче */
.cmp-r .cb { height: 4px; }
.cmp-r .cb i { opacity: .75; }
.cmp-r { grid-template-columns: 74px 1fr minmax(110px, 170px) 1fr 74px; padding: 4px 0; }
/* телефон: донаты — строка под видео, детали по нажатию; на компьютере — карточка у статистики */
.dn-mob { display: none; }
@media (max-width: 980px) {
  .dn-mob { display: block; }
  #dnBox { display: none; }
  .cd-row.with-dn { display: block; }
  .dnm { margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 8px 10px; }
  .dnm-h { display: flex; align-items: center; gap: 8px; }
  .dnm-t { flex: 1; min-width: 0; background: none; border: 0; padding: 4px 0; color: var(--fg); font: 700 14px Inter, sans-serif; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dnm-t small { color: var(--muted); font-weight: 600; }
  .dnm-t i { font-style: normal; color: var(--muted); display: inline-block; transition: transform .2s; }
  .dnm.open .dnm-t i { transform: rotate(180deg); }
  .dnm-b { display: none; padding: 8px 2px 4px; flex-direction: column; gap: 8px; }
  .dnm.open .dnm-b { display: flex; }
  .dnm .dn-r { display: flex; flex-direction: column; gap: 2px; }
  .dnm .dn-r small { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; }
  .dnm .dn-banks { display: flex; flex-wrap: wrap; gap: 5px; }
  .dnm .dn-goal { margin: 4px 0; } .dnm .gl-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .dnm .gl-top span { color: var(--muted); }
  .dnm .gl-bar { height: 8px; margin-top: 5px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; } .dnm .gl-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); min-width: 8px; }
}
/* статистика и донаты — одной высоты: нижние края на одной линии; «Перевести» и QR прижаты к низу карточки */
.cd-row.with-dn { align-items: stretch; }
.cd-row.with-dn > div { display: flex; flex-direction: column; }
.cd-row.with-dn .cmp, .cd-row.with-dn .dnp { flex: 1; }
.dnp.dn-side .dn-go { margin-top: auto; padding-top: 6px; }
.dnm-h .btn { flex: none; white-space: nowrap; }
/* импорт с сайта федерации */
.ib-note { border: 1px solid rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .07); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.ib-note .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ib-list { overflow: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.ib-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(150px, 220px); gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.ib-row .lg { width: 34px; height: 34px; border-radius: 8px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.ib-row .lg img { width: 100%; height: 100%; object-fit: contain; }
.ib-row .nm b { display: block; } .ib-row .nm small { color: var(--muted); }
.ib-row select { min-width: 0; }
@media (max-width: 560px) { .ib-row { grid-template-columns: 34px minmax(0, 1fr); } .ib-row select { grid-column: 1 / -1; } }
/* матчи турнира: ближайшие / завершённые */
.m-tabs { display: inline-flex; gap: 4px; margin: 22px 0 0; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.m-tabs button { font: 800 15px var(--cond, inherit); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: none; border: 0; border-radius: 9px; padding: 9px 16px; cursor: pointer; }
.m-tabs button small { font: 700 12px Inter, sans-serif; opacity: .7; margin-left: 4px; }
.m-tabs button.on { background: var(--accent, #ffb020); color: #111; }
.m-tabs button:disabled { opacity: .35; cursor: default; }
/* публичная страница турнира: разделы и статистика игроков */
.p-tabs { display: flex; gap: 6px; margin: 22px 0 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.p-tabs button { font: 800 18px var(--cond, inherit); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px 9px; cursor: pointer; white-space: nowrap; }
.p-tabs button.on { color: var(--fg); border-bottom-color: var(--accent, #ffb020); }
.s-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.s-head .s-mode { margin: 18px 0 0; }
/* «всего / за игру» на вкладке статистики — закреплён наверху при прокрутке */
.s-stick { position: sticky; top: 0; z-index: 15; margin: 6px 0 0; padding: 8px 0; background: var(--bg); }
.s-stick .m-tabs { margin: 0; }
.s-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.s-bar select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); color: var(--fg); font: inherit; max-width: 100%; }
.s-bar .hint { margin: 0; }
table.pstat th button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; white-space: nowrap; }
table.pstat th.on { color: var(--accent, #ffb020); }
table.pstat td.l, table.pstat th.l { position: sticky; left: 0; background: var(--panel); z-index: 1; text-align: left; }
table.pstat .pn { display: flex; align-items: center; gap: 8px; min-width: 170px; }
table.pstat .pn img, table.pstat .pn i { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; background: var(--panel2); display: inline-block; }
table.pstat .pn span { display: flex; flex-direction: column; line-height: 1.2; }
table.pstat .pn small { color: var(--muted); font-size: 11.5px; }
table.pstat td.b { font-weight: 800; }
/* таблицы на телефоне: короткие названия команд, закреплены шапка и колонки «#» и «Команда» */
.nm-short { display: none; }
@media (max-width: 700px) {
  table.std td.tm .nm-short, table.xtab td.tm .nm-short { display: inline; }
  table.std td.tm .nm-full:has(+ .nm-short), table.xtab td.tm .nm-full:has(+ .nm-short) { display: none; }
  .tbl-wrap:has(> table.std:not(.pstat):not(.tstat)), .tbl-wrap:has(> table.xtab) { max-height: 72vh; overflow: auto; }
  table.std:not(.pstat):not(.tstat) th, table.xtab th { position: sticky; top: 0; z-index: 2; background: var(--panel); }
  table.std:not(.pstat):not(.tstat) tr > :first-child, table.xtab tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); width: 26px; min-width: 26px; padding-left: 4px; padding-right: 4px; box-shadow: -6px 0 0 var(--panel); }
  table.std:not(.pstat):not(.tstat) tr > :nth-child(2), table.xtab tr > :nth-child(2) { position: sticky; left: 26px; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
  table.std:not(.pstat):not(.tstat) tr:first-child > :first-child, table.std:not(.pstat):not(.tstat) tr:first-child > :nth-child(2), table.xtab tr:first-child > :first-child, table.xtab tr:first-child > :nth-child(2) { z-index: 3; }
  table.xtab td.tm img, table.xtab td.tm .xb { width: 22px; height: 22px; margin-right: 6px; }
  table.xtab, table.std:not(.pstat):not(.tstat) { border-collapse: separate; border-spacing: 0; } /* слитные рамки у закреплённых клеток просвечивают */
  table.xtab th, table.xtab td { border-width: 0 1px 1px 0; }
  details.xt .tbl-wrap { padding: 0; margin: 0 0 12px; } /* без отступа: под закреплённой колонкой не просвечивают клетки */
  table.pstat th { position: sticky; top: 0; z-index: 2; background: var(--panel); }
  table.pstat th.l { z-index: 3; }
  .tbl-wrap:has(> table.pstat) { max-height: 75vh; overflow: auto; }
}
/* фильтр матчей по команде (публичная страница турнира, страница организатора, админка) */
.m-team { display: block; margin: 18px 0 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 700 14px Inter, sans-serif; max-width: 100%; }
.hlv-box { margin: -4px 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 13px; }
.hlv-box table { margin-top: 6px; border-collapse: collapse; } .hlv-box td { padding: 3px 14px 3px 0; color: var(--muted); } .hlv-box td:first-child { color: var(--fg); }
/* этапы сезона (загрузка с сайта РФБ): заголовки дивизионов и этапов, пары плей-офф */
.stg-h { margin: 18px 0 8px; }
.stg-l0 { font-size: 18px; }
.stg-l1 { font-size: 15px; color: var(--muted, #9aa3b2); }
.stg-l2, .stg-l3 { font-size: 13px; color: var(--muted, #9aa3b2); text-transform: uppercase; letter-spacing: .06em; }
.po-pairs { display: flex; flex-direction: column; gap: 6px; }
.po-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; font-size: 13px; }
.po-pair small { grid-column: 1 / -1; opacity: .7; }
.po-pair span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.po-pair span:last-child { justify-content: flex-end; text-align: right; }
.po-pair span img, .po-pair span i { width: 20px; height: 20px; object-fit: contain; border-radius: 50%; flex: none; }
.po-pair .po-w { font-weight: 800; }
a.po-pair { color: inherit; text-decoration: none; border-radius: 8px; margin: 0 -6px; padding: 4px 6px; }
a.po-pair:hover { background: var(--panel2, rgba(255,255,255,.06)); }
.m-stage { max-width: 100%; }
/* рейтинговая (итоговая) таблица Кубка Феникса: разделы одной панели */
.grp.rt { margin-top: 14px; }
.grp.rt .rt-h { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #9aa3b2); }
.grp.rt tr.me td { background: rgba(255, 176, 32, .12); }

/* «⋯ Ещё» в карточке матча: редкое — по группам */
.mrow .more summary { font-size: 13px; letter-spacing: 0; padding-left: 10px; padding-right: 10px; }
.mrow .more-pop { min-width: 270px; max-width: min(340px, 90vw); }
.mrow .more-pop .mh { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 -2px; }
.mrow .more-pop .mh:first-child { margin-top: 0; }
.mrow .more-pop select { width: 100%; }

/* кабинет: «+ Новый турнир» — кнопкой, форма раскрывается по нажатию */
.nt-bar { margin: 0 0 14px; }
/* ссылка, которая на компьютере есть в левом меню: в шапке — только на телефоне (там в нижней панели ссылок нет) */
body.has-snav .top-right .side-dup { display: none; }
.mmore .more-pop > .mm-x { display: none; }
@media (max-width: 760px) {
  body.has-snav .top-right .side-dup:not([hidden]) { display: inline-flex; }
  /* «⋯» у карточек: на телефоне — панелью снизу во всю ширину, над нижним меню (иначе уезжает за край экрана) */
  .mmore .more-pop, .mrow .more-pop { position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 45;
    min-width: 0; max-width: none; max-height: 65vh; overflow-y: auto; box-shadow: 0 -8px 40px rgba(0,0,0,.6); }
  /* крестик «закрыть» — справа вверху, не уезжает при прокрутке меню */
  .mmore .more-pop > .mm-x { display: flex; position: sticky; top: -10px; align-self: flex-end; z-index: 2; flex: none; margin: -4px -4px -6px 0;
    width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line);
    background: var(--panel2); color: var(--fg); font-size: 18px; cursor: pointer; }
}
/* админка: группы матчей «Идут сейчас / Предстоящие / Сыгранные» */
.msec { margin: 22px 0 0; font: 800 15px/1.2 var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.msec:first-of-type { margin-top: 8px; }
