@layer components {
/* ── Photo upload ───────────────────────────────────── */
.photo-file-input {
  display: none;
}
.photo-placeholder {
  cursor: pointer;
  transition: opacity var(--t-slow);
}
.photo-placeholder:hover { opacity: 0.85; }
.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  border-radius: var(--r);
}

.image-picker { margin-top: 12px; }
.image-picker-label {
  font-size: 13px;
  color: var(--text-muted, #666);
  margin-bottom: 8px;
}
.image-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.image-picker-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: oklch(95% 0.01 65);
  padding: 0;
}
.image-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.image-picker-thumb:hover { opacity: 0.85; }
.image-picker-thumb--selected {
  border-color: oklch(65% 0.15 290);
  box-shadow: 0 0 0 2px oklch(95% 0.05 290);
}
.image-picker-thumb--upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px dashed oklch(80% 0.02 65);
  background: oklch(98% 0.005 65);
  color: var(--text-muted, #666);
}
.image-picker-thumb--upload:hover {
  border-color: oklch(65% 0.15 290);
  color: oklch(55% 0.15 290);
  opacity: 1;
}
.image-picker-upload-icon {
  font-size: 22px;
  line-height: 1;
  font-weight: 300;
}
.image-picker-upload-label {
  font-size: 11px;
  font-weight: 500;
}
}
