/* Constructor de MORPH en 4 pasos (ver constructor.js). Mismo lenguaje visual que el Hub: papel cálido,
   tarjetas blancas con sombra de botón, Fredoka/Nunito. Pensado para el celular primero. */

/* Mientras no se pida el mundo 3D, TODO lo demás del cuerpo (la escena, el HUD, el panel, el cargador) no existe:
   ni se ve, ni se lee con lector de pantalla, ni se puede enfocar. */
body:not(.mx-3d) > *:not(#mx-app):not(script):not(meta):not(link):not(noscript):not(style):not(.mxc-volver3d):not(#c):not(#bubble):not(#sage) { display: none !important; }
/* La fábrica 3D de FONDO (constructor.js → prepararFondo): solo el lienzo y el globo de diálogo de tu MORPH.
   Aparece con un fundido cuando el mundo ya está armado; mientras tanto, el papel de siempre. */
body:not(.mx-3d):not(.mx-fondo) #c, body:not(.mx-3d):not(.mx-fondo) #bubble { display: none !important; }
body.mx-fondo #c { opacity: 0; transition: opacity 1.1s ease; z-index: 0; }
body.mx-fondo-listo #c { opacity: 1; }
body.mx-fondo #bubble { z-index: 401; }
body:not(.mx-3d) { overflow: auto; height: auto; background: #FFF8EC; }
/* El papel desde el primer cuadro: sin esto, mientras carga se veía el cielo azul de la Fábrica (fondo de <html>). */
html:has(body:not(.mx-3d)) { overflow: auto; height: auto; background: #FFF8EC; }

.mxc {
  --ink: #2B1B3D; --ink2: #5B4A70; --muted: #6C5E82; --line: rgba(43, 27, 61, .12);
  --paper: #FFF8EC; --blue: #2350FF; --blue-d: #1435B8; --yellow: #FFC21A; --yellow-d: #D98A00; --green: #0F7A43; --warm: #9A5000; --rose: #C8237A;
  position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; overflow: hidden;
  font-family: Nunito, system-ui, sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(90% 60% at 12% -8%, rgba(255, 140, 198, .42) 0%, transparent 60%),
    radial-gradient(80% 55% at 100% 0%, rgba(155, 107, 255, .30) 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 108%, rgba(95, 184, 255, .34) 0%, transparent 60%),
    var(--paper);
}
.mxc[hidden] { display: none; }
body.mx-fondo-listo .mxc { background: transparent; pointer-events: none; }
body.mx-fondo-listo .mxc-cab, body.mx-fondo-listo .mxc-panel, body.mx-fondo-listo .mxc-toast, body.mx-fondo-listo .mxc-esc-info { pointer-events: auto; }
body.mx-fondo-listo .mxc-cab { background: linear-gradient(180deg, rgba(255, 248, 236, .9), rgba(255, 248, 236, 0)); }
.mxc *, .mxc *::before, .mxc *::after { box-sizing: border-box; }
.mxc button, .mxc input, .mxc textarea { font: inherit; color: inherit; }
.mxc :focus-visible { outline: 3px solid #9B6BFF; outline-offset: 2px; border-radius: 10px; }

/* ── cabecera ── */
.mxc-cab { display: flex; align-items: center; gap: 14px; padding: 12px 16px; flex: none; }
.mxc-marca { display: flex; align-items: center; gap: 9px; font: 700 20px/1 Fredoka, sans-serif; letter-spacing: .04em; }
.mxc-pasos { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 8px; align-items: center; }
.mxc-pasos li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 800; font-size: 13px; }
.mxc-pn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(43, 27, 61, .09); font-size: 13px; }
.mxc-pasos li.actual { color: var(--ink); }
.mxc-pasos li.actual .mxc-pn { background: var(--ink); color: #fff; }
.mxc-pasos li.hecho .mxc-pn { background: var(--green); color: #fff; }
.mxc-pasos li + li::before { content: ''; width: 18px; height: 2px; background: var(--line); margin-right: 1px; }
.mxc-acc { display: flex; align-items: center; gap: 8px; }
.mxc-ico, .mxc-link {
  min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-weight: 800; font-size: 13.5px; color: var(--ink); background: #fff; border: 2px solid var(--line); box-shadow: 0 3px 0 rgba(43, 27, 61, .12);
}
.mxc-ico { background: transparent; box-shadow: none; border-color: transparent; color: var(--muted); width: 40px; padding: 0; justify-content: center; }

/* ── cuerpo ── */
.mxc-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Escenario (arriba en el celular, a la izquierda en el computador): ahí se ve la fábrica con tu MORPH. */
.mxc-escenario { position: relative; flex: none; height: 30vh; min-height: 170px; max-height: 300px; display: grid; place-items: center; }
.mxc-esc-img { height: 100%; aspect-ratio: 3 / 4; padding: 8px 0; }
.mxc-esc-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; border-radius: 22px; box-shadow: 0 6px 0 rgba(43, 27, 61, .1); display: block; }
body.mx-fondo-listo .mxc-esc-img { display: none; }
.mxc-esc-info {
  position: absolute; left: 12px; bottom: 10px; display: grid; gap: 1px; padding: 8px 12px; border-radius: 16px; max-width: calc(100% - 24px);
  background: rgba(255, 255, 255, .92); border: 2px solid var(--line); box-shadow: 0 4px 0 rgba(43, 27, 61, .1);
}
.mxc-esc-info b { font: 700 17px/1.1 Fredoka, sans-serif; }
.mxc-esc-info span { font-weight: 800; font-size: 12.5px; color: var(--muted); }
.mxc-esc-info i { font-style: normal; font: 700 14px Fredoka, sans-serif; color: var(--blue); }
.mxc-esc-vacio { display: grid; gap: 4px; text-align: center; padding: 0 20px; }
.mxc-esc-vacio b { font: 700 20px/1.15 Fredoka, sans-serif; }
.mxc-esc-vacio span { font-weight: 700; color: var(--muted); font-size: 14px; }
body.mx-fondo-listo .mxc-esc-vacio { display: none; }
/* Panel: hoja blanca con su propia barra al pie. */
.mxc-panel {
  flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative;
  background: rgba(255, 255, 255, .96); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px -16px rgba(43, 27, 61, .35); border: 2px solid var(--line); border-bottom: 0;
}
.mxc-main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 24px; -webkit-overflow-scrolling: touch; }
.mxc-col { max-width: 760px; margin: 0 auto; display: grid; gap: 26px; }

.mxc h1 { font: 700 clamp(28px, 6.4vw, 44px)/1.08 Fredoka, sans-serif; margin: 6px 0 10px; letter-spacing: -.01em; }
.mxc h2 { font: 700 20px/1.2 Fredoka, sans-serif; margin: 0 0 4px; }
.mxc-intro p { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--ink2); font-weight: 600; max-width: 56ch; }
.mxc-ayuda { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--muted); font-weight: 600; }
.mxc-sec { display: grid; gap: 8px; }
.mxc-nota { margin: 0; padding: 12px 14px; border-radius: 16px; background: #FFF4D6; border: 2px solid rgba(255, 170, 30, .5); color: #5A3A00; font-size: 14px; line-height: 1.5; font-weight: 700; }

/* ── personajes ── */
.mxc-personajes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mxc-pj {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 8px 12px; cursor: pointer; text-align: center;
  background: #fff; border: 2px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 rgba(43, 27, 61, .1);
  transition: transform .16s cubic-bezier(.3, 1.6, .5, 1), box-shadow .16s, border-color .16s;
}
.mxc-pj:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(43, 27, 61, .1); }
.mxc-pj:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(43, 27, 61, .1); }
.mxc-pj[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35, 80, 255, .28), 0 8px 0 rgba(35, 80, 255, .2); background: #F4F6FF; }
.mxc-pj[aria-pressed="true"]::after {
  content: '✓'; position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-weight: 900; font-size: 15px;
}
.mxc-pj-img { width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #F6F3EE; display: grid; place-items: center; }
.mxc-pj-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.mxc-pj b { font: 700 18px/1.1 Fredoka, sans-serif; margin-top: 8px; }
.mxc-pj small { color: var(--muted); font-weight: 800; font-size: 12.5px; }
.mxc-nombre { display: grid; gap: 10px; }
.mxc-frase { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink2); font-weight: 600; }

/* ── opciones, fichas, campos ── */
.mxc-ops { display: grid; gap: 10px; }
.mxc-op {
  display: grid; gap: 4px; text-align: left; padding: 14px 16px; cursor: pointer; background: #fff; border: 2px solid var(--line); border-radius: 18px;
  box-shadow: 0 4px 0 rgba(43, 27, 61, .08); transition: transform .14s, box-shadow .14s, border-color .14s;
}
.mxc-op b { font: 600 17px/1.2 Fredoka, sans-serif; }
.mxc-op small { color: var(--ink2); font-weight: 600; font-size: 13.5px; line-height: 1.45; }
.mxc-op:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(43, 27, 61, .08); }
.mxc-op[aria-pressed="true"] { border-color: var(--blue); background: #F4F6FF; box-shadow: 0 0 0 3px rgba(35, 80, 255, .22), 0 4px 0 rgba(35, 80, 255, .18); }
.mxc-marcas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mxc-marcas i { font-style: normal; font-weight: 800; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(43, 27, 61, .07); color: var(--ink2); }
.mxc-marcas i.hoy { background: rgba(47, 201, 143, .16); color: var(--green); }
.mxc-marcas i.dis { background: rgba(255, 194, 26, .22); color: var(--warm); }
.mxc-marcas i.rec { background: rgba(35, 80, 255, .1); color: var(--blue); }

.mxc-fichas { display: flex; flex-wrap: wrap; gap: 8px; }
.mxc-ficha {
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 14.5px; text-align: left; background: #fff;
  border: 2px solid var(--line); box-shadow: 0 3px 0 rgba(43, 27, 61, .1); transition: transform .12s, box-shadow .12s;
}
.mxc-ficha:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(43, 27, 61, .1); }
.mxc-ficha[aria-pressed="true"] { background: var(--blue); border-color: transparent; color: #fff; box-shadow: 0 3px 0 var(--blue-d); }

.mxc-ofi { padding: 14px; border-radius: 18px; background: #fff; border: 2px solid var(--line); display: grid; gap: 8px; box-shadow: 0 4px 0 rgba(43, 27, 61, .07); }
.mxc-ofi-cab { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.mxc-ofi-cab b { font: 600 16.5px/1.2 Fredoka, sans-serif; }
.mxc-ofi-cab span { font-weight: 800; font-size: 13px; color: var(--muted); }

.mxc-campo { display: grid; gap: 5px; }
.mxc-campo > span { font-weight: 800; font-size: 13px; letter-spacing: .02em; color: var(--ink2); }
.mxc-campo small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.mxc-in {
  width: 100%; min-height: 48px; padding: 10px 14px; font-size: 16px; font-weight: 700; background: #fff; border: 2px solid var(--line); border-radius: 16px;
  box-shadow: 0 3px 0 rgba(43, 27, 61, .07); outline: none;
}
textarea.mxc-in { resize: vertical; min-height: 84px; }
.mxc-in:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(35, 80, 255, .16); }
.mxc-doble { display: grid; gap: 12px; }
.mxc-chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; font-weight: 700; color: var(--ink2); cursor: pointer; }
.mxc-chk input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--blue); flex: none; }
.mxc-det { padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .7); border: 2px dashed var(--line); display: grid; gap: 10px; }
.mxc-det summary { cursor: pointer; font-weight: 800; }
.mxc-det[open] summary { margin-bottom: 4px; }

/* ── plan y resumen ── */
.mxc-planes { display: grid; gap: 10px; }
.mxc-plan {
  display: grid; gap: 3px; text-align: left; padding: 14px 16px; cursor: pointer; background: #fff; border: 2px solid var(--line); border-radius: 18px;
  box-shadow: 0 4px 0 rgba(43, 27, 61, .08); position: relative;
}
.mxc-plan b { font: 700 18px/1.2 Fredoka, sans-serif; }
.mxc-precio { font: 700 17px/1.2 Fredoka, sans-serif; color: var(--blue); }
.mxc-plan small { color: var(--ink2); font-weight: 600; font-size: 13.5px; }
.mxc-plan i { font-style: normal; font-weight: 800; font-size: 11.5px; color: var(--warm); }
.mxc-plan i.lock { color: var(--muted); }
.mxc-plan[aria-pressed="true"] { border-color: var(--blue); background: #F4F6FF; box-shadow: 0 0 0 3px rgba(35, 80, 255, .28), 0 4px 0 rgba(35, 80, 255, .18); }
.mxc-plan[disabled] { opacity: .55; cursor: not-allowed; }
.mxc-resumen { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 6px 16px; box-shadow: 0 4px 0 rgba(43, 27, 61, .07); }
.mxc-fila { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 700; color: var(--ink2); }
.mxc-fila b { color: var(--ink); text-align: right; }
.mxc-fila.total { border-bottom: 0; font-size: 16px; color: var(--ink); }
.mxc-fila.total b { color: var(--blue); font-size: 18px; }

/* ── barra inferior ── */
.mxc-barra {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 2px solid var(--line);
}
.mxc-atras { min-height: 48px; padding: 0 18px; border-radius: 16px; background: #fff; border: 2px solid var(--line); box-shadow: 0 3px 0 rgba(43, 27, 61, .12); font-weight: 800; cursor: pointer; }
.mxc-atras[hidden] { display: none; }
.mxc-falta { flex: 1; min-width: 0; font-size: 13px; font-weight: 800; color: var(--rose); line-height: 1.3; }
.mxc-cta {
  margin-left: auto; min-height: 52px; padding: 0 26px; border: 0; border-radius: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font: 600 18px/1 Fredoka, sans-serif; text-decoration: none; color: var(--ink); background: var(--yellow);
  box-shadow: 0 6px 0 var(--yellow-d), 0 14px 24px -8px rgba(224, 154, 0, .4); transition: transform .12s, box-shadow .12s;
}
.mxc-cta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--yellow-d); }
.mxc-cta.apagado { background: #E8E1D6; color: #8A7DA0; box-shadow: 0 6px 0 #CFC5B6; cursor: not-allowed; }
.mxc-cta.buy[data-incompleto] { pointer-events: none; }
.mxc-cta.mx-enviada { background: var(--green); color: #fff; box-shadow: 0 6px 0 #0A5230; }
.mxc-cta.mx-enviando { opacity: .75; }
#mx-confirmacion { margin: 0; }

.mxc-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); max-width: min(92vw, 440px); padding: 12px 16px; border-radius: 16px; z-index: 5;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.mxc-toast.on { opacity: 1; transform: translate(-50%, 0); }
.mxc-pie3d { margin: 6px 0 0; text-align: center; display: none; }
.mxc-3d { background: none; border: 0; cursor: pointer; color: var(--muted); font-weight: 800; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.mxc-volver3d {
  position: fixed; left: 14px; bottom: 14px; z-index: 500; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid rgba(43, 27, 61, .14); background: #fff;
  color: #2B1B3D; font: 800 14px Nunito, sans-serif; cursor: pointer; box-shadow: 0 4px 0 rgba(43, 27, 61, .14);
}
body:not(.mx-3d) .mxc-volver3d { display: none; }

/* ── escritorio: dos columnas, el MORPH siempre a la vista ── */
@media (min-width: 960px) {
  .mxc-cab { padding: 16px 28px; }
  .mxc-cuerpo { flex-direction: row; gap: 18px; padding: 0 22px 22px; }
  .mxc-escenario { flex: 1; height: auto; max-height: none; min-height: 0; }
  .mxc-esc-img { height: min(70%, 520px); }
  .mxc-esc-info { left: 8px; bottom: 8px; }
  .mxc-panel { flex: none; width: min(560px, 48vw); border-radius: 28px; border-bottom: 2px solid var(--line); box-shadow: 0 8px 0 rgba(43, 27, 61, .1), 0 24px 50px -20px rgba(43, 27, 61, .35); overflow: hidden; }
  .mxc-main { padding: 18px 22px 24px; }
  .mxc-personajes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mxc-doble { grid-template-columns: 1fr 1fr; }
  .mxc-barra { padding: 14px 18px; border-radius: 0 0 26px 26px; }
  .mxc-pie3d { display: block; }
}
@media (max-width: 640px) {
  .mxc-pasos { margin: 0; flex: 1; justify-content: center; gap: 4px; }
  .mxc-pt, .mxc-pasos li + li::before { display: none; }
  .mxc-pasos li.actual .mxc-pt { display: inline; }
  .mxc-acc .mxc-link { padding: 0 11px; }
  .mxc-marca span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mxc *, .mxc *::before, .mxc *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ── Portada: la bienvenida a la Fábrica ─────────────────────────────────────────────────────────
   Mientras se ve, no hay pasos ni panel: solo la fábrica de fondo y esta tarjeta. Sin 3D, el cielo
   de la Fábrica (rosa → lila → azul) hace de fondo. */
.mxc--portada .mxc-pasos, .mxc--portada .mxc-cuerpo, .mxc--portada .mxc-link { visibility: hidden; }
.mxc--portada { background: radial-gradient(120% 90% at 50% 0%, #FF8CC6 0%, #9B6BFF 45%, #2350FF 100%); }
body.mx-fondo-listo .mxc--portada { background: transparent; }
.mxp {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: flex-start; padding: 0 16px calc(18px + env(safe-area-inset-bottom));
  pointer-events: none; transition: opacity .45s ease, transform .45s ease;
  /* Velo oscuro bajo la tarjeta: el texto blanco se lee aunque detrás haya césped, cielo o personajes. */
  background: linear-gradient(180deg, transparent 28%, rgba(30, 22, 80, .45) 52%, rgba(24, 16, 64, .82) 100%);
}
.mxp.fuera { opacity: 0; transform: translateY(24px); }
.mxp-tarjeta { pointer-events: auto; max-width: 560px; width: 100%; color: #fff; }
.mxp-kicker { margin: 0 0 2px; font: 600 18px Fredoka, sans-serif; text-shadow: 0 3px 0 rgba(30, 40, 120, .3); }
/* El logo cromado de la Fábrica (scripts/logo-cromado.py). `.mxc .mxp-titulo` gana sobre `.mxc h1`. */
.mxc .mxp-titulo { margin: 2px 0 0; line-height: 0; }
.mxp-titulo img {
  width: min(86vw, 520px); height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(20, 10, 60, .45));
  animation: mxp-logo .8s cubic-bezier(.3, 1.5, .5, 1) .1s both;
}
@keyframes mxp-logo { from { opacity: 0; transform: translateY(30px) scale(.86); } to { opacity: 1; transform: none; } }
.mxp-tag {
  display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #2B1B3D;
  font: 800 11.5px Nunito, sans-serif; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 4px 0 rgba(30, 20, 80, .2);
}
.mxp-lead { margin: 14px 0 0; font: 700 16.5px/1.5 Nunito, sans-serif; max-width: 46ch; text-shadow: 0 2px 10px rgba(20, 10, 60, .45); }
.mxp-fila { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.mxp-caras { display: flex; }
.mxp-cara {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; margin-left: -10px; background: #F6F3EE; border: 3px solid #fff;
  box-shadow: 0 3px 0 rgba(20, 10, 60, .25); animation: mxp-cara .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 70ms + 600ms);
}
.mxp-cara:first-child { margin-left: 0; }
.mxp-cara img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transform: scale(1.5); }
@keyframes mxp-cara { from { opacity: 0; transform: translateY(14px) scale(.7); } to { opacity: 1; transform: none; } }
.mxp-fila-tx { font: 800 13.5px Nunito, sans-serif; text-shadow: 0 2px 8px rgba(20, 10, 60, .5); }
.mxp-puntos { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mxp-puntos li { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1.5px solid rgba(255, 255, 255, .45); font: 800 13px Nunito, sans-serif; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mxp-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
/* `.mxc .mxp-…`: ganan sobre `.mxc button { color: inherit }` (si no, el texto salía blanco sobre blanco). */
.mxc .mxp-cta {
  display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 30px; border: 0; border-radius: 22px; cursor: pointer;
  font: 600 22px/1 Fredoka, sans-serif; color: #2B1B3D; background: #FFC21A; box-shadow: 0 6px 0 #D98A00, 0 16px 30px -8px rgba(224, 154, 0, .55);
  transition: transform .12s, box-shadow .12s; animation: mxp-cta 2.6s ease-in-out 1.6s infinite;
}
.mxp-cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #D98A00; }
@keyframes mxp-cta { 0%, 86%, 100% { transform: none; } 92% { transform: translateY(-4px); } }
/* Las dos explicaciones del sabio (en la fábrica 3D). Sin 3D no aparecen. */
.mxp-sabios { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mxc .mxp-sabio {
  min-height: 46px; padding: 0 18px; border-radius: 16px; cursor: pointer; color: #2B1B3D; background: rgba(255, 255, 255, .94);
  border: 0; font: 600 16px Fredoka, sans-serif; box-shadow: 0 5px 0 rgba(30, 20, 80, .25);
}
.mxp-sabio:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(30, 20, 80, .25); }
body:not(.mx-fondo) .mxp-sabios { display: none; }
body.mx-fondo:not(.mx-fondo-listo) .mxp-sabio { opacity: .6; }
/* Mientras habla el sabio, el constructor se aparta y se ve su caja (la de la Fábrica). */
body.mx-sabio #mx-app { visibility: hidden; }
body.mx-fondo #sage { z-index: 450; }
.mxp-pie { margin: 14px 0 0; font: 700 14px Nunito, sans-serif; text-shadow: 0 2px 8px rgba(20, 10, 60, .5); }
.mxp-pie a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 960px) {
  .mxp { padding: 0 6vw 9vh; background: radial-gradient(80% 85% at 0% 100%, rgba(24, 16, 64, .78) 0%, rgba(30, 22, 80, .35) 45%, transparent 72%); }
  .mxp-lead { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mxp-titulo img, .mxp-cara, .mxp-cta { animation: none; }
}
