.client-photos-page {
  padding: 64px 0 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.client-photos-header {
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 8px 16px;
  z-index: 25;
}

.client-photos-title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1b1b1b;
}

.client-photos-back,
.client-photos-add {
  width: 44px;
  height: 44px;
}

.client-photos-back {
  border-radius: 50%;
  background: #fff;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.client-photos-back img {
  width: 24px;
  height: 24px;
}

.client-photos-add {
  border-radius: 50%;
  background: #1b1b1b;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.client-photos-add img {
  width: 24px;
  height: 24px;
}

.client-photos-content {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.client-photos-empty {
  margin-top: 32px;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.client-photos-error {
  display: none;
  font-size: 13px;
  color: #e53935;
  text-align: center;
}

.client-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.client-photos-grid--loading {
  pointer-events: none;
}

.client-photos-skeleton {
  border-radius: 16px;
  background: linear-gradient(90deg, #eef1f4 0%, #f7f8fa 50%, #eef1f4 100%);
  background-size: 200% 100%;
  animation: client-photo-skeleton 1.2s ease-in-out infinite;
  aspect-ratio: 1 / 1;
}

.client-photos-item {
  border: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f4f6;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  position: relative;
}

.client-photos-item--loading {
  background: #e6ebf2;
}

.client-photos-item--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #eef1f4 0%, #f7f8fa 50%, #eef1f4 100%);
  background-size: 200% 100%;
  animation: client-photo-skeleton 1.2s ease-in-out infinite;
  pointer-events: none;
}

.client-photos-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 160ms ease;
}

.client-photos-item--loading .client-photos-item__img {
  opacity: 0;
}

.client-photo-actions .add-menu__item--danger {
  color: #EA3323;
}

.client-photos-add--disabled {
  opacity: 0.6;
  cursor: default;
}

@keyframes client-photo-skeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.client-photo-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}

.client-photo-viewer--show {
  opacity: 1;
  pointer-events: auto;
}

.client-photo-viewer__img {
  max-width: min(92vw, 760px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.client-photo-viewer__close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.client-photo-viewer__close img {
  width: 20px;
  height: 20px;
}

body.photo-viewer-open {
  overflow: hidden;
}
