/* Albricia Web v2 — sistema de diseño "Phygital Sentiment" (Stitch, Sera jun-2026).
   Paleta rose-gold/peach + tipografías Bricolage Grotesque (titulares) y
   Plus Jakarta Sans (texto). Los selectores se conservan: el JS depende de
   ellos (occasion, thumb, chip, upload-*, gift-*…). */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Tokens del diseño de Sera (tailwind.config del Stitch) */
  --primary: #7d5448;            /* marrón rosado — titulares y botones oscuros */
  --on-primary: #ffffff;
  --primary-container: #e5b1a1;  /* rose gold */
  --on-primary-container: #30130a;
  --rose-gold: #e5b1a1;
  --bg: #fff8f4;                 /* background */
  --peach: #fff5ed;              /* digital-peach */
  --surface-low: #fcf2ea;        /* tarjetas y chips */
  --surface-high: #f6ece4;
  --outline-variant: #d5c3bd;    /* bordes suaves */
  --outline: #83746f;
  --ink: #1f1b16;                /* on-surface */
  --muted: #83746f;
  --red: #ff4d4d;                /* celebration-red — CTA principal */
  --red-deep: #ba1724;           /* tertiary */
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(125, 84, 72, 0.12);
  --glow-red: 0 0 20px rgba(255, 77, 77, 0.4), inset 0 -2px 5px rgba(255, 215, 0, 0.3);
  --glow-rose: 0 6px 24px rgba(229, 177, 161, 0.55);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  position: sticky;
  top: 0;
  background: rgba(255, 248, 244, 0.85);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--primary);
  text-decoration: none;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--on-primary-container);
  background: var(--primary-container);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.12;
  margin: 12px 0 8px;
  font-weight: 800;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 22px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(213, 195, 189, 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* --- Form --- */
.form { display: flex; flex-direction: column; gap: 20px; }
/* En modo Pago reordenamos: nombres + ocasión + preview -> diseño manual ->
   mensaje -> enlace al archivo + botón generar + estado.
   Hay que asignar `order` a TODOS los bloques porque flex pone primero los
   que no tienen order. */
.form.form-paid > *,
.form.form-manual > * { order: 0; }
.form.form-paid #custom-design,
.form.form-manual #custom-design { order: 2; }
.form.form-paid #message-field,
.form.form-manual #message-field { order: 3; }
.form.form-paid #archivo-field,
.form.form-manual #archivo-field { order: 4; }
.form.form-paid #generate,
.form.form-manual #generate { order: 5; }
.form.form-paid #create-status,
.form.form-manual #create-status { order: 6; }

/* Ocasiones no incluidas en la versión gratuita. */
.is-locked { opacity: .55; cursor: not-allowed; position: relative; }
.is-locked::after { content: '\1F512'; position: absolute; top: 6px; right: 6px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 8px; }

.field > span {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 14px;
  background: #fffdfb;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(229, 177, 161, 0.3);
}

.field textarea { resize: vertical; }

.hint { color: var(--muted); font-size: 0.82rem; }

/* --- Occasion grid (tarjetas "phygital": superficie crema, icono en
       círculo rose-gold, etiqueta en color primario) --- */
.occasion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
}

.occasion {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 12px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--surface-low);
  box-shadow: 0 4px 14px rgba(125, 84, 72, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.occasion:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(125, 84, 72, 0.14); }

.occasion.selected {
  border-color: var(--rose-gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(229, 177, 161, 0.35);
}

.occasion-emoji {
  font-size: 1.35rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(229, 177, 161, 0.25);
}

.occasion-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
}

.occasion-paper {
  width: 100%;
  height: 34px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 4px;
}

/* --- Suggestions --- */
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }

.suggestion-chip {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  padding: 8px 14px;
  border: 1px solid rgba(213, 195, 189, 0.5);
  border-radius: 999px;
  background: var(--surface-high);
  cursor: pointer;
  color: #684236;
  max-width: 100%;
  transition: background 0.15s ease, color 0.15s ease;
}

.suggestion-chip:hover { background: rgba(229, 177, 161, 0.35); color: var(--on-primary-container); }

/* --- Buttons --- */
/* CTA principal del formulario: rojo celebración con brillo (dopamine-glow). */
.btn-primary {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: 16px;
  padding: 15px 20px;
  cursor: pointer;
  box-shadow: var(--glow-red);
  transition: background 0.2s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  background: var(--red-deep);
  box-shadow: 0 0 30px rgba(255, 77, 77, 0.6), inset 0 -2px 5px rgba(255, 215, 0, 0.4);
}

/* CTA del hero: píldora rose-gold con texto oscuro (Home Emocional). */
.btn-rose {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--on-primary-container);
  background: var(--rose-gold);
  border: none;
  border-radius: 999px;
  padding: 15px 26px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: var(--glow-rose);
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-rose:hover { background: #efbbaa; transform: translateY(-1px); }

/* Botón oscuro "Siguiente/Continuar" (pantallas de pasos). */
.btn-dark {
  font-family: inherit;
  font-weight: 800;
  color: var(--on-primary);
  background: var(--primary);
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-dark:hover { background: #684236; }

.btn-secondary {
  font-family: inherit;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface-high);
  border: 1px solid rgba(213, 195, 189, 0.5);
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-secondary:hover { background: rgba(229, 177, 161, 0.3); }

.btn-whatsapp {
  font-family: inherit;
  font-weight: 800;
  color: #fff;
  background: #25d366;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-whatsapp:hover { background: #1fb957; }

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px;
}

/* --- Result --- */
.result { margin-top: 22px; }
.result h2 { margin: 0 0 6px; }
.result-sub { color: var(--muted); margin: 0 0 16px; }

.link-row { display: flex; gap: 8px; margin-bottom: 14px; }
.link-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fffdfb;
}

.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.share-row a { flex: 1; min-width: 140px; }

/* --- Landing hero --- */
.hero {
  text-align: center;
  padding: 40px 20px 20px;
}
.hero .gift-emoji {
  font-size: 4rem;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--peach), var(--primary-container));
  box-shadow: var(--shadow);
}
.hero h1 { margin-top: 22px; }
.hero .cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero .cta-group a { min-width: 200px; padding: 15px 24px; font-size: 1.05rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.step {
  text-align: center;
  background: var(--surface-low);
  border-radius: 16px;
  padding: 20px 14px;
  box-shadow: 0 4px 14px rgba(125, 84, 72, 0.08);
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(229, 177, 161, 0.3);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 4px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.4; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 30px 20px 50px;
}

/* El atributo hidden debe ganar siempre a los display de las clases
   (.btn-google y .auth-chip usan inline-flex, que sin esta regla anula el
   hidden y deja visible "Iniciar sesión" con la sesión ya iniciada). */
[hidden] { display: none !important; }

/* --- Auth + topbar actions --- */
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-link { font-size: 0.9rem; }

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-google:hover { background: var(--surface-high); }
.btn-google .g-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  border: 1px solid var(--outline-variant);
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-user {
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  min-height: 1.2em;
}

/* --- Custom design panel --- */
.custom-design {
  border: 1.5px dashed var(--outline-variant);
  border-radius: 16px;
  padding: 16px;
  margin: 6px 0 4px;
  background: var(--surface-low);
}
.custom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.custom-title { font-weight: 700; color: var(--primary); }
.custom-lock { color: var(--muted); font-size: 0.85rem; }

.shuffle-design-btn {
  margin-top: 10px;
  border: 1px dashed var(--outline-variant);
  background: #fff;
  color: var(--primary);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}
.shuffle-design-btn:hover { background: var(--surface-high); }
.shuffle-design-btn[hidden] { display: none; }
.shuffle-design-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.shuffle-design-hint[hidden] { display: none; }
.quick-preview {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  align-items: flex-end;
}
.quick-preview[hidden] { display: none; }
.quick-preview-item {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.quick-preview-thumb {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-high);
  border: 1px solid var(--outline-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(125, 84, 72, 0.08);
}
.quick-preview-paper { aspect-ratio: 1 / 1; }
.quick-preview-card { aspect-ratio: 4 / 3; }
.quick-preview-thumb img {
  width: 100%;
  height: 100%;
  display: block;
}
.quick-preview-paper img { object-fit: cover; }
.quick-preview-card img { object-fit: contain; padding: 6px; box-sizing: border-box; }
@keyframes albriciaShufflePop {
  0%   { transform: scale(0.94); opacity: 0.55; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}
.quick-preview.is-shuffling .quick-preview-thumb {
  animation: albriciaShufflePop 280ms ease-out;
}
.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.upload-progress[hidden] { display: none; }
.upload-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose-gold) var(--p, 0%), var(--surface-high) 0);
  transition: background 0.2s ease;
}
.upload-text { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.upload-url-alt { margin-top: 8px; }
.upload-url-alt > summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.upload-url-alt > input { margin-top: 8px; width: 100%; }
.custom-body { margin-top: 14px; display: grid; gap: 16px; }
.custom-body .field > span {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.field-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.field-inline > span { margin-bottom: 0; }
.field-inline input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 0;
  border: 1.5px solid var(--outline-variant);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}
.thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  aspect-ratio: 1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.selected { border-color: var(--rose-gold); box-shadow: 0 0 0 3px rgba(229, 177, 161, 0.35); }

/* Las tarjetas son apaisadas (4:3, 1200x896): grid más ancho, ratio correcto
   y object-fit:contain para que se vea el diseño completo sin recortes. */
#card-grid {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
#card-grid .thumb {
  aspect-ratio: 4 / 3;
  background: var(--surface-high);
  display: flex;
  align-items: center;
  justify-content: center;
}
#card-grid .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px;
  border: 1.5px solid var(--outline-variant);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.chip.selected {
  border-color: var(--rose-gold);
  background: rgba(229, 177, 161, 0.3);
  font-weight: 700;
}

/* --- Mis regalos --- */
/* Pestañas Enviadas/Recibidas (segmented pill, diseño Perfil_Usuario). */
.gift-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--surface-high);
  padding: 5px;
  border-radius: 999px;
  margin: 4px 0 6px;
}
.gift-tab {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s ease;
}
.gift-tab.is-active {
  background: var(--rose-gold);
  color: var(--on-primary-container);
}

.gift-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.gift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-low);
  border: 1px solid rgba(213, 195, 189, 0.4);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(125, 84, 72, 0.08);
}
.gift-item-main { display: grid; gap: 2px; }
.gift-item-occ { font-weight: 700; color: var(--primary); }
.gift-item-to { font-size: 0.9rem; }
.gift-item-date { color: var(--muted); font-size: 0.82rem; }
.gift-item-side { display: grid; gap: 8px; justify-items: end; }
.gift-status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.gift-status.pending { background: var(--surface-high); color: var(--muted); }
.gift-status.open { background: rgba(34, 139, 87, 0.12); color: #228b57; }
.gift-item-actions { display: flex; gap: 12px; }

/* ============================================================
   Creación: layout dividido (preview fija + wizard de pasos)
   ============================================================ */

.create-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  padding: 6px 16px 24px;
  min-height: calc(100dvh - 130px);
}

/* --- Preview fija: paquete + tarjeta lado a lado --- */
.preview-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 4px;
}
.preview-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.preview-items {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}
.pv-item {
  margin: 0;
  flex: 1 1 0;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pv-item figcaption {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

/* Caja envuelta: papel de fondo + cintas y lazo de satén teñidos en vivo. */
.pv-package {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #8a5a3c center / cover no-repeat; /* marrón por defecto */
  box-shadow: 0 10px 24px rgba(125, 84, 72, 0.22);
  --ribbon: #d4af37;
}
.pv-ribbon-v, .pv-ribbon-h {
  position: absolute;
  background-color: var(--ribbon);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08) inset,
    0 2px 6px rgba(64, 37, 30, 0.16);
}
.pv-ribbon-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 15%;
  transform: translateX(-50%);
  background-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.16),
    rgba(255, 255, 255, 0.28) 25%,
    rgba(255, 255, 255, 0.08) 51%,
    rgba(0, 0, 0, 0.14) 100%
  );
}
.pv-ribbon-h {
  left: 0;
  right: 0;
  top: 50%;
  height: 15%;
  transform: translateY(-50%);
  background-image: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.16),
    rgba(255, 255, 255, 0.28) 25%,
    rgba(255, 255, 255, 0.08) 51%,
    rgba(0, 0, 0, 0.14) 100%
  );
}
.pv-bow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46%;
  height: 40%;
  transform: translate(-50%, -50%);
  z-index: 2;
  filter: drop-shadow(0 5px 5px rgba(58, 32, 26, 0.28));
}

.pv-bow,
.bow-chip-art {
  background-color: var(--ribbon);
  -webkit-mask: var(--bow-art) center / contain no-repeat;
  mask: var(--bow-art) center / contain no-repeat;
}
.pv-bow::before,
.bow-chip-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bow-art) center / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.88;
}

.pv-package[data-bow="Lazonormal"] .pv-bow,
.bow-chip-art[data-bow="Lazonormal"] {
  --bow-art: url("../assets/lazos_preview/lazo-clasico.png");
}
.pv-package[data-bow="Lazoestrella"] .pv-bow,
.bow-chip-art[data-bow="Lazoestrella"] {
  --bow-art: url("../assets/lazos_preview/lazo-estrella.png");
}
.pv-package[data-bow="Lazoflor"] .pv-bow,
.bow-chip-art[data-bow="Lazoflor"] {
  --bow-art: url("../assets/lazos_preview/lazo-flor.png");
}

#bow-grid {
  --ribbon: #d4af37;
  gap: 10px;
}
#bow-grid .chip {
  width: 88px;
  min-height: 86px;
  padding: 7px 8px 8px;
  border-radius: 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.bow-chip-art {
  position: relative;
  display: block;
  width: 62px;
  height: 52px;
  flex: 0 0 52px;
  filter: drop-shadow(0 2px 2px rgba(58, 32, 26, 0.22));
}
.bow-chip-label {
  line-height: 1.15;
}
/* Tarjeta: diseño + texto del mensaje superpuesto. */
.pv-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--outline-variant);
  box-shadow: 0 10px 24px rgba(125, 84, 72, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pv-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.pv-card-text {
  position: relative;
  z-index: 1;
  max-width: 84%;
  max-height: 84%;
  overflow: hidden;
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.25;
  font-weight: 600;
  color: #2a1a12;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* --- Panel de pasos (wizard) --- */
.wizard-pane {
  flex: 0 0 auto;
  background: var(--card);
  border: 1px solid rgba(213, 195, 189, 0.4);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 18px 20px;
  overflow: hidden;
}
.wizard { display: block; }
.step { border: none; margin: 0; padding: 0; min-width: 0; }
.step[hidden] { display: none !important; }
.step-kicker {
  margin: 0 0 2px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose-gold);
}
.step-title {
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 800;
}
.step-help { color: var(--muted); margin: -6px 0 14px; font-size: 0.95rem; line-height: 1.45; }
.step .field { margin-bottom: 16px; }

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.step-nav .btn-dark, .step-nav .btn-primary { min-width: 150px; }

/* Rama automático / personalizado */
.branch-q {
  margin: 18px 0 10px;
  font-weight: 700;
  color: var(--primary);
}
.branch-row { display: flex; gap: 12px; flex-wrap: wrap; }
.branch-btn { flex: 1; min-width: 150px; padding: 14px 18px; }

.auto-message {
  background: var(--surface-low);
  border: 1px solid rgba(213, 195, 189, 0.5);
  border-radius: 14px;
  padding: 14px 16px;
  color: #2a1a12;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 14px;
  min-height: 2.6em;
}

/* Móvil: preview compacta (~50% de altura respecto al tamaño completo) para
   no robar protagonismo a las opciones, pero legible para apreciar los
   cambios. Los items mandan la altura vía su ancho. */
@media (max-width: 759px) {
  .pv-item { max-width: 104px; }
  .pv-item figcaption { font-size: 0.72rem; }
}
@media (max-width: 380px) {
  .preview-items { gap: 10px; }
  .pv-item { max-width: 92px; }
  .pv-card-text { font-size: 0.5rem; }
}

/* Foco en el textarea del mensaje (móvil): la preview se pliega aún más para
   que el campo activo y la navegación queden visibles con el teclado abierto. */
@media (max-width: 759px) {
  body.preview-collapsed .preview-pane {
    gap: 4px;
    padding: 4px 6px 2px;
  }
  body.preview-collapsed .preview-label { display: none; }
  body.preview-collapsed .pv-item { max-width: 66px; }
  body.preview-collapsed .pv-item figcaption { display: none; }
}

/* En pantallas anchas, preview a la izquierda y wizard a la derecha. */
@media (min-width: 760px) {
  .create-layout {
    max-width: 920px;
    flex-direction: row;
    align-items: flex-start;
    gap: 22px;
  }
  .preview-pane {
    flex: 0 0 300px;
    position: sticky;
    top: 80px;
    padding-top: 0;
  }
  .preview-items { flex-direction: column; }
  .pv-item { max-width: 300px; width: 100%; }
  .wizard-pane { flex: 1; }
}

/* --- Información legal y aceptación de condiciones --- */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 10px;
}
.legal-links a,
.legal-full-link,
.legal-section a {
  color: var(--primary);
  text-underline-offset: 3px;
}
.creator-access { display: grid; gap: 14px; }
.creator-access h2,
.creator-access p { margin: 0; }
.creator-legal-notice {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.legal-acceptance {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}
.legal-acceptance-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}
.legal-acceptance-check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}
.legal-acceptance-check a { color: var(--primary); }
.legal-acceptance .btn-dark { justify-self: start; }

.legal-layout {
  width: min(100% - 36px, 820px);
  margin: 0 auto;
  padding: 34px 0 50px;
}
.legal-heading { margin-bottom: 28px; }
.legal-heading h1 {
  margin: 4px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.05;
}
.legal-index {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--outline-variant);
}
.legal-index a {
  color: var(--primary);
  font-weight: 700;
  text-underline-offset: 3px;
}
.legal-section {
  scroll-margin-top: 82px;
  padding: 30px 0;
  border-top: 1px solid var(--outline-variant);
}
.legal-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.55rem;
}
.legal-section p {
  max-width: 74ch;
  margin: 0 0 14px;
  line-height: 1.7;
}
.legal-full-link {
  display: inline-block;
  margin-top: 4px;
  font-weight: 700;
}
.legal-contact p { margin-bottom: 6px; }

@media (max-width: 560px) {
  .legal-layout { width: min(100% - 28px, 820px); padding-top: 24px; }
  .legal-heading h1 { font-size: 2rem; }
  .legal-section { padding: 24px 0; }
}

/* --- Control de musica ambiente en Inicio y Crear --- */
.ambient-audio-toggle {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--outline-variant);
  border-radius: 50%;
  background: rgba(255, 248, 244, 0.96);
  box-shadow: 0 8px 24px rgba(75, 49, 42, 0.18);
  color: var(--text);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ambient-audio-toggle.is-floating {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1200;
}
.ambient-audio-toggle:hover { background: #fff; }
.ambient-audio-toggle:focus-visible {
  outline: 3px solid rgba(166, 90, 70, 0.34);
  outline-offset: 3px;
}
.ambient-audio-toggle:active { transform: scale(0.94); }
.ambient-audio-toggle.is-muted {
  background: rgba(234, 225, 217, 0.96);
  box-shadow: 0 5px 16px rgba(75, 49, 42, 0.12);
}

@media (max-width: 560px) {
  .ambient-audio-toggle { flex-basis: 38px; width: 38px; height: 38px; font-size: 1.1rem; }
}
