/* «Шахматы» (/chess). Доска и клетки — в app.css; здесь раскладка страницы,
   часы, запись ходов, просмотр партии, расстановка, дебюты и чемпионы */
.chess-wrap { display: flex; flex-wrap: wrap; gap: 20px; margin: 14px 0 0; align-items: flex-start; }
.board-col { width: min(100%, 600px); }
.board-col .board { width: 100%; }
.chess-side { flex: 1; min-width: 280px; }

.clock {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 12px; margin: 6px 0; border-radius: 10px; border: 1px solid var(--line);
  font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 700;
}
.clock.running { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.clock.low { color: var(--warn); }
.clock span { font-size: 15px; font-weight: 600; color: var(--muted); }

.sq.check { box-shadow: inset 0 0 0 100vmax #e0303060; }

.replay { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; flex-wrap: wrap; }
.replay button {
  border: 1px solid var(--line); background: var(--field); color: var(--text);
  border-radius: 10px; min-width: 42px; height: 38px; font-size: 16px; cursor: pointer;
}
.replay span { flex: 1; text-align: center; font-size: 15px; color: var(--muted); min-width: 120px; }

.c-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.c-grid select { width: 100%; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.file-btn { cursor: pointer; }
.btn:disabled { opacity: .45; }

.history-box { margin: 18px 0 0; }
.history-box h3 { font-size: 15px; color: var(--muted); margin: 0 0 6px; }
.history {
  margin: 0; padding-inline-start: 34px; max-height: 260px; overflow: auto;
  columns: 2; column-gap: 12px; font-variant-numeric: tabular-nums;
}
.history li { break-inside: avoid; padding: 1px 0; }
.history .result { list-style: none; font-weight: 700; }

.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 8px 0; max-width: 360px; }
.palette button {
  aspect-ratio: 1; border: 1px solid var(--line); background: var(--field); border-radius: 8px;
  padding: 2px; cursor: pointer; font-size: 16px; color: var(--text);
}
.palette button.on { border: 2px solid var(--accent); background: #f2d14c55; }
.palette img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

.small-sheet { max-width: 420px; }
.promo-pieces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.promo-pieces button {
  aspect-ratio: 1; border: 1px solid var(--line); background: #ede6d1; border-radius: 12px; cursor: pointer; padding: 4px;
}
.promo-pieces img { width: 100%; height: 100%; object-fit: contain; }

.op-group h3 { font-size: 15px; color: var(--muted); margin: 14px 0 6px; }
.article h2 { font-size: 19px; margin: 6px 0; }
.article h3 { font-size: 15px; color: var(--muted); margin: 14px 0 4px; }
.article p { margin: 4px 0; white-space: pre-wrap; }
.article .moves { font-variant-numeric: tabular-nums; }

/* Низкий экран (телефон лёжа): доска — по высоте экрана, рядом — столбец с
   кнопками и записью, который прокручивается сам; заголовок «Шахматы» и
   вкладки — одной строкой (30.09.2026) */
@media (max-height: 500px) and (orientation: landscape) {
  .chess-wrap { flex-wrap: nowrap; gap: 12px; margin-top: 8px; }
  .board-col { width: min(55vw, calc(100dvh - 24px)); flex: none; }
  .chess-side { min-width: 0; max-height: calc(100dvh - 24px); overflow: auto; }
  .clock { padding: 3px 8px; font-size: 15px; margin: 3px 0; }
  .chess-status { font-size: 15px; }
  .history { max-height: 120px; }
  .c-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* Узкий экран (телефон стоя): столбец под доской — ровно по ширине. Его
   min-width 280 распирал страницу: карточка кончалась раньше края, а
   подписи и «Выйти из сетевой партии» вылезали за неё (снимок 30.09.2026) */
@media (max-width: 560px) {
  .chess-wrap { gap: 10px; margin-top: 10px; }
  .board-col { width: 100%; }
  .chess-side { min-width: 0; flex: 1 1 100%; }
  .chess-side .c-buttons { gap: 6px; }
  .c-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .c-mode select { padding: 6px 8px; }
  .clock { padding: 4px 10px; font-size: 16px; }
  .chess-status { font-size: 16px; }
  .history { columns: 1; max-height: 180px; }
  .replay button { min-width: 36px; height: 34px; }
  .article p { font-size: 14px; }
}

/* ======================= ОФОРМЛЕНИЕ (30.09.2026) =======================
   Рустам: «лучший дизайн». Как в шахматных приложениях: полоски игроков у
   доски, статус плашкой, вкладки одной строкой, запись ходов парами */

/* Вкладки — одной строкой; не влезли — листаются пальцем */
.tabs.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs.scroll::-webkit-scrollbar { display: none; }
.tabs.scroll .tab { flex: none; }

/* Доска — с тенью и рамкой, как на столе */
.board { box-shadow: 0 6px 24px #0003; border-radius: 10px; }
.sq.l { background: #eeeed2; }
.sq.d { background: #769656; }
.sq.last { box-shadow: inset 0 0 0 100vmax #f6f66988; }
.sq.chosen { background: #f6f669; }
/* Подписи клеток — мелко, в углах, цветом соседней клетки */
.sq .coord { font-size: 11px; font-weight: 700; line-height: 1; position: absolute; pointer-events: none; }
.sq .coord.rank { top: 3px; inset-inline-start: 3px; bottom: auto; }
.sq .coord.file { bottom: 2px; inset-inline-end: 3px; inset-inline-start: auto; }
.sq.l .coord { color: #769656; }
.sq.d .coord { color: #eeeed2; }

/* Полоски игроков */
.player-bar {
  display: flex; align-items: center; gap: 10px; padding: 6px 4px; margin: 4px 0;
  border-radius: 10px; transition: background .2s;
}
.player-bar.turn { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.pb-face { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--line); flex: none; }
.player-bar[data-icon]:not([data-icon=""]) .pb-face { display: none; }
.player-bar[data-icon]:not([data-icon=""])::before {
  content: attr(data-icon); width: 36px; height: 36px; flex: none; border-radius: 8px;
  display: grid; place-items: center; font-size: 22px; background: var(--line);
}
.pb-name { flex: 1; min-width: 0; line-height: 1.25; }
.pb-name b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-name span { font-size: 12px; color: var(--muted); }
.pb-clock {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px;
  padding: 4px 10px; border-radius: 8px; background: var(--field); border: 1px solid var(--line);
}
.pb-clock.running { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pb-clock.low { color: #fff; background: var(--warn); border-color: var(--warn); }

/* Статус — плашкой: мой ход зелёная, ход соперника спокойная, шах — красная */
.chess-status {
  padding: 8px 12px; border-radius: 10px; background: var(--field); border: 1px solid var(--line);
  font-size: 16px;
}
.chess-status.me { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chess-status.them { color: var(--muted); }
.chess-status.check { background: var(--warn); color: #fff; border-color: var(--warn); }
.chess-status.good { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); border-color: var(--accent); }
.chess-status:empty { display: none; }

/* Запись ходов — парами «1. e4 e5» */
.history { display: flex; flex-wrap: wrap; gap: 4px 10px; columns: auto; padding: 0; list-style: none; }
.history .mv { white-space: nowrap; font-variant-numeric: tabular-nums; }
.history .mv i { color: var(--muted); font-style: normal; }
.history .result { font-weight: 700; }

/* Кнопки со значками */
#g-back::before { content: "↶ "; }
#g-flip::before { content: "⇅ "; }
#g-draw::before, #g-claim::before { content: "½ "; }
#g-resign::before, #o-resign::before { content: "⚑ "; }
#g-save::before { content: "⤓ "; }
#g-setup::before { content: "✎ "; }
#p-hint::before { content: "💡 "; }
#p-next::before { content: "→ "; }

/* Кнопки у доски — сеткой в два столбца, а не лесенкой по одной */
.chess-side .c-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chess-side .c-buttons .btn { width: 100%; text-align: center; justify-content: center; font-size: 14px; padding: 8px 8px; }
.chess-side .c-buttons .btn[hidden] { display: none; }
/* Доска с полосками игроков — не выше окна: нижняя полоска не уходит за край */
@media (min-height: 501px) and (min-width: 561px) {
  .board-col { width: min(100%, 600px, calc(100dvh - 260px)); }
}

/* ---------- Телефон стоя: главное — в экран (30.09.2026) ----------
   Рустам с Android: «задача… ничего нет… чей ход… подсказка… следующий…
   где база дебютов… партии чемпионов». С крупным шрифтом телефона полоски
   игроков и доска занимали весь экран, а статус, кнопки и списки уходили
   вниз, за край. Теперь столбцы «растворяются» (display: contents), и порядок
   задаётся по важности: чей ход — над доской, кнопки — сразу под ней, списки
   дебютов и чемпионов, пока их выбирают, — над доской (.list-first) */
@media (max-width: 560px) and (orientation: portrait) {
  .chess-wrap { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
  .board-col, .chess-side { display: contents; }
  #c-status { order: 1; margin: 0; padding: 6px 10px; font-size: 15px; }
  #bar-top { order: 2; margin: 0; }
  #board { order: 3; }
  #bar-bottom { order: 4; margin: 0; }
  #replay { order: 5; margin: 0; }
  .chess-side .c-mode { order: 6; }
  #c-info, #c-opening { order: 7; margin: 0; }
  #history-box { order: 8; margin: 6px 0 0; }
  #c-info:empty, #c-opening:empty { display: none; }
  .chess-wrap.list-first .c-mode { order: 0; }
  .player-bar { padding: 3px 4px; }
  .pb-face, .player-bar[data-icon]:not([data-icon=""])::before { width: 30px; height: 30px; }
  .pb-name b { font-size: 14px; }
}

/* ---------------- Красивее (Рустам, 30.09.2026: «и стоя и лёжа — красиво и аккуратно») ---------------- */
/* Статус: плашка во всю ширину, кружок — цвет того, чей ход */
.chess-status { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.chess-status[data-turn]:not([data-turn=""])::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 2px #0005 inset, 0 1px 3px #0006;
}
.chess-status[data-turn="w"]::before { background: #f4f1e8; }
.chess-status[data-turn="b"]::before { background: #1d1d1d; box-shadow: 0 0 0 2px #fff6 inset; }

/* Кнопки задачи: сеткой, «Следующая» — во всю ширину */
#m-puzzle .c-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#m-puzzle #p-next { grid-column: 1 / -1; }
#m-puzzle .btn { width: 100%; justify-content: center; text-align: center; }

/* Карточки дебютов и партий чемпионов */
.op-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 16px 0 8px; }
.op-group .facts { margin: -4px 0 8px; }
.c-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.c-card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: start;
  padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--field); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.c-card:hover, .c-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 16px #0003; }
.c-card-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.c-card-body b { font-size: 15px; line-height: 1.3; }
.c-card-body small { font-size: 12.5px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.c-badge {
  flex: none; min-width: 44px; padding: 4px 8px; border-radius: 8px; text-align: center;
  font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text);
}
.c-result.w { background: #f4f1e8; color: #222; }
.c-result.b { background: #1d1d1d; color: #f4f1e8; border: 1px solid #fff3; }
.c-result.d { background: #8a8a8a; color: #fff; }
.article h2 { line-height: 1.3; }
.article .moves { padding: 8px 10px; border-radius: 10px; background: var(--field); border: 1px solid var(--line); font-size: 14px; }

/* Стоя: плашки и полоски во всю ширину */
@media (max-width: 560px) and (orientation: portrait) {
  .chess-wrap { align-items: stretch; }
  .c-cards { grid-template-columns: 1fr; }
}

/* Лёжа: доска вместе с полосками игроков — целиком в экране */
@media (max-height: 500px) and (orientation: landscape) {
  .board-col { width: min(52vw, calc(100dvh - 100px)); }
  .player-bar { padding: 2px 4px; margin: 2px 0; }
  .pb-face, .player-bar[data-icon]:not([data-icon=""])::before { width: 28px; height: 28px; font-size: 18px; }
  .pb-name b { font-size: 13px; } .pb-name span { font-size: 11px; }
  .chess-side { align-self: stretch; }
  .c-cards { grid-template-columns: 1fr; }
}

/* Очень узкий экран (крупный масштаб, ~220 точек; 01.10.2026) */
.c-cards { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
@media (max-width: 300px) {
  .chess-side .c-buttons .btn, #m-puzzle .btn { font-size: 12px; padding: 7px 4px; }
  #p-hint::before { content: "💡"; }
  .c-card { padding: 8px; gap: 8px; }
  .c-badge { min-width: 36px; padding: 3px 5px; font-size: 12px; }
  .c-card-body b { font-size: 13.5px; overflow-wrap: anywhere; }
  .replay button { min-width: 30px; height: 30px; }
  .replay span { min-width: 0; font-size: 12px; }
}

/* ---------------- Полоска оценки позиции (01.10.2026) ---------------- */
.board-wrap { display: flex; gap: 6px; align-items: stretch; }
.board-wrap .board { flex: 1; min-width: 0; }
.evalbar {
  position: relative; width: 16px; flex: none; border-radius: 6px; overflow: hidden;
  background: #262626; border: 1px solid var(--line); display: flex; flex-direction: column-reverse;
}
.evalbar.flipped { flex-direction: column; }
.eval-fill { background: #f4f1e8; height: 50%; transition: height .35s ease; }
#eval-num {
  position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%) rotate(-90deg);
  font-size: 10px; font-weight: 800; color: #8a8a8a; text-align: center; white-space: nowrap; mix-blend-mode: difference;
}
.history .mv { cursor: pointer; border-radius: 6px; padding: 0 3px; }
.history .mv:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
@media (max-width: 560px) and (orientation: portrait) {
  #board-wrap { order: 3; }
  .evalbar { width: 12px; }
}
.board-col .board-wrap .board { width: auto; }

/* Живое лицо соперника с камеры — крупнее, с зелёной рамкой */
.player-bar.live .pb-face { width: 72px; height: 54px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); }
.player-bar.live[data-icon]:not([data-icon=""]) .pb-face { display: block; }
.player-bar.live[data-icon]:not([data-icon=""])::before { display: none; }

/* Без заголовка раздела: шапка карточки пустая — доска сразу сверху (01.10.2026) */
#tabs[hidden] { display: none; }
.card > .panel-head:has(> #mode-title) { display: contents; }
.card > .panel-head:has(> #mode-title) + .chess-wrap { margin-top: 0; }

/* Игроки — рамка с прокруткой, по 10 (01.10.2026) */
#o-players {
  max-height: min(520px, 60vh); overflow-y: auto; overscroll-behavior: contain;
  padding-inline-end: 4px; scrollbar-width: thin;
}
#o-players li { flex-wrap: nowrap !important; gap: 10px; padding: 6px 8px; min-height: 56px; }
#o-players li img { width: 40px; height: 40px; }
#o-players .who { flex: 1; min-width: 0; }
#o-players .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
#o-players .pl-info { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#o-players .row-buttons { flex: none; flex-basis: auto !important; }
#o-players .row-buttons .btn { padding: 6px 14px; min-height: 32px; }
@media (max-width: 560px) and (orientation: portrait) { #o-players { max-height: 60vh; } }
.o-more { text-align: center; margin: 6px 0 0; font-size: 13px; }
#o-players::-webkit-scrollbar { width: 6px; }
#o-players::-webkit-scrollbar-thumb { background: var(--md-outline-variant, var(--line)); border-radius: 3px; }

/* Дебюты и партии чемпионов — перечень в рамке с ползунком, видно около 10
   (Рустам, 01.10.2026: «справа вертикальный перечень дебютов с ползунком (10)»).
   Карточки компактнее: название и ходы — по строке */
#op-list, #ch-list {
  max-height: 680px; overflow-y: auto; overscroll-behavior: contain;
  padding-inline-end: 6px; scrollbar-width: thin;
}
#op-list::-webkit-scrollbar, #ch-list::-webkit-scrollbar { width: 6px; }
#op-list::-webkit-scrollbar-thumb, #ch-list::-webkit-scrollbar-thumb { background: var(--md-outline-variant, var(--line)); border-radius: 3px; }
#op-list .op-group h3, #ch-list .op-group h3 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 8px 2px;
  background: var(--md-surface-container-low, var(--card)); }
#op-list .c-cards, #ch-list .c-cards { grid-template-columns: 1fr; gap: 6px; }
#op-list .c-card, #ch-list .c-card { padding: 6px 10px; min-height: 56px; gap: 10px; }
#op-list .c-card-body b, #ch-list .c-card-body b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#op-list .c-card-body small, #ch-list .c-card-body small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ch-list .op-group .facts { margin: 0 0 6px; }
@media (min-height: 501px) and (min-width: 561px) {
  #op-list, #ch-list { max-height: min(680px, calc(100dvh - 200px)); }
}
@media (max-width: 560px) and (orientation: portrait) {
  #op-list, #ch-list { max-height: 62vh; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #op-list, #ch-list { max-height: calc(100dvh - 120px); }
}

/* Телефон стоя: доска шире (Рустам, 02.10.2026: «чуть-чуть пошире») — у
   карточки вокруг доски почти нет полей, страница — поуже по краям */
@media (max-width: 560px) and (orientation: portrait) {
  main { --pad: 6px; }
  #page > .card { padding: 8px 4px; border-radius: 12px; }
  .board, .board-col .board-wrap .board { border-radius: 6px; }
  .player-bar, #c-status, .chess-side .c-mode, #history-box, #c-info, #c-opening, #replay { margin-inline: 4px; }
}

/* «←» и чей ход — в верхней панели (03.10.2026) */
.bar a.back.icon-only { width: 48px; height: 48px; padding: 0; justify-content: center; flex: none; }
.bar > .chess-status { flex: 1; min-width: 0; margin: 0 6px; padding: 8px 14px; font-size: 15px; order: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar > .chess-status:empty { display: block; visibility: hidden; }
@media (max-width: 300px) { .bar > .chess-status { font-size: 12.5px; padding: 6px 8px; gap: 6px; } }
/* Порядок в панели: ← · чей ход (растягивается) · шестерёнка */
.bar a.back.icon-only { order: 0; }
.bar > #c-status { order: 1; flex: 1 1 auto; width: auto; margin: 0 6px; }
.bar .gear-wrap { order: 2; }
/* showStatus переписывает className — поэтому правила по месту, не по классу */
.bar:has(> #c-status) { flex-wrap: nowrap; justify-content: flex-start; }
.bar > #c-status { flex-wrap: nowrap; }
@media (max-width: 300px) {
  .bar > #c-status { font-size: 12px; padding: 6px 8px; margin: 0 2px; letter-spacing: 0; }
  .bar > #c-status::before { display: none !important; }
  .bar a.back.icon-only, .bar button.gear { width: 40px; height: 40px; }
}

/* «← Задачи» — раздел виден, статус рядом короче (03.10.2026) */
.bar a.back.with-section { flex: none; max-width: 42%; padding: 0 12px 0 6px; font-size: 15px; }
.bar > #c-status { font-size: 13px; padding: 7px 12px; letter-spacing: .02em; }
@media (max-width: 300px) {
  .bar a.back.with-section { font-size: 0; padding: 0; width: 40px; justify-content: center; }
  .bar a.back.with-section::before { font-size: 16px; }
}

/* Компьютер: шахматы на весь экран (Рустам, 03.10.2026). Страница во всю
   ширину окна, доска — по высоте окна, справа столбец кнопок и записи */
@media (min-width: 1000px) and (min-height: 501px) {
  main:has(#board) { max-width: none; }
  main:has(#board) .bar { border-radius: 0 0 var(--md-shape-l, 16px) var(--md-shape-l, 16px); }
  .chess-wrap { flex-wrap: nowrap; gap: 28px; justify-content: center; }
  .board-col { width: min(calc(100vw - 520px), calc(100dvh - 250px)); flex: none; }
  .chess-side { flex: 0 1 420px; min-width: 340px; max-height: calc(100dvh - 150px); overflow: auto; }
  .chess-side .c-buttons .btn { font-size: 15px; padding: 10px; }
}

/* Компьютер (04.10.2026): слева запись ходов, в середине доска, справа
   кнопки — помельче */
@media (min-width: 1000px) and (min-height: 501px) {
  .board-col { width: min(calc(100vw - 760px), calc(100dvh - 250px)); }
  .history-col { flex: 0 1 240px; min-width: 180px; align-self: stretch; max-height: calc(100dvh - 150px); overflow: auto; }
  .history-col .history-box { margin: 0; padding: 12px; border-radius: var(--md-shape-l, 16px);
    background: var(--md-surface-container, var(--field)); height: 100%; }
  .history-col .history { max-height: none; flex-direction: column; flex-wrap: nowrap; gap: 4px; font-size: 15px; }
  .chess-side { flex: 0 1 360px; min-width: 300px; }
  .chess-side .c-buttons { gap: 5px; }
  .chess-side .c-buttons .btn { font-size: 13px; padding: 6px 8px; min-height: 32px; }
  .chess-side label, .chess-side .check { font-size: 13px; }
  .chess-side select { min-height: 40px !important; font-size: 14px; padding: 6px 10px; }
  .c-grid { gap: 6px; }
}

/* Регламент сетевой партии — над поиском игроков (06.10.2026) */
.o-tc { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; font-size: 14px; }
.o-tc select { flex: 1; }
.o-tc[hidden] { display: none; }

/* Камеры сетевой партии — крупно, справа (06.10.2026) */
.o-faces { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.o-faces[hidden], .o-faces figure[hidden] { display: none; }
.o-faces figure { margin: 0; }
.o-faces img, .o-faces video { width: 100%; max-width: 360px; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 12px; background: #000; display: block; }
.o-faces video { max-width: 220px; transform: scaleX(-1); }
.o-faces figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Страна игрока у имени: флаг и код (06.10.2026) */
.pb-country { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 12px; color: var(--muted); }
.pb-country[hidden] { display: none; }
.pb-country img { width: 26px; height: 17px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.pb-country img[hidden] { display: none; }
.pb-country i { font-style: normal; font-weight: 600; letter-spacing: .5px; }
.pl-flag { width: 20px; height: 13px; object-fit: cover; border-radius: 2px; vertical-align: -2px; margin-right: 4px; }
/* Значок AIN (нейтральный спортсмен) вместо флага — круглый, флаги прямоугольные */
.pb-country img.no-flag { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; box-shadow: none; }
.pl-flag.no-flag { width: 15px; height: 15px; border-radius: 50%; object-fit: contain; }
