.section-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.section-header h2 {
  margin: 0;
}
.media-panel-header {
  margin-bottom: var(--space-3);
}

.group-header {
  margin-bottom: var(--space-3);
}

.header-copy {
  display: grid;
  gap: var(--space-1);
}

.image-language-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 3.15rem;
  background: #ffffff;
  color: var(--color-text-muted);
}

.image-language-button.empty {
  opacity: 0.76;
}

.image-language-button.complete {
  border-color: #b8ddc2;
}

.image-language-button.incomplete {
  border-color: #e8c8c2;
}

.image-language-button.active {
  background: #fff5b8;
  border-color: var(--color-brand);
  color: var(--color-text);
  opacity: 1;
}

.image-language-button__label {
  line-height: 1;
}

.image-language-button__state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.image-language-button.complete .image-language-button__state {
  background: #dcefdc;
  color: #25603b;
}

.image-language-button.incomplete .image-language-button__state {
  background: #f7ddd7;
  color: #944329;
}

.form-field--wide {
  grid-column: 1 / -1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-card);
  align-self: end;
  justify-self: start;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-mark {
  width: 1.05rem;
  height: 1.05rem;
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  border-radius: 0.3rem;
  background: #ffffff;
}

.toggle input:checked + .toggle-mark {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.toggle input:checked + .toggle-mark::after {
  content: "";
  position: absolute;
  left: 0.31rem;
  top: 0.12rem;
  width: 0.22rem;
  height: 0.46rem;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.toggle span {
  font-size: 0.84rem;
  font-weight: 600;
}

.preview-card {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
}

.preview-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.sort-editor {
  align-items: end;
}

.sort-editor label {
  display: grid;
  gap: var(--space-1);
  min-width: min(100%, 180px);
}

@media (max-width: 720px) {
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .media-panel-meta {
    justify-content: flex-start;
  }

  .sort-editor {
    align-items: stretch;
  }
}
