/* Opening replays only: reserve room for dialogue before allocating the canvas.
   Normal racing, betting and farm surfaces retain their existing layout. */
#race-view.opening-presentation {
  box-sizing: border-box;
  height: 97svh;
  max-height: 97svh;
  overflow-x: hidden;
  overflow-y: auto;
}
#race-view.opening-presentation #race-broadcast-info { display: none; }
#race-view.opening-presentation #race-canvas {
  height: 0;
  min-height: 0;
  flex: 1 1 0;
}
#race-view.opening-presentation #race-live-event {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
  padding: 8px;
  gap: 8px;
}
#race-view.opening-presentation .race-speech { min-width: 0; }
#race-view.opening-presentation .race-speech-meta { display: none; }
#race-view.opening-presentation #race-live-event p {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}
#race-view.opening-presentation #race-event-log { flex-shrink: 0; }
/* Camera settings are optional; their expanded content scrolls independently. */
#race-view.opening-presentation #race-camera-settings[open] {
  flex: 0 1 auto;
  min-height: 28px;
  max-height: 22svh;
  overflow-y: auto;
}
@media (max-width: 420px) {
  #race-view.opening-presentation .race-face {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  #race-view.opening-presentation .race-hud { gap: 3px; }
  #race-view.opening-presentation .race-hud button { padding: 4px 6px; }
}
