.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding: 20px 0 14px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.main-stage::-webkit-scrollbar { display: none; }

@media (max-width: 1100px) {
  .bento-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .situation-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .scoreboard-row,
  .bento-stats-grid {
    grid-template-columns: 1fr;
  }

  .situation-card { grid-column: auto; }

  .main-stage { gap: 12px; padding: 12px 0 8px; }

  .score-runs-wickets { font-size: clamp(3.4rem, 16vw, 4.8rem); }

  .nothing-header,
  .nothing-footer-console {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nothing-header {
    flex-wrap: wrap;
  }

  .match-context { max-width: 100%; }

  .footer-intel {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .nothing-header { padding: 10px 14px; }
  .nothing-footer-console { padding: 10px 14px 12px; }

  .ball-cell {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .batter-row {
    grid-template-columns: 1fr auto;
  }

  .batter-stats-matrix {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .score-runs-wickets { font-size: 3.6rem; }

  .header-actions .btn-text { display: none; }
  .glyph-btn { padding: 9px 11px; }

  /* Same facts already live in the cards; keep the phone footer to one commentary line */
  .footer-intel { display: none; }

  .preset-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .modal-card { padding: 16px; }
}

:fullscreen .app-container,
:-webkit-full-screen .app-container {
  padding: 0;
}
