/* Zusätzliche Verdichtung für die Bedienung auf kleinen Bildschirmen. */
@media (max-width: 700px) {
  /* Formulare bleiben gut antippbar, verbrauchen aber zwischen den Feldern weniger Raum. */
  .scan-form > .grid,
  .scan-form > .team-matchup,
  .scan-form > label,
  .user-edit-section,
  .login-form label {
    margin-top: .4rem;
    margin-bottom: .4rem;
  }

  .scan-form > h2,
  .user-edit-section h2 {
    margin-top: .8rem;
    margin-bottom: .45rem;
  }

  .scan-upload-options {
    margin: .6rem 0;
  }

  .scan-upload-options label {
    margin: .4rem 0;
  }

  .scan-preview > h2,
  .new-scan-preview > h2 {
    margin: .7rem 0 .4rem;
  }

  /* Zwei zusammengehörige Aktionen passen nebeneinander; eine einzelne bleibt groß. */
  .scan-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
  }

  .scan-actions > * {
    min-width: 0;
    width: 100%;
    white-space: normal;
  }

  .scan-actions > :only-child {
    grid-column: 1 / -1;
  }

  .new-scan-preview img,
  .scan-preview > img,
  .managed-scan {
    margin-left: auto;
    margin-right: auto;
  }

  /* Zeitangaben sind am Seitenende schnell erfassbar und umbrechen sauber. */
  .game-timestamps {
    display: grid;
    gap: .3rem;
    margin: .65rem 0 0;
    padding: .6rem .7rem;
    font-size: .82rem;
    line-height: 1.4;
  }

  /* Bearbeitungstabellen dürfen horizontal gleiten, bleiben dabei aber kompakter. */
  .table:not(.game-results) .stats {
    min-width: 480px;
    font-size: .84rem;
  }

  .table:not(.game-results) .stats th,
  .table:not(.game-results) .stats td {
    padding: .42rem .3rem;
  }

  .table:not(.game-results) .stats th:first-child,
  .table:not(.game-results) .stats td:first-child {
    min-width: 108px;
  }

  /* Auf sehr schmalen Geräten bleibt die öffentliche Ergebnistabelle lesbar. */
  .game-results th,
  .game-results td {
    font-size: .92rem;
  }
}

@media (max-width: 380px) {
  .scan-actions {
    grid-template-columns: 1fr;
  }

  .scan-actions > :only-child {
    grid-column: auto;
  }

  .game-results th,
  .game-results td {
    font-size: .86rem;
  }

  .game-results th:first-child,
  .game-results td:first-child {
    padding-left: .25rem;
    padding-right: .15rem;
  }
}
