/* Página de subida de fotos (post-compra) — blanco, minimalista, mobile-first.
   Los tokens de color viven en brand.css. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--dy-bg);
  color: var(--dy-ink);
  font-family: "Figtree", system-ui, sans-serif;
}

h1, h2 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  margin: 0 0 10px;
  text-wrap: balance;
}

/* --- Header --- */
.uf-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--dy-line);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 15px;
}
.uf-theme-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--dy-bg-soft);
  border: 1px solid var(--dy-line);
}

/* --- Main --- */
.uf-main {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 40px) clamp(16px, 4vw, 24px) 80px;
}
.uf-back-link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dy-muted);
  text-decoration: none;
  margin-bottom: 16px;
}
.uf-back-link:hover { color: var(--dy-ink); }

.uf-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dy-muted);
  max-width: 56ch;
  margin: 0 0 28px;
}

/* --- Tema + vista previa de la carta --- */
.uf-theme-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--dy-line);
}
@media (min-width: 640px) {
  .uf-theme-section { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.uf-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--dy-muted);
  margin: 0 0 12px;
}
.uf-theme-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.uf-theme-option {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--dy-line);
  background: var(--dy-surface);
  color: var(--dy-ink);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.uf-theme-option:hover { transform: translateY(-1px); }
.uf-theme-option.active {
  border-color: var(--dy-teal);
  background: color-mix(in srgb, var(--dy-teal) 10%, white);
  color: var(--dy-navy);
}

.uf-preview { text-align: center; }
.uf-preview-card-wrap {
  width: 150px;
  margin: 0 auto;
}
#preview-card { cursor: pointer; }
#preview-card:not(.has-photo) { cursor: default; }
#preview-card .card-back span { font-size: clamp(28px, 8vw, 40px); }
#preview-card.has-photo .card-back,
#preview-card.has-photo .card-front {
  transition: transform 0.5s, box-shadow 0.2s ease;
}
#preview-card.has-photo:hover .card-inner { box-shadow: 0 10px 20px -8px rgba(28, 59, 99, 0.35); }

/* --- Dropzone --- */
.uf-dropzone {
  border: 2px dashed var(--dy-line);
  border-radius: 20px;
  padding: clamp(32px, 8vw, 48px) 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  margin-bottom: 20px;
}
.uf-dropzone:hover,
.uf-dropzone.drag-over {
  border-color: var(--dy-teal);
  background: color-mix(in srgb, var(--dy-teal) 5%, white);
}
.uf-dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--dy-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.uf-dropzone-text {
  margin: 0 0 4px;
  font-size: 15.5px;
}
.uf-dropzone-hint {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--dy-muted);
}
.uf-dropzone-btn {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--dy-line);
  background: var(--dy-surface);
  color: var(--dy-navy);
  cursor: pointer;
}
.uf-dropzone-btn:hover { border-color: var(--dy-teal); }

/* --- Fila de estadísticas --- */
.uf-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--dy-bg-soft);
  border: 1px solid var(--dy-line);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.uf-stat-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uf-stat-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--dy-surface);
  border: 1px solid var(--dy-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 15px;
}
.uf-stat-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
}
.uf-stat-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--dy-muted);
}
.uf-stat-fraction {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 4vw, 22px);
  background: var(--dy-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.uf-heic-warning {
  font-size: 13.5px;
  line-height: 1.5;
  color: #a35a2a;
  background: #fdf1e6;
  border: 1px solid #f2d6b8;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
}
.hidden { display: none !important; }

.uf-grid-title {
  font-size: 15px;
  margin-bottom: 14px;
}

/* --- Grid de 18 espacios --- */
.uf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
@media (min-width: 560px) {
  .uf-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 720px) {
  .uf-grid { grid-template-columns: repeat(6, 1fr); }
}

.uf-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.uf-slot-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--dy-bg-soft);
  border: 2px dashed var(--dy-line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--dy-muted);
  font-size: 15px;
}
.uf-slot-photo:hover { border-color: var(--dy-teal); color: var(--dy-navy); }

.uf-slot.filled .uf-slot-photo {
  border: 2px solid transparent;
  cursor: default;
}
.uf-slot-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.uf-slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(21, 19, 31, 0.6);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uf-slot-remove:hover { background: rgba(21, 19, 31, 0.85); }

.uf-slot-dedication {
  width: 100%;
  font-family: "Figtree", sans-serif;
  font-size: 11.5px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid var(--dy-line);
  background: var(--dy-surface);
  color: var(--dy-ink);
}
.uf-slot-dedication::placeholder { color: var(--dy-muted); }
.uf-slot-dedication:focus {
  outline: none;
  border-color: var(--dy-teal);
}

/* --- Botón principal --- */
.uf-submit {
  display: block;
  width: 100%;
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--dy-gradient);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(28, 59, 99, 0.45);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.uf-submit:hover:not(:disabled) { transform: translateY(-2px); }
.uf-submit:disabled {
  background: var(--dy-bg-soft);
  color: var(--dy-muted);
  box-shadow: none;
  cursor: not-allowed;
}
.uf-submit-status {
  text-align: center;
  font-size: 13.5px;
  color: var(--dy-muted);
  margin: 12px 0 0;
  min-height: 1.4em;
}
.uf-submit-status.success { color: #1f8b53; font-weight: 600; }
