.upload-area input.photo-picker-input {
  position: absolute;
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.photo-picker-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

.photo-picker-input:focus-visible + .photo-picker-label {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}

.photo-picker-label:hover,
.photo-picker-label:focus-within {
  background: var(--purple);
  color: var(--white);
}

.photo-picker-label.is-full,
.photo-picker-label.is-full:hover {
  background: var(--line);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}

.photo-preview-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

.photo-preview-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo-preview-card figcaption {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 10px;
}

.photo-preview-card figcaption > span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-badge {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--lime);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.photo-card-action {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.photo-card-action:hover,
.photo-card-action:focus-visible {
  background: var(--purple);
  color: var(--white);
}

.photo-card-action.remove {
  border-color: #a22;
  color: #821919;
}

@media (max-width: 700px) {
  .photo-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-preview-card { box-shadow: 3px 3px 0 var(--ink); }
}
