/* Manada Peludito /crear3/: producto -> foto -> producto con su retrato. Movil primero. */
:root {
  --d-ink: #1b1a1a;
  --d-ink-2: #5c5853;
  --d-bg: #f7f3ec;
  --d-card: #ffffff;
  --d-beige: #ede6d7;
  --d-line: #e4ddd0;
  --d-ok: #2f6b4f;
  --d-err: #a3392f;
  --d-serif: "Playfair Display", Georgia, serif;
  --d-sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.mpd { margin: 0; background: var(--d-bg) !important; color: var(--d-ink); font: 400 15px/1.5 var(--d-sans); -webkit-font-smoothing: antialiased; }
.mpd *, .mpd *::before, .mpd *::after { box-sizing: border-box; }
.mpd img { max-width: 100%; display: block; }
.mpd [hidden] { display: none !important; }
.mpd button { font-family: inherit; color: inherit; text-transform: none; letter-spacing: normal; min-height: 0; line-height: 1.3; box-shadow: none; }
.mpd h1, .mpd h2 { font-family: var(--d-serif); font-weight: 500; margin: 0; line-height: 1.15; }
.mpd h1 { font-size: 26px; }
.mpd h2 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.mpd h2 span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--d-ink); color: #fff; font: 500 13px var(--d-sans); }
.mpd-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* Cabecera */
.mpd-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--d-card); border-bottom: 1px solid var(--d-line); }
.mpd-icono { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--d-ink); }
.mpd-logo { width: 34px; }
.mpd-pasos { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0; font-size: 13px; color: var(--d-ink-2); }
.mpd-pasos li { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.mpd-pasos li span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; }
.mpd-pasos li.is-on { background: var(--d-ink); color: #fff; }
.mpd-pasos li.is-hecho span { background: var(--d-ok); border-color: var(--d-ok); color: #fff; }
.mpd-demo { font: 700 11px var(--d-sans); letter-spacing: .1em; text-transform: uppercase; background: #fff3c4; color: #6b5300; padding: 3px 7px; border-radius: 6px; }
.mpd-carro-btn { border: 1px solid var(--d-line); background: var(--d-card); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.mpd-carro-btn b { background: var(--d-ink); color: #fff; border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.mpd-wa { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #25d366; color: #fff; }

/* Paso 1 */
.mpd-paso { width: 100%; max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }
.mpd-intro { text-align: center; max-width: 560px; margin: 6px auto 18px; }
.mpd-intro p { color: var(--d-ink-2); margin: 8px 0 0; }
.mpd-prods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mpd-prod { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--d-line); border-radius: 16px; background: var(--d-card); overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.mpd-prod:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(27, 26, 26, .08); }
.mpd-prod:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.mpd-prod img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--d-beige); }
.mpd-prod__txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.mpd-prod__txt strong { font: 500 18px var(--d-serif); }
.mpd-prod__txt small { color: var(--d-ink-2); font-size: 12px; line-height: 1.3; }
.mpd-prod__txt b { font-weight: 500; font-size: 14px; margin-top: 4px; }
@media (min-width: 760px) { .mpd-prods { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Paso 2 */
.mpd-crear { display: grid; gap: 16px; }
@media (min-width: 900px) { .mpd-crear { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .mpd-esc { position: sticky; top: 70px; } }
.mpd-esc { min-width: 0; }
.mpd-lienzo { position: relative; aspect-ratio: 1; border-radius: 18px; background: var(--d-card); border: 1px solid var(--d-line); overflow: hidden; display: grid; place-items: center; }
.mpd-mock { width: 100%; height: 100%; display: grid; place-items: center; padding: 6%; }
.mpd-mock svg { width: 100%; height: 100%; }
.mpd-real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.mpd-vacio { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 18px; border: 2px dashed rgba(27, 26, 26, .25); border-radius: 14px; background: rgba(255, 255, 255, .85); font-size: 13px; color: var(--d-ink-2); pointer-events: none; }
.mpd-vacio span { font-size: 26px; }
.mpd-cargando { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(247, 243, 236, .88); text-align: center; padding: 20px; }
.mpd-cargando i { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--d-line); border-top-color: var(--d-ink); animation: mpd-giro 1s linear infinite; }
.mpd-cargando p { margin: 0; font: 500 16px var(--d-serif); }
@keyframes mpd-giro { to { transform: rotate(360deg); } }
.mpd-modo { display: flex; gap: 4px; padding: 4px; background: var(--d-card); border: 1px solid var(--d-line); border-radius: 999px; width: max-content; margin: 0 auto 10px; }
.mpd-modo button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.mpd-modo button.is-sel { background: var(--d-ink); color: #fff; }
.mpd-ver-retrato { display: block; margin: 8px auto 0; }
.mpd-pie-esc { text-align: center; color: var(--d-ink-2); font-size: 13px; margin: 8px 0 0; min-height: 1em; }
.mpd-pie-esc.is-cargando { color: var(--d-ink); font-weight: 500; }
.mpd-pie-esc.is-cargando::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--d-line); border-top-color: var(--d-ink); animation: mpd-giro 1s linear infinite; vertical-align: -1px; }

.mpd-panel { min-width: 0; background: var(--d-card); border: 1px solid var(--d-line); border-radius: 18px; padding: 18px 16px 0; }
.mpd-panel__cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mpd-bloque { padding: 14px 0; border-top: 1px solid var(--d-line); }
.mpd-bloque:first-child { border-top: 0; padding-top: 0; }
.mpd-nota { color: var(--d-ink-2); font-size: 12.5px; margin: 8px 0 0; }
.mpd-legal a, .mpd-nota a { color: inherit; }
.mpd-link { border: 0; background: none; padding: 0; color: var(--d-ink); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; cursor: pointer; }

.mpd-fotos { display: flex; flex-wrap: wrap; gap: 10px; }
.mpd-foto { position: relative; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--d-beige); }
.mpd-foto img { width: 100%; height: 100%; object-fit: cover; }
.mpd-foto button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(27, 26, 26, .75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.mpd-foto--mas { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px dashed var(--d-line); background: var(--d-bg); font-size: 12px; color: var(--d-ink-2); cursor: pointer; text-align: center; }
.mpd-foto--mas span { font-size: 22px; line-height: 1; color: var(--d-ink); }
.mpd-foto--grande { width: 100%; height: auto; padding: 26px 16px; gap: 4px; }
.mpd-foto--grande span { font-size: 30px; }
.mpd-foto--grande b { font-size: 16px; color: var(--d-ink); font-weight: 500; }

.mpd-encuadre { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mpd-encuadre button { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px; border: 1.5px solid var(--d-line); border-radius: 14px; background: var(--d-card); cursor: pointer; }
.mpd-encuadre button b { font-weight: 500; font-size: 15px; }
.mpd-encuadre button small { color: var(--d-ink-2); font-size: 12px; line-height: 1.3; }
.mpd-encuadre button.is-sel { border-color: var(--d-ink); box-shadow: inset 0 0 0 1px var(--d-ink); }
.mpd-encuadre button:disabled { opacity: .55; cursor: default; }
.mpd-toque { margin-top: 12px; }
.mpd-toque summary, .mpd-cambio summary { cursor: pointer; font-weight: 500; }
.mpd-toque summary small { color: var(--d-ink-2); font-weight: 400; }
.mpd-toque .mpd-chips { margin-top: 10px; }

.mpd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mpd-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--d-line); border-radius: 999px; background: var(--d-card); font-size: 14px; cursor: pointer; }
.mpd-chips button i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.mpd-chips button small { color: var(--d-ink-2); font-size: 11.5px; }
.mpd-chips button.is-sel { border-color: var(--d-ink); background: var(--d-ink); color: #fff; }
.mpd-chips button.is-sel small { color: #e8e2d8; }
.mpd-chips button:disabled { opacity: .45; cursor: default; }

.mpd-anterior { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 4px; border-radius: 14px; background: var(--d-bg); font-size: 14px; }
.mpd-anterior img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #fff; }
.mpd-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.mpd-check small { color: var(--d-ink-2); }
.mpd-nombres { display: grid; gap: 8px; margin-top: 10px; }
.mpd-nombres label { display: flex; align-items: center; gap: 8px; }
.mpd-nombres img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.mpd-nombres input, .mpd-cambio textarea, .mpd-campos input, .mpd-campos select { width: 100%; padding: 10px 12px; border: 1px solid var(--d-line); border-radius: 10px; font: inherit; background: #fff; }
.mpd-cambio textarea { margin-top: 10px; resize: vertical; }
.mpd-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mpd-ideas button { border: 1px solid var(--d-line); background: var(--d-bg); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.mpd-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.mpd-msg { margin: 10px 0 0; font-size: 14px; color: var(--d-ok); min-height: 0; }
.mpd-msg.is-err { color: var(--d-err); }
.mpd-msg:empty { display: none; }
.mpd-panel__pie { position: sticky; bottom: 0; margin: 14px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--d-card); border-top: 1px solid var(--d-line); border-radius: 0 0 18px 18px; }
.mpd-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mpd-total span { color: var(--d-ink-2); font-size: 12.5px; }
.mpd-total strong { font: 600 22px var(--d-serif); }
.mpd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 20px; border: 0; border-radius: 999px; background: var(--d-ink); color: #fff !important; font: 500 16px var(--d-sans); cursor: pointer; text-decoration: none; }
.mpd-btn:disabled { opacity: .45; cursor: default; }
.mpd-btn--full { width: 100%; }
.mpd-btn--sec { background: var(--d-card); color: var(--d-ink) !important; border: 1.5px solid var(--d-ink); padding: 9px 16px; font-size: 14px; }

/* Paso 3 */
.mpd-pago { display: grid; gap: 16px; }
@media (min-width: 900px) { .mpd-pago { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
.mpd-resumen, .mpd-form { background: var(--d-card); border: 1px solid var(--d-line); border-radius: 18px; padding: 18px 16px; min-width: 0; }
.mpd-resumen h1, .mpd-form h1 { margin-bottom: 12px; }
.mpd-items { display: grid; gap: 10px; margin-bottom: 10px; }
.mpd-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) 28px; gap: 10px; align-items: center; }
.mpd-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--d-beige); }
.mpd-item div { display: flex; flex-direction: column; min-width: 0; }
.mpd-item small { color: var(--d-ink-2); font-size: 12.5px; line-height: 1.35; }
.mpd-item button { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--d-ink-2); }
.mpd-cuentas { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--d-line); font-size: 14px; }
.mpd-cuentas dd { margin: 0; text-align: right; }
.mpd-cuentas .mpd-tt { font-weight: 700; font-size: 16px; }
.mpd-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mpd-campos label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--d-ink-2); min-width: 0; }
.mpd-campos .mpd-ancho { grid-column: 1 / -1; }
.mpd-campos .is-err { border-color: var(--d-err); }
@media (max-width: 420px) { .mpd-campos { grid-template-columns: 1fr; } }
.mpd-pagos { border: 0; padding: 0; margin: 14px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mpd-pagos legend { font-weight: 500; margin-bottom: 8px; }
.mpd-pagos label { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--d-line); border-radius: 12px; cursor: pointer; }
.mpd-pagos span { display: flex; flex-direction: column; }
.mpd-pagos small { color: var(--d-ink-2); font-size: 12px; }
.mpd-form .mpd-btn { margin-top: 14px; }

.mpd-zoom { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .85); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.mpd-zoom img { max-height: 92vh; border-radius: 12px; }
.mpd-ok { position: fixed; inset: 0; z-index: 50; background: rgba(27, 26, 26, .55); display: grid; place-items: center; padding: 16px; }
.mpd-ok > div { background: var(--d-card); border-radius: 18px; padding: 22px; max-width: 360px; text-align: center; }
.mpd-ok img { width: 160px; height: 160px; object-fit: cover; border-radius: 14px; margin: 0 auto 12px; }

@media (max-width: 560px) {
  .mpd-pasos li { padding: 4px 6px; font-size: 0; gap: 0; }
  .mpd-pasos li span { font-size: 11px; }
  .mpd-pasos li.is-on { font-size: 12px; gap: 5px; padding: 4px 9px; }
  .mpd h1 { font-size: 23px; }
}
.mpd-pocillo-nota { margin: 0; font-size: 14px; color: var(--d-ink-2); }
.mpd-pocillo-nota strong { color: var(--d-ink); }

/* ¿Te lo enviamos por WhatsApp? (despues del retrato) */
.mpd-guardar { background: #effaf2; border: 1px solid #cfeedd; border-radius: 14px; padding: 14px 14px 10px; }
.mpd-guardar h2 { margin-top: 0; }
.mpd-guardar__f { display: flex; gap: 8px; margin: 8px 0 6px; }
.mpd-guardar__f input { flex: 1; min-width: 0; height: 46px; border: 1px solid #cdd6cf; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #fff; }
.mpd-guardar__f .mpd-btn { flex: none; min-height: 46px; padding: 0 18px; }
.mpd-guardar__legal { font-size: 12px !important; margin: 0 !important; }
.mpd-guardar__legal a { color: inherit; }
.mpd-guardar__ok { background: #effaf2; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 14px; }


/* Tipo de letra del nombre (2026-11-25): vista previa en cada opcion */
.mpd-letras-t { margin: 14px 0 8px; font-size: 13px; font-weight: 500; color: var(--d-ink-2); }
.mpd-letras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mpd-letras button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px 10px; border: 1px solid var(--d-line); border-radius: 12px; background: var(--d-card); color: var(--d-ink); cursor: pointer; overflow: hidden; }
.mpd-letras__m { font-size: 21px; line-height: 1.25; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpd-letras button small { font-size: 11.5px; color: var(--d-ink-2); }
.mpd-letras button.is-sel { border: 2px solid var(--d-ink); box-shadow: 0 0 0 3px rgba(27, 26, 26, .08); }
.mpd-letras button.is-sel small { color: var(--d-ink); font-weight: 600; }
.mpd-letras button.is-sel small::before { content: "✓ "; }

/* Antes y despues (2026-11-25) */
.mpd-comp { position: absolute; inset: 0; overflow: hidden; background: #ddd6cf; border-radius: inherit; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; z-index: 2; }
.mpd .mpd-comp__foto { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; max-width: none; }
.mpd-comp__ret { position: absolute; inset: 0; background: #ddd6cf; clip-path: inset(0 0 0 50%); }
.mpd-comp__ret img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; pointer-events: none; }
.mpd-comp__linea { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); outline: none; }
.mpd-comp__tir { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 76px; height: 44px; border-radius: 999px; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); opacity: .45; transition: opacity .2s ease; }
/* Semitransparente en reposo; fuerte al pasarle el cursor, al arrastrar o con el teclado (2026-11-25) */
.mpd-comp__tir:hover, .mpd-comp.is-arrastrando .mpd-comp__tir, .mpd-comp__linea:focus-visible .mpd-comp__tir { opacity: 1; }
.mpd-comp__linea { transition: opacity .2s ease; }
.mpd-comp__tir svg { fill: #3a3a3a; stroke: #3a3a3a; }
.mpd-comp__linea:focus-visible .mpd-comp__tir { box-shadow: 0 0 0 3px #1b1a1a; }
.mpd-comp__et { position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .88); font-size: 12px; font-weight: 500; color: #1b1a1a; pointer-events: none; }
.mpd-comp__et--a { left: 12px; }
.mpd-comp__et--b { right: 12px; }
@media (min-width: 900px) { .mpd-comp__tir { width: 92px; height: 52px; } }

/* Historial de retratos (paso 1) y barra de pasos clicable (2026-11-25) */
.mpd-hist { margin: 0 0 22px; }
.mpd-hist__cab { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mpd-hist__cab h2 { margin: 0; font-size: 17px; }
.mpd-hist__cab p { margin: 0; font-size: 13px; color: var(--d-ink-2); }
.mpd-hist__fila { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.mpd-hist__it { flex: 0 0 auto; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; cursor: pointer; scroll-snap-align: start; color: var(--d-ink); }
.mpd-hist__img { display: block; width: 96px; height: 96px; border-radius: 14px; background: #fff; border: 1px solid var(--d-line); overflow: hidden; transition: border-color .15s, transform .15s; }
.mpd .mpd-hist__img img { width: 100%; height: 100%; object-fit: contain; }
.mpd-hist__it small { font-size: 11.5px; color: var(--d-ink-2); max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpd-hist__it:hover .mpd-hist__img { border-color: var(--d-ink); transform: translateY(-2px); }
.mpd-hist__it.is-sel .mpd-hist__img { border: 2px solid var(--d-ink); }
.mpd-pasos li.is-clic { cursor: pointer; }
.mpd-pasos li.is-clic:hover { text-decoration: underline; text-underline-offset: 3px; }
.mpd-pasos li:focus-visible { outline: 2px solid var(--d-ink); outline-offset: 3px; border-radius: 6px; }

/* Navidad: el logo con gorro es mas alto */
.mpd-logo[src*="logo-navidad"] { width: 38px; }
