/* Standalone match-report host — поверх pefl25-styles */
html.match-report-host,
body.match-report-host {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--body-bg, #C9F8B7);
  color: var(--text-main, #000000);
  font-family: var(--font-ui, system-ui, 'Segoe UI', sans-serif);
}

body.match-report-host {
  display: flex;
  flex-direction: column;
}

.match-report-host-status {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  color: var(--text-muted, #607d8b);
  font-size: 0.95rem;
}

.match-report-host-status[hidden] {
  display: none !important;
}

.match-report-host-status--error {
  color: var(--danger, #c62828);
}

#pefl25-root.pefl25-page-match-report.page {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 4px;
}

/* Без сайдбара PEFL — контент на всю ширину (дубль pefl25-styles, если CSS грузится раньше) */
#pefl25-root.pefl25-page-match-report > .layout.layout--match-report {
  grid-template-columns: minmax(0, 1fr);
}

#pefl25-root.pefl25-page-match-report > .layout.layout--match-report > .sidebar {
  display: none !important;
}

#pefl25-root.pefl25-page-match-report > .layout.layout--match-report > .content.content--match-report {
  grid-column: 1 / -1;
}

/* Узкий экран: страница скроллится целиком, не «fullscreen lock» */
@media (max-width: 980px) {
  html.match-report-host,
  body.match-report-host {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.match-report-host {
    display: block;
  }

  #pefl25-root.pefl25-page-match-report.page {
    flex: none;
    min-height: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }
}
