@media (max-width: 650px) {
  .relation-tabs .tabbuttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    white-space: normal;
    border-bottom: 0;
    padding-bottom: 18px;
    margin-bottom: 8px;
  }
  .relation-tabs .tabbuttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f5f6f8;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .relation-tabs .tabbuttons button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .relation-tabs .tabbuttons button.selected {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    font-weight: 700;
  }
  .relation-tabs .tabbuttons button:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
  }
}
