body { background:#f5f6f8; }
.comp-bar { background:#fff; border-bottom:1px solid #dee2e6; margin-left:-12px; margin-right:-12px; padding:0 12px; }
.comp-bar .comp-title { font-weight:600; }
.comp-bar .nav-link { color:#495057; padding:.6rem 1rem; border-bottom:2px solid transparent; }
.comp-bar .nav-link.active { color:#000; border-bottom-color:#b3261e; font-weight:600; }
table.table-tight td, table.table-tight th { padding:.35rem .5rem; vertical-align:middle; }
.row-err > td { background:#fdecea !important; } .row-warn > td { background:#fff8e1 !important; }
.lock { color:#b45309; }
.dropzone { border:2px dashed #adb5bd; border-radius:.6rem; padding:1.4rem; text-align:center; background:#fff; color:#6c757d; }
.kpi .num { font-size:1.9rem; font-weight:600; line-height:1; }
.seg { display:flex; gap:2px; min-width:120px; } .seg span { flex:1; height:.5rem; background:#e9ecef; border-radius:2px; } .seg span.ok { background:#198754; }

/* Протокол */
.score-input { width:3.3rem; text-align:center; padding:.2rem .1rem; font-variant-numeric:tabular-nums; }
/* Отброшенные оценки (одна наименьшая и одна наибольшая): вид — в настройках интерфейса пользователя (класс на body), по умолчанию зачёркивание */
.score-input.is-min, .score-input.is-max, .live-score.is-min, .live-score.is-max { text-decoration:line-through; text-decoration-thickness:2px; color:#6c757d; }
body.mark-color .is-min, body.mark-color .is-max, .mark-preview.mark-color .is-min, .mark-preview.mark-color .is-max { text-decoration:none; color:inherit; }
body.mark-color .is-min, body.mark-both .is-min, .mark-preview.mark-color .is-min, .mark-preview.mark-both .is-min { background:#e7f1ff; border-color:#9ec5fe; }
body.mark-color .is-max, body.mark-both .is-max, .mark-preview.mark-color .is-max, .mark-preview.mark-both .is-max { background:#fde2e1; border-color:#f1aeb5; }
body.mark-both .is-min, body.mark-both .is-max, .mark-preview.mark-both .is-min, .mark-preview.mark-both .is-max { text-decoration:line-through; color:#6c757d; }
.mark-preview.mark-strike .is-min, .mark-preview.mark-strike .is-max { text-decoration:line-through; color:#6c757d; background:#e9ecef; border-color:#dee2e6; }
.score-input.bad { background:#f8d7da; border-color:#dc3545; }
.score-input.incomplete { background:#fff3cd; border-color:#ffc107; }
.total.provisional { color:#6c757d; font-style:italic; }
tr.row-saving > td:first-child { box-shadow:inset 3px 0 0 #9ec5fe !important; }
tr.row-unsaved > td:first-child { box-shadow:inset 4px 0 0 #fd7e14 !important; }
.save-status { position:fixed; left:.5rem; bottom:.5rem; z-index:1060; }
.total { font-size:1.05rem; font-variant-numeric:tabular-nums; }
tr.adv > td:first-child { box-shadow:inset 4px 0 0 #198754; }
tr.out { color:#8a9199; } tr.out > td:first-child { box-shadow:inset 4px 0 0 #ced4da; }
tr.tie > td { background:#fff5f5; } tr.tie > td:first-child { box-shadow:inset 4px 0 0 #dc3545; }
.place { display:inline-block; min-width:5.2rem; text-align:center; border-radius:1rem; padding:.15rem .6rem; font-weight:600; font-size:.85rem; }
.place.p1 { background:#ffd54f; } .place.p2 { background:#cfd8dc; } .place.p3 { background:#e6b98a; } .place.p4 { background:#eceff1; color:#546e7a; }
kbd { background:#343a40; }
.seg span.part { background:linear-gradient(90deg,#198754 50%,#e9ecef 50%); }

/* Изменение порядка выступления (reorder.js) */
.reordering tr[data-entry] { cursor:grab; }
.reordering tr.row-locked { cursor:not-allowed; opacity:.6; }
.reordering tr.row-locked .draw-cell::after { content:" 🔒"; }
.reordering input, .reordering select, .reordering .btn-link, .reordering form button { pointer-events:none; }
.reordering .draw-cell { font-weight:700; color:#0d6efd !important; }
.reordering .draw-cell::before { content:"⠿ "; color:#adb5bd; }
.reordering tr.row-locked .draw-cell::before { content:""; }
.sortable-ghost > td { background:#e7f1ff !important; }

/* Публичная трансляция */
.live-dot { display:inline-block; width:.6rem; height:.6rem; border-radius:50%; background:#2ecc71; margin-right:.25rem; animation:livepulse 1.6s infinite; }
.live-off .live-dot { background:#e74c3c; animation:none; }
@keyframes livepulse { 0%{opacity:1} 50%{opacity:.3} 100%{opacity:1} }
tr.next > td { background:#fff8e1; } tr.next > td:first-child { box-shadow:inset 4px 0 0 #f0ad4e; }
.live-score { display:inline-block; min-width:2.6rem; text-align:center; padding:.1rem .35rem; border:1px solid #dee2e6; border-radius:.3rem; background:#fff; font-variant-numeric:tabular-nums; }
.stage-badge { font-weight:600; }
/* Телефон в альбомной ориентации (протокол, трансляция): лист (data-fit-sheet) fit.js масштабирует по ширине экрана. */
.fit-toggle { display:none; position:fixed; right:.5rem; bottom:.5rem; z-index:1050; opacity:.9; }
@media (orientation: landscape) and (max-height: 540px) {
  body.fit-page .container { max-width:none; }          /* колонка на всю ширину — лист крупнее */
  .fit-sheet.fit-on { width:max-content; min-width:100%; }
  .fit-sheet.fit-on .table-responsive { overflow:visible; }
  body.fit-page .fit-toggle { display:block; }
}
@media print { header, footer, .navbar, .comp-bar, .no-print, .alert { display:none !important; } .print-sheet { border:0 !important; box-shadow:none !important; } body { background:#fff; } }

/* Числовое поле без стрелок (номер участника в таблице) */
input.no-spin::-webkit-outer-spin-button, input.no-spin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.no-spin { -moz-appearance: textfield; appearance: textfield; }
/* Узкий выпадающий список: меньше отступ под стрелку */
select.select-compact { padding-left: .4rem; padding-right: 1.4rem; background-position: right .35rem center; }
/* Широкая таблица (участники): уже боковые отступы ячеек */
table.table-narrow td, table.table-narrow th { padding-left: .35rem; padding-right: .35rem; }
/* Горизонтальная прокрутка таблиц видна всегда (на macOS полосы по умолчанию скрыты до прокрутки) */
.table-responsive::-webkit-scrollbar { height: 10px; }
.table-responsive::-webkit-scrollbar-track { background: var(--bs-tertiary-bg); }
.table-responsive::-webkit-scrollbar-thumb { background: var(--bs-secondary-color); border-radius: 5px; border: 2px solid var(--bs-tertiary-bg); }
.di { vertical-align:-.2em; color:#495057; }
