/* Selection uses one complete photo per row on phones; comparison alone keeps
   two columns. These rules are scoped to the client's gallery, not owner cards. */
.clean-theme #client-gallery { box-sizing: border-box; width: 100%; min-width: 0; padding-bottom: 160px; }
.clean-theme #client-gallery #photos { min-width: 0; max-width: 100%; }
.clean-theme #client-gallery .photo { min-width: 0; max-width: 100%; }
.clean-theme #client-gallery > footer { position: static; }
.clean-theme #compare-dialog { width: 100% !important; max-width: 100% !important; overflow-x: hidden !important; }
.clean-theme #compare-dialog :is(.compare-grid,.compare-pane,.compare-pane footer,.compare-controls) { min-width: 0; }
.clean-theme #compare-dialog .compare-pane footer > b { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.clean-theme #compare-dialog .compare-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.clean-theme .client-selection-dock {
  position: fixed; z-index: 20; left: max(16px,env(safe-area-inset-left)); right: max(16px,env(safe-area-inset-right));
  bottom: calc(max(12px,env(safe-area-inset-bottom)) + var(--client-dock-bottom,0px));
  box-sizing: border-box; max-width: 640px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--clean-panel); color: var(--ink); box-shadow: 0 6px 24px #00000014;
}
.clean-theme .client-selection-dock[hidden],body:has(dialog:modal) .client-selection-dock { display: none !important; }
.clean-theme .client-selection-dock .client-dock-summary { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.clean-theme .client-selection-dock .button { flex-shrink: 0; min-height: 44px; font-size: 13px; padding: 10px 16px; }
.clean-theme .client-selection-dock .button:disabled { opacity: .55; cursor: default; }
@media (max-width: 720px) {
  .clean-theme #client-gallery #photos { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .clean-theme #client-gallery .clean-photo-surface { aspect-ratio: auto; width: 100%; }
  .clean-theme #client-gallery .clean-photo-surface > img { width: 100%; height: auto; max-width: 100%; object-fit: contain; }
  .clean-theme #client-gallery .clean-photo-tools {
    position: static; display: flex; flex-wrap: wrap; justify-content: flex-start;
    opacity: 1; pointer-events: auto; gap: 6px; padding: 0; margin: 4px 0 0;
    background: transparent; border: 0; box-shadow: none;
  }
  .clean-theme #client-gallery .clean-photo-tools button { min-width: 44px; min-height: 44px; width: 44px; height: 44px; flex-basis: 44px; }
  .clean-theme #client-gallery .clean-photo-tools .pick,.clean-theme #client-gallery .clean-options { display: none; }
  .clean-theme .client-selection-dock { gap: 10px; padding: 10px 12px; }
  .clean-theme .client-selection-dock .client-dock-summary { font-size: 12px; }
  .clean-theme .client-selection-dock .button { padding-inline: 12px; font-size: 12px; }
}
