/* Базовые стили по макетам docs/mockups (стиль kazan.run) */
:root {
  color-scheme: light;
  --navy: #232357;
  --navy-stripe: #2C2D6B;
  --gold: #EDC168;
  --gold-hover: #E0AE4B;
  --link: #3A3BA8;
  --bg: #F4F4F4;
  --text: #0A0A0B;
  --muted: #525252;
  --border: #E4E4E4;
  --live: #EC602F;
  --field-border: #8C8C99; /* рамка полей ввода: 3,3:1 к белому, поле видно на ярком экране */
  --live-text: #C2410C; /* live-цвет для текста и мелких плашек: 5,2:1 к белому (сам #EC602F только 3,3:1) */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Golos Text', sans-serif; font-size: 15px; line-height: 1.45; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
a { color: var(--link); }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--navy); } }
h1, h2, h3, .brand { font-family: 'Unbounded', sans-serif; text-transform: uppercase; letter-spacing: 0.01em; }
/* длинные названия переносятся ровно, без одного слова на последней строке */
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(20px, 2.3vw, 28px); line-height: 1.2; font-weight: 800; margin: 0; }
h2 { font-size: clamp(15px, 1.5vw, 18px); font-weight: 700; margin: 0; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 24px; }

.site-header { color: #fff; background: linear-gradient(115deg, var(--navy) 0%, var(--navy) 38%, var(--navy-stripe) 38%, var(--navy-stripe) 52%, var(--navy) 52%, var(--navy) 74%, var(--navy-stripe) 74%, var(--navy-stripe) 84%, var(--navy) 84%); }
.site-header .wrap { min-height: 60px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.site-header .left { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand { font-size: 16px; font-weight: 800; letter-spacing: 0.02em; color: #fff; text-decoration: none; }
.brand span { font-weight: 400; color: #b9bdc4; }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; flex-wrap: wrap; }
.site-nav a { color: #d6d9de; text-decoration: none; }
.site-nav a.active { color: #fff; }
@media (hover: hover) and (pointer: fine) { .site-nav a:hover { color: #fff; } }
.site-nav a.active { font-weight: 600; }

main { flex: 1; width: 100%; padding-top: 24px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }

.card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 20px 24px; }
.btn { white-space: nowrap; font: inherit; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 10px; padding: 0 20px; min-height: 44px; cursor: pointer; border: 1px solid #CFCFCF; background: #fff; color: var(--text); display: inline-flex; align-items: center; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .btn:hover { border-color: var(--navy); color: var(--navy); } }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); } }
.badge { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #EDEDF7; color: var(--navy); white-space: nowrap; }
.badge.done { background: #EAEAEA; color: var(--muted); }
.live { color: var(--live-text); font-weight: 700; }

.comp-list { display: flex; flex-direction: column; gap: 12px; }
.comp { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.comp-info { display: flex; flex-direction: column; gap: 4px; flex: 1 1 420px; min-width: 0; }
.comp-meta { font-size: 14px; color: #3a3a3a; }
.comp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 13px; color: #3a3a3a; }

.site-footer { background: var(--navy); color: #b9bdc4; font-size: 13px; }
.site-footer .wrap { min-height: 64px; padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.site-footer a { color: #d6d9de; }
.site-footer .footer-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.site-footer a.report-bug { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #EDC168; color: #232357; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-footer a.report-bug:hover { background: #f3d08a; }
.site-footer .site-version { font-size: 12px; opacity: .8; }
.site-footer .footer-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.site-footer .dev-logo { display: block; height: 40px; width: auto; opacity: .9; }
.site-footer .dev-logo-link { display: block; }
.site-footer .dev-logo-link:hover .dev-logo, .site-footer .dev-logo-link:focus-visible .dev-logo { opacity: 1; }
@media (max-width: 900px) {
  .site-footer .wrap { flex-wrap: nowrap; padding-top: 16px; padding-bottom: 16px; }
  .site-footer .footer-left { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-footer .footer-right { flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .comp-side { align-items: flex-start; }
}

/* --- общие элементы --- */
.inline { display: inline; margin: 0; }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: #d6d9de; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .linklike:hover { color: #fff; } }
.who { color: #b9bdc4; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.flash { border-radius: 12px; padding: 12px 16px; background: #EDEDF7; color: var(--navy); }
.flash.error { background: #FDECEA; color: #8f1c13; }
.flash.success { background: #E7F4EC; color: #1d6b3a; }
.field { font: inherit; font-size: 14px; min-height: 40px; border: 1px solid var(--field-border); border-radius: 8px; padding: 0 12px; background: #fff; color: var(--text); }
.field:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
label.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.btn.small { min-height: 36px; padding: 0 12px; }
.btn:disabled { background: #EAEAEA; border-color: #EAEAEA; color: #6b7078; cursor: not-allowed; }
.badge.open { background: #D9F0E1; color: #17632f; }
.badge.closed { background: #FDE3E0; color: #b3261e; }
.badge.running { background: #E4E6FB; color: var(--link); }
.badge.err { background: #FDECEA; color: #8f1c13; }
.badge.warn { background: #FFF4D6; color: #7a5300; }
.badge.ok { background: #E7F4EC; color: #1d6b3a; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: 14px; }
.tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid #EAEAEA; }
table.list td { padding: 8px 10px; border-top: 1px solid #EFEFF2; vertical-align: middle; }
.table-scroll { overflow-x: auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* --- конструктор заявки --- */
.builder { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.builder .pool { flex: 1 1 340px; min-width: 0; padding: 0; }
.builder .sheet { flex: 2.4 1 600px; min-width: 0; padding: 0; }
.pool-head { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid #EAEAEA; }
.pool-list { max-height: 75vh; overflow-y: auto; }
.ath { padding: 12px 16px; border-top: 1px solid #EFEFF2; display: flex; flex-direction: column; gap: 10px; }
.ath.off { opacity: .55; }
.ath-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ath-name { font-weight: 600; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 13px; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid #CFCFCF; background: #fff; color: var(--text); cursor: pointer; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--link); } }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.off { background: #eeefec; border-style: dashed; color: #525252; cursor: not-allowed; border-radius: 16px; }
.chip .why { font-size: 12px; color: #525252; }
.chip.on .why { color: #d6d9de; }
/* Высоты сетки в вводе результатов: чип с числом и крестиком удаления */
.hj-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 6px 4px 14px; border-radius: 999px; border: 1px solid #CFCFCF; background: #fff; }
.hj-chip .mono { font-size: 15px; }
.hj-x { width: 32px; height: 32px; border-radius: 50%; border: none; background: #F0F0F5; color: #525252; font-size: 16px; line-height: 1; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .hj-x:hover { background: #b42318; color: #fff; } }
.counters { display: flex; gap: 24px; padding: 16px 20px; border-bottom: 1px solid #EAEAEA; flex-wrap: wrap; }
.counter .n { font-family: 'IBM Plex Mono', monospace; font-size: 24px; font-weight: 600; }
.counter .n.bad { color: #b42318; }
.limits { padding: 12px 20px; border-bottom: 1px solid #EAEAEA; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.limit { display: inline-flex; gap: 4px; padding: 4px 10px; border-radius: 999px; background: #F1F1F6; }
.limit.full { background: var(--navy); color: #fff; }
.erow { display: grid; grid-template-columns: 1.6fr 1.3fr 1.1fr 1.1fr 1.4fr 36px; gap: 10px; align-items: start; padding: 10px 16px; border-top: 1px solid #EAEAEA; font-size: 14px; }
.erow.head { font-size: 12px; color: var(--muted); font-weight: 600; border-top: 0; }
.erow.inactive { opacity: .5; text-decoration: line-through; }
.erow .field { width: 100%; }
.issue { font-size: 12px; line-height: 1.3; }
.issue.error { color: #b42318; font-weight: 600; }
.issue.warning { color: #7a5300; }
.issue.ok { color: #1d6b3a; }
.x { font: inherit; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
@media (hover: hover) and (pointer: fine) { .x:hover { border-color: #CFCFCF; color: #b42318; } }
.sheet-foot { padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; align-items: center; border-top: 1px solid #EAEAEA; }
@media (max-width: 900px) {
  .erow { grid-template-columns: 1fr 1fr; }
  .erow.head { display: none; }
}
.field.bad { border-color: #b42318; background: #FFF5F4; }
details.entered-event { border-top: 1px solid #EAEAEA; }
details.entered-event:first-child { border-top: 0; }
details.entered-event summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; cursor: pointer; font-weight: 600; list-style: none; }
details.entered-event summary::before { content: "▸"; color: var(--muted); margin-right: 8px; }
details.entered-event[open] summary::before { content: "▾"; }
details.entered-event summary > span:first-child { flex: 1; }

/* --- формы кабинета --- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.lbl input:not([type=checkbox]):not([type=file]), .lbl select, .lbl textarea { font: inherit; font-size: 14px; min-height: 40px; border: 1px solid var(--field-border); border-radius: 8px; padding: 6px 12px; background: #fff; color: var(--text); width: 100%; box-sizing: border-box; }
.lbl.check { justify-content: flex-end; color: var(--text); font-size: 14px; }

/* Телефон: поле меньше 16px iOS приближает при вводе и не отдаляет обратно — на сенсорных экранах поля 16px.
   Те же селекторы, что выше, поэтому крупные поля оператора (.op-*) остаются крупными. */
@media (pointer: coarse) {
  :where(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { font-size: 16px; }
  .field, .lbl input:not([type=checkbox]):not([type=file]), .lbl select, .lbl textarea { font-size: 16px; }
}

/* Логотип БФЛА в шапке: белый, «ПОРТАЛ» тем же жирным наклонным начертанием, что буквы логотипа */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { height: 40px; width: auto; display: block; filter: brightness(0) invert(1); }
.brand span { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 19px; letter-spacing: 0.02em; color: #fff; text-transform: uppercase; display: inline-block; transform: skewX(-12deg); line-height: 1; padding-top: 6px; }

/* Календарь: плашка на всю ширину, картинка слева, информация и статус справа. На телефоне всё друг под другом */
.comp-row { display: grid; grid-template-columns: 280px minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; padding: 16px; }
.comp-row-img { grid-row: 1 / span 2; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--navy); }
.comp-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comp-row .comp-info { min-width: 0; padding: 4px 0; }
.comp-row .comp-side { grid-column: 3; grid-row: 1 / span 2; padding: 4px 8px 4px 0; }
/* Средняя ширина: статус и кнопка уходят под текст, справа от картинки, слева */
@media (max-width: 960px) {
  .comp-row { grid-template-columns: 240px minmax(0, 1fr); }
  .comp-row .comp-side { grid-column: 2; grid-row: 2; align-items: flex-start; text-align: left; padding: 0; }
}
/* Телефон: всё друг под другом */
@media (max-width: 720px) {
  .comp-row { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; }
  .comp-row-img { grid-row: auto; }
  .comp-row .comp-side { grid-column: 1; grid-row: auto; }
}
.comp-head-img { width: 220px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; }
.comp-thumb { width: 220px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }

/* Заглушка вместо картинки: логотип БФЛА на фирменном фоне. У каждого соревнования есть картинка */
.cover-stub { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy) 38%, var(--navy-stripe) 38%, var(--navy-stripe) 58%, var(--navy) 58%); }
.cover-stub img { width: 55%; height: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .92; }
.comp-row-img .cover-stub img { width: 55%; height: auto; }

.comp-row.finished .comp-row-img { filter: grayscale(.85); opacity: .85; }

.closed-note { color: #c62828; font-weight: 700; font-size: 15px; }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.pager .pg { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #fff; border: 1px solid #e3e3ea; color: var(--link); font-family: 'IBM Plex Mono', monospace; font-size: 14px; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .pager a.pg:hover { border-color: var(--link); } }
.pager .pg.current { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.pager .pg.gap { border: 0; background: none; color: var(--muted); min-width: 20px; padding: 0; }
.pager .pg-total { margin-left: 8px; }

a.who { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a.who:hover { color: #fff; } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px;
  background: none; border: 0; padding: 0; color: #d6d9de; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: #fff; background: rgba(255,255,255,.12); } }

.brand-logo-wide { height: 40px; width: auto; display: block; }
.site-nav .who, .site-nav form.inline { display: flex; align-items: center; line-height: 1; }

/* Заявленные: одинаковые колонки во всех видах */
table.entered-table { table-layout: fixed; }
table.entered-table th:nth-child(1) { width: 34%; }
table.entered-table th:nth-child(2) { width: 10%; }
table.entered-table th:nth-child(3) { width: 26%; }
table.entered-table th:nth-child(4), table.entered-table th:nth-child(5) { width: 15%; }
@media (max-width: 720px) { table.entered-table { table-layout: auto; min-width: 520px; } }

/* Недоступные кнопки: серые, не нажимаются */
.btn.disabled, span.btn.disabled { background: #EDEDF0; color: #9a9aa6; border-color: #E0E0E6; box-shadow: none; cursor: not-allowed; pointer-events: none; }

.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
/* Разрушительное действие (отклонить): красный контур, отличается от «Принять» и «Вернуть». #B42318 к белому 6,5:1 */
.btn.danger { border-color: #B42318; color: #B42318; }
@media (hover: hover) and (pointer: fine) { .btn.danger:hover { background: #B42318; border-color: #B42318; color: #fff; } }
@media (hover: hover) and (pointer: fine) { .btn.dark:hover { background: #2C2D6B; border-color: #2C2D6B; } }

/* Настройки соревнования: ровные сетки, подзаголовки, галочки карточками */
.form-grid { align-items: start; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sub { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding-top: 6px; border-top: 1px solid #EFEFF2; }
.sub:first-of-type { border-top: 0; padding-top: 0; }
.check-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.check-row .lbl.check { border: 1px solid #E3E3EA; border-radius: 12px; padding: 12px 14px; justify-content: center; background: #FAFAFC; }
.check-row .lbl.check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy); }
.lbl.check .row-gap { align-items: center; gap: 10px; }
@media (max-width: 720px) { .form-grid.cols-3, .check-row { grid-template-columns: 1fr; } }

/* Списки с кнопками: всё по центру строки по высоте */
table.list.centered td, table.list.centered th { vertical-align: middle; }
table.list.centered td .row-gap { align-items: center; }

/* Эстафеты в заявке */
.relays { margin-top: 18px; padding-top: 14px; border-top: 1px solid #EFEFF2; display: grid; gap: 12px; }
.relay-card { border: 1px solid #E3E3EA; border-radius: 14px; padding: 14px; background: #FAFAFC; display: grid; gap: 10px; }
.relay-legs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .relay-legs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .relay-legs { grid-template-columns: 1fr; } }

/* Недоступные поля настроек */
.lbl.is-off { opacity: .45; }
.lbl .field:disabled, .lbl select:disabled, .lbl input:disabled { background: #F2F2F6; cursor: not-allowed; }

/* Значки скачивания: Excel зелёный, PDF красный, у PDF подпись «А–Я» (по фамилии) и «№ 1–9» (по номеру) */
.dl-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid #E3E3EA; background: #fff; transition: border-color .15s, box-shadow .15s; }
@media (hover: hover) and (pointer: fine) { .dl-icon:hover { border-color: var(--navy); box-shadow: 0 2px 8px rgba(35, 35, 87, .15); } }
.dl-icon.pdf.bib { background: #EEF2FD; }

/* Картинки соревнования: превью слева, описание и выбор файла справа */
.imgfields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.imgfield { border: 1px solid #E3E3EA; border-radius: 14px; padding: 14px; background: #FAFAFC; display: grid; gap: 10px; align-content: start; }
.imgfield-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
.imgfield-preview { height: 100px; border-radius: 10px; background: repeating-conic-gradient(#EDEDF2 0 25%, #fff 0 50%) 0 0 / 14px 14px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #E3E3EA; }
.imgfield-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.imgfield-spec { margin: 0 0 8px; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; }
.imgfield-controls input[type=file] { font-size: 13px; max-width: 100%; }
.imgfield-clear { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px; color: #8f1c13; }
@media (max-width: 520px) { .imgfield-body { grid-template-columns: 1fr; } }

/* Документы соревнования: положение, регламент, расписание */
.doc-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.doc-tile { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 14px; border: 1px solid #E3E3EA;
  background: #fff; color: var(--navy); text-decoration: none; font-weight: 600; transition: border-color .15s, box-shadow .15s; }
@media (hover: hover) and (pointer: fine) { .doc-tile:hover { border-color: var(--navy); box-shadow: 0 2px 8px rgba(35, 35, 87, .15); } }
.doc-tile small { display: block; font-weight: 400; color: #5C5C68; font-size: 12px; }
.doc-tile.reg { background: #EEF2FD; } .doc-tile.rules { background: #EAF6EE; } .doc-tile.sched { background: #FDF1E7; }
.doc-tile.photo { background: #F3EBFB; } .doc-tile.callroom { background: #ECECF6; }
.doc-tile.records { background: #FBF5E1; }
.comp-about { max-width: 80ch; line-height: 1.55; }
.comp-about p { margin: 0 0 10px; }
.comp-about p:last-child { margin-bottom: 0; }
.meet-records { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.meet-records h3 { margin: 0 0 6px; }
.meet-records th { text-align: left; }
.meet-records tr.meet-new td { background: #EEEEFB; }

/* Программа: одинаковые столбцы в каждом дне */
.program-table { table-layout: fixed; width: 100%; }
.program-table td:nth-child(1) { width: 76px; }
.program-table td:nth-child(3) { width: 130px; }
.program-table td:nth-child(4) { width: 130px; }
.program-table td:nth-child(5) { width: 170px; }
@media (max-width: 640px) { .program-table td:nth-child(3), .program-table td:nth-child(4) { width: 90px; } .program-table td:nth-child(5) { width: 0; padding: 0; } }

/* Сводка участников в информации: всего зелёным, мужчины голубым, женщины розовым */
.stat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.stat-chip b { font-family: "IBM Plex Mono", monospace; }
.stat-chip.total { background: #DDF3E5; color: #14683A; }
.stat-chip.men { background: #DCEEFB; color: #155A8A; }
.stat-chip.women { background: #FBDDEA; color: #A3235F; }

/* Стартовый протокол: столбцы одной ширины во всех забегах */
.start-table { table-layout: fixed; width: 100%; min-width: 880px; }
.start-table th:nth-child(1), .start-table td:nth-child(1) { width: 64px; }
.start-table th:nth-child(2), .start-table td:nth-child(2) { width: 84px; }
.start-table th:nth-child(3), .start-table td:nth-child(3) { width: 24%; }
.start-table th:nth-child(4), .start-table td:nth-child(4) { width: 112px; }
.start-table th:nth-child(5), .start-table td:nth-child(5) { width: 18%; }
.start-table th:nth-child(6), .start-table td:nth-child(6) { width: 96px; }
.start-table th:nth-child(7), .start-table td:nth-child(7) { width: 150px; }
.start-table th:nth-child(8), .start-table td:nth-child(8) { width: 210px; }

/* hidden должен скрывать и блоки с display: grid/flex */
[hidden] { display: none !important; }

.legend { color: #62627A; line-height: 1.5; padding: 4px 2px; }

/* Онлайн-результаты: кто прыгает и кто следующий */
.live-card { background: #fff; border: 1px solid #E3E3EA; border-radius: 16px; padding: 12px 16px; min-width: 260px; display: flex; flex-direction: column; gap: 4px; }
.live-event { color: #62627A; font-size: 13px; }
.live-now-name { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #1E8E4E; box-shadow: 0 0 0 4px rgba(30,142,78,.2); animation: live-pulse 1.2s infinite; flex: none; }
.live-next-name { color: #155A8A; font-size: 14px; }
.live-timer { font-size: 30px; font-weight: 600; color: #232357; }
.live-row-now td { background: #DDF3E5; }
.live-row-next td { background: #DCEEFB; }
.live-tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: 2px 8px; }
.live-tag.now { background: #17703D; color: #fff; }
.live-tag.next { background: #155A8A; color: #fff; }
.mark-tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 6px; color: #fff; }
.mark-tag.nr { background: #C62828; }
.mark-tag.mr { background: #3A3BA8; }
.mark-tag.pb { background: #17703D; }
.mark-tag.sb { background: #E0A02C; color: #232357; }
.live-row-pb, .live-row-nr { font-weight: 600; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(30,142,78,.5); } 70% { box-shadow: 0 0 0 10px rgba(30,142,78,0); } 100% { box-shadow: 0 0 0 0 rgba(30,142,78,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }


.photofinish { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.photofinish > img:first-child { max-width: 100%; border-radius: 12px; }
.photofinish .top3 { margin: 0; padding-left: 20px; }
.photofinish .partners { max-width: 360px; width: 100%; }

.tt-wrap { overflow-x: auto; border: 1px solid #D9D9E4; border-radius: 14px; background: #fff; }
.tt-row { display: flex; border-top: 1px solid #E3E3EA; }
.tt-row:first-child { border-top: 0; }
.tt-name { flex: 0 0 150px; position: sticky; left: 0; z-index: 4; background: #F3F3F8; padding: 14px 12px; font-weight: 700; font-size: 13px; color: #232357; border-right: 1px solid #D9D9E4; box-sizing: border-box; }
.tt-grid { position: relative; flex: 0 0 auto; }
.tt-head { height: 40px; border-bottom: 1px solid #D9D9E4; background: #F3F3F8; }
.tt-tick { position: absolute; top: 0; bottom: 0; border-left: 1.5px solid #A9A9BE; padding: 4px 0 0 6px; font-size: 13px; font-weight: 600; color: #232357; font-family: "IBM Plex Mono", monospace; }
.tt-min { position: absolute; bottom: 3px; transform: translateX(-50%); font-size: 11px; color: #6B6B7B; font-family: "IBM Plex Mono", monospace; }
.tt-line { position: absolute; top: 0; bottom: 0; border-left: 1px dotted #DCDCE6; }
.tt-line.half { border-left: 1px dashed #C4C4D4; }
.tt-line.hour { border-left: 1.5px solid #A9A9BE; }
.tt-item { position: absolute; height: 44px; z-index: 2; text-decoration: none; color: #232357; }
@media (hover: hover) and (pointer: fine) { .tt-item:hover { color: #232357; z-index: 3; } }
.tt-cap { display: block; font-size: 12px; font-weight: 700; line-height: 16px; white-space: nowrap; }
.tt-box { display: block; position: relative; height: 26px; box-sizing: border-box; border-radius: 5px; color: #fff; font-size: 12px; line-height: 26px; padding-left: 5px; white-space: nowrap; }
.tt-box b { font-family: "IBM Plex Mono", monospace; font-weight: 500; }
.tt-item.m .tt-box { background: #2F6FB7; }
.tt-item.f .tt-box { background: #D8433B; }
.tt-item.x .tt-box { background: #5B5B8C; }
.tt-pre { position: absolute; top: 0; height: 26px; background: #E6E6EC; border: 1px solid #C2C2D0; border-radius: 5px 0 0 5px; box-sizing: border-box; }
@media (hover: hover) and (pointer: fine) { .tt-item:hover .tt-box { filter: brightness(1.08); box-shadow: 0 2px 8px rgba(35,35,87,.25); } }
.tt-item.now .tt-box { box-shadow: 0 0 0 3px #EDC168; }
.tt-item.done { opacity: .45; }
.tt-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #EC602F; z-index: 3; }
.tt-legend { display: flex; gap: 16px; font-size: 12px; color: #6b6b7b; flex-wrap: wrap; margin-top: 6px; }
.tt-legend i { display: inline-block; width: 16px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.tt-legend i.m, .tt-dot.m { background: #2F6FB7; }
.tt-legend i.f, .tt-dot.f { background: #D8433B; }
.tt-legend i.x, .tt-dot.x { background: #5B5B8C; }
.tt-legend i.pre { background: #E6E6EC; border: 1px solid #C2C2D0; box-sizing: border-box; }
.tt-legend i.nowline { width: 2px; background: #EC602F; margin: 0 13px 0 7px; }
.tt-legend i.ring { background: #2F6FB7; box-shadow: 0 0 0 2px #EDC168; }
.tt-legend i.done { background: #2F6FB7; opacity: .45; }
.tt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.tt-edit summary { cursor: pointer; padding: 4px 0; }
.tt-edit[open] summary { margin-bottom: 8px; }
.tt-table tr.now td { background: #FFF8E6; }
.tt-table tr.done td { color: #6B6B7B; }
.tt-table tr:target td { background: #EEF0FB; }
.tt-dur { width: 90px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--field-border); border-radius: 8px; font: inherit; font-family: "IBM Plex Mono", monospace; }
.tt-dur.manual { border-color: #232357; background: #F3F3FB; font-weight: 600; }

.btn.accent { background: #232357; color: #fff; border-color: #232357; }
@media (hover: hover) and (pointer: fine) { .btn.accent:hover { background: #3A3BA8; border-color: #3A3BA8; } }

.radio { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #CFCFCF; border-radius: 10px; cursor: pointer; font-weight: 600; }
.radio input { accent-color: #232357; }
.radio:has(input:checked) { border-color: #232357; background: #EEEEF8; }
.rule-panel { padding: 12px 14px; border-left: 3px solid #EDC168; background: #FAFAFC; border-radius: 8px; }

.warn-mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #C62828; color: #fff; font-weight: 800; font-size: 13px; }
.issue-text { color: #C62828; margin-top: 2px; }
tr.sub-row td { background: #FAFAFC; }

.site-nav a.has-pending { color: #EDC168; font-weight: 700; }
.pending-badge { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: var(--live-text); color: #fff; font-size: 12px; font-weight: 800; text-align: center; line-height: 18px; animation: pending-pulse 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pending-badge { animation: none; } }
@keyframes pending-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(236, 96, 47, .55); } 50% { box-shadow: 0 0 0 5px rgba(236, 96, 47, 0); } }

/* Онлайн-результаты: статусы кругов, расписание, последние результаты, мои спортсмены */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: #EDEDF2; color: #525252; }
.st.start { background: #E4E6FB; color: var(--link); }
.st.live { background: var(--live-text); color: #fff; }
.st.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: st-blink 1.2s infinite; }
.st.unofficial { background: #FFF4D6; color: #7a5300; }
.st.official { background: #E7F4EC; color: #1d6b3a; }
@keyframes st-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .st.live::before { animation: none; } }
.live-status { font-size: 13px; color: var(--muted); }
.live-status.on { color: #17703D; }
.tabs a .st { margin-left: 4px; }
.ol-search { font: inherit; min-height: 36px; padding: 4px 14px; border: 1px solid var(--field-border); border-radius: 999px; min-width: 200px; flex: 1 1 200px; max-width: 320px; }
/* Общий .chip — колонка (для чипов с пояснением .why); в фильтрах онлайн-расписания всё в одну строку,
   иначе счётчик «★ Мои» переносится на вторую строку */
.ol-filters .chip { flex-direction: row; align-items: center; gap: 5px; }
.ol-day + .ol-day { margin-top: 12px; }
.ol-day-name { font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.ol-row, .ol-now { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 8px; border-top: 1px solid #EFEFF2; color: var(--text); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .ol-row:hover, .ol-now:hover { background: #F7F7FB; color: var(--text); } }
.ol-row[hidden] { display: none; }
.ol-now { grid-template-columns: 52px 1fr auto; }
.ol-list .ol-now:first-child { border-top: 0; }
.ol-latest { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ol-result { border: 1px solid #E3E3EA; border-radius: 16px; padding: 12px 14px; color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
@media (hover: hover) and (pointer: fine) { .ol-result:hover { border-color: var(--link); color: var(--text); } }
.ol-result-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ol-podium { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.ol-podium li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; }
.ol-place { color: var(--muted); }
.ol-block-head h2 { margin: 0; }
.qual-tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: var(--navy); color: #fff; }
.fav { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: #B0B0BC; padding: 2px 4px; }
.fav.on { color: #E0A02C; }
tr.fav-row td { background: #FFF8E6; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .ol-row { grid-template-columns: 44px 1fr auto; }
  .ol-count { display: none; }
  table.list.ol-table td, table.list.ol-table th { padding: 6px 6px; }
}
.ol-summary summary { cursor: pointer; }
.ol-summary[open] summary { margin-bottom: 8px; }
.show-sm { display: none; }
@media (max-width: 640px) { .show-sm { display: block; } }
.tabs a.tab-live { background: #fff; border-color: #D92D20; color: #B42318; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 0 0 3px rgba(217,45,32,.12); }
@media (hover: hover) and (pointer: fine) { .tabs a.tab-live:hover { background: #FEF3F2; } }
.tab-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #D92D20; animation: tab-live-blink 1s infinite; }
@keyframes tab-live-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .tab-live-dot { animation: none; } }
/* Стартовые на странице соревнования: узкие колонки дорожки, номера и года, имя и принадлежность по остатку */
table.pub-start { table-layout: fixed; }
table.pub-start th:nth-child(1) { width: 64px; }
table.pub-start th:nth-child(2) { width: 72px; }
table.pub-start th:nth-child(4) { width: 72px; }
table.pub-start th:nth-child(5) { width: 32%; }
.start-heat { margin: 14px 10px 2px; font-size: 14px; color: var(--muted); }
.start-heat b { color: var(--text); }
@media (max-width: 720px) { table.pub-start { table-layout: auto; min-width: 480px; } }

/* Кнопки секретаря: на узком экране ряд с переносом слева, а не столбик, прижатый вправо */
@media (max-width: 1000px) {
  .comp-side.sec-actions { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: stretch; justify-content: flex-start; }
  .comp-side.sec-actions form { display: contents; }
}
@media (max-width: 520px) {
  .comp-side.sec-actions .btn { flex: 1 1 100%; text-align: center; justify-content: center; box-sizing: border-box; }
}
.ol-found { grid-column: 2 / -1; font-size: 13px; color: #3A3BA8; margin-top: -4px; }
.ol-found[hidden] { display: none; }
.ol-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ol-card { border: 1px solid #E3E3EA; border-left: 4px solid #EC602F; border-radius: 16px; padding: 12px 14px; color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
@media (hover: hover) and (pointer: fine) { .ol-card:hover { background: #F7F7FB; color: var(--text); } }
.ol-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 16px; }
.ol-card-sub { color: #62627A; font-size: 13px; }
.ol-card-name { font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ol-card .live-timer { font-size: 24px; }
.ol-card .live-timer:empty { display: none; }
.ol-podium-res { white-space: nowrap; }
.nav-toggle { display: none; }
/* Шапка на узком экране: логотип, вход и бургер в одной строке, разделы раскрываются списком под шапкой */
@media (max-width: 1100px) {
  .site-header .wrap { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-top: 10px; padding-bottom: 10px; }
  .site-header .left { display: contents; }
  .site-header .brand { grid-column: 1; grid-row: 1; }
  .site-header .wrap > .site-nav { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 12px; }
  .site-header .wrap > .site-nav .who { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-toggle { display: inline-flex; position: relative; order: 10; }
  .nav-toggle path { transition: transform .2s, opacity .2s; transform-origin: 12px 12px; }
  .site-header.nav-open .nav-toggle .bar-top { transform: translateY(6px) rotate(45deg); }
  .site-header.nav-open .nav-toggle .bar-mid { opacity: 0; }
  .site-header.nav-open .nav-toggle .bar-bot { transform: translateY(-6px) rotate(-45deg); }
  .nav-toggle-dot { position: absolute; top: 2px; right: 0; width: 9px; height: 9px; border-radius: 50%; background: #EC602F; box-shadow: 0 0 0 2px var(--navy); }
  .site-header.nav-open .nav-toggle-dot { display: none; }
  .site-header .left > .site-nav { display: none; grid-column: 1 / -1; grid-row: 2; flex-direction: column; align-items: stretch; gap: 0; font-size: 16px; padding: 4px 0 2px; border-top: 1px solid rgba(255,255,255,.15); }
  .site-header.nav-open .left > .site-nav { display: flex; }
  .site-header .left > .site-nav a { padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-header .left > .site-nav a:last-child { border-bottom: 0; }
  .site-header .left > .site-nav a.nav-live { align-self: flex-start; margin: 8px 0; padding: 6px 14px; border-bottom: 0; }
}
@media (max-width: 520px) {
  .site-header .brand-logo-wide { height: 32px; }
  .site-header .wrap > .site-nav .who { display: none; }
}
.photofinish-box summary { cursor: pointer; font-weight: 600; color: #3A3BA8; }
.photofinish-box img { display: block; max-width: 100%; margin-top: 10px; border-radius: 12px; }
.live-result { font-size: 30px; font-weight: 700; color: #1E7B45; }
.ol-card .live-result { font-size: 24px; }
table.ol-table .att-col { width: 64px; min-width: 64px; text-align: left; white-space: nowrap; }
.att-wind { display: block; font-size: 12px; line-height: 14px; color: #6B6B7B; }

/* Ввод результатов оператором: телефон и планшет, крупные поля и кнопки */
.op-login { max-width: 420px; margin: 0 auto; width: 100%; }
.op-pin { font-size: 28px; letter-spacing: 0.3em; text-align: center; min-height: 56px; font-family: "IBM Plex Mono", monospace; }
.op-list { display: grid; gap: 8px; }
.op-event { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 14px 18px; }
.op-name { display: flex; flex-direction: column; }
.op-card { gap: 10px; padding: 16px; }
.op-card-head { align-items: center; }
.op-card-head h2 { margin: 0; }
.op-row { display: grid; grid-template-columns: 32px 1fr 52px 128px 84px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); }
.op-who { display: flex; flex-direction: column; min-width: 0; }
.op-lane, .op-place { text-align: center; font-weight: 600; }
.op-time-in, .op-attempts .field { font-size: 18px; min-height: 48px; width: 100%; }
.op-status { min-height: 48px; }
.op-save { min-height: 52px; justify-content: center; }
.op-wind .field { width: 90px; }
.op-best { margin-left: auto; font-size: 18px; }
.op-attempts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.op-att { display: flex; flex-direction: column; gap: 2px; }
.op-attempts .field { text-align: center; padding-left: 4px; padding-right: 4px; }
.op-status-row { display: flex; flex-direction: column; gap: 2px; max-width: 320px; margin-top: 8px; }
.op-status-row .op-status { width: 100%; font-size: 16px; }
.op-att-wind { font-size: 14px !important; min-height: 36px !important; }
.op-heights { align-items: center; }
.op-heights .field { width: 170px; }
.op-flash { position: sticky; top: 0; z-index: 5; }
@media (max-width: 640px) {
  .op-row { grid-template-columns: 28px 1fr 44px; }
  .op-time-in { grid-column: 1 / 3; }
  .op-status { grid-column: 3 / 4; }
  .op-attempts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .op-event { grid-template-columns: 70px 1fr; }
  .op-event .st { grid-column: 2; justify-self: start; }
  .op-save { width: 100%; }
}

/* Кнопка «Онлайн» в шапке: видна, пока идёт соревнование с онлайном */
.site-nav a.nav-live { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; background: #D92D20; border-radius: 999px; padding: 4px 12px; }
.site-nav a.nav-live .tab-live-dot { background: #fff; }
@media (hover: hover) and (pointer: fine) { .site-nav a.nav-live:hover { background: #B42318; color: #fff; } }
.age-tag { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; background: #EDEDF7; color: var(--navy); border-radius: 6px; padding: 1px 6px; }
.op-ok { color: #1d6b3a; font-weight: 600; font-size: 13px; }
.op-now { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; }
.op-now:has(.op-now-wind) { grid-template-columns: auto 90px 1fr auto auto; }
.op-now-label { font-weight: 700; white-space: nowrap; }
.op-now-mark, .op-now-wind { font-size: 22px; min-height: 52px; width: 100%; }
.op-key { min-height: 52px; min-width: 52px; justify-content: center; font-size: 20px; }
.op-all summary { cursor: pointer; color: var(--link); }
.op-finalist { border-color: var(--gold); }
.op-final { align-items: center; }
.op-hj-now { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.op-hj-h { font-size: 20px; font-weight: 700; }
.op-hj-cell { font-size: 22px; min-width: 60px; text-align: center; letter-spacing: .1em; }
.op-hj-history { color: var(--muted, #6b7078); }
.op-out-card { opacity: .6; }
.op-chips { flex-wrap: wrap; align-items: center; }
.hj-chip.on { border-color: var(--navy); background: #EDEDF7; }
.op-new-height { width: 110px; font-size: 18px; min-height: 48px; }
@media (max-width: 640px) {
  .op-now { grid-template-columns: auto 1fr; }
  .op-now:has(.op-now-wind) { grid-template-columns: auto 1fr; }
  .op-now .op-key { width: 100%; }
}
/* Формат соревнования (полное проведение или только онлайн-результаты): контурная метка в строке с группами,
   чтобы не путалась со статусом по датам справа («Скоро», «Идёт») */
.comp-format { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.mode-tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 600; white-space: nowrap; background: transparent; border: 1px solid currentColor; }
.mode-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mode-tag.full { color: #1d6b3a; }
.mode-tag.full::before { content: "✓"; width: auto; height: auto; background: none; font-size: 12px; line-height: 1; }
.mode-tag.online { color: #B4401C; }
.ol-bar-now { color: #B4401C; font-weight: 700; }
.op-out-title { margin: 16px 0 4px; color: #6b7078; font-size: 16px; }

/* Широкая таблица на телефоне: колонка «Спортсмен» закреплена слева, чтобы при прокрутке было видно, чей результат */
.table-scroll .sticky-col { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 4px 0 6px -4px rgba(0, 0, 0, .18); min-width: 130px; }
.table-scroll th.sticky-col { z-index: 2; }
.live-row-now td.sticky-col { background: #DDF3E5; }
.live-row-next td.sticky-col { background: #DCEEFB; }
tr.fav-row td.sticky-col { background: #FFF8E6; }

/* Очередь в секторе у оператора: 1 — сейчас, 2 — готовится, 3 — следом */
.op-queue { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; width: fit-content; text-decoration: none; }
.op-queue.now { background: #1d8a4a; color: #fff; }
.op-queue.ready { background: #2f6fd6; color: #fff; }
.op-queue.next { background: #E4E6EB; color: #3d4250; }
.op-card.q-now { border: 2px solid #1d8a4a; box-shadow: 0 0 0 3px rgba(29, 138, 74, .15); }
.op-card.q-ready { border: 2px solid #2f6fd6; }
.op-card.q-next { border: 2px dashed #9aa0ab; }
.op-queue-bar { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: 0; z-index: 4; padding: 10px 12px; }
.op-queue-bar .op-queue { font-weight: 500; }

/* Галочка с подписью: квадратик одного размера, подпись рядом и переносится сама */
.op-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid #E3E3EA; border-radius: 10px; background: #FAFAFC; cursor: pointer; }
.op-check input[type=checkbox] { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); }
.op-filter { padding: 12px; border: 1px solid #E3E3EA; border-radius: 12px; background: #fff; gap: 8px; }
.op-filter-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; }
.op-filter .chip { flex-direction: row; align-items: center; }
.op-check[hidden] { display: none; }
@media (max-width: 640px) { .op-filter-row { grid-template-columns: 1fr; gap: 4px; } }
.op-check:has(input:checked) { border-color: var(--navy); background: #EDEDF7; }

/* Инструкции /help/…: читаемый текст, таблицы на всю ширину */
.guide { max-width: 900px; line-height: 1.55; }
.guide h1 { margin-top: 0; }
.guide h2 { margin-top: 28px; }
.guide h3 { margin-top: 20px; font-size: 1rem; }
.guide hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.guide ul, .guide ol { padding-left: 22px; }
.guide li { margin: 4px 0; }
.guide code { font-family: "IBM Plex Mono", monospace; background: #F4F4F4; padding: 1px 5px; border-radius: 4px; }
.guide .table-scroll { margin: 10px 0 16px; }
.guide-actions { float: right; margin-left: 12px; }
@media (max-width: 640px) { .guide-actions { float: none; margin: 0 0 12px; } }


/* --- Телефон: касания --- */
/* Без задержки 300 мс на двойной тап; подписи кнопок не выделяются долгим нажатием */
a, button, [role="button"], .btn, .chip, label, summary { touch-action: manipulation; }
.btn, .chip, button, .tabs a, .pager a.pg, .fav, .x, .hj-x { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Отклик в момент касания, а не после отпускания */
.btn, .chip, .tabs a, .pager a.pg { transition: transform 100ms ease-out, background-color 100ms ease-out, border-color 100ms ease-out; }
.btn:active, .chip:active, .tabs a:active, .pager a.pg:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .btn:active, .chip:active, .tabs a:active, .pager a.pg:active { transform: none; } }
.table-scroll { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }

/* отступы основной части: .wrap задаёт padding 0 и перебивает main — последний блок прилипал к подвалу */
main.wrap { padding-top: 24px; padding-bottom: 56px; }
@media (max-width: 720px) { main.wrap { padding-top: 16px; padding-bottom: 40px; } }

/* Кружок «действующий» (есть результат за 2 года): по центру строчных букв заголовка */
.act-dot { display: inline-block; width: .32em; height: .32em; min-width: 10px; min-height: 10px; border-radius: 50%;
  background: #B9B9C3; vertical-align: middle; position: relative; top: -.06em; margin-left: .3em; box-shadow: 0 0 0 .08em rgba(0,0,0,.05); }
.act-dot.on { background: #2E9E6B; box-shadow: 0 0 0 .08em rgba(46,158,107,.22); }
.act-dot.sm { width: 9px; height: 9px; min-width: 9px; min-height: 9px; margin: 0 8px 0 0; top: -1px; }
.btn .act-dot.sm { margin-right: 6px; }
.check-active { display: inline-flex; align-items: center; gap: 6px; align-self: end; min-height: 44px; cursor: pointer; white-space: nowrap; }
/* круглый зелёный чекбокс: пустой кружок — все, зелёный — только действующие */
.check-active input { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; margin: 0; border-radius: 50%;
  border: 2px solid #2E9E6B; background: #fff; cursor: pointer; transition: background .15s, box-shadow .15s; }
.check-active input:checked { background: #2E9E6B; box-shadow: 0 0 0 4px rgba(46,158,107,.22); }
.check-active input:focus-visible { outline: 2px solid #3A3BA8; outline-offset: 2px; }

/* Онлайн: блоки внутри #online-root идут с тем же отступом 20 px, что и остальные карточки страницы */
#online-root > * + * { margin-top: 20px; }
#online-board:not(:has(*)) { display: none; }

/* Пояснение под неактивной кнопкой: почему недоступно и когда станет доступно */
.why-off { font-size: 12px; color: var(--muted); max-width: 320px; text-align: right; }
@media (max-width: 960px) { .why-off { text-align: left; } }

/* Телефон: основной текст 16 px и межстрочный 1,5 — как у полей ввода, читается без приближения */
@media (max-width: 720px) { body { font-size: 16px; line-height: 1.5; } }

/* Список спортсменов на телефоне: строка таблицы превращается в карточку без прокрутки вбок.
   Фамилия на всю ширину, ниже год, группа и регион, ещё ниже учреждение */
@media (max-width: 720px) {
  table.registry-table, table.registry-table tbody { display: block; }
  table.registry-table tr.head { display: none; }
  table.registry-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 10px 2px; border-top: 1px solid #EFEFF2; }
  table.registry-table tr:first-child + tr { border-top: 0; }
  table.registry-table td { display: block; padding: 0; border: 0; }
  table.registry-table td:nth-child(1) { flex: 1 1 100%; font-weight: 600; }
  table.registry-table td:nth-child(3) { color: var(--muted); }
  table.registry-table td:nth-child(4) { flex: 1 1 100%; color: var(--muted); font-size: 14px; }
  table.registry-table td:empty { display: none; }
}
