@media (max-width: 467px) {
  .teams {
    padding: 1rem;
    margin: 1rem auto;
    width: 100%;

    h1 {
      font-size: 1.3rem;
      text-align: center;
      margin-bottom: 0.5rem;
    }

    h4 {
      font-size: 0.75rem;
      text-align: center;
      margin: 0.25rem 0 1rem;
      line-height: 1.4;
    }

    /* 検索欄 */
    .teams-search {
      flex-direction: column;
      gap: 0.5rem;
      width: 100%;
      margin: 0.75rem 0;
    }

    .teams-search label {
      font-size: 0.85rem;
      text-align: center;
      width: 100%;
      font-weight: 700;
    }

    .teams-search__box {
      width: 100%;
      min-width: unset;
    }

    .teams-search input {
      width: 100%;
      padding: 0.6rem;
      font-size: 0.95rem;
      border-radius: 0.4rem;
    }

    .teams-search button {
      width: 100%;
      padding: 0.6rem;
      font-size: 0.85rem;
      border-radius: 0.4rem;
    }

    .teams-search button.secondary {
      width: 100%;
    }

    .teams-search__result {
      width: 100%;
      text-align: center;
      margin-left: 0;
      font-size: 0.75rem;
      color: #6b7280;
    }

    /* テーブル：2行2列を維持 */
    .teams-table {
      width: 100%;
      border-collapse: collapse;
    }

    .teams-table tbody {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
    }

    .teams-table tr {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.75rem;
      width: 100%;
    }

    .teams-table td {
      flex: 1;
      min-width: unset;
      width: 100%;
    }

    /* チームカード */
    .team {
      padding: 1rem;
      border-radius: 0.6rem;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .team h3 {
      font-size: 1.1rem;
      margin-bottom: 0.6rem;
      font-weight: 800;
      text-align: center;
    }

    .members {
      gap: 0.15rem;
      max-height: 200px;
      overflow-y: auto;
    }

    .members li {
      font-size: 0.75rem;
      line-height: 1.4;
      margin-left: 0;
    }

    /* ハイライト */
    .class-code.is-hit {
      padding: 0.15rem 0.3rem;
      font-size: 0.75rem;
      font-weight: 700;
      border-radius: 0.2rem;
    }

    /* サジェストリスト */
    .teams-suggest {
      max-height: 120px;
      font-size: 0.8rem;
    }

    .teams-suggest li {
      padding: 0.35rem 0.6rem;
      font-size: 0.75rem;
    }
  }
}
