.add-round-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.add-round-panel h2,
.add-round-panel p {
  margin: 0;
}

.add-round-panel p {
  margin-top: 6px;
}

@media (max-width: 740px) {
  html {
    font-size: 16px;
  }

  body {
    overflow-x: hidden;
  }

  .main-content {
    width: 100%;
    padding: 24px 14px 104px;
  }

  .page-heading {
    gap: 16px;
  }

  .page-heading > div,
  .page-heading > .button,
  .heading-actions,
  .heading-actions .button {
    width: 100%;
  }

  .page-heading h1 {
    overflow-wrap: anywhere;
  }

  .page-heading p {
    line-height: 1.6;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-width: 0;
    min-height: 96px;
    padding: 14px;
  }

  .stat-label {
    line-height: 1.35;
  }

  .stat-value {
    font-size: 1.5rem;
    overflow-wrap: anywhere;
  }

  .grid-two,
  .grid-equal,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .surface-pad,
  .form-card {
    padding: 17px;
  }

  .form-card {
    width: 100%;
  }

  .form-card > .button {
    width: 100%;
    margin: 5px 0 0;
  }

  input:not([type=checkbox]):not([type=radio]),
  select,
  textarea,
  .button {
    min-height: 48px;
  }

  input,
  select,
  textarea,
  button,
  .button {
    font-size: 16px;
  }

  .inline-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .inline-actions form,
  .inline-actions .button,
  .inline-actions select {
    width: 100%;
  }

  .section-heading {
    margin-bottom: 15px;
  }

  .section-heading h2 {
    font-size: 1.18rem;
  }

  .list-row {
    align-items: flex-start;
    gap: 10px;
  }

  .list-row > form {
    flex: none;
  }

  .list-row .button-small {
    min-height: 40px;
  }

  .round-title {
    align-items: flex-start;
  }

  .match-card {
    padding: 14px;
  }

  .match-teams {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 14px;
    text-align: center;
  }

  .match-team,
  .match-team.right {
    text-align: center;
    padding: 9px;
    border-radius: 5px;
    background: #f4f7f2;
  }

  .score {
    font-size: 1.45rem;
  }

  .score-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .score-form label,
  .score-form input {
    width: 100%;
    max-width: none;
  }

  .score-form .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mobile-table,
  .mobile-table tbody,
  .mobile-table tr,
  .mobile-table td {
    display: block;
    width: 100%;
  }

  .mobile-table thead {
    display: none;
  }

  .mobile-table tr {
    margin-bottom: 12px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .mobile-table td,
  .mobile-table td.table-number {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    text-align: right;
  }

  .mobile-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
  }

  .add-round-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .add-round-panel form,
  .add-round-panel .button {
    width: 100%;
  }

  .auth-panel {
    width: 100%;
    margin: 22px auto;
  }

  .mobile-nav a {
    min-height: 48px;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .main-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .stat-grid,
  .dev-login-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-header {
    padding-left: 14px;
    padding-right: 14px;
  }
}
