.photos-page {
  gap: 16px;
}

.photos-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.photos-head h1 {
  margin: 0 0 5px;
}

.photos-head p {
  margin: 0;
}

.photos-badges,
.photos-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.photos-actions form {
  margin: 0;
}

.photo-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.photo-album-card {
  min-width: 0;
  overflow: hidden;
  padding: 0;
}

.photo-album-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--s2);
}

.photo-album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}

.photo-album-card:hover .photo-album-cover img {
  transform: scale(1.025);
}

.photo-album-cover .badge {
  position: absolute;
  top: 9px;
  left: 9px;
}

.photo-album-cover .photo-private-badge {
  left: auto;
  right: 9px;
}

.photo-empty-cover,
.photo-lock-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--text-3);
  background: var(--s1);
  border: 1px solid var(--border);
}

.photo-empty-cover .ico,
.photo-lock-icon .ico {
  width: 25px;
  height: 25px;
}

.photo-album-locked .photo-album-cover {
  background: linear-gradient(145deg, var(--s2), var(--pink-soft));
}

.photo-album-body {
  padding: 12px;
}

.photo-album-body h2 {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.photo-album-body p {
  margin: 0;
  font-size: 12px;
}

.photos-empty {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
}

.photos-empty h2,
.photos-empty p {
  margin-top: 0;
}

.photos-description,
.photos-manage-panel,
.photos-confirm {
  padding: 18px;
}

.photo-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.photo-detail-item {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.photo-detail-item a {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--s2);
}

.photo-detail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-detail-item figcaption {
  padding: 10px 12px;
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.photos-form-wrap {
  width: 100%;
}

.photos-check-field input {
  width: 18px;
  height: 18px;
}

.photo-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.photo-manage-item {
  min-width: 0;
  padding: 10px;
}

.photo-manage-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--r);
  color: var(--text-3);
  background: var(--s2);
}

.photo-manage-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-manage-preview span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  font-size: 12px;
}

.photo-caption-form {
  margin-top: 10px;
}

.photo-item-actions {
  margin-top: 10px;
}

.photo-owned-card {
  min-width: 0;
}

.photo-manage-link {
  width: 100%;
  margin-top: 7px;
}

.photos-confirm {
  max-width: 650px;
}

.photos-confirm h1 {
  margin-top: 0;
}

.photo-age-gate {
  border-color: var(--amber);
}

.photos-side-note {
  white-space: normal;
  color: var(--text-3);
  cursor: default;
}

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

  .photos-head > .btn {
    width: 100%;
  }

  .photo-album-grid,
  .photo-detail-grid,
  .photo-manage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-album-body {
    padding: 9px;
  }

  .photo-detail-item figcaption {
    padding: 8px;
  }
}
