.gallery-editor {
  padding-block: 0.5rem;
  min-width: 0;
}
.gallery-heading,
.gallery-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gallery-heading {
  justify-content: space-between;
}
.gallery-heading h3,
.gallery-help,
.gallery-status {
  margin: 0;
}
.gallery-help,
.gallery-status,
.gallery-count {
  color: var(--muted, #a8a299);
  font-size: 0.84rem;
}
.gallery-help,
.gallery-status:not(:empty) {
  margin-block: 0.6rem;
}
.gallery-list {
  padding: 0;
  margin: 0.7rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 0.6rem;
  list-style: none;
}
.gallery-item {
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--line, rgba(245, 240, 230, 0.09));
  border-radius: 12px;
  background: var(--well, #0e0e11);
}
.gallery-item img {
  display: block;
  width: 100%;
  max-height: 160px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}
.gallery-caption {
  display: block;
  font-size: 0.8rem;
  margin-block: 0.4rem;
}
.gallery-tools {
  flex-wrap: wrap;
  gap: 0.3rem;
}
.gallery-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong, rgba(245, 240, 230, 0.19));
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  min-height: 36px;
  color: var(--white, #f5f2eb);
  background: var(--raised, #212127);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}
.gallery-button:hover:not(:disabled) {
  background: var(--raised-hover, #2a2a32);
}
.gallery-button:disabled {
  opacity: 0.4;
  cursor: default;
}
.gallery-button:focus-visible,
.gallery-slide:focus-visible {
  outline: 2px solid var(--iris-soft, #e6cfa8);
  outline-offset: 2px;
}
.profile-gallery,
.gallery-slide {
  width: 100%;
  min-width: 0;
}
.gallery-slide {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: inherit;
  height: 100%;
  aspect-ratio: 4 / 3;
  background: var(--well, #0e0e11);
  touch-action: pan-y;
}
.gallery-slide > img.gallery-slide-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}
.gallery-slide .gallery-button,
.gallery-indicator {
  position: absolute;
  z-index: 1;
  background: rgba(9, 9, 11, 0.86);
  color: var(--white, #f5f2eb);
}
.gallery-slide .gallery-button {
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.5rem;
  border-radius: 50%;
}
.gallery-prev {
  left: 0.6rem;
}
.gallery-next {
  right: 0.6rem;
}
.gallery-indicator {
  bottom: 0.6rem;
  right: 0.6rem;
  border-radius: 99px;
  border: 1px solid var(--line, rgba(245, 240, 230, 0.09));
  padding: 0.2rem 0.65rem;
  font-size: 0.77rem;
  font-variant-numeric: tabular-nums;
}
