@media (max-width: 980px) {
  .workbench {
    align-items: stretch;
    gap: 12px;
  }

  .control-panel,
  .video-panel {
    z-index: 0;
  }

  .control-panel {
    margin-top: 0;
  }

  .video-panel {
    overflow: visible;
  }

  .video-panel video,
  .video-panel .youtube-player {
    max-height: min(48vh, 360px);
  }

  .video-panel video.has-video,
  .youtube-player.has-youtube {
    display: block;
    object-fit: contain;
  }
}

@media (max-width: 620px) {
  .workbench {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .competitor-status-bar,
  .video-panel,
  .control-panel {
    grid-column: 1 / -1;
  }

  .control-panel {
    order: 3;
  }

  .video-panel {
    order: 2;
  }

  .competitor-status-bar {
    order: 1;
  }

  .competitor-status-bar .red-side-panel,
  .competitor-status-bar .blue-side-panel {
    grid-column: auto;
    order: initial;
  }

  .timer-strip,
  .video-panel.video-mode .timer-strip {
    grid-template-columns: 1fr;
  }

  .timer-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .timer-buttons .icon-button,
  .timer-buttons .icon-button.wide {
    min-width: 0;
    width: 100%;
  }

  .youtube-loader {
    grid-template-columns: 1fr;
  }

  .video-panel video,
  .video-panel .youtube-player {
    max-height: 34vh;
  }
}
