:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --text: #e7ecf1;
  --muted: #8b9aab;
  --accent: #3d9a6e;
  --danger: #c45c5c;
  --font: "Manrope", system-ui, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

.file__label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.controls-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.controls-hint summary {
  cursor: pointer;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  user-select: none;
}

.controls-hint summary:hover {
  color: var(--accent);
}

.controls-hint[open] summary {
  margin-bottom: 0.4rem;
}

.controls-hint .hint {
  font-size: 0.78rem;
  line-height: 1.4;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hint kbd {
  font: inherit;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border: 1px solid #3d4d5c;
  border-radius: 4px;
  background: #0a0e12;
}

.file {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.file--inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  min-width: 0;
  width: 100%;
}

.file--inline input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  font-size: 0.76rem;
}

.match-link-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.match-link-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
}

.match-link-field input,
.match-link-field #match-url {
  width: 100%;
  min-width: 0;
  max-width: none;
  font-size: 0.76rem;
  box-sizing: border-box;
}

.match-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.match-link-actions .btn-compact {
  flex: 0 0 auto;
}

.file {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.file input {
  max-width: 28rem;
}

.layout {
  display: flex;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  gap: 0.65rem;
  padding: 0.65rem;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

.pitch-column {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  overflow: hidden;
}

.timeline {
  margin: 0;
  padding: 0.12rem 0 0.22rem;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  user-select: none;
  -webkit-user-select: none;
  zoom: 1;
}

.timeline.timeline--split-layout {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.timeline--overlay {
  margin: 0;
  padding: 0;
  width: 100%;
  box-shadow: none;
  border: none;
  border-radius: 0;
  background: transparent;
  zoom: 1;
}

.pitch-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  perspective: 1400px;
}

.pitch-zoom-layer {
  position: relative;
  flex: 0 0 auto;
  transform-origin: center center;
  line-height: 0;
  touch-action: none;
  cursor: pointer;
}

.pitch-zoom-layer[data-pannable="true"] {
  cursor: grab;
}

.pitch-stage--panning .pitch-zoom-layer {
  cursor: grabbing;
}

.pitch-zoom-dock {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  z-index: 19;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.32rem;
  pointer-events: auto;
}

/* Панель инструментов над линейкой (метки слева, вид поля справа) */
.pitch-timeline-tools {
  --pitch-timeline-tools-gap: 0.28rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
  pointer-events: none;
  padding: 0 0.35rem;
  margin-bottom: var(--pitch-timeline-tools-gap);
}

.pitch-stage > .pitch-timeline-tools {
  position: absolute;
  z-index: 22;
  left: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.pitch-timeline-tools[hidden] {
  display: none !important;
}

.pitch-timeline-tools > .marker-field-dock,
.pitch-timeline-tools > .pitch-zoom-dock {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  transform: none;
  z-index: auto;
  max-width: none;
  flex: 0 0 auto;
  pointer-events: auto;
}

.pitch-timeline-tools > .marker-field-dock {
  flex-direction: row;
  align-items: center;
}

.pitch-zoom-btn__glyph {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  font-family: inherit;
  pointer-events: none;
}

.pitch-zoom-btn__glyph--field {
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.pitch-zoom-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

/* Спойлер вида поля — панель влево от кнопки (справа в тулбаре) */
.pitch-view-spoiler .marker-field-spoiler__panel {
  left: auto;
  right: calc(100% + 0.32rem);
}

.pitch-scrub-overlay {
  position: absolute;
  z-index: 21;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  row-gap: 0.3rem;
}

/* Линейка на поле / FS — вплотную к нижней кромке канваса */
body.replay--timeline-on-pitch .pitch-scrub-overlay,
.pitch-wrap:fullscreen .pitch-scrub-overlay {
  row-gap: 0;
}

.timeline-fs-slot {
  order: 1;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  pointer-events: none;
  background: transparent;
}

.timeline-fs-slot > .timeline {
  flex-shrink: 0;
  background: rgba(26, 34, 44, 0.94);
  border: 1px solid #2a3544;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.timeline-fs-slot > .timeline.timeline--split-layout,
.timeline--overlay.timeline--split-layout {
  overflow: visible;
}

/* Узкий экран по высоте: линейка поверх нижней кромки поля */
body.replay--timeline-on-pitch .timeline-page-slot {
  display: none;
}

.pitch-scrub-band {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  pointer-events: none;
}

body.replay--timeline-on-pitch .pitch-scrub-band {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  padding: 0;
  pointer-events: none;
}

body.replay--timeline-on-pitch .pitch-timeline-tools,
.pitch-scrub-overlay .pitch-timeline-tools,
.pitch-stage > .pitch-timeline-tools {
  padding-left: max(0.35rem, var(--pitch-side-col-left, 0.35rem));
  padding-right: 0.35rem;
}

body.replay--timeline-on-pitch .marker-field-spoiler {
  width: 1.85rem;
  height: 1.85rem;
}

body.replay--timeline-on-pitch .timeline-fs-slot {
  flex: 0 0 auto;
  width: var(--pitch-canvas-w, auto);
  max-width: 100%;
  margin-left: auto;
  min-width: 0;
  padding: 0;
  pointer-events: none;
}

body.replay--timeline-on-pitch .timeline-fs-slot > .timeline,
body.replay--timeline-on-pitch .timeline--on-pitch.timeline--overlay {
  pointer-events: auto;
  background: rgba(8, 12, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  padding: 0.12rem 0 0.22rem;
}

body.replay--timeline-on-pitch .pitch-wrap {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
}

body.replay--timeline-on-pitch .pitch-column {
  align-items: stretch;
}

body.replay--timeline-on-pitch .bottom-bar {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  align-self: stretch;
}

body.replay--timeline-on-pitch .match-text-page-slot,
body.replay--timeline-on-pitch .match-text-page-slot > .match-text-panel {
  width: 100%;
  max-width: none;
}

/* Высота полосы линейки поверх поля (padding + markers + track). */
body.replay--timeline-on-pitch .pitch-stage {
  justify-content: flex-end;
  align-items: center;
  --replay-timeline-on-pitch-band: calc(0.45rem + 1.85rem + 0.28rem + 0.34rem + 1.1rem + 0.75rem);
  --pitch-side-gutter: calc(100% - var(--pitch-canvas-w, 0px));
  --pitch-side-col-left: max(0.35rem, calc(var(--pitch-side-gutter) / 2 - 0.93rem));
}

/* 21:9 follow/angle: широкий слой строго по центру (flex-end иначе показывает правый край). */
body.replay--pitch-camera-crop .pitch-stage,
body.replay--pitch-camera-crop.replay--timeline-on-pitch .pitch-stage {
  justify-content: center;
}

body.replay--timeline-on-pitch:has(.timeline--split-layout) .pitch-stage {
  --replay-timeline-on-pitch-band: calc(0.45rem + 1.85rem + 0.28rem + 0.75rem + 1.1rem + 0.75rem + 0.34rem);
}

body.replay--timeline-on-pitch:has(.timeline--split-layout) .timeline--on-pitch.timeline--overlay {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.screenshot-slot-fs {
  position: absolute;
  top: 2.45rem;
  right: 0.65rem;
  z-index: 16;
}

.screenshot-slot-fs .btn-compact--icon {
  background: rgba(12, 16, 22, 0.88);
  border-color: rgba(58, 74, 92, 0.85);
}

.screenshot-slot-fs .btn-compact--icon:hover {
  background: rgba(26, 40, 56, 0.95);
}

.stats-fs {
  position: relative;
  z-index: 13;
  pointer-events: none;
  width: min(12.75rem, 26vw);
  min-width: 11.5rem;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.34rem 0.38rem 0.38rem;
  background: rgba(12, 16, 22, 0.72);
  border: 1px solid rgba(58, 74, 92, 0.58);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(5px);
  overflow: hidden;
  flex: 0 0 auto;
  min-height: 0;
}

.stats-fs-dock {
  position: absolute;
  z-index: 13;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  width: fit-content;
  height: fit-content;
  max-height: min(88%, 34rem);
  min-height: 0;
  overflow: hidden;
}

.stats-fs-dock[hidden] {
  display: none !important;
}

.stats-fs-dock--home {
  left: 0;
  top: 4.25rem;
}

.stats-fs-dock--away {
  right: 0;
  top: 4.25rem;
}

.pitch-wrap:fullscreen .stats-fs-dock .stats-fs {
  pointer-events: auto;
  cursor: pointer;
  border: none;
  box-shadow: none;
}

.pitch-wrap:fullscreen .stats-fs-dock .formation-fs--overlay {
  border: none;
  box-shadow: none;
}

.pitch-wrap:fullscreen .stats-fs-dock .formation-fs__pitch {
  border: none;
  background: linear-gradient(
    180deg,
    rgba(58, 107, 66, 0.55) 0%,
    rgba(74, 122, 78, 0.5) 50%,
    rgba(58, 107, 66, 0.55) 100%
  );
}

.pitch-wrap:fullscreen .hud-board,
.pitch-wrap:fullscreen .hud-clock-plate {
  border: none;
  box-shadow: none;
}

.pitch-wrap:fullscreen .hud-board__stats-panel {
  border-top: none;
}

.pitch-wrap:fullscreen .hud-board__row--extended-start .hud-board__label {
  box-shadow: none;
}

.pitch-wrap:fullscreen .hud-board.hud-board--kit-chip .hud-board__score-row,
.pitch-wrap:fullscreen .hud-board.hud-board--kit-chip.hud-board--stats-open .hud-board__stats-panel {
  border: none;
  box-shadow: none;
}

.stats-fs-dock--collapsed .stats-fs__scroll,
.stats-fs-dock--collapsed > .formation-fs--dock {
  display: none !important;
}

.stats-fs-dock--collapsed .stats-fs {
  padding-bottom: 0.34rem;
}

.stats-fs-dock .stats-fs {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  width: 100%;
  max-width: 100%;
}

.stats-fs-dock .stats-fs__team,
.stats-fs-dock .stats-fs__scroll {
  flex: 1 1 auto;
  min-height: 0;
}

.stats-side-dock {
  flex: 0 0 min(19rem, 32vw);
  width: min(19rem, 32vw);
  max-width: 19rem;
  min-width: 16rem;
  min-height: 0;
  max-height: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  --replay-quick-controls-h: 1.72rem;
  --replay-quick-controls-gap: 0.32rem;
  --replay-quick-controls-pad: 0.38rem;
}

.stats-side-dock > .stats-panel,
.stats-side-dock > .user-settings-overlay {
  flex: 1 1 auto;
  min-height: 0;
}

.replay-quick-controls {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--replay-quick-controls-gap);
  padding: var(--replay-quick-controls-pad);
  min-height: calc(var(--replay-quick-controls-h) + var(--replay-quick-controls-pad) * 2);
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(18, 24, 34, 0.72) 0%,
    rgba(12, 16, 24, 0.88) 100%
  );
  border: 1px solid rgba(70, 92, 118, 0.42);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 6px 16px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.replay-quick-controls__btn,
.replay-quick-controls .settings-window-btn,
.replay-quick-controls .weather-quick-btn {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: var(--replay-quick-controls-h);
  padding: 0 0.22rem;
  border-radius: 6px;
  border-color: rgba(78, 102, 132, 0.55);
  background: rgba(22, 32, 46, 0.92);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    transform 0.12s ease,
    box-shadow 0.16s ease;
}

.replay-quick-controls__btn:hover,
.replay-quick-controls .settings-window-btn:hover,
.replay-quick-controls .weather-quick-btn:hover {
  border-color: rgba(110, 150, 190, 0.75);
  background: rgba(32, 48, 68, 0.96);
  transform: translateY(-1px);
}

.replay-quick-controls__btn:active,
.replay-quick-controls .settings-window-btn:active,
.replay-quick-controls .weather-quick-btn:active {
  transform: translateY(0);
}

.replay-quick-controls .settings-window-btn__icon,
.replay-quick-controls .weather-quick-btn__icon,
.replay-quick-controls .pitch-fullscreen-btn .ui-icon,
.replay-quick-controls .replay-quick-play-btn .ui-icon {
  width: 0.98rem;
  height: 0.98rem;
}

.replay-quick-controls .pitch-fullscreen-btn .ui-icon--exit {
  display: none;
}

.replay-quick-controls .pitch-fullscreen-btn[aria-pressed="true"] .ui-icon--enter {
  display: none;
}

.replay-quick-controls .pitch-fullscreen-btn[aria-pressed="true"] .ui-icon--exit {
  display: block;
}

.replay-quick-play-btn .ui-icon--pause {
  display: none;
}

.replay-quick-play-btn[aria-pressed="true"] .ui-icon--play {
  display: none;
}

.replay-quick-play-btn[aria-pressed="true"] .ui-icon--pause {
  display: block;
}

.replay-quick-play-btn[aria-pressed="true"] {
  border-color: rgba(74, 143, 212, 0.85);
  background: rgba(26, 51, 72, 0.96);
  color: #d7ebff;
}

.pefl10-to-repeat-btn {
  color: #e8d7b0;
}

.pefl10-to-repeat-btn:hover {
  border-color: rgba(210, 170, 90, 0.7);
  color: #f3e6c4;
}

#replay-quick-play[hidden],
#pefl10-to-repeat[hidden] {
  display: none !important;
}

body.replay--pefl10 .stats-side-dock {
  --replay-quick-controls-h: 1.78rem;
  --replay-quick-controls-gap: 0.26rem;
  --replay-quick-controls-pad: 0.3rem;
}

.stats-side-dock[hidden] {
  display: none !important;
}

.formation-fs--overlay {
  pointer-events: none;
  padding: 0.28rem 0.3rem 0.32rem;
  background: rgba(12, 16, 22, 0.58);
  border: 1px solid rgba(58, 74, 92, 0.45);
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

/* В доке статистики — без карточки и без внутренних отступов (поле вплотную к краю). */
.formation-fs--page-inline.formation-fs--overlay {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
}

.formation-fs--dock {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  align-self: center;
}

.stats-fs-dock--home .formation-fs--dock {
  align-self: flex-start;
}

.stats-fs-dock--away .formation-fs--dock {
  align-self: flex-end;
}

.formation-fs--dock[hidden] {
  display: none !important;
}

.formation-fs--dock .formation-fs__pitch {
  width: 4.85rem;
}

.formation-fs--page-inline {
  flex: 1 1 0;
  min-height: 0;
  align-self: stretch;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  margin-top: 0;
}

.formation-fs--page-inline .formation-fs__layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.38rem;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
}

.formation-fs--page-inline .formation-fs__scheme {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  align-items: center;
  gap: 0.22rem;
  align-self: stretch;
  min-width: 1rem;
  padding: 0.1rem 0.06rem 0.1rem 0;
  color: rgba(214, 224, 236, 0.9);
  user-select: none;
}

.formation-fs__scheme-line {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.formation-fs__scheme[hidden] {
  display: none !important;
}

.formation-fs--page-inline[hidden] {
  display: none !important;
}

.formation-fs--page-inline .formation-fs__pitch {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  aspect-ratio: 105 / 68;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  border: none;
  overflow: hidden;
}

.formation-fs--page-inline .formation-fs__field {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
  background:
    linear-gradient(90deg, rgba(52, 98, 58, 0.78) 0%, rgba(68, 118, 72, 0.72) 50%, rgba(52, 98, 58, 0.78) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 0.5rem,
      rgba(0, 0, 0, 0.045) 0.5rem,
      rgba(0, 0, 0, 0.045) 1rem
    );
  border: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.formation-fs__field-lines {
  display: block;
  width: 100%;
  height: 100%;
}

.formation-fs--page-inline .formation-fs__grid--landscape {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
  z-index: 1;
}

.stats-team-panel-dock .formation-fs--overlay {
  pointer-events: auto;
}

.stats-team-panel-dock .formation-fs--overlay .formation-fs__pitch,
.stats-team-panel-dock .formation-fs--overlay .formation-fs__field {
  pointer-events: none;
}

.formation-fs__shirt--pickable {
  pointer-events: auto;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.formation-fs__shirt--pickable:hover {
  transform: scale(1.08);
  z-index: 2;
}

.formation-fs__shirt--highlight {
  box-shadow:
    0 0 0 2px rgba(130, 190, 255, 0.95),
    0 0 10px rgba(90, 150, 255, 0.55),
    0 1px 3px rgba(0, 0, 0, 0.28);
  z-index: 3;
  transform: scale(1.1);
}

.formation-fs--page-inline .formation-fs__row--landscape-col {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  transform: translateX(-50%);
}

.formation-fs--page-inline .formation-fs__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 0;
  width: auto;
}

.formation-fs--page-inline .formation-fs__cell--empty {
  visibility: hidden;
  pointer-events: none;
}

.formation-fs--page-inline .formation-fs__shirt {
  width: 0.92rem;
  height: 0.92rem;
  min-width: 0.92rem;
  min-height: 0.92rem;
  aspect-ratio: 1;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 0.48rem;
  line-height: 1;
}

.formation-fs {
  flex: 0 0 auto;
}

.formation-fs--page-inline.formation-fs {
  flex: 1 1 0;
}

.formation-fs__pitch {
  width: 4.85rem;
  aspect-ratio: 5 / 7.2;
  padding: 0.22rem 0.18rem;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(58, 107, 66, 0.55) 0%, rgba(74, 122, 78, 0.5) 50%, rgba(58, 107, 66, 0.55) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 0.55rem,
      rgba(0, 0, 0, 0.05) 0.55rem,
      rgba(0, 0, 0, 0.05) 1.1rem
    );
  border: 1px solid rgba(90, 120, 90, 0.45);
  box-sizing: border-box;
}

.formation-fs__grid {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 0.06rem;
}

.formation-fs__row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.05rem;
  flex: 1 1 0;
  min-height: 0;
  align-items: center;
}

.formation-fs__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0.72rem;
}

.formation-fs__cell--empty {
  visibility: hidden;
}

.formation-fs__cell--stack {
  flex-direction: column;
  gap: 0.04rem;
}

.formation-fs__shirt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  box-sizing: border-box;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  font-size: 0.48rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.formation-fs__shirt--sub {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 1px 3px rgba(0, 0, 0, 0.28);
}

.formation-fs__shirt-num {
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.formation-fs__shirt[hidden] {
  display: none !important;
}

.stats-team-block {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: visible;
}

.stats-team-block .stats-team {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 0.42rem 0.44rem 0.48rem;
  background: var(--panel);
  border: 1px solid #2a3544;
  border-radius: 8px;
}

.stats-team-block .stats-team__name {
  text-align: center;
}

.stats-fs__team {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}

.stats-fs__name {
  margin: 0;
  font-size: 0.648rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.stats-fs__scroll {
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  --stats-row-pad-y: 0.108rem;
  --stats-row-font: 0.612rem;
  --stats-row-head-font: 0.558rem;
  --stats-row-line-h: 1.125;
  --stats-badge-size: 10px;
  --stats-card-badge-h: 0.522rem;
  --stats-card-badge-w: 0.378rem;
  --stats-block-gap: 0.252rem;
}

.stats-fs__scroll .stats-table {
  font-size: var(--stats-row-font);
}

.stats-fs__scroll .stats-table th,
.stats-fs__scroll .stats-table td {
  padding: var(--stats-row-pad-y) 0.12rem;
  line-height: var(--stats-row-line-h);
}

.stats-fs__scroll .stats-table th {
  background: rgba(18, 24, 32, 0.92);
  font-size: var(--stats-row-head-font);
}

.stats-fs__scroll .stats-player-badge__ball--fallback {
  width: var(--stats-badge-size);
  height: var(--stats-badge-size);
}

.stats-fs__scroll .stats-player-badge__boot-img {
  height: var(--stats-badge-size);
}

.stats-fs__scroll .stats-player-badge--y,
.stats-fs__scroll .stats-player-badge--r {
  width: var(--stats-card-badge-w);
  height: var(--stats-card-badge-h);
}

.stats-table--compact .stats-table__name {
  max-width: 7.2rem;
}

.stats-table--compact .stats-table__cond {
  min-width: 1.65rem;
}

.stats-table--compact .stats-table__rating {
  min-width: 2.1rem;
  white-space: nowrap;
}

.stats-fs__row--sub-on .stats-table__num {
  white-space: nowrap;
}

.stats-fs__row--sub-on .stats-table__num::after {
  content: "↑";
  display: inline;
  margin-left: 0.04rem;
  font-size: 0.58em;
  line-height: 1;
  font-weight: 700;
  color: var(--muted);
  vertical-align: baseline;
}

.stats-fs .stats-table tr[hidden] {
  display: none;
}

.scrub--overlay {
  gap: 0;
  margin: 0;
}

.scrub--wide {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  font-size: 0.85rem;
  color: var(--muted);
  user-select: none;
  -webkit-user-select: none;
}

.scrub-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.pitch-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  flex: 0 1 auto;
  width: auto;
  height: auto;
  align-self: center;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.pitch-wrap:fullscreen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: #070b10;
  box-shadow: none;
}

.pitch-wrap:fullscreen .pitch-stage {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.pitch-wrap:fullscreen .pitch-scrub-band {
  padding-bottom: 0;
}

/* Page mode: линейка под полем без зазора */
body:not(.replay--timeline-on-pitch):not(.replay--compact) .pitch-column {
  gap: 0;
}

body:not(.replay--timeline-on-pitch):not(.replay--compact) .bottom-bar {
  margin-top: 0;
}

body:not(.replay--timeline-on-pitch):not(.replay--compact) .pitch-wrap {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

body:not(.replay--timeline-on-pitch):not(.replay--compact) .timeline-page-slot {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.bottom-bar {
  flex: 0 0 auto;
  margin: 0;
  margin-top: auto;
  max-width: 100%;
  min-height: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  row-gap: 0.35rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.timeline-page-slot {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
  background: var(--panel);
  border: 1px solid #2a3544;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.timeline-page-slot:has(.timeline--split-layout) {
  overflow: visible;
}

.timeline-fs-slot > * {
  pointer-events: auto;
  flex-shrink: 0;
  min-height: 0;
}

.match-text-page-slot,
.match-text-fs-slot {
  flex: 0 0 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid #2a3544;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.match-text-fs-slot {
  order: 2;
  position: relative;
  max-height: none;
  padding: 0 0.35rem;
  pointer-events: none;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.match-text-fs-slot > .match-text-panel {
  pointer-events: auto;
  background: rgba(26, 34, 44, 0.94);
  border: 1px solid #2a3544;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.match-text-panel {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  background: rgba(8, 12, 18, 0.62);
  overflow: hidden;
}

.match-text-page-slot > .match-text-panel {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: rgba(8, 12, 18, 0.62);
}

.match-text-panel--overlay {
  border: none;
  background: rgba(26, 34, 44, 0.94);
}

.match-text-panel__scroll {
  --match-text-lines: 4;
  --match-text-font: 0.76rem;
  --match-text-lh: 1.45;
  --match-text-pad-top: 0;
  --match-text-pad-bottom: 0.38rem;
  --match-text-body-h: calc(1em * var(--match-text-lh) * var(--match-text-lines));
  flex: 0 0 auto;
  box-sizing: border-box;
  height: calc(var(--match-text-body-h) + var(--match-text-pad-top) + var(--match-text-pad-bottom));
  overflow: hidden;
  padding: var(--match-text-pad-top) 0.55rem var(--match-text-pad-bottom);
  font-size: var(--match-text-font);
  line-height: var(--match-text-lh);
  color: rgba(220, 228, 238, 0.9);
}

.match-text-panel__content {
  height: var(--match-text-body-h);
  max-height: var(--match-text-body-h);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  flex: 0 0 auto;
}

.match-text-line {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: var(--match-text-lh, 1.45);
}

.match-text-part--home {
  color: rgba(140, 180, 255, 0.94);
}

.match-text-part--away {
  color: rgba(255, 140, 140, 0.94);
}

.match-text-part--neutral {
  color: rgba(220, 228, 238, 0.88);
}

.match-text-part--minute {
  color: rgba(176, 186, 202, 0.9);
  font-weight: 600;
}

.match-text-panel[hidden] {
  display: none !important;
}

.marker-field-dock {
  --marker-field-btn-h: 1.85rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.32rem;
  pointer-events: auto;
}

.marker-field-dock[hidden] {
  display: none !important;
}

.marker-field-spoiler {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  vertical-align: bottom;
  max-width: none;
  pointer-events: auto;
}

.marker-field-spoiler[hidden] {
  display: none !important;
}

.marker-field-spoiler__tab {
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  width: 1.85rem;
  height: 1.85rem;
  min-width: 1.85rem;
  min-height: 1.85rem;
  margin: 0;
  padding: 0;
}

.marker-field-spoiler--open > .marker-field-spoiler__tab {
  border-color: #3d9a6e;
  background: rgba(28, 48, 38, 0.94);
  color: #b8f0d0;
}

.marker-field-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(58, 74, 92, 0.9);
  background: rgba(12, 16, 22, 0.9);
  color: #d8e4f0;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  font: inherit;
}

.marker-field-btn:hover:not(:disabled) {
  border-color: rgba(90, 120, 150, 0.95);
  background: rgba(22, 30, 40, 0.94);
  color: #fff;
}

.marker-field-btn__icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.marker-tour-btn[aria-pressed="true"] {
  border-color: #c9a227;
  background: rgba(58, 46, 18, 0.94);
  color: #ffe8a3;
}

.marker-tour-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.marker-field-spoiler__panel {
  position: absolute;
  left: calc(100% + 0.32rem);
  bottom: 0;
  margin: 0;
  padding: 0 0.28rem;
  border-radius: 6px;
  border: 1px solid #2a3544;
  background: rgba(12, 16, 22, 0.94);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  height: 1.85rem;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: min(calc(100vw - 7rem), 96vw);
  overflow: hidden;
}

.marker-field-spoiler__panel[hidden] {
  display: none !important;
}

.marker-field-spoiler__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.28rem;
  min-width: 0;
  height: 100%;
}

.marker-xg-min-btn__label {
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  pointer-events: none;
}

.controls {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid #2a3544;
  overflow: hidden;
  min-height: 0;
}

.controls--popup {
  flex: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: auto;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.controls--popup .controls__body {
  overflow: visible;
  flex: 0 1 auto;
}

.side-column {
  flex: 0 0 min(19rem, 32vw);
  width: min(19rem, 32vw);
  max-width: 19rem;
  min-width: 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}

#controls-host {
  display: none !important;
}

#controls-host[hidden] {
  display: none !important;
}

.controls-host {
  display: none !important;
}

.settings-window-body {
  margin: 0;
  min-height: 0;
  height: auto;
  overflow-x: hidden;
  background: var(--bg);
}

.settings-window__mount {
  display: block;
  min-height: 0;
  padding-bottom: 1rem;
}

.settings-window__mount--scroll {
  overflow-y: auto;
}

.settings-window__error {
  margin: 1.5rem;
  color: var(--danger);
}

.dev-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  overflow: hidden;
}

.dev-settings-overlay[hidden] {
  display: none !important;
}

.dev-settings-overlay__backdrop {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  background: rgba(4, 8, 14, 0.72);
}

.dev-settings-overlay__panel {
  position: fixed;
  z-index: 1;
  width: min(960px, calc(100vw - 1.5rem));
  max-height: min(88vh, 920px);
  overflow: auto;
  pointer-events: auto;
  background: var(--bg);
  border: 1px solid #2a3544;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.dev-settings-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.45rem 0.5rem 0.45rem 0.85rem;
  border-bottom: 1px solid #2a3544;
  background: rgba(12, 18, 26, 0.96);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.dev-settings-overlay__panel--dragging .dev-settings-overlay__head {
  cursor: grabbing;
}

.dev-settings-overlay__title {
  flex: 1 1 auto;
  min-width: 0;
  color: #c8d8ea;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dev-settings-overlay__close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid #3a4a5c;
  border-radius: 8px;
  background: rgba(12, 18, 26, 0.92);
  color: #c8d8ea;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.dev-settings-overlay__close:hover {
  background: rgba(26, 40, 56, 0.95);
  color: #fff;
}

body.replay--dev-settings-open {
  overflow: hidden;
}

.dev-settings-overlay .settings-window__mount {
  padding: 0 0.75rem 1rem;
}

.stats-panel {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.stats-panel__teams {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0;
  overflow: visible;
}

.stats-team {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stats-team__name {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-team__scroll {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  --stats-row-pad-y: 0.12rem;
  --stats-row-font: 0.68rem;
  --stats-row-head-font: 0.62rem;
  --stats-row-line-h: 1.25;
  --stats-badge-size: 11px;
  --stats-card-badge-h: 0.58rem;
  --stats-card-badge-w: 0.42rem;
  --stats-block-gap: 0.28rem;
}

.stats-team__scroll .stats-table {
  flex: 0 0 auto;
  font-size: var(--stats-row-font);
}

.stats-team__scroll .stats-table th,
.stats-team__scroll .stats-table td {
  padding: var(--stats-row-pad-y) 0.18rem;
  line-height: var(--stats-row-line-h);
}

.stats-team__scroll .stats-table th {
  font-size: var(--stats-row-head-font);
}

.stats-team__scroll .stats-player-badge__ball--fallback {
  width: var(--stats-badge-size);
  height: var(--stats-badge-size);
}

.stats-team__scroll .stats-player-badge__boot-img {
  height: var(--stats-badge-size);
}

.stats-team__scroll .stats-player-badge--y,
.stats-team__scroll .stats-player-badge--r {
  width: var(--stats-card-badge-w);
  height: var(--stats-card-badge-h);
}

.stats-team__scroll .stats-team-panel-dock {
  margin-top: var(--stats-block-gap);
}

.stats-team__scroll .stats-team-panel-dock,
.stats-team__scroll .formation-fs--page-inline {
  cursor: default;
}

.stats-team-panel-dock {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.22rem;
  flex: 1 1 0;
  min-height: 3.5rem;
  min-width: 0;
}

.stats-team-panel-dock__view {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  container-type: size;
}

.stats-team-panel-dock__view > .formation-fs--page-inline,
.stats-team-panel-dock__view > .stats-team-panel-dock__panel {
  flex: 1 1 0;
  min-height: 0;
}

.stats-team-panel-dock__panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(10, 14, 20, 0.35);
  border: 1px solid rgba(42, 53, 68, 0.55);
  --stats-row-pad-y: 0.1rem;
  --stats-row-font: 0.62rem;
  --stats-row-head-font: 0.58rem;
  --stats-row-line-h: 1.05;
  --stats-badge-size: 8px;
  --stats-card-badge-h: 0.42rem;
  --stats-card-badge-w: 0.32rem;
}

.stats-team-panel-dock__panel .stats-table {
  font-size: var(--stats-row-font);
}

.stats-team-panel-dock__panel .stats-table th,
.stats-team-panel-dock__panel .stats-table td {
  padding: var(--stats-row-pad-y) 0.14rem;
  line-height: var(--stats-row-line-h);
}

.stats-team-panel-dock__panel[hidden] {
  display: none !important;
}

.stats-team-panel-dock__empty {
  margin: 0;
  padding: 0.55rem 0.45rem;
  font-size: 0.62rem;
  color: var(--muted);
  text-align: center;
}

.stats-team-panel-dock__empty[hidden] {
  display: none !important;
}

.stats-team-panel-dock__tabs {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 0.14rem;
  flex: 0 0 1.85rem;
  min-width: 1.85rem;
  min-height: 0;
}

.stats-team-panel-dock__tab {
  appearance: none;
  margin: 0;
  flex: 1 1 0;
  min-height: 0;
  padding: 0.12rem;
  border: 1px solid rgba(58, 74, 92, 0.55);
  border-radius: 4px;
  background: rgba(18, 24, 32, 0.82);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.stats-team-panel-dock__tab-icon {
  display: block;
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  max-width: 0.95rem;
  max-height: 0.95rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.stats-team-panel-dock__tab:hover {
  color: var(--text);
  background: rgba(28, 36, 48, 0.92);
  border-color: rgba(80, 100, 128, 0.65);
}

.stats-team-panel-dock__tab--active,
.stats-team-panel-dock__tab[aria-pressed="true"] {
  color: var(--text);
  background: rgba(42, 58, 82, 0.95);
  border-color: rgba(100, 140, 200, 0.55);
  box-shadow: inset 0 0 0 1px rgba(100, 140, 200, 0.22);
}

.stats-table--dock-panel {
  flex: 1 1 auto;
}

.stats-table--dock-panel tbody tr {
  cursor: pointer;
}

.stats-table__row--pickable {
  cursor: pointer;
}

.stats-table__row--highlight td {
  background: rgba(70, 120, 200, 0.22);
}

.stats-table__row--highlight .stats-table__name-text {
  color: #c8dcff;
}

.stats-table__row--pickable:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.stats-table__row--pickable.stats-table__row--highlight:hover td {
  background: rgba(70, 120, 200, 0.28);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.stats-table th,
.stats-table td {
  padding: 0.12rem 0.18rem;
  text-align: center;
  border-bottom: 1px solid rgba(42, 53, 68, 0.65);
}

.stats-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.62rem;
}

.stats-table__name {
  text-align: left;
  max-width: 6.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-table__name-text {
  vertical-align: middle;
}

.stats-table__badges {
  display: inline-flex;
  align-items: center;
  gap: 0.14rem;
  margin-left: 0.2rem;
  vertical-align: middle;
}

.stats-player-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.stats-player-badge__ball {
  display: block;
  border-radius: 50%;
  flex-shrink: 0;
}

.stats-player-badge__ball--fallback {
  width: 11px;
  height: 11px;
  background: #ebe4d8;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.stats-player-badge--assist {
  filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.45));
}

.stats-player-badge__boot-img {
  height: 11px;
  width: auto;
  display: block;
  object-fit: contain;
}

.stats-player-badge--y,
.stats-player-badge--r {
  width: 0.42rem;
  height: 0.58rem;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.stats-player-badge--y {
  background: linear-gradient(165deg, #f5e06a 0%, #d4b820 100%);
}

.stats-player-badge--r {
  background: linear-gradient(165deg, #f06a6a 0%, #c82828 100%);
}

.stats-table__cond,
.stats-table__rating {
  font-variant-numeric: tabular-nums;
}

.stats-subbed-block {
  margin-top: 0.28rem;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(42, 53, 68, 0.55);
}

.stats-subbed-block[hidden] {
  display: none !important;
}

.stats-subbed-block__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.12rem 0.18rem 0.18rem;
}

.stats-table--subbed tr {
  opacity: 0.9;
}

.stats-table--bench tr {
  opacity: 0.88;
}

.stats-table__num {
  color: var(--muted);
  width: 1.4rem;
}

/* Legacy blocks removed from page stats — kept for archived copies */
.stats-subbed-block[hidden],
.stats-bench-spoiler[hidden] {
  display: none !important;
}

.stats-card--y {
  color: #e8c84a;
}

.stats-card--r {
  color: #e86a6a;
}

/* Режимы просмотра (оверлей после загрузки матча) */
.view-mode-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(8px);
}

.view-mode-overlay[hidden] {
  display: none;
}

/* Стартовые составы — полноэкранная TV-карточка перед матчем */
.starting-lineup-overlay {
  --lineup-accent: #4a6080;
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 1.6vw, 1rem);
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(42, 68, 98, 0.42), transparent 62%),
    linear-gradient(180deg, rgba(5, 9, 15, 0.96) 0%, rgba(7, 11, 18, 0.98) 100%);
  backdrop-filter: blur(12px);
}

.starting-lineup-overlay[hidden] {
  display: none !important;
}

.starting-lineup-card {
  width: min(86rem, 98vw);
  max-height: min(96vh, 68rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.72rem 0.85rem 0.62rem;
  border: 1px solid rgba(68, 88, 112, 0.5);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%),
    linear-gradient(165deg, rgba(14, 21, 30, 0.98), rgba(8, 12, 18, 0.99));
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.starting-lineup-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.42rem;
  border-bottom: 1px solid rgba(58, 74, 94, 0.42);
}

.starting-lineup-card__head-main {
  min-width: 0;
}

.starting-lineup-card__title {
  margin: 0;
  font-size: clamp(0.98rem, 1.7vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.starting-lineup-card__subtitle {
  margin: 0.14rem 0 0;
  font-size: 0.72rem;
  color: var(--muted, #9aa8b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.starting-lineup-card__pitch {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.starting-lineup-pretalk {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0 0.15rem;
  max-height: 4.2rem;
  overflow: hidden;
}

.starting-lineup-pretalk[hidden] {
  display: none !important;
}

.starting-lineup-pretalk__line {
  --pretalk-accent: rgba(120, 148, 178, 0.55);
  margin: 0;
  padding: 0.22rem 0.55rem 0.22rem 0.62rem;
  border-left: 2px solid var(--pretalk-accent);
  font-size: clamp(0.72rem, 1.32vw, 0.84rem);
  line-height: 1.38;
  color: rgba(214, 224, 238, 0.9);
  text-wrap: balance;
}

.starting-lineup-pretalk__line--home,
.starting-lineup-pretalk__line--away {
  background: linear-gradient(90deg, color-mix(in srgb, var(--pretalk-accent) 14%, transparent), transparent 72%);
}

.starting-lineup-pitch--shared {
  width: 100%;
}

.starting-lineup-card__teams {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  overflow: auto;
}

.starting-lineup-team {
  --lineup-accent: #4a6080;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
  padding: 0.48rem 0.52rem 0.52rem;
  border-radius: 10px;
  background: rgba(8, 13, 20, 0.72);
  border: 1px solid rgba(48, 62, 80, 0.48);
  overflow: hidden;
}

.starting-lineup-team__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--lineup-accent) 18%,
    color-mix(in srgb, var(--lineup-accent) 72%, white) 50%,
    var(--lineup-accent) 82%,
    transparent 100%
  );
  opacity: 0.92;
}

.starting-lineup-team__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.starting-lineup-team__swatch {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.starting-lineup-team__titles {
  min-width: 0;
}

.starting-lineup-team__name {
  margin: 0;
  font-size: clamp(0.82rem, 1.35vw, 0.94rem);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.starting-lineup-team__manager {
  margin: 0.08rem 0 0;
  font-size: 0.64rem;
  color: var(--muted, #9aa8b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.starting-lineup-pitch {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  perspective: 1100px;
}

.starting-lineup-pitch__tilt {
  width: 100%;
  max-width: 100%;
  transform: rotateX(14deg);
  transform-origin: center 88%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.38),
    0 2px 0 rgba(255, 255, 255, 0.04) inset;
  border: 1px solid rgba(72, 92, 118, 0.35);
}

/* PEFL 2.4: 16:9 выше — слабее tilt и запас снизу, чтобы не резать бровку */
body:not(.replay--pefl10) .starting-lineup-pitch {
  align-items: center;
  padding-bottom: 0.55rem;
  box-sizing: border-box;
}

body:not(.replay--pefl10) .starting-lineup-pitch__tilt {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  transform: rotateX(8deg);
  transform-origin: center bottom;
  display: flex;
  align-items: center;
  justify-content: center;
}

body:not(.replay--pefl10) .starting-lineup-pitch__canvas {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

.starting-lineup-pitch__canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  background: #1a2a1c;
}

.starting-lineup-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.starting-lineup-player {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  font-size: 0.7rem;
  line-height: 1.2;
}

.starting-lineup-player__num {
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #b8c6d4;
}

.starting-lineup-player__name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e8eef4;
}

.starting-lineup-player__cap {
  margin-left: 0.18rem;
  font-size: 0.58rem;
  font-weight: 700;
  color: #e8b84a;
  vertical-align: baseline;
}

.starting-lineup-bench {
  padding-top: 0.28rem;
  border-top: 1px solid rgba(52, 68, 86, 0.38);
}

.starting-lineup-bench__label {
  margin-bottom: 0.18rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d8f9f;
}

.starting-lineup-bench__count {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.starting-lineup-list--bench {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0.38rem;
  row-gap: 0.06rem;
}

.starting-lineup-list--bench .starting-lineup-player {
  font-size: 0.64rem;
}

.starting-lineup-list--bench .starting-lineup-player__num {
  font-size: 0.6rem;
  color: #8a9aab;
}

.starting-lineup-list--bench .starting-lineup-player__name {
  color: #b8c4d0;
}

.starting-lineup-start-btn {
  flex: 0 0 auto;
  padding: 0.42rem 0.82rem;
  border: 1px solid rgba(88, 112, 140, 0.65);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(48, 66, 88, 0.95), rgba(30, 42, 58, 0.98));
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.starting-lineup-start-btn:hover {
  border-color: #7a96b8;
  background: linear-gradient(180deg, rgba(58, 80, 106, 0.98), rgba(36, 50, 68, 0.99));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.starting-lineup-start-btn:focus-visible {
  outline: 2px solid #6ea8ff;
  outline-offset: 2px;
}

.starting-lineup-card__hint {
  margin: 0;
  text-align: center;
  font-size: 0.64rem;
  color: #6f8194;
}

body.replay--starting-lineup .layout {
  pointer-events: none;
}

@media (max-width: 720px) {
  .starting-lineup-card__head {
    flex-wrap: wrap;
  }

  .starting-lineup-card__teams {
    grid-template-columns: 1fr;
  }

  .starting-lineup-pitch__tilt {
    transform: rotateX(10deg);
  }

  .starting-lineup-list--bench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.view-mode-dialog {
  width: min(28rem, 100%);
  padding: 1.35rem 1.25rem 1.25rem;
  border: 1px solid #3a4a5e;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(18, 26, 36, 0.98), rgba(10, 16, 24, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.view-mode-dialog__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.view-mode-dialog__hint {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted, #9aa8b8);
  line-height: 1.45;
}

.view-mode-dialog__hint--scope {
  margin-top: 0;
}

.view-mode-step {
  display: none;
  flex-direction: column;
  gap: 0.55rem;
}

.view-mode-step.view-mode-step--active {
  display: flex !important;
}

.view-mode-step[hidden] {
  display: none !important;
}

/* display:flex ниже перебивает UA [hidden] — иначе видны peфл10 / debug */
.view-mode-btn[hidden] {
  display: none !important;
}

.view-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid #3d4f66;
  border-radius: 10px;
  background: rgba(22, 32, 44, 0.88);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.1s ease;
}

.view-mode-btn:hover {
  border-color: #5a7a9a;
  background: rgba(32, 46, 62, 0.95);
}

.view-mode-btn:focus-visible {
  outline: 2px solid rgba(130, 170, 210, 0.65);
  outline-offset: 2px;
}

.view-mode-btn__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.view-mode-btn__desc {
  font-size: 0.8rem;
  color: var(--muted, #9aa8b8);
  line-height: 1.35;
}

.view-mode-back {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  border: none;
  background: none;
  color: #8ea8c4;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.view-mode-back:hover {
  color: #c8d8ea;
}

.view-mode-play-another {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.85rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #3a4a5c;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.view-mode-play-another:hover {
  color: var(--text);
  border-color: #5a7088;
  background: rgba(255, 255, 255, 0.04);
}

.view-mode-play-another[hidden] {
  display: none !important;
}

body.replay--view-mode-pick .view-mode-play-another {
  width: 100%;
  margin-top: 0.35rem;
}

body.replay--play-buffer.replay--play-buffer-prelineup .pitch-wrap,
body.replay--play-buffer.replay--play-buffer-prelineup .hud,
body.replay--play-buffer.replay--play-buffer-prelineup .bottom-bar,
body.replay--play-buffer.replay--play-buffer-prelineup .stats-side-dock,
body.replay--play-buffer.replay--play-buffer-prelineup .pitch-column,
body.replay--play-buffer.replay--starting-lineup .pitch-wrap,
body.replay--play-buffer.replay--starting-lineup .hud,
body.replay--play-buffer.replay--starting-lineup .bottom-bar,
body.replay--play-buffer.replay--starting-lineup .stats-side-dock,
body.replay--play-buffer.replay--starting-lineup .pitch-column {
  display: none !important;
}

body.replay--play-buffer [data-view-mode="compact"],
body.replay--play-buffer [data-view-mode="debug"] {
  display: none !important;
}

/* Компактный режим — поле + HUD + линейка (виджет / iframe) */
body.replay--compact {
  background: #060a10;
}

body.replay--compact .layout {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  gap: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}

body.replay--compact .pitch-column {
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--replay-compact-max-w, 21.25rem);
  min-width: 0;
  min-height: 0;
  gap: 0;
  align-items: center;
  justify-content: center;
}

body.replay--compact .pitch-wrap {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}

body.replay--compact .stats-side-dock,
body.replay--compact .pitch-timeline-tools,
body.replay--compact .marker-field-dock,
body.replay--compact .match-text-page-slot,
body.replay--compact .match-text-panel,
body.replay--compact .pitch-zoom-dock,
body.replay--compact .replay-quick-controls,
body.replay--compact #fullscreen-toggle,
body.replay--compact #weather-quick-toggle,
body.replay--compact #pefl10-precip-toggle,
body.replay--compact #replay-quick-play,
body.replay--compact #pefl10-to-repeat,
body.replay--compact #open-settings-window {
  display: none !important;
}

body.replay--compact .pitch-scrub-overlay {
  row-gap: calc(0.3rem * var(--replay-compact-scale, 1));
}

body.replay--compact #scrub {
  --scrub-track-h: calc(2.5px * var(--replay-compact-scale, 1));
  --scrub-thumb: calc(7px * var(--replay-compact-scale, 1));
}

body.replay--compact .timeline-style--broadcast {
  --scrub-track-h: calc(2.5px * var(--replay-compact-scale, 1));
  --scrub-thumb: calc(7px * var(--replay-compact-scale, 1));
}

body.replay--compact .timeline-style--broadcast #scrub {
  top: 50%;
  bottom: auto;
  height: var(--scrub-thumb);
  transform: translateY(-50%);
}

body.replay--compact .timeline-style--broadcast #scrub::-webkit-slider-runnable-track {
  height: var(--scrub-track-h);
}

body.replay--compact .timeline-style--broadcast #scrub::-moz-range-track {
  height: var(--scrub-track-h);
}

body.replay--compact .timeline-style--broadcast #scrub::-moz-range-progress {
  height: var(--scrub-track-h);
}

body.replay--compact .timeline-style--broadcast .scrub-progress {
  height: var(--scrub-track-h);
}

body.replay--compact #scrub::-webkit-slider-thumb {
  border-width: 1px;
  box-sizing: border-box;
}

body.replay--compact #scrub::-moz-range-thumb {
  border-width: 1px;
  box-sizing: border-box;
}

body.replay--compact .scrub-wrap {
  grid-template-rows:
    calc(0.75rem * var(--replay-compact-scale, 1))
    calc(0.55rem * var(--replay-compact-scale, 1));
}

body.replay--compact .scrub-track {
  height: calc(0.55rem * var(--replay-compact-scale, 1));
}

body.replay--compact .scrub-markers {
  height: calc(0.75rem * var(--replay-compact-scale, 1));
}

body.replay--compact .timeline-style--broadcast .scrub-marker::after {
  height: calc(0.42rem * var(--replay-compact-scale, 1));
}

body.replay--compact .scrub-marker--bookmark::before {
  width: calc(14px * var(--replay-compact-scale, 1));
  height: calc(16px * var(--replay-compact-scale, 1));
}

body.replay--compact .hud {
  top: 0;
  left: 0;
  gap: 0.2rem;
  max-width: 100%;
}

body.replay--compact #hud {
  transform: scale(calc(2 * var(--replay-compact-scale, 1)));
  transform-origin: top left;
}

body.replay--compact .hud-board,
body.replay--compact .hud-board.hud-board--stats-open {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  min-height: var(--hud-plate-h);
  height: var(--hud-plate-h);
  --hud-compact-team-slot: 2.12em;
}

body.replay--compact .hud-board__score-row,
body.replay--compact .hud-board.hud-board--stats-open .hud-board__score-row {
  width: max-content;
  gap: 0.58rem;
  padding: 0 0.68rem;
  box-sizing: border-box;
  pointer-events: none;
  cursor: default;
}

body.replay--compact .hud-board__score-row .hud-team,
body.replay--compact .hud-board.hud-board--stats-open .hud-board__score-row .hud-team {
  display: grid;
  place-items: center;
  flex: 0 0 var(--hud-compact-team-slot, 2.12em);
  width: var(--hud-compact-team-slot, 2.12em);
  min-width: var(--hud-compact-team-slot, 2.12em);
  max-width: var(--hud-compact-team-slot, 2.12em);
  box-sizing: border-box;
  overflow: hidden;
  font-size: var(--hud-team-name-size);
  letter-spacing: 0;
  text-align: center;
  gap: 0;
}

body.replay--compact .hud-board__score-row .hud-team__pill {
  display: none !important;
}

body.replay--compact .hud-board__score-row .hud-team__name {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  text-align: center;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

body.replay--compact .hud-board--kit-dot .hud-team--home::before,
body.replay--compact .hud-board--kit-dot .hud-team--away::after,
body.replay--compact .hud-board--kit-stripe .hud-team--home::before,
body.replay--compact .hud-board--kit-stripe .hud-team--away::after {
  content: none;
}

body.replay--compact .hud-board__stats-panel {
  display: none !important;
}

body.replay--compact .fps-overlay-stack,
body.replay--compact .fps-overlay,
body.replay--compact #scrub-xg,
body.replay--compact #weather-fx,
body.replay--compact #weather-haze {
  display: none !important;
}

body.replay--compact .bottom-bar {
  display: none !important;
}

body.replay--compact #timeline,
body.replay--compact .pitch-scrub-band,
body.replay--compact .scrub-markers,
body.replay--compact .scrub-markers-away,
body.replay--compact .scrub-markers-neutral {
  display: none !important;
}

body.replay--compact .timeline-fs-slot {
  padding: 0 0 calc(0.45rem * var(--replay-compact-scale, 1));
  pointer-events: none;
}

body.replay--compact .timeline-fs-slot > .timeline,
body.replay--compact .timeline--on-pitch {
  pointer-events: auto;
  background: rgba(8, 12, 18, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(6px * var(--replay-compact-scale, 1));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  padding: calc(0.12rem * var(--replay-compact-scale, 1)) 0
    calc(0.2rem * var(--replay-compact-scale, 1));
}

.compact-play-btn,
.compact-sound-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: calc(1.855rem * var(--replay-compact-scale, 1));
  height: calc(1.855rem * var(--replay-compact-scale, 1));
  padding: 0;
  border: 1px solid #3a4a5e;
  border-radius: 999px;
  background: rgba(12, 18, 26, 0.92);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

body.replay--compact .compact-play-btn:not([hidden]),
body.replay--compact .compact-sound-btn:not([hidden]) {
  display: inline-flex;
  position: absolute;
  top: calc(0.65rem * var(--replay-compact-scale, 1));
  z-index: 15;
  width: calc(1.855rem * 2.4 * var(--replay-compact-scale, 1));
  height: calc(1.855rem * 2.4 * var(--replay-compact-scale, 1));
}

body.replay--compact .compact-play-btn:not([hidden]) {
  right: calc(0.65rem * var(--replay-compact-scale, 1));
}

/* Полный / PEFL 1.0 на телефоне: play/pause на поле (#play в скрытом controls-host). */
body.replay--pitch-play-btn .compact-play-btn:not([hidden]) {
  display: inline-flex;
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 16;
  width: 2.75rem;
  height: 2.75rem;
}

body.replay--pitch-play-btn .compact-play-btn__icon {
  width: 1.2rem;
  height: 1.2rem;
}

body.replay--pitch-play-btn.replay--timeline-on-pitch .compact-play-btn:not([hidden]) {
  bottom: calc(0.45rem + var(--replay-timeline-on-pitch-band, 3.5rem));
}

body.replay--compact .compact-sound-btn:not([hidden]) {
  right: calc((0.65rem + 1.855rem * 2.4 + 0.4rem) * var(--replay-compact-scale, 1));
}

body.replay--compact .compact-play-btn__icon,
body.replay--compact .compact-sound-btn__icon {
  width: calc(0.875rem * 2.4 * var(--replay-compact-scale, 1));
  height: calc(0.875rem * 2.4 * var(--replay-compact-scale, 1));
}

.compact-play-btn:hover,
.compact-sound-btn:hover {
  border-color: #5a6d84;
  background: rgba(18, 26, 36, 0.96);
}

.compact-play-btn:active,
.compact-sound-btn:active {
  transform: scale(0.96);
}

.compact-play-btn__icon,
.compact-sound-btn__icon {
  width: calc(0.875rem * var(--replay-compact-scale, 1));
  height: calc(0.875rem * var(--replay-compact-scale, 1));
}

.compact-play-btn__icon[hidden],
.compact-sound-btn__icon[hidden] {
  display: none;
}

body.replay--compact .pitch-zoom-layer {
  cursor: pointer;
}

body.replay--compact .hud-clock-plate {
  width: 3.4rem;
  min-width: 3.4rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

body.replay--compact #clock {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-width: 4.5ch;
  text-align: center;
}

body.replay--compact #score {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Встраивание на главную (iframe) */
html.replay-html--embed-compact-pending body {
  background: #060a10;
}

html.replay-html--embed-compact-pending .layout {
  visibility: hidden;
  pointer-events: none;
}

html.replay-html--embed-compact-pending #fullscreen-toggle,
html.replay-html--embed-compact-pending #weather-quick-toggle,
html.replay-html--embed-compact-pending #pefl10-precip-toggle,
html.replay-html--embed-compact-pending #open-settings-window,
html.replay-html--embed-compact-pending #view-mode-overlay,
html.replay-html--embed-compact-pending #controls-host,
html.replay-html--embed-compact-pending #error,
html.replay-html--embed-compact-pending .pitch-timeline-tools,
html.replay-html--embed-compact-pending .pitch-zoom-dock {
  display: none !important;
}

html:has(body.replay--embed),
body.replay--embed {
  overflow: hidden;
  margin: 0;
  min-height: 0;
}

body.replay--embed .view-mode-overlay,
body.replay--embed .bottom-bar,
body.replay--embed .stats-side-dock,
body.replay--embed .match-text-page-slot,
body.replay--embed .match-text-panel,
body.replay--embed .pitch-timeline-tools,
body.replay--embed .marker-field-dock,
body.replay--embed .pitch-zoom-dock,
body.replay--embed #fullscreen-toggle,
body.replay--embed #weather-quick-toggle,
body.replay--embed #pefl10-precip-toggle,
body.replay--embed #open-settings-window,
body.replay--embed #controls-host,
body.replay--embed #error {
  display: none !important;
}

body.replay--embed-pending .layout {
  visibility: hidden;
  pointer-events: none;
}

/* Embed в сайдбаре PEFL: поле на всю рамку iframe */
html.replay-html--embed-compact-ready,
html.replay-html--embed-compact-ready body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.replay--embed.replay--compact {
  --replay-compact-max-w: 100%;
  width: 100%;
  height: 100%;
}

body.replay--embed.replay--compact .layout,
body.replay--embed.replay--compact .pitch-column {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
}

body.replay--embed.replay--compact .pitch-wrap {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.replay--view-mode-pick .layout {
  display: none;
}

body.replay--await-match .layout {
  display: none;
}

body.replay--await-match {
  background: #060a10;
}

body.replay--view-mode-pick .view-mode-overlay {
  background: #060a10;
  backdrop-filter: none;
}

/* Первый просмотр: на линейке видна только пройденная длина */
.timeline--view-first #scrub::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    #627a92 0%,
    #8ea2b8 var(--scrub-fill, 0%),
    transparent var(--scrub-fill, 0%),
    transparent 100%
  );
}

.timeline--view-first #scrub::-moz-range-track {
  background: transparent;
}

.timeline--view-first .scrub-progress {
  display: block;
}

.settings-window-btn,
.weather-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #3a4a5e;
  border-radius: 5px;
  background: rgba(12, 18, 26, 0.92);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.weather-quick-btn {
  overflow: hidden;
}

#open-settings-window[hidden] {
  display: none !important;
}

.pefl10-precip-btn {
  display: none;
}

body.replay--pefl10 #weather-quick-toggle {
  display: none !important;
}

body.replay--pefl10 #pefl10-precip-toggle:not([hidden]) {
  display: inline-flex;
}

.pefl10-precip-btn[aria-pressed="false"] {
  color: rgba(210, 220, 232, 0.55);
}

.pefl10-precip-btn[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 2px;
  background: currentColor;
  transform: rotate(-32deg);
  border-radius: 1px;
  pointer-events: none;
}

.pitch-fullscreen-btn[aria-pressed="true"] {
  border-color: #4a8fd4;
  background: rgba(26, 51, 72, 0.96);
}

.weather-quick-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.weather-quick-btn[data-weather="summer"] {
  border-color: rgba(210, 168, 48, 0.72);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(255, 196, 72, 0.22);
}

.weather-quick-btn[data-weather="summer"]::before {
  background: radial-gradient(circle at 50% 35%, rgba(255, 214, 96, 0.28), transparent 68%);
}

.weather-quick-btn[data-weather="autumn"] {
  border-color: rgba(196, 118, 52, 0.78);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(210, 128, 58, 0.2);
}

.weather-quick-btn[data-weather="autumn"]::before {
  background: radial-gradient(circle at 40% 60%, rgba(210, 110, 48, 0.22), transparent 70%);
}

.weather-quick-btn[data-weather="rain"] {
  border-color: rgba(74, 132, 184, 0.82);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(72, 148, 210, 0.22);
}

.weather-quick-btn[data-weather="rain"]::before {
  background: radial-gradient(circle at 50% 30%, rgba(96, 168, 228, 0.2), transparent 72%);
}

.weather-quick-btn[data-weather="winter"] {
  border-color: rgba(148, 188, 228, 0.82);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(168, 210, 255, 0.24);
}

.weather-quick-btn[data-weather="winter"]::before {
  background: radial-gradient(circle at 50% 40%, rgba(196, 228, 255, 0.24), transparent 70%);
}

.weather-quick-btn:hover {
  transform: translateY(-1px);
}

.weather-quick-btn[data-weather="summer"]:hover {
  border-color: #e8c050;
  background: rgba(28, 24, 14, 0.96);
}

.weather-quick-btn[data-weather="autumn"]:hover {
  border-color: #d88848;
  background: rgba(26, 18, 12, 0.96);
}

.weather-quick-btn[data-weather="rain"]:hover {
  border-color: #68a8d8;
  background: rgba(14, 22, 32, 0.96);
}

.weather-quick-btn[data-weather="winter"]:hover {
  border-color: #a8cce8;
  background: rgba(16, 22, 30, 0.96);
}

.weather-quick-btn:active {
  transform: translateY(0);
}

.weather-quick-btn__icon {
  position: relative;
  z-index: 1;
  width: 1.55rem;
  height: 1.55rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.weather-quick-btn[data-weather="leto"] {
  border-color: rgba(210, 168, 48, 0.72);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 196, 72, 0.22);
}
.weather-quick-btn[data-weather="leto"]::before {
  background: radial-gradient(circle at 50% 35%, rgba(255, 214, 96, 0.28), transparent 68%);
}
.weather-quick-btn[data-weather="vesna"] {
  border-color: rgba(120, 188, 88, 0.78);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 12px rgba(140, 210, 96, 0.2);
}
.weather-quick-btn[data-weather="vesna"]::before {
  background: radial-gradient(circle at 50% 35%, rgba(160, 220, 110, 0.24), transparent 70%);
}
.weather-quick-btn[data-weather="osen"] {
  border-color: rgba(196, 118, 52, 0.78);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 12px rgba(210, 128, 58, 0.2);
}
.weather-quick-btn[data-weather="osen"]::before {
  background: radial-gradient(circle at 40% 60%, rgba(210, 110, 48, 0.22), transparent 70%);
}
.weather-quick-btn[data-weather="dozhd"] {
  border-color: rgba(74, 132, 184, 0.82);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(72, 148, 210, 0.22);
}
.weather-quick-btn[data-weather="dozhd"]::before {
  background: radial-gradient(circle at 50% 30%, rgba(96, 168, 228, 0.2), transparent 72%);
}
.weather-quick-btn[data-weather="sneg"] {
  border-color: rgba(148, 188, 228, 0.82);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(168, 210, 255, 0.24);
}
.weather-quick-btn[data-weather="sneg"]::before {
  background: radial-gradient(circle at 50% 40%, rgba(196, 228, 255, 0.24), transparent 70%);
}
.weather-quick-btn[data-weather="afrika"] {
  border-color: rgba(210, 140, 48, 0.82);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 12px rgba(230, 160, 60, 0.22);
}
.weather-quick-btn[data-weather="afrika"]::before {
  background: radial-gradient(circle at 50% 30%, rgba(255, 180, 72, 0.22), transparent 72%);
}
.weather-quick-btn[data-weather="kiberpank"] {
  border-color: rgba(72, 210, 230, 0.82);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 62, 207, 0.2);
}
.weather-quick-btn[data-weather="kiberpank"]::before {
  background: radial-gradient(circle at 50% 50%, rgba(57, 230, 255, 0.16), transparent 72%);
}
.weather-quick-btn[data-weather="fallout"] {
  border-color: rgba(109, 255, 74, 0.75);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(109, 255, 74, 0.22);
}
.weather-quick-btn[data-weather="fallout"]::before {
  background: radial-gradient(circle at 50% 40%, rgba(109, 255, 74, 0.14), transparent 72%);
}
.weather-quick-btn[data-weather="stimpank"] {
  border-color: rgba(201, 160, 106, 0.85);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 14px rgba(232, 200, 120, 0.2);
}
.weather-quick-btn[data-weather="stimpank"]::before {
  background: radial-gradient(circle at 50% 40%, rgba(212, 176, 128, 0.18), transparent 72%);
}

.weather-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 10, 16, 0.86);
  backdrop-filter: blur(8px);
}
.weather-picker-overlay[hidden] {
  display: none;
}
.weather-picker-dialog {
  width: min(56rem, 100%);
  max-height: min(88vh, 44rem);
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid #3a4a5e;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(18, 26, 36, 0.98), rgba(10, 16, 24, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.weather-picker-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.weather-picker-dialog__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.weather-picker-dialog__hint {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.86rem;
  color: var(--muted, #9aa8b8);
}
.weather-picker-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid #3d4f66;
  border-radius: 8px;
  background: rgba(22, 32, 44, 0.88);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.weather-picker-layout {
  display: grid;
  grid-template-columns: minmax(8.5rem, 10rem) 1fr;
  gap: 0.85rem;
  min-height: 0;
  flex: 1;
}
.weather-picker-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: auto;
}
.weather-picker-tab {
  display: grid;
  grid-template-columns: 1.4rem 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid #3d4f66;
  border-radius: 8px;
  background: rgba(22, 32, 44, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}
.weather-picker-tab.active {
  border-color: #4a8fd4;
  background: rgba(26, 51, 72, 0.92);
}
.weather-picker-tab__icon {
  display: flex;
  width: 1.25rem;
  height: 1.25rem;
}
.weather-picker-tab__icon svg {
  width: 100%;
  height: 100%;
}
.weather-picker-tab__count {
  font-size: 0.72rem;
  color: var(--muted, #9aa8b8);
}
.weather-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.55rem;
  overflow: auto;
  align-content: start;
  padding-right: 0.15rem;
}
.weather-picker-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid #3d4f66;
  border-radius: 10px;
  background: rgba(16, 24, 34, 0.9);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.weather-picker-card:hover {
  border-color: #5a7a9a;
}
.weather-picker-card.selected {
  border-color: #4a8fd4;
  box-shadow: 0 0 0 1px rgba(74, 143, 212, 0.35);
}
.weather-picker-card.is-default .weather-picker-card__title::after {
  content: " ★";
  color: #e8c050;
}
.weather-picker-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #0a1018;
}
.weather-picker-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #0a1018;
  color: var(--muted, #9aa8b8);
  font-size: 0.75rem;
}
.weather-picker-card__title {
  font-size: 0.78rem;
  line-height: 1.25;
}
.weather-picker-card__def {
  font-size: 0.7rem;
  color: #e8c050;
}
.weather-picker-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted, #9aa8b8);
  font-size: 0.88rem;
}
@media (max-width: 640px) {
  .weather-picker-layout {
    grid-template-columns: 1fr;
  }
  .weather-picker-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .weather-picker-tab {
    grid-template-columns: 1.1rem auto auto;
  }
}

.settings-window-btn:hover {
  border-color: #5a7a9a;
  background: rgba(18, 26, 36, 0.96);
}

.settings-window-btn--pulse {
  animation: settings-window-btn-pulse 0.85s ease-in-out 3;
  border-color: #5a9ac8;
}

@keyframes settings-window-btn-pulse {
  0%,
  100% {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(90, 154, 200, 0.35), 0 4px 18px rgba(0, 0, 0, 0.35);
  }
}

.settings-window-btn__icon {
  width: 1.35rem;
  height: 1.35rem;
}

.controls__head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #2a3544;
  background: rgba(8, 12, 18, 0.35);
}

.controls__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

.controls__body[hidden] {
  display: none;
}

.ctrl-spoiler {
  border-bottom: 1px solid #2a3544;
}

.ctrl-spoiler:last-child {
  border-bottom: none;
}

.ctrl-spoiler > summary {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  list-style-position: outside;
}

.ctrl-spoiler > summary:hover {
  color: var(--accent);
}

.ctrl-spoiler__body {
  padding: 0 0.75rem 0.6rem;
}

.ctrl-spoiler__body .row {
  margin-bottom: 0.5rem;
}

.ctrl-spoiler__body .row:last-child {
  margin-bottom: 0;
}

.ctrl-spoiler .meta {
  margin: 0.15rem 0 0;
}

.row--screen-tools {
  margin-top: 0.15rem;
  margin-bottom: 0;
}

.controls .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.marker-toggle-all {
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #4a6a8a;
  background: #1e3348;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.marker-toggle-all:hover {
  background: #2a4560;
}

.marker-toggle-all[aria-pressed="true"] {
  border-color: #3d9a6e;
  background: #234d3a;
}

.marker-toggle-all[aria-pressed="true"]:hover {
  background: #2d6b4f;
}

.marker-filter-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(58, 74, 92, 0.9);
  background: rgba(12, 16, 22, 0.9);
  color: #d8e4f0;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  font: inherit;
}

.marker-field-spoiler__panel .marker-field-btn,
.marker-field-spoiler__panel .marker-filter-btn {
  width: 1.85rem;
  height: 100%;
  min-width: 1.85rem;
  min-height: 0;
  box-shadow: none;
}

.marker-field-spoiler__panel .marker-field-btn__icon,
.marker-field-spoiler__panel .marker-swatch--icon,
.marker-field-spoiler__panel .marker-swatch--ball {
  width: 1rem;
  height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
}

.marker-filter-btn:hover {
  border-color: rgba(90, 120, 150, 0.95);
  background: rgba(22, 30, 40, 0.94);
  color: #fff;
}

.marker-filter-btn[aria-pressed="true"] {
  border-color: #3d9a6e;
  background: rgba(28, 48, 38, 0.94);
  color: #b8f0d0;
}

.marker-filter-btn[aria-pressed="false"] {
  opacity: 0.42;
}

.marker-filter-btn .marker-swatch {
  pointer-events: none;
}

.marker-filter-btn .marker-swatch--icon,
.marker-filter-btn .marker-swatch--ball {
  width: 1.15rem;
  height: 1.15rem;
}

.marker-xg-btn {
  flex: 0 0 auto;
  padding: 0.28rem 0.42rem;
  min-width: 3.35rem;
  border-radius: 6px;
  border: 1px solid rgba(58, 74, 92, 0.9);
  background: rgba(12, 16, 22, 0.9);
  color: #d8e4f0;
  cursor: pointer;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.marker-xg-btn:hover {
  border-color: rgba(90, 120, 150, 0.95);
  background: rgba(22, 30, 40, 0.94);
  color: #fff;
}

.marker-xg-btn[aria-pressed="true"] {
  border-color: #6a8fd4;
  background: rgba(24, 36, 58, 0.94);
  color: #c8dcff;
}

.marker-field-spoiler .marker-filters {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.marker-filter-group {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 0.28rem;
  height: 100%;
}

.marker-filter-group:not(:first-child) {
  margin-left: 0.3rem;
  padding-left: 0.3rem;
  border-left: 1px solid rgba(168, 176, 188, 0.34);
}

.marker-swatch {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
}

.marker-swatch--ball {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.marker-swatch--icon {
  display: inline-block;
  filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.45));
}

#pitch {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  background: #1a1a1a;
  box-shadow: 0 0 5px #333;
  -webkit-font-smoothing: antialiased;
}

.pitch-fade {
  position: absolute;
  left: 0;
  top: 0;
  background: #080c10;
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  border-radius: 4px;
}

.weather-haze {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: 4px;
  opacity: 0;
}

.weather-haze--snow {
  background: linear-gradient(
    to bottom,
    rgb(198, 214, 232) 0%,
    rgb(236, 242, 248) 45%,
    rgb(210, 222, 236) 100%
  );
}

.weather-haze--rain {
  /* Туман снизу: длиннее переход, без «полосы» на ~52% высоты */
  background: linear-gradient(
    to bottom,
    rgba(185, 200, 218, 0) 38%,
    rgba(178, 194, 214, 0.22) 68%,
    rgba(168, 184, 204, 0.78) 100%
  );
}

.weather-fx {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 11;
  border-radius: 4px;
}

.hud {
  z-index: 14;
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  transform: none;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.32rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
  max-width: calc(100% - 1.3rem);
  --hud-plate-h: 2.05rem;
  --hud-team-name-size: 0.78rem;
  --hud-stat-size: calc(var(--hud-team-name-size) * 0.8);
  /* Фикс. ширина табло (эталон: ДИН 0 : 0 СОК на скрине пользователя). */
  --hud-board-fixed-w: 7.75rem;
}

.hud-board {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(15, 20, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}

body:not(.replay--compact) .hud-board {
  flex: 0 0 auto;
  width: var(--hud-board-fixed-w);
  max-width: 100%;
}

.hud-board:not(.hud-board--stats-open) {
  min-height: var(--hud-plate-h);
  height: var(--hud-plate-h);
}

.hud-board--stats-open {
  flex: 0 0 auto;
  height: auto;
  min-height: var(--hud-plate-h);
  max-width: 100%;
}

body:not(.replay--compact) .hud-board .hud-board__score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 0;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

body:not(.replay--compact) .hud-board.hud-board--stats-open .hud-board__score-row {
  width: 100%;
  max-width: 100%;
}

body:not(.replay--compact) .hud-board .hud-board__score-row .hud-team {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 3ch;
  max-width: none;
  overflow: hidden;
  text-overflow: clip;
  letter-spacing: 0.04em;
  text-align: center;
}

body:not(.replay--compact) .hud-board .hud-board__score-row .hud-team--home {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  text-align: center;
}

body:not(.replay--compact) .hud-board .hud-board__score-row .hud-team--away {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
  text-align: center;
}

body:not(.replay--compact) .hud-board .hud-board__score-row #score {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

body:not(.replay--compact) .hud-board .hud-board__score-row .hud-team__name {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  text-align: center;
}

body:not(.replay--compact) .hud-board .hud-board__stats-panel {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding-left: 0.12rem;
  padding-right: 0.12rem;
}

body:not(.replay--compact) .hud-board.hud-board--stats-open .hud-board__stats-panel {
  width: 100%;
  min-width: 0;
}

body:not(.replay--compact) .hud-board .hud-board__stats-table {
  table-layout: fixed;
  width: 100%;
}

body:not(.replay--compact) .hud-board .hud-board__home,
body:not(.replay--compact) .hud-board .hud-board__away {
  min-width: 0;
  width: 27%;
  padding-left: 0.04rem;
  padding-right: 0.04rem;
  overflow: hidden;
}

body:not(.replay--compact) .hud-board .hud-board__label {
  min-width: 0;
  width: 46%;
  padding-left: 0.06rem;
  padding-right: 0.06rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-board__score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: var(--hud-plate-h);
  padding: 0 0.55rem 0 0.85rem;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
}

.hud-board__score-row .hud-team {
  flex: 1 1 0;
  min-width: 0;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--hud-team-name-size);
  font-weight: 500;
  line-height: 1;
  opacity: 0.92;
}

.hud-board__score-row .hud-team--home {
  text-align: right;
}

.hud-board__score-row .hud-team--away {
  text-align: left;
}

.hud-board__score-row #score {
  flex: 0 0 auto;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.04em;
  line-height: 1;
}

.hud-board__score-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.hud-board__score-row--open {
  background: rgba(61, 122, 154, 0.12);
}

.hud-board__shootout {
  padding: 0.28rem 0.65rem 0.38rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hud-board__shootout[hidden] {
  display: none !important;
}

.hud-board--shootout:not(.hud-board--stats-open) {
  height: auto;
  min-height: var(--hud-plate-h);
}

.hud-shootout__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.28rem;
}

.hud-shootout__label {
  font-size: 0.465rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(176, 186, 202, 0.78);
}

.hud-shootout__score {
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.96);
}

.hud-shootout__dots {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.hud-shootout__dots-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.24rem;
  min-height: 0.55rem;
}

.hud-shootout__dots-line--home::before,
.hud-shootout__dots-line--away::before {
  content: "";
  flex: 0 0 0.28rem;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  margin-right: 0.12rem;
  opacity: 0.85;
}

.hud-shootout__dot {
  flex: 0 0 auto;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  box-sizing: border-box;
}

.hud-shootout__dot--goal {
  background: #3ecf6e;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 0 6px rgba(62, 207, 110, 0.45);
}

.hud-shootout__dot--empty {
  background: rgba(148, 156, 168, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.hud-shootout__dot--miss {
  background: transparent;
  border: 1.5px solid rgba(255, 108, 108, 0.82);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.hud-shootout__dot--pending {
  background: rgba(255, 255, 255, 0.28);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  animation: hud-shootout-pulse 1.1s ease-in-out infinite;
}

@keyframes hud-shootout-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

body.replay--compact .hud-board--shootout,
body.replay--compact .hud-board.hud-board--stats-open.hud-board--shootout {
  height: auto;
  min-height: var(--hud-plate-h);
}

body.replay--compact .hud-board--shootout .hud-board__shootout {
  padding: 0.2rem 0.5rem 0.28rem;
}

body.replay--compact .hud-shootout__head {
  margin-bottom: 0.18rem;
}

body.replay--compact .hud-shootout__label {
  font-size: 0.435rem;
}

body.replay--compact .hud-shootout__score {
  font-size: 0.8rem;
}

body.replay--compact .hud-shootout__dot {
  width: 0.42rem;
  height: 0.42rem;
}

.hud-board__stats-table {
  border-collapse: collapse;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
  width: 100%;
}

.hud-clock-dock {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  pointer-events: none;
}

.hud-clock-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 3.15rem;
  min-height: var(--hud-plate-h);
  height: var(--hud-plate-h);
  padding: 0 0.5rem;
  background: rgba(15, 20, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.hud-board__stats-panel {
  margin-top: 0;
  padding: 0.28rem 0.12rem 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  user-select: none;
}

.hud-board__stats-panel:hover {
  background: rgba(255, 255, 255, 0.04);
}

.hud-board__stats-panel--extended {
  background: rgba(61, 122, 154, 0.1);
}

.hud-board__stats-panel[hidden] {
  display: none !important;
}

.hud-board__row--extended-start .hud-board__label,
.hud-board__row--extended-start .hud-board__home,
.hud-board__row--extended-start .hud-board__away {
  padding-top: 0.22rem;
}

.hud-board__row--extended-start .hud-board__label {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hud-board td {
  padding: 0.1rem 0.14rem;
  vertical-align: middle;
}

.hud-board__row--stat td {
  padding-top: 0.06rem;
  padding-bottom: 0.06rem;
  font-size: var(--hud-stat-size);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hud-board__row--stat .hud-board__label {
  font-size: var(--hud-stat-size);
  font-weight: 500;
  color: rgba(180, 194, 210, 0.82);
}

.hud-board__row--stat .hud-board__home,
.hud-board__row--stat .hud-board__away {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hud-board__row--stat .hud-board__sub {
  font-size: calc(var(--hud-stat-size) * 0.72);
  font-weight: 500;
}

.hud-board__home {
  text-align: right;
  color: rgba(140, 180, 255, 0.95);
  min-width: 2.8rem;
}

.hud-board__away {
  text-align: left;
  color: rgba(255, 140, 140, 0.95);
  min-width: 2.8rem;
}

.hud-board__label {
  text-align: center;
  color: rgba(180, 194, 210, 0.78);
  font-weight: 500;
  white-space: nowrap;
  padding-left: 0.18rem;
  padding-right: 0.18rem;
}

.hud-board__label-narrow {
  display: inline-block;
  transform: scaleX(0.82);
  transform-origin: center center;
  margin: 0 -0.38em;
  letter-spacing: -0.035em;
}

.hud-team__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-team__pill {
  display: none;
}

/* —— Плашка (ТВ): единая трёхцветная полоса —— */
.hud-board.hud-board--kit-chip {
  --hud-chip-team-pad-x: calc(0.55rem * 1.1);
  min-width: 0;
  max-width: 100%;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.hud-board.hud-board--kit-chip .hud-board__score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: minmax(var(--hud-plate-h), auto);
  gap: 0;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hud-board.hud-board--kit-chip .hud-board__score-row:hover,
.hud-board.hud-board--kit-chip .hud-board__score-row--open {
  background: transparent;
}

body.replay--compact .hud-board.hud-board--kit-chip,
body.replay--compact .hud-board.hud-board--kit-chip.hud-board--stats-open {
  width: max-content;
  min-width: 0;
  max-width: 100%;
  height: auto;
}

body.replay--compact .hud-board.hud-board--kit-chip .hud-board__score-row,
body.replay--compact .hud-board.hud-board--kit-chip.hud-board--stats-open .hud-board__score-row {
  display: grid;
  grid-template-columns: max-content auto max-content;
  gap: 0;
  padding: 0;
  width: max-content;
  min-width: 0;
  max-width: 100%;
  pointer-events: none;
  cursor: default;
}

.hud-board.hud-board--kit-chip .hud-board__score-row .hud-team {
  grid-row: 1;
  width: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem var(--hud-chip-team-pad-x);
  background: var(--hud-kit-grad, var(--hud-kit-back, #666));
  color: var(--hud-kit-color, #fff);
  border: none;
  border-radius: 0;
  opacity: 1;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
  text-align: center;
}

body.replay--compact .hud-board.hud-board--kit-chip .hud-board__score-row .hud-team,
body.replay--compact .hud-board.hud-board--kit-chip.hud-board--stats-open .hud-board__score-row .hud-team {
  flex: none;
  width: max-content;
  max-width: 11rem;
  letter-spacing: 0.04em;
  text-align: center;
  overflow: hidden;
}

.hud-board.hud-board--kit-chip .hud-board__score-row .hud-team--home {
  grid-column: 1;
  border-radius: 99px 0 0 99px;
}

.hud-board.hud-board--kit-chip .hud-board__score-row .hud-team--away {
  grid-column: 3;
  border-radius: 0 99px 99px 0;
}

.hud-board.hud-board--kit-chip .hud-board__score-row .hud-team__name {
  width: auto;
  max-width: 100%;
  text-align: center;
}

.hud-board.hud-board--kit-chip.hud-board--stats-open .hud-board__stats-panel {
  margin-top: 0.28rem;
  padding: 0.28rem 0.12rem 0.35rem;
  background: rgba(15, 20, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.hud-board.hud-board--kit-chip .hud-board__score-row #score {
  grid-column: 2;
  grid-row: 1;
  flex: none;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.34rem 0.52rem;
  margin: 0;
  background: linear-gradient(180deg, rgba(34, 38, 46, 0.98) 0%, rgba(8, 10, 14, 0.98) 100%);
  color: rgba(255, 255, 255, 0.96);
  border-left: 1px solid rgba(0, 0, 0, 0.45);
  border-right: 1px solid rgba(0, 0, 0, 0.45);
  border-top: none;
  border-bottom: none;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
}

/* —— Отметки формы: симметричные отступы и крайние маркеры —— */
.hud-board--kit-dot,
.hud-board--kit-pill,
.hud-board--kit-stripe {
  --hud-kit-mark-pad-x: 0.65rem;
}

.hud-board--kit-dot .hud-board__score-row,
.hud-board--kit-pill .hud-board__score-row,
.hud-board--kit-stripe .hud-board__score-row {
  padding-left: var(--hud-kit-mark-pad-x);
  padding-right: var(--hud-kit-mark-pad-x);
}

.hud-board--kit-dot.hud-board--stats-open .hud-board__stats-panel,
.hud-board--kit-pill.hud-board--stats-open .hud-board__stats-panel,
.hud-board--kit-stripe.hud-board--stats-open .hud-board__stats-panel {
  padding-left: 0.12rem;
  padding-right: 0.12rem;
}

.hud-board--kit-dot .hud-board__score-row .hud-team--home,
.hud-board--kit-pill .hud-board__score-row .hud-team--home,
.hud-board--kit-stripe .hud-board__score-row .hud-team--home,
.hud-board--kit-dot .hud-board__score-row .hud-team--away,
.hud-board--kit-pill .hud-board__score-row .hud-team--away,
.hud-board--kit-stripe .hud-board__score-row .hud-team--away {
  justify-content: center;
  text-align: center;
}

body.replay--compact .hud-board--kit-dot .hud-board__score-row .hud-team--home,
body.replay--compact .hud-board--kit-pill .hud-board__score-row .hud-team--home,
body.replay--compact .hud-board--kit-stripe .hud-board__score-row .hud-team--home,
body.replay--compact .hud-board--kit-dot .hud-board__score-row .hud-team--away,
body.replay--compact .hud-board--kit-pill .hud-board__score-row .hud-team--away,
body.replay--compact .hud-board--kit-stripe .hud-board__score-row .hud-team--away {
  display: grid;
  place-items: center;
  justify-content: center;
  text-align: center;
}

/* —— Точка у названия —— */
.hud-board--kit-dot .hud-board__score-row {
  align-items: center;
}

.hud-board--kit-dot .hud-team,
.hud-board--kit-pill .hud-team,
.hud-board--kit-stripe .hud-team {
  color: rgba(236, 242, 252, 0.96);
}

.hud-board--kit-dot .hud-team {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  line-height: 1;
}

.hud-board--kit-dot .hud-team__name {
  line-height: 1;
}

.hud-board--kit-dot .hud-team--home::before,
.hud-board--kit-dot .hud-team--away::after {
  content: "";
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  align-self: center;
  border-radius: 50%;
  background: var(--hud-kit-grad, var(--hud-kit-back, #888));
  border: 1px solid var(--hud-kit-border, rgba(255, 255, 255, 0.35));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

/* —— Мини-пилюля (как фишка на поле) —— */
.hud-board--kit-pill .hud-team {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.hud-board--kit-pill .hud-team--away .hud-team__name {
  order: 1;
}

.hud-board--kit-pill .hud-team--away .hud-team__pill {
  order: 2;
}

.hud-board--kit-pill .hud-team__pill {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.72rem;
  height: 1.08rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--hud-kit-border, rgba(255, 255, 255, 0.35));
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0) 38%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.34) 0%,
      rgba(0, 0, 0, 0.06) 22%,
      rgba(255, 255, 255, 0.14) 50%,
      rgba(0, 0, 0, 0.08) 78%,
      rgba(0, 0, 0, 0.32) 100%
    ),
    var(--hud-kit-pill-surface, var(--hud-kit-grad, var(--hud-kit-back, #888)));
  color: var(--hud-kit-color, #fff);
  font-size: calc(var(--hud-team-name-size) * 0.68);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  box-shadow:
    inset 0 -0.1rem 0.18rem rgba(0, 0, 0, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.32);
}

.hud-board--kit-dot .hud-board__score-row {
  align-items: center;
}

.hud-board--kit-pill:not(.hud-board--stats-open) .hud-team__pill {
  display: inline-flex;
}

.hud-board--kit-pill:not(.hud-board--stats-open) .hud-team__name {
  display: none;
}

body:not(.replay--compact) .hud-board--kit-pill.hud-board--stats-open .hud-team__pill {
  display: inline-flex;
  min-width: 1.05rem;
  width: 1.05rem;
  padding: 0;
  font-size: 0;
}

body:not(.replay--compact) .hud-board--kit-pill.hud-board--stats-open .hud-team__pill:not(:empty) {
  min-width: 1.72rem;
  width: auto;
  padding: 0 0.4rem;
  font-size: calc(var(--hud-team-name-size) * 0.68);
}

/* —— Полоска —— */
.hud-board--kit-stripe .hud-board__score-row {
  align-items: center;
}

.hud-board--kit-stripe .hud-team {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.hud-board--kit-stripe .hud-team--home::before,
.hud-board--kit-stripe .hud-team--away::after {
  content: "";
  flex: 0 0 auto;
  width: 0.22rem;
  height: 1em;
  align-self: center;
  border-radius: 2px;
  background: var(--hud-kit-back, #888);
  border: 1px solid var(--hud-kit-border, rgba(255, 255, 255, 0.35));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* —— Подсветка зоны —— */
.hud-board--kit-zone .hud-board__score-row {
  position: relative;
  isolation: isolate;
}

.hud-board--kit-zone .hud-board__score-row::before,
.hud-board--kit-zone .hud-board__score-row::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  pointer-events: none;
  z-index: 0;
}

.hud-board--kit-zone .hud-board__score-row::before {
  left: 0;
  background: linear-gradient(90deg, var(--hud-home-back, #c00) 0%, rgba(0, 0, 0, 0) 94%);
  opacity: 0.58;
  border-radius: 6px 0 0 6px;
}

.hud-board--kit-zone .hud-board__score-row::after {
  right: 0;
  background: linear-gradient(270deg, var(--hud-away-back, #063) 0%, rgba(0, 0, 0, 0) 94%);
  opacity: 0.58;
  border-radius: 0 6px 6px 0;
}

.hud-board--kit-zone .hud-board__score-row > * {
  position: relative;
  z-index: 1;
}

.hud-board--kit-zone .hud-team--home,
.hud-board--kit-zone .hud-team--away {
  color: rgba(236, 242, 252, 0.96);
}

/* —— Цвет текста формы (kit.back) —— */
.hud-board--kit-text .hud-team--home,
.hud-board--kit-text .hud-team--away {
  color: var(--hud-kit-text, var(--hud-kit-back, #dfe6f2));
}

.hud-shootout__dots-line--home::before {
  background: var(--hud-home-back, rgba(140, 180, 255, 0.9));
  border: 1px solid var(--hud-home-border, transparent);
  box-sizing: border-box;
}

.hud-shootout__dots-line--away::before {
  background: var(--hud-away-back, rgba(255, 140, 140, 0.9));
  border: 1px solid var(--hud-away-border, transparent);
  box-sizing: border-box;
}

#clock {
  display: inline-block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.25;
}

.row--transport {
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.row--transport #play {
  padding: 0.26rem 0.55rem;
  font-size: 0.76rem;
}

.row--transport .skip-event--icon {
  min-width: 1.65rem;
  padding: 0.24rem 0.42rem;
  font-size: 0.8rem;
  line-height: 1;
}

.seek-minute {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.1rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.seek-minute input {
  width: 3.4rem;
  padding: 0.22rem 0.35rem;
  border-radius: 6px;
  border: 1px solid #3a4a5c;
  background: #121820;
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
}

.seek-minute input:focus {
  outline: 2px solid #4a8fd4;
  outline-offset: 1px;
}

.btn-compact--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 0.24rem 0.4rem;
}

.btn-compact--icon[aria-pressed="true"] {
  border-color: #4a8fd4;
  background: #1a3348;
}

.skip-event--icon {
  letter-spacing: 0;
}

.delay-hint {
  position: fixed;
  z-index: 1000;
  transform: translateX(-50%);
  padding: 0.28rem 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  background: var(--panel);
  border: 1px solid #2a3544;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  max-width: 18rem;
  color: var(--text);
}

.speed--inline {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.15rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.speed--inline select {
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
  border: 1px solid #555;
  background: #1a1a1a;
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
}

.btn-compact {
  align-self: flex-end;
  padding: 0.28rem 0.45rem;
  margin-bottom: 0.05rem;
  border-radius: 6px;
  border: 1px solid #4a6a8a;
  background: #1e3348;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  white-space: nowrap;
}

.btn-compact:hover {
  background: #2a4560;
}

#play {
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid #3d9a6e;
  background: #234d3a;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

#play:hover {
  background: #2d6b4f;
}

.skip-goal {
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #4a6a8a;
  background: #1e3348;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}

.skip-goal:hover:not(:disabled) {
  background: #2a4560;
}

.skip-goal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.skip-event {
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #5a6a4a;
  background: #243020;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.skip-event:hover:not(:disabled) {
  background: #2f4028;
}

.skip-event:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#ball-colors {
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #5a5a5a;
  background: #2a2a2a;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}

#ball-colors:hover {
  background: #353535;
}

#ball-colors[aria-pressed="true"] {
  border-color: #c9a227;
  background: #3a3520;
}

#ball-colors[aria-pressed="true"]:hover {
  background: #4a4328;
}

.scrub,
.speed {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.row--appearance {
  margin-top: 0;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
}

.ctrl-spoiler .row--appearance {
  align-items: flex-end;
}

.ctrl-spoiler .appearance--check {
  padding-top: 0;
  align-self: center;
}

.row--players {
  align-items: flex-end;
}

.player-settings-section {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.player-settings-section:first-child {
  margin-top: 0;
}

.player-settings-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.player-settings-block[hidden] {
  display: none !important;
}

.ctrl-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.65rem;
}

#player-volume-controls[hidden],
#player-capsule-controls-wrap[hidden] {
  display: none !important;
}

.appearance--range--compact {
  min-width: 5.75rem;
}

.weather-toggle[aria-pressed="true"] {
  border-color: #3d9a6e;
  background: #234d3a;
}

.weather-toggle[aria-pressed="true"]:hover {
  background: #2d6b4f;
}

.weather-toggle[aria-pressed="false"] {
  border-color: #5a4040;
  background: #2a1e1e;
  color: #b8a8a8;
}

.weather-toggle[aria-pressed="false"]:hover {
  background: #3a2828;
}

.weather-toggle--cyberpunk[aria-pressed="true"] {
  border-color: #00d4ff;
  background: #0d2438;
  color: #d8fcff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.weather-toggle--cyberpunk[aria-pressed="true"]:hover {
  background: #123650;
}

.row--cyberpunk {
  margin-bottom: 0.35rem;
}

.weather-picker-cyber-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: -0.35rem 0 0.75rem;
}

.weather-picker-cyber-row[hidden] {
  display: none;
}

.btn-compact--muted {
  align-self: flex-end;
  border-color: #5a5a5a;
  background: #2a2a2a;
}

.btn-compact--muted:hover {
  background: #353535;
}

.btn-compact--muted[aria-pressed="true"] {
  border-color: #c9a227;
  background: #3a3520;
}

.appearance {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.appearance select {
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #555;
  background: #1a1a1a;
  color: var(--text);
  font: inherit;
  min-width: 9rem;
}

.appearance--check {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  padding-top: 1.15rem;
  cursor: pointer;
  user-select: none;
}

.appearance--check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.appearance--range {
  flex-direction: column;
  gap: 0.25rem;
  min-width: 9rem;
}

.appearance--range input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.row--sound {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #2a3544;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.4rem 0.5rem;
}

.row--sound .appearance--range {
  flex: 1 1 0;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: none;
  font-size: 0.68rem;
}

.row--sound .appearance--range span {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row--sound .appearance--range input[type="range"] {
  flex: 0 1 3.25rem;
  width: 3.25rem;
  min-width: 2.5rem;
  max-width: 3.75rem;
}

.sound-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #4a6a8a;
  background: #1e3348;
  color: var(--text);
  cursor: pointer;
}

.sound-toggle:hover {
  background: #2a4560;
}

.sound-toggle[aria-pressed="true"] {
  border-color: #3d9a6e;
  background: #234d3a;
  color: #dff5ea;
}

.sound-toggle[aria-pressed="true"]:hover {
  background: #2d6b4f;
}

.sound-toggle[aria-pressed="false"] {
  opacity: 0.72;
  color: var(--muted);
}

.sound-toggle__icon {
  display: block;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__icon--off,
.sound-toggle[aria-pressed="false"] .sound-toggle__icon--on {
  display: none;
}

.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}

.btn-compact--icon .ui-icon {
  width: 16px;
  height: 16px;
}

.btn-compact--icon .ui-icon--exit {
  display: none;
}

.btn-compact--icon[aria-pressed="true"] .ui-icon--enter {
  display: none;
}

.btn-compact--icon[aria-pressed="true"] .ui-icon--exit {
  display: block;
}

.ball3d-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  background: rgba(8, 12, 18, 0.82);
  border: 1px solid #3a4a5c;
  color: #dfe8f2;
  font-size: 0.78rem;
  pointer-events: none;
}

.ctrl-inline--ball-shadow {
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
}

.appearance--range-compact span {
  min-width: 2.6rem;
}

.replay-badge {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  animation: replay-badge-pulse 1s ease-in-out infinite;
}

.fps-overlay-stack {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.22rem;
  max-width: min(22rem, calc(100% - 1.3rem));
  pointer-events: none;
}

.fps-overlay-stack .fps-overlay {
  position: static;
  top: auto;
  right: auto;
}

.pitch-stage > .fps-overlay {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 15;
}

.fps-overlay {
  padding: 0.28rem 0.55rem;
  border-radius: 5px;
  background: rgba(15, 20, 25, 0.82);
  border: 1px solid rgba(120, 150, 180, 0.28);
  color: #c8e6ff;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  pointer-events: none;
  line-height: 1.2;
}

@keyframes replay-badge-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.scrub-wrap {
  position: relative;
  display: grid;
  grid-template-rows: 0.75rem 1.1rem;
  width: 100%;
}

.scrub-track {
  grid-row: 2;
  grid-column: 1;
  position: relative;
  width: 100%;
  height: 1.1rem;
}

.scrub-track-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.scrub-track-rail,
.scrub-progress {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  pointer-events: none;
}

.scrub-track-rail {
  left: 7px;
  right: 7px;
  height: var(--scrub-track-h, 5px);
  background: rgba(108, 118, 134, 0.52);
}

.scrub-progress {
  left: 7px;
  width: 0;
  height: var(--scrub-track-h, 5px);
  background: linear-gradient(90deg, #6a849c, #8ca4b8);
  box-shadow: 0 0 10px rgba(122, 148, 172, 0.38);
}

.scrub-xg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.scrub-markers {
  grid-row: 1;
  grid-column: 1;
  align-self: end;
  position: relative;
  width: 100%;
  height: 0.75rem;
  pointer-events: none;
  z-index: 3;
}

.scrub-xg-dot {
  position: absolute;
  top: 50%;
  width: var(--xg-dot-size, 6px);
  height: var(--xg-dot-size, 6px);
  margin-left: calc(var(--xg-dot-size, 6px) / -2);
  transform: translateY(-50%);
  border-radius: 999px;
  opacity: 0.95;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 3px rgba(0, 0, 0, 0.4);
}

.scrub-xg-dot--goal {
  box-shadow:
    0 0 0 1px rgba(255, 214, 90, 0.85),
    0 0 5px rgba(255, 200, 60, 0.55);
}

.scrub-marker--bookmark {
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
  min-width: 10px;
  min-height: 12px;
}

.scrub-marker--bookmark:hover,
.scrub-marker--bookmark:focus-visible {
  filter: brightness(1.15);
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 1px;
}

.scrub-marker--bookmark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 16px;
  transform: translate(-50%, -50%);
}

.scrub-marker--icon {
  position: absolute;
  bottom: 0;
  margin-left: -5.5px;
  opacity: 0.96;
  filter: drop-shadow(0 0.5px 1.5px rgba(0, 0, 0, 0.5));
}

.scrub-marker--goal {
  position: absolute;
  bottom: -1px;
  margin-left: -5.5px;
  border-radius: 50%;
  opacity: 0.95;
}

.scrub-marker--aerial {
  bottom: 2px;
  opacity: 0.88;
}

.scrub-marker--aerial-b {
  opacity: 0.58;
}

#aerial-highlight-toggle[aria-pressed="true"] {
  border-color: rgba(255, 196, 32, 0.72);
  background: rgba(255, 196, 32, 0.16);
  color: #ffe08a;
}

#scrub {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
  --scrub-track-h: 5px;
  --scrub-thumb: 14px;
}

#scrub::-webkit-slider-runnable-track {
  height: var(--scrub-track-h);
  border-radius: 999px;
  background: rgba(108, 118, 134, 0.52);
}

#scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--scrub-thumb);
  height: var(--scrub-thumb);
  margin-top: calc((var(--scrub-track-h) - var(--scrub-thumb)) / 2);
  border-radius: 50%;
  border: 2px solid rgba(122, 112, 98, 0.88);
  background: #ebe4d8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

#scrub::-moz-range-track {
  height: var(--scrub-track-h);
  border: none;
  border-radius: 999px;
  background: rgba(108, 118, 134, 0.52);
}

#scrub::-moz-range-thumb {
  width: var(--scrub-thumb);
  height: var(--scrub-thumb);
  border: 2px solid rgba(122, 112, 98, 0.88);
  border-radius: 50%;
  background: #ebe4d8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* 1 — TV / broadcast */
.timeline-style--broadcast .scrub-track-rail {
  display: none;
}

.timeline-style--broadcast .scrub-progress {
  display: block;
  z-index: 1;
}

.timeline-style--broadcast {
  --scrub-track-h: 7px;
  --scrub-thumb: 16px;
}

.timeline-style--broadcast .scrub-track-rail {
  left: 0;
  right: 0;
  height: 7px;
  background: rgba(26, 32, 42, 0.94);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(168, 176, 188, 0.08);
}

.timeline-style--broadcast .scrub-progress {
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, #627a92, #8ea2b8);
  box-shadow: 0 0 10px rgba(130, 158, 186, 0.4);
}

.timeline-style--broadcast #scrub {
  --scrub-track-h: 7px;
  --scrub-thumb: 16px;
  --scrub-fill: 0%;
}

.timeline-style--broadcast #scrub::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #627a92 0%,
    #8ea2b8 var(--scrub-fill, 0%),
    rgba(26, 32, 42, 0.94) var(--scrub-fill, 0%),
    rgba(26, 32, 42, 0.94) 100%
  );
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(168, 176, 188, 0.08);
}

.timeline-style--broadcast #scrub::-moz-range-track {
  height: 7px;
  border: none;
  border-radius: 999px;
  background: rgba(26, 32, 42, 0.94);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(168, 176, 188, 0.08);
}

.timeline-style--broadcast #scrub::-moz-range-progress {
  height: 7px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, #627a92, #8ea2b8);
  box-shadow: 0 0 10px rgba(130, 158, 186, 0.4);
}

.timeline-style--broadcast #scrub::-webkit-slider-thumb {
  border-color: rgba(168, 158, 142, 0.95);
  background: #f0e8dc;
  box-shadow:
    0 0 0 2px rgba(8, 12, 18, 0.88),
    0 0 12px rgba(210, 198, 178, 0.42);
}

.timeline-style--broadcast #scrub::-moz-range-thumb {
  border-color: rgba(168, 158, 142, 0.95);
  background: #f0e8dc;
  box-shadow:
    0 0 0 2px rgba(8, 12, 18, 0.88),
    0 0 12px rgba(210, 198, 178, 0.42);
}

.timeline-style--broadcast .scrub-xg-dot {
  opacity: 0.82;
}

.timeline-style--broadcast .scrub-xg-dot--goal {
  opacity: 1;
}

.timeline-style--broadcast .scrub-markers {
  z-index: 3;
}

.timeline-style--broadcast .scrub-xg {
  z-index: 4;
}

.timeline-style--broadcast .scrub-marker {
  position: absolute;
  bottom: 0;
}

.timeline-style--broadcast .scrub-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 0.42rem;
  margin-left: -0.5px;
  background: linear-gradient(
    to bottom,
    rgba(176, 186, 202, 0.55),
    rgba(176, 186, 202, 0.06)
  );
  pointer-events: none;
  z-index: 1;
}

.timeline-style--broadcast .scrub-marker--goal {
  bottom: -1px;
  filter: drop-shadow(0 0 4px rgba(212, 192, 128, 0.4));
}

.timeline-style--broadcast .scrub-marker--goal::after {
  background: linear-gradient(
    to bottom,
    rgba(212, 192, 128, 0.62),
    rgba(212, 192, 128, 0.05)
  );
}

/* 2 — split: хозяева сверху, гости снизу, нейтральные на дорожке (дорожка — broadcast) */
.timeline-style--split {
  --scrub-split-stem: 0.42rem;
  grid-template-rows: 0.75rem 1.1rem 0.75rem;
  overflow: visible;
}

.timeline-style--split .scrub-markers--home,
.timeline-style--split .scrub-markers--away {
  overflow: visible;
}

.timeline-style--split .scrub-markers--home {
  grid-row: 1;
  grid-column: 1;
  align-self: end;
}

.timeline-style--split .scrub-track {
  grid-row: 2;
}

.timeline-style--split .scrub-markers--away {
  grid-row: 3;
  grid-column: 1;
  align-self: start;
}

.timeline-style--split .scrub-markers--away:not([hidden]) {
  display: block;
}

.timeline-style--split .scrub-markers-neutral {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.timeline-style--split .scrub-markers-neutral:not([hidden]) {
  display: block;
}

.timeline-style--split .scrub-markers--home .scrub-marker {
  bottom: 0;
  top: auto;
}

.timeline-style--split .scrub-markers--home .scrub-marker--goal {
  bottom: -1px;
}

.timeline-style--split .scrub-markers--home .scrub-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  bottom: auto;
  width: 1px;
  height: var(--scrub-split-stem);
  margin-left: -0.5px;
  background: linear-gradient(
    to bottom,
    rgba(176, 186, 202, 0.55),
    rgba(176, 186, 202, 0.06)
  );
  pointer-events: none;
  z-index: 1;
}

.timeline-style--split .scrub-markers--home .scrub-marker--goal::after {
  background: linear-gradient(
    to bottom,
    rgba(212, 192, 128, 0.62),
    rgba(212, 192, 128, 0.05)
  );
}

.timeline-style--split .scrub-marker--lane-away.scrub-marker--icon {
  top: 0;
  bottom: auto;
}

.timeline-style--split .scrub-marker--lane-away.scrub-marker--goal {
  top: -1px;
  bottom: auto;
}

.timeline-style--split .scrub-marker--lane-away::after {
  content: "";
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 100%;
  width: 1px;
  height: var(--scrub-split-stem);
  margin-left: -0.5px;
  background: linear-gradient(
    to top,
    rgba(176, 186, 202, 0.55),
    rgba(176, 186, 202, 0.06)
  );
  pointer-events: none;
  z-index: 1;
}

.timeline-style--split .scrub-marker--lane-away.scrub-marker--goal::after {
  background: linear-gradient(
    to top,
    rgba(212, 192, 128, 0.62),
    rgba(212, 192, 128, 0.05)
  );
}

.timeline-style--split .scrub-marker--on-track {
  top: 50%;
  bottom: auto;
  margin-left: -5.5px;
  opacity: 0.92;
  filter: saturate(0.35) brightness(1.12) drop-shadow(0 0 2px rgba(148, 168, 196, 0.35));
}

.timeline-style--split .scrub-marker--on-track::after {
  display: none;
}

.timeline-style--split .scrub-marker--on-track.scrub-marker--goal {
  filter: saturate(0.45) brightness(1.08) drop-shadow(0 0 3px rgba(180, 170, 140, 0.35));
}

#scrub:focus {
  outline: none;
}

#scrub:focus-visible {
  outline: 2px solid rgba(120, 160, 220, 0.45);
  outline-offset: 2px;
}

select#speed {
  font: inherit;
  padding: 0.25rem;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid #2a3544;
}

.meta {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.bottom-bar[hidden] {
  display: none;
}

@media (max-width: 960px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .layout {
    flex-wrap: wrap;
    overflow: visible;
  }

  .pitch-column {
    flex: 1 1 100%;
    min-height: min(52vw, 58vh);
  }

  .side-column {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .stats-side-dock {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .stats-panel {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    max-height: min(52vh, 28rem);
  }
}

.error {
  flex: 0 0 auto;
  margin: 0 0.65rem 0.65rem;
  padding: 0.75rem 1rem;
  background: rgba(196, 92, 92, 0.15);
  border: 1px solid var(--danger);
  border-radius: 6px;
  color: #f0b0b0;
}

code {
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* —— Пользовательские настройки (боковая панель справа) —— */
.user-settings-overlay {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-settings-overlay[hidden] {
  display: none !important;
}

.user-settings-dialog {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.55rem 0.65rem;
  border: 1px solid rgba(58, 74, 94, 0.55);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(20, 28, 38, 0.96), rgba(10, 16, 24, 0.94));
  box-shadow: none;
  overflow: hidden;
}

.user-settings-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-settings-dialog__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.user-settings-reset {
  padding: 0.38rem 0.72rem;
  border: 1px solid #5a4a3a;
  border-radius: 9px;
  background: rgba(44, 34, 24, 0.72);
  color: #e8c89a;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.user-settings-reset:hover {
  border-color: #8a7050;
  background: rgba(58, 44, 30, 0.92);
}

.user-settings-dialog__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.user-settings-dialog__hint {
  margin: 0.15rem 0 0.45rem;
  font-size: 0.75rem;
  color: var(--muted, #9aa8b8);
  flex-shrink: 0;
}

.user-settings-close {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid #3d4f66;
  border-radius: 10px;
  background: rgba(22, 32, 44, 0.88);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.user-settings-close:hover {
  border-color: #5a7a9a;
  background: rgba(32, 46, 62, 0.95);
}

.user-settings-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: hidden;
}

.user-settings-tabs {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.25rem;
  width: 100%;
  flex-shrink: 0;
}

.user-settings-tab {
  flex: 1 1 0;
  min-width: 0;
  height: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem;
  border: 1px solid #3d4f66;
  border-radius: 8px;
  background: rgba(22, 32, 44, 0.72);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.1s ease,
    color 0.15s ease;
}

/* display:flex выше перебивает UA [hidden] — вкладка «Поле» PEFL 1.0 */
.user-settings-tab[hidden] {
  display: none !important;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.user-settings-tab__icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.user-settings-tab:hover {
  border-color: #5a7a9a;
  background: rgba(32, 46, 62, 0.88);
}

.user-settings-tab.active {
  border-color: #4a8fd4;
  background: rgba(26, 51, 72, 0.92);
  color: #d8ecff;
  box-shadow: inset 0 0 0 1px rgba(74, 143, 212, 0.25);
}

.user-settings-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.1rem;
}

.user-settings-panel {
  display: none;
  animation: us-panel-in 0.18s ease;
  overflow: visible;
}

.user-settings-panel.active {
  display: block;
}

@keyframes us-panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.us-grid {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.us-grid--toggles {
  gap: 0.32rem;
}

.us-grid--col {
  max-width: none;
}

.us-grid--labels {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.us-labels-col {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
}

.us-labels-col__title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
}

.us-range-grid {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(58, 74, 94, 0.55);
}

.us-range-grid[hidden] {
  display: none !important;
}

.us-range-grid--flush {
  margin-top: 0.35rem;
  padding-top: 0;
  border-top: none;
}

.us-camera-block {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(58, 74, 94, 0.55);
}

.us-camera-block[hidden] {
  display: none !important;
}

.us-section-title {
  margin: 0.55rem 0 0.28rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #9aa8b8);
}

.us-section-title:first-child {
  margin-top: 0;
}

.us-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 0.4rem;
  min-width: 0;
  overflow: visible;
}

/* display:flex выше перебивает UA [hidden] — без !important строки не скрываются */
.us-field[hidden],
.us-range-grid[hidden],
.us-crowd-recolor[hidden] {
  display: none !important;
}

/* PEFL 1.0: ручные выцветание / износ / превью / трибуны — только пайплайн */
body.replay--pefl10 .us-field:has(#pitch-color-fade-toggle),
body.replay--pefl10 .us-field:has(#pitch-wear-toggle),
body.replay--pefl10 .us-field:has(#pitch-ultrawide-preview-toggle),
body.replay--pefl10 .us-field:has(#crowd-recolor-toggle),
body.replay--pefl10 #crowd-recolor-controls,
body.replay--pefl10 #pitch-condition-controls {
  display: none !important;
}

.us-field--emphasis {
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(74, 143, 212, 0.45);
  border-radius: 8px;
  background: rgba(26, 51, 72, 0.45);
}

.us-field > select,
.us-field > .us-range {
  flex: 1 1 0;
  min-width: 0;
  max-width: 62%;
  width: auto;
}

.us-field select {
  padding: 0.28rem 0.4rem;
  border: 1px solid #3d4f66;
  border-radius: 7px;
  background: rgba(14, 20, 28, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
}

.us-field--check {
  display: block;
}

.us-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.32rem 0.42rem;
  border: 1px solid #3d4f66;
  border-radius: 8px;
  background: rgba(22, 32, 44, 0.55);
}

.us-check-row input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: #4a8fd4;
}

.us-field--range input[type="range"] {
  accent-color: #4a8fd4;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Метка значения по умолчанию на дорожке ползунка */
.us-range {
  position: relative;
  display: flex;
  align-items: center;
  height: 1.15rem;
}

.us-range__default {
  position: absolute;
  left: var(--us-default-pct, 50%);
  top: 50%;
  width: 2px;
  height: 0.72rem;
  margin-left: -1px;
  transform: translateY(-50%);
  border-radius: 1px;
  background: rgba(232, 200, 154, 0.85);
  box-shadow: 0 0 0 1px rgba(10, 16, 24, 0.55);
  pointer-events: none;
  z-index: 1;
}

.us-field--toggle .us-toggle,
.us-field--action .us-btn,
.us-field--sound-mute .us-sound-toggle {
  flex: 0 0 auto;
}

.us-crowd-recolor {
  margin-top: 0.35rem;
}

.us-crowd-recolor[hidden] {
  display: none !important;
}

.us-field--color input[type="color"] {
  width: 100%;
  max-width: 11rem;
  height: 2rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line, #3a4654) 80%, transparent);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.us-label {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted, #b0bcc8);
  line-height: 1.25;
  overflow: visible;
}

.us-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: rgba(74, 143, 212, 0.18);
  color: #8ec0ef;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  outline: none;
  flex-shrink: 0;
}

.us-tip-float {
  position: fixed;
  z-index: 200;
  max-width: min(16rem, calc(100vw - 1.5rem));
  padding: 0.48rem 0.58rem;
  border: 1px solid #4a6278;
  border-radius: 8px;
  background: rgba(12, 18, 26, 0.98);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.38;
  text-align: left;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.us-tip-float[hidden] {
  display: none;
}

.us-toggle,
.us-btn {
  flex: 0 0 auto;
  min-width: 2.85rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid #3d4f66;
  border-radius: 7px;
  background: rgba(22, 32, 44, 0.88);
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.us-toggle:hover,
.us-btn:hover {
  border-color: #5a7a9a;
  background: rgba(32, 46, 62, 0.95);
}

.us-toggle[aria-pressed="true"] {
  border-color: #4a8fd4;
  background: rgba(26, 51, 72, 0.96);
  color: #d8ecff;
}

.us-btn {
  min-width: 3.25rem;
}

.us-sound-toggle {
  flex-shrink: 0;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border-radius: 10px;
}

.us-check-row .us-label {
  flex: 1 1 auto;
}

.us-field--speed {
  align-items: flex-start;
}

.us-field--speed > .us-label {
  padding-top: 0.18rem;
}

.us-speed-slider {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: relative;
}

.us-speed-pop {
  position: fixed;
  z-index: 200;
  padding: 0.32rem 0.5rem;
  border: 1px solid #4a6278;
  border-radius: 8px;
  background: rgba(12, 18, 26, 0.98);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.us-speed-pop[hidden] {
  display: none;
}

.us-speed-slider input[type="range"] {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: #4a8fd4;
}

.us-speed-slider .us-range {
  display: block;
  width: 100%;
  max-width: none;
  flex: none;
  height: auto;
}

.us-speed-ticks {
  display: flex;
  justify-content: space-between;
  gap: 0;
  font-size: 0.65rem;
  line-height: 1.1;
  color: var(--muted, #9aa8b8);
  user-select: none;
}

.us-speed-ticks--step025 {
  font-size: 0.58rem;
  letter-spacing: -0.02em;
  pointer-events: auto;
}

.us-speed-tick {
  flex: 1 1 0;
  min-width: 0;
  min-height: 1.05rem;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.us-speed-tick--pin {
  font-weight: 600;
  color: var(--text);
}

.us-speed-tick:first-child {
  text-align: left;
}

.us-speed-tick:last-child {
  text-align: right;
}

.us-field--field-picker {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}

.us-field--field-picker > .us-label {
  max-width: none;
}

.us-field-picker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.us-field-picker__status {
  margin: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid #3d4f66;
  border-radius: 8px;
  background: rgba(14, 20, 28, 0.72);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}

.us-btn--wide {
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-align: center;
  padding: 0.45rem 0.65rem;
}

.us-btn--wide:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.us-field--actor-size {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.us-field--actor-size > .us-label {
  max-width: none;
}

.us-actor-size-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  border: 1px solid #3d4f66;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(14, 20, 28, 0.92);
}

.us-actor-size-seg__btn {
  appearance: none;
  margin: 0;
  padding: 0.42rem 0.2rem;
  border: none;
  border-right: 1px solid #3d4f66;
  background: transparent;
  color: var(--muted, #9aa8b8);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}

.us-actor-size-seg__btn:last-child {
  border-right: none;
}

.us-actor-size-seg__btn:hover {
  color: var(--text);
  background: rgba(74, 143, 212, 0.12);
}

.us-actor-size-seg__btn.is-active,
.us-actor-size-seg__btn[aria-checked="true"] {
  color: #e8f1fa;
  background: rgba(74, 143, 212, 0.38);
  box-shadow: inset 0 0 0 1px rgba(74, 143, 212, 0.35);
}

body.replay--user-settings-open .stats-panel {
  display: none !important;
}

body.replay--user-settings-open #open-settings-window,
body.replay--user-settings-open .settings-window-btn#open-settings-window {
  border-color: #4a8fd4;
  background: rgba(26, 51, 72, 0.92);
  box-shadow: inset 0 0 0 1px rgba(74, 143, 212, 0.25);
}

@media (max-width: 640px) {
  .user-settings-tab {
    height: 2.35rem;
    padding: 0.32rem;
  }

  .user-settings-tab__icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}

/* Обзор тура (PEFL 2.5 embed) */
body.replay--tour #open-settings-window,
body.replay--tour #fullscreen-toggle,
body.replay--tour .settings-window-btn,
body.replay--tour .replay-quick-controls,
body.replay--tour .screenshot-slot-fs,
body.replay--tour #view-mode-overlay {
  display: none !important;
}

body.replay--tour .bottom-bar,
body.replay--tour #timeline,
body.replay--tour .timeline,
body.replay--tour .pitch-timeline-tools,
body.replay--tour .marker-field-dock,
body.replay--tour .pitch-zoom-dock,
body.replay--tour #weather-quick-toggle,
body.replay--tour .weather-quick-btn,
body.replay--tour #pefl10-precip-toggle,
body.replay--tour #stats-side-dock,
body.replay--tour .stats-side-dock,
body.replay--tour .stats-fs-dock,
body.replay--tour .formation-fs,
body.replay--tour #hud-stats-panel,
body.replay--tour .hud-board__stats-panel,
body.replay--tour .match-text-panel {
  display: none !important;
}

body.replay--tour.replay--tour-match-fs #hud-score-row {
  pointer-events: none;
  cursor: default;
}

body.replay--tour .timeline-page-slot,
body.replay--tour .match-text-page-slot {
  display: none;
}

body.replay--tour .pitch-column {
  max-width: none;
}

body.replay--tour .starting-lineup-card__hint {
  opacity: 0.85;
}

body.replay--tour.replay--tour-prelineup .pitch-wrap,
body.replay--tour.replay--tour-prelineup .hud,
body.replay--tour.replay--tour-prelineup .bottom-bar,
body.replay--tour.replay--tour-prelineup .stats-side-dock,
body.replay--tour.replay--tour-prelineup .pitch-column {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.replay--tour.replay--tour-match-fs {
  overflow: hidden;
}

body.replay--tour.replay--tour-match-fs .layout {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
}

body.replay--tour.replay--tour-match-fs .pitch-column {
  flex: 1 1 auto;
  height: 100%;
  max-width: none;
  align-self: stretch;
}

body.replay--tour.replay--tour-match-fs .pitch-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  flex: 1 1 auto !important;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: #070b10;
  box-shadow: none;
}

body.replay--tour.replay--tour-match-fs .pitch-stage {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

body.replay--tour.replay--tour-match-fs .hud-board,
body.replay--tour.replay--tour-match-fs .hud-clock-plate {
  border: none;
  box-shadow: none;
}

body.replay--tour.replay--tour-lineup .hud,
body.replay--tour.replay--tour-lineup .bottom-bar,
body.replay--tour.replay--tour-lineup .stats-side-dock,
body.replay--tour.replay--tour-lineup #pitch-wrap,
body.replay--tour.replay--tour-lineup .pitch-column,
body.replay--tour.replay--tour-lineup .starting-lineup-start-btn,
body.replay--tour.replay--tour-lineup .starting-lineup-card__hint {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.replay--tour .layout {
  min-height: 100vh;
}

/* ——— Fallout / Pip-Boy UI chrome ——— */
body.replay--fallout {
  --bg: #0e1610;
  --panel: #152016;
  --text: #c8efb0;
  --muted: #6a9a58;
  --accent: #6dff4a;
  --fo-green: #6dff4a;
  --fo-green-dim: #3a9a2a;
  --fo-green-glow: rgba(109, 255, 74, 0.35);
  --fo-panel: #10160e;
  --fo-panel-soft: #121a10;
  --fo-border: rgba(109, 255, 74, 0.42);
  --fo-border-soft: rgba(109, 255, 74, 0.22);
  --fo-text: #b8f5a0;
  --fo-text-dim: #6a9a58;
  --fo-amber: #c4a35a;
  --fo-mono: "Consolas", "Cascadia Mono", "Segoe UI Mono", ui-monospace, monospace;
  --fo-bezel-r: 10px;
  --fo-bezel-w: 3px;
  --fo-bezel-metal: linear-gradient(
    145deg,
    #7a8a68 0%,
    #4a5640 12%,
    #6b5238 22%,
    #2e3628 38%,
    #5a4630 52%,
    #3a4234 64%,
    #8a6a48 76%,
    #2a3224 88%,
    #5c684c 100%
  );
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(72, 110, 40, 0.18), transparent 55%),
    linear-gradient(180deg, #121c12 0%, #0c140a 48%, #0a1208 100%);
  color: var(--text);
}

body.replay--fallout .pitch-wrap {
  background: var(--panel);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(109, 255, 74, 0.12);
}

body.replay--fallout .pitch-wrap:fullscreen {
  background: #0a1208;
}

body.replay--fallout .pitch-fade {
  background: #0a1208;
}

/* Ржаво-оливковый безель панелей (как на референсе Fallout) */
body.replay--fallout .hud-board,
body.replay--fallout .hud-clock-plate,
body.replay--fallout .stats-fs,
body.replay--fallout .formation-fs--overlay,
body.replay--fallout .formation-fs--dock,
body.replay--fallout .timeline-page-slot,
body.replay--fallout .match-text-page-slot,
body.replay--fallout .match-text-fs-slot > .match-text-panel,
body.replay--fallout .user-settings-dialog,
body.replay--fallout .weather-picker-dialog,
body.replay--fallout .fps-overlay,
body.replay--fallout .stats-team-block .stats-team {
  border: var(--fo-bezel-w) solid transparent;
  border-radius: var(--fo-bezel-r);
  background:
    linear-gradient(180deg, #141c12 0%, #0e140c 55%, #0c120a 100%) padding-box,
    var(--fo-bezel-metal) border-box;
  box-shadow:
    0 0 0 1px #1a1e14,
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(170, 190, 130, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(109, 255, 74, 0.12);
  backdrop-filter: none;
  color: var(--fo-text);
}

/* Fullscreen иначе снимает border/shadow у статов — вернуть безель */
body.replay--fallout .pitch-wrap:fullscreen .stats-fs-dock .stats-fs,
body.replay--fallout .pitch-wrap:fullscreen .stats-fs-dock .formation-fs--overlay {
  border: var(--fo-bezel-w) solid transparent;
  border-radius: var(--fo-bezel-r);
  background:
    linear-gradient(180deg, #141c12 0%, #0e140c 55%, #0c120a 100%) padding-box,
    var(--fo-bezel-metal) border-box;
  box-shadow:
    0 0 0 1px #1a1e14,
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(170, 190, 130, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(109, 255, 74, 0.12);
}

body.replay--fallout .formation-fs--page-inline {
  border: var(--fo-bezel-w) solid transparent;
  border-radius: var(--fo-bezel-r);
  background:
    linear-gradient(180deg, #141c12 0%, #0e140c 55%, #0c120a 100%) padding-box,
    var(--fo-bezel-metal) border-box;
  box-shadow:
    0 0 0 1px #1a1e14,
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(170, 190, 130, 0.18),
    inset 0 0 0 1px rgba(109, 255, 74, 0.12);
  padding: 0;
}

body.replay--fallout .formation-fs--page-inline .formation-fs__field {
  border-color: rgba(109, 255, 74, 0.38);
  background:
    linear-gradient(
      90deg,
      rgba(62, 52, 28, 0.78) 0%,
      rgba(48, 58, 32, 0.72) 50%,
      rgba(62, 52, 28, 0.78) 100%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(109, 255, 74, 0.04) 0,
      rgba(109, 255, 74, 0.04) 0.5rem,
      rgba(0, 0, 0, 0.12) 0.5rem,
      rgba(0, 0, 0, 0.12) 1rem
    );
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35);
}

body.replay--fallout .formation-fs--page-inline .formation-fs__field-lines {
  filter: sepia(0.35) hue-rotate(55deg) saturate(0.85);
  opacity: 0.88;
}

body.replay--fallout .formation-fs__pitch,
body.replay--fallout .pitch-wrap:fullscreen .stats-fs-dock .formation-fs__pitch {
  border: 1px solid rgba(109, 255, 74, 0.28);
  border-radius: 3px;
  background:
    linear-gradient(
      180deg,
      rgba(62, 52, 28, 0.72) 0%,
      rgba(48, 58, 32, 0.65) 42%,
      rgba(58, 48, 26, 0.7) 100%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(109, 255, 74, 0.04) 0,
      rgba(109, 255, 74, 0.04) 0.55rem,
      rgba(0, 0, 0, 0.12) 0.55rem,
      rgba(0, 0, 0, 0.12) 1.1rem
    );
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}

body.replay--fallout .formation-fs--page-inline .formation-fs__shirt {
  border-radius: 50%;
}

body.replay--fallout .formation-fs--page-inline .formation-fs__scheme {
  color: rgba(196, 214, 170, 0.92);
  text-shadow: 0 0 6px rgba(109, 255, 74, 0.18);
}

body.replay--fallout .formation-fs__scheme-line {
  font-family: var(--fo-mono);
}

body.replay--fallout .formation-fs__shirt {
  border-radius: 999px 999px 40% 40%;
  border-width: 1px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-family: var(--fo-mono);
  font-size: 0.46rem;
}

body.replay--fallout .formation-fs__shirt--sub {
  box-shadow:
    0 0 0 1px rgba(109, 255, 74, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.replay--fallout .hud-board__score-row,
body.replay--fallout .hud-board__score-row .hud-team,
body.replay--fallout .hud-board__score-row #score,
body.replay--fallout .hud-clock-plate,
body.replay--fallout .hud-clock-plate #clock {
  color: var(--fo-green);
  text-shadow: 0 0 6px var(--fo-green-glow);
  font-family: var(--fo-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

body.replay--fallout .hud-board__stats-panel,
body.replay--fallout .hud-board__stats-table,
body.replay--fallout .hud-board__stats-table td,
body.replay--fallout .hud-board__stats-table th {
  color: var(--fo-text);
  border-color: var(--fo-border-soft);
  font-family: var(--fo-mono);
}

body.replay--fallout .stats-fs__name,
body.replay--fallout .stats-team__name {
  color: var(--fo-green);
  text-shadow: 0 0 5px var(--fo-green-glow);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-family: var(--fo-mono);
}

body.replay--fallout .stats-table,
body.replay--fallout .stats-table th,
body.replay--fallout .stats-table td,
body.replay--fallout .stats-fs__scroll .stats-table th,
body.replay--fallout .stats-fs__scroll .stats-table td {
  color: var(--fo-text);
  border-color: var(--fo-border-soft);
  font-family: var(--fo-mono);
}

body.replay--fallout .stats-table th {
  color: var(--fo-text-dim);
}

body.replay--fallout .match-text-panel,
body.replay--fallout .match-text-page-slot > .match-text-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Не склеивать линейку с полем — у поля своя кайма; линейка+текст — одна общая */
body.replay--fallout:not(.replay--compact) .pitch-wrap {
  border-radius: var(--fo-bezel-r);
}

body.replay--fallout:not(.replay--timeline-on-pitch):not(.replay--compact) .timeline-page-slot {
  border: var(--fo-bezel-w) solid transparent;
  border-bottom-width: 0;
  border-radius: var(--fo-bezel-r) var(--fo-bezel-r) 0 0;
  margin-top: 0;
}

body.replay--fallout:not(.replay--timeline-on-pitch):not(.replay--compact) .match-text-page-slot {
  border: var(--fo-bezel-w) solid transparent;
  border-top-width: 0;
  border-radius: 0 0 var(--fo-bezel-r) var(--fo-bezel-r);
  margin-top: 0;
}

body.replay--fallout .bottom-bar {
  row-gap: 0;
}

body.replay--fallout .pitch-column {
  gap: 0.22rem;
}

body.replay--fallout .timeline-page-slot,
body.replay--fallout .match-text-page-slot {
  overflow: hidden;
  margin-top: 0;
  flex-shrink: 0;
}

body.replay--fallout .timeline-page-slot:has(.timeline--split-layout) {
  overflow: visible;
}

body.replay--fallout .timeline,
body.replay--fallout .timeline--overlay {
  padding: 0.1rem 0.35rem 0.14rem;
}

body.replay--fallout .match-text-panel__scroll {
  --match-text-lines: 3;
  --match-text-font: 0.72rem;
  --match-text-lh: 1.35;
  --match-text-pad-bottom: 0.22rem;
  color: var(--fo-text);
  font-family: var(--fo-mono);
}

/* Линейка на поле — та же кайма */
body.replay--fallout .timeline-fs-slot > .timeline,
body.replay--fallout .timeline--on-pitch.timeline--overlay {
  border: var(--fo-bezel-w) solid transparent;
  border-radius: var(--fo-bezel-r);
  background:
    linear-gradient(180deg, #141c12 0%, #0e140c 55%, #0c120a 100%) padding-box,
    var(--fo-bezel-metal) border-box;
  box-shadow:
    0 0 0 1px #1a1e14,
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(170, 190, 130, 0.18),
    inset 0 0 0 1px rgba(109, 255, 74, 0.12);
}

body.replay--fallout .match-text-part--minute {
  color: var(--fo-amber);
}

body.replay--fallout .match-text-part--home,
body.replay--fallout .match-text-part--away,
body.replay--fallout .match-text-part--neutral {
  color: var(--fo-text);
}

/* ——— Fallout: линейка событий ——— */
body.replay--fallout .scrub-track-rail,
body.replay--fallout .timeline-style--broadcast .scrub-track-rail {
  background: rgba(28, 36, 22, 0.96);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(109, 255, 74, 0.16),
    inset 0 0 0 1px rgba(90, 70, 40, 0.35);
}

body.replay--fallout .scrub-progress,
body.replay--fallout .timeline-style--broadcast .scrub-progress {
  background: linear-gradient(90deg, #3a6a28, var(--fo-green));
  box-shadow: 0 0 10px var(--fo-green-glow);
}

body.replay--fallout .timeline-style--broadcast #scrub::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    #3a6a28 0%,
    var(--fo-green) var(--scrub-fill, 0%),
    rgba(28, 36, 22, 0.96) var(--scrub-fill, 0%),
    rgba(28, 36, 22, 0.96) 100%
  );
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(109, 255, 74, 0.16);
}

body.replay--fallout .timeline-style--broadcast #scrub::-moz-range-track {
  background: rgba(28, 36, 22, 0.96);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(109, 255, 74, 0.16);
}

body.replay--fallout .timeline-style--broadcast #scrub::-moz-range-progress {
  background: linear-gradient(90deg, #3a6a28, var(--fo-green));
  box-shadow: 0 0 10px var(--fo-green-glow);
}

body.replay--fallout #scrub::-webkit-slider-thumb,
body.replay--fallout .timeline-style--broadcast #scrub::-webkit-slider-thumb {
  border-color: rgba(109, 255, 74, 0.85);
  background: #d8efb0;
  box-shadow:
    0 0 0 2px rgba(10, 16, 8, 0.9),
    0 0 12px rgba(109, 255, 74, 0.45);
}

body.replay--fallout #scrub::-moz-range-thumb,
body.replay--fallout .timeline-style--broadcast #scrub::-moz-range-thumb {
  border-color: rgba(109, 255, 74, 0.85);
  background: #d8efb0;
  box-shadow:
    0 0 0 2px rgba(10, 16, 8, 0.9),
    0 0 12px rgba(109, 255, 74, 0.45);
}

body.replay--fallout .timeline-style--broadcast .scrub-marker::after,
body.replay--fallout .timeline-style--split .scrub-markers--home .scrub-marker::after,
body.replay--fallout .timeline-style--split .scrub-marker--lane-away::after {
  background: linear-gradient(
    to bottom,
    rgba(109, 255, 74, 0.7),
    rgba(109, 255, 74, 0.05)
  );
}

body.replay--fallout .timeline-style--broadcast .scrub-marker--goal::after,
body.replay--fallout .timeline-style--split .scrub-markers--home .scrub-marker--goal::after,
body.replay--fallout .timeline-style--split .scrub-marker--lane-away.scrub-marker--goal::after {
  background: linear-gradient(
    to bottom,
    rgba(196, 163, 90, 0.85),
    rgba(196, 163, 90, 0.08)
  );
}

body.replay--fallout .scrub-xg-dot {
  opacity: 0.9;
}

body.replay--fallout .marker-field-btn {
  border-color: var(--fo-border-soft);
  background: rgba(10, 18, 8, 0.9);
  color: var(--fo-text);
  border-radius: 2px;
}

body.replay--fallout .marker-field-btn:hover,
body.replay--fallout .marker-field-btn[aria-pressed="true"],
body.replay--fallout .marker-field-btn.is-active {
  border-color: var(--fo-border);
  color: var(--fo-green);
  box-shadow: 0 0 8px rgba(109, 255, 74, 0.18);
}

body.replay--fallout .user-settings-tab[aria-selected="true"],
body.replay--fallout .user-settings-tab.is-active {
  color: var(--fo-green);
  border-color: var(--fo-border);
  text-shadow: 0 0 6px var(--fo-green-glow);
}

body.replay--fallout .us-toggle[aria-pressed="true"] {
  background: rgba(109, 255, 74, 0.16);
  border-color: var(--fo-border);
  color: var(--fo-green);
}
