.cartera-back {
  display: inline-block;
  margin-top: 0.75rem;
  text-decoration: none;
}

.copies-apply {
  justify-content: flex-end;
}

.copies-apply span {
  visibility: hidden;
}

/* ── Lista de fotos ── */

.cartera-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cartera-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #faf9f7;
}

.cartera-item__thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--collage-photo-bg);
  border: 1px solid var(--border);
}

.cartera-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.cartera-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cartera-item__copies {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cartera-item__copies label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cartera-item__copies input {
  width: 64px;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.cartera-item__actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cartera-item__btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  width: 28px;
  height: 24px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--text);
}

.cartera-item__btn:hover {
  background: #f0ece6;
}

.cartera-item__btn--remove {
  color: #a23a2e;
}

/* ── Área de vista previa ── */

.cartera-preview {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cartera-sheets {
  flex: 1;
  overflow: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.cartera-sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cartera-sheet__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cartera-sheet canvas {
  background: #fff;
  box-shadow: var(--shadow);
  max-width: min(900px, 100%);
  height: auto;
  border: 1px solid var(--border);
}

.cartera-empty {
  color: var(--text-muted);
  text-align: center;
  margin-top: 4rem;
  font-size: 0.95rem;
  max-width: 360px;
}

@media (max-width: 880px) {
  body {
    overflow: auto;
  }

  .app {
    grid-template-columns: 1fr;
    height: auto;
  }

  .cartera-preview {
    min-height: 60vh;
  }
}
