.record-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.record-views {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.record-views a {
  min-height: 46px;
  padding: 11px 16px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.record-views a:hover {
  color: var(--ink);
  background: var(--surface);
}

.record-views a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.record-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.record-sort label {
  font-size: 14px;
  font-weight: 650;
}

.record-sort select {
  width: auto;
  min-height: 46px;
  padding-right: 34px;
}

.record-sort select:focus-visible,
.record-views a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .record-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .record-views {
    width: 100%;
  }

  .record-views a {
    flex: 1;
    text-align: center;
  }

  .record-sort {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .record-sort label {
    grid-column: 1 / -1;
  }

  .record-sort select {
    width: 100%;
    min-width: 0;
  }
}
