/* =========================================================
   ESTILOS · AMAPAN – Turno nocturno
   Diseño RESPONSIVE: todo se mide en "rem" y el tamaño base
   cambia según la pantalla (celular vertical, celular horizontal,
   tablet o computador). Nada está fijado a una resolución.
   ========================================================= */

:root {
  --rojo: #a31c1c; --rojo-osc: #6e0d0d; --oro: #f3c26b; --amarillo: #ffd54a; --tinta: #6b1f10;
  --crema: linear-gradient(#fff6e4, #f6e2bd);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; }
@media (orientation: portrait)  { html { font-size: clamp(13px, 4.1vw, 26px); } }
@media (orientation: landscape) { html { font-size: clamp(11px, min(2vw, 3.6vh), 26px); } }
@media (orientation: portrait) and (min-width: 600px) { html { font-size: clamp(13px, 3vw, 21px); } }   /* tablet vertical */

html, body {
  height: 100%; background: #12070a; overflow: hidden; overscroll-behavior: none;
  font-family: 'Fredoka', 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  color: var(--tinta); -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
button { font-family: inherit; }

#escenario { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: #2f120d; }

/* ---------- fondo del taller ---------- */
#fondo { position: absolute; inset: 0; z-index: 0; }
#fondo svg { width: 100%; height: 100%; display: block; }
#fondo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(20,6,6,.28), rgba(20,6,6,.12) 40%, rgba(20,6,6,.3)); }
#fondo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,170,70,0) 10%, rgba(255,140,40,.55)); opacity: var(--alba, 0);
}
body.img-fondo #fondo { background: var(--img-fondo) center / cover no-repeat; }
body.img-fondo #fondo svg { display: none; }

/* ---------- estructura: HUD arriba · pantalla · acciones abajo ---------- */
#hud { position: relative; z-index: 20; flex: none; pointer-events: none; }
#pantalla {
  position: relative; z-index: 10; flex: 1; min-height: 0; min-width: 0; width: 100%; max-width: 64rem; margin: 0 auto;
  display: flex; flex-direction: column; gap: .5rem; padding: .5rem .8rem max(.8rem, env(safe-area-inset-bottom));
}
#pantalla.entrar > .escena > * { animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; }
#pantalla.entrar > .escena > :nth-child(2) { animation-delay: .08s; }
#pantalla.entrar > .escena > :nth-child(3) { animation-delay: .16s; }
#pantalla.entrar > .acciones { animation: sube-acc .4s .1s both; }
#pantalla.sacudir { animation: sacudir .35s; }

.escena { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .5rem; }
.contenido {
  flex: 1; min-height: 0; min-width: 0; position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; justify-content: safe center; gap: .55rem;
  overflow-y: auto; scrollbar-width: none;
}
.contenido::-webkit-scrollbar { display: none; }
.acciones { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.acciones > .btn-grande, .acciones > .btn-amasar { flex: 1; min-width: 0; max-width: 18rem; margin-left: auto; font-size: 1.2rem; padding: .5rem .9rem .6rem; }
.acciones.centrada { flex-direction: column; justify-content: center; }
.acciones.centrada .btn-grande { flex: none; margin: 0; max-width: none; }

/* ---------- logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap;
  background: radial-gradient(circle at 30% 20%, #d83a2e, #8e1212);
  color: #fff; letter-spacing: .05rem; padding: .2rem .8rem; border-radius: 2rem;
  border: .15rem solid #fff3d6; box-shadow: 0 .15rem 0 #5a0a0a; font-size: 1rem;
}
.logo { flex: none; }
.logo b { font-weight: 700; }
.logo.mini { font-size: .68rem; padding: .1rem .5rem; border-width: .12rem; box-shadow: none; }
.logo.xl { font-size: 2.1rem; padding: .25rem 1.3rem; border-width: .22rem; box-shadow: 0 .3rem 0 #5a0a0a, 0 0 1.5rem #ffb30066; }
body.img-logo .logo { background: var(--img-logo) center / contain no-repeat; border: none; box-shadow: none; width: 6rem; height: 2.4rem; padding: 0; }
body.img-logo .logo.mini { width: 3.2rem; height: 1.4rem; }
body.img-logo .logo.xl { width: 15rem; height: 6rem; }
body.img-logo .logo > * { display: none; }

/* ---------- HUD ---------- */
.hud-in { padding: max(.45rem, env(safe-area-inset-top)) .7rem 0; }
.hud-fila { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.hud-izq {
  display: flex; align-items: center; gap: .4rem; color: #fff3d6;
  background: linear-gradient(#7a1818dd, #4e0c0cdd); border: .12rem solid var(--oro);
  border-radius: 2rem; padding: .2rem .7rem .2rem .25rem;
}
.hud-turno { white-space: nowrap; }
.hud-turno b { display: block; font-size: .72rem; line-height: 1.05; }
.hud-turno small { font-size: .62rem; display: flex; align-items: center; }
.punto { display: inline-block; width: .42rem; height: .42rem; border-radius: 50%; background: #2b1008; border: .08rem solid var(--oro); margin-left: .15rem; }
.punto:first-of-type { margin-left: .35rem; }
.punto.on { background: #ffc524; }
.hud-der { display: flex; align-items: center; gap: .3rem; margin-right: 2.6rem; }
.vidas, .energia {
  background: #4e0c0cee; border: .12rem solid var(--oro); border-radius: 1.2rem; color: #fff3d6;
  position: relative; overflow: hidden;
}
.vidas { padding: 0 .5rem; font-size: 1.05rem; letter-spacing: .04rem; }
.vidas .cor { display: inline-block; }
.vidas .viva { color: #ff3b3b; text-shadow: 0 0 .5rem #ff3b3b88; }
.vidas .muerta { color: #3a1010; }
.vidas .media { background: linear-gradient(90deg, #ff3b3b 50%, #3a1010 50%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.vidas.perdio { animation: sacudir .4s; }
.energia { padding: .1rem .6rem; font-size: .82rem; font-weight: 700; }
.energia::before { content: ''; position: absolute; inset: 0; width: var(--p, 100%); background: linear-gradient(90deg, #f5a60077, #ffd54a99); transition: width .4s; }
.energia b { position: relative; }
.energia.baja { animation: latido .8s infinite; }
.energia.baja::before { background: linear-gradient(90deg, #e5393588, #ff8a65aa); }
.energia.pts { color: #ffd54a; }
.hud-reloj {
  display: flex; align-items: center; gap: .35rem; margin-top: .35rem; color: #fff3d6; font-size: .75rem;
  background: #3a0c0ccc; border: .1rem solid #f3c26b88; border-radius: 1rem; padding: .1rem .6rem;
}
.hud-reloj b { min-width: 2.6rem; }
.rbar { flex: 1; height: .4rem; border-radius: .3rem; background: #10163f; overflow: hidden; }
.rbar i { display: block; height: 100%; background: linear-gradient(90deg, #8aa4ff, #ffc524); transition: width .5s; }
#btn-sonido {
  position: absolute; right: .7rem; top: max(.45rem, env(safe-area-inset-top)); z-index: 30; width: 2.2rem; height: 2.2rem;
  border-radius: 50%; border: .12rem solid var(--oro); background: #3a0c0ccc; color: #fff; font-size: 1rem; cursor: pointer; display: none;
}

/* ---------- guía: personaje + globo de diálogo ---------- */
.guia { flex: none; display: flex; align-items: flex-end; gap: .35rem; width: 100%; }
.pj-wrap { position: relative; width: 5.2rem; height: 6.5rem; flex: none; pointer-events: none; }
.pj { width: 100%; height: 100%; animation: flota 3.2s ease-in-out infinite; transform-origin: bottom center; }
.pj svg { width: 100%; height: 100%; filter: drop-shadow(0 .4rem .3rem #0006); }
body.img-maestro .pj[data-pj="maestro"] { background: var(--img-maestro) center bottom / contain no-repeat; }
body.img-mateo .pj[data-pj="mateo"] { background: var(--img-mateo) center bottom / contain no-repeat; }
body.img-maestro .pj[data-pj="maestro"] svg, body.img-mateo .pj[data-pj="mateo"] svg { display: none; }
.etiqueta-pj {
  position: absolute; right: -.2rem; top: 1rem; background: #8e1212; color: #fff3d6; font-weight: 600;
  padding: 0 .7rem; border-radius: 1rem; border: .12rem solid var(--oro); font-size: .8rem;
}
.globo {
  position: relative; flex: 1; background: #fff4de; border: .15rem solid var(--oro); border-radius: 1.1rem;
  padding: .45rem .75rem .5rem; font-size: .95rem; line-height: 1.2; color: var(--tinta); font-weight: 500;
  box-shadow: 0 .2rem 0 #0004; text-align: left; margin-bottom: 1.2rem;
}
.globo::after { content: ''; position: absolute; left: -.8rem; bottom: .9rem; border: .4rem solid transparent; border-right-color: var(--oro); border-left-width: .4rem; }
.globo-nombre {
  display: block; width: max-content; background: #8e1212; color: #fff3d6; border-radius: 1rem; padding: 0 .6rem;
  font-size: .6rem; font-weight: 600; margin-bottom: .2rem; border: .08rem solid var(--oro);
}
.globo b { font-weight: 700; }
.verde { color: #2e8a3a; }

/* ---------- botones ---------- */
.btn {
  font-weight: 700; font-size: 1.1rem; color: #7a1212; cursor: pointer; min-height: 2.9rem;
  background: linear-gradient(#ffd54a, #f7a600); border: .2rem solid #fff0a0; border-radius: 2.5rem;
  padding: .45rem 1.2rem .55rem; box-shadow: 0 .25rem 0 #b86f00, 0 0 1.2rem #ffb30088;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; white-space: nowrap;
  transition: transform .1s;
}
.btn:active { transform: translateY(.2rem); box-shadow: 0 .05rem 0 #b86f00; }
.btn[disabled] { filter: grayscale(.8); opacity: .6; cursor: not-allowed; }
.btn .tri { color: #8e1212; font-size: .8em; }
.btn-grande { font-size: 1.3rem; min-height: 3.3rem; padding: .5rem 1.5rem .6rem; animation: latido 1.8s ease-in-out infinite; }
.btn-amasar { animation: none; font-size: 1.5rem; min-height: 3.8rem; }
.btn-sec {
  background: linear-gradient(#fff6e2, #f1dcb4); border: .15rem solid #fff; color: #7a1212;
  box-shadow: 0 .2rem 0 #a98a5a; font-size: 1rem; padding: .35rem 1rem .45rem;
}
.btn-volver {
  font-size: .95rem; padding: .35rem .9rem .45rem; background: linear-gradient(#a31c1c, #6e0d0d);
  color: #fff3d6; border: .15rem solid #fff3d6; box-shadow: 0 .2rem 0 #3d0606;
}

/* ---------- cintas, paneles y chips ---------- */
.panel {
  background: var(--crema); border: .15rem solid var(--oro); border-radius: 1.2rem;
  box-shadow: 0 .3rem 0 #0004, 0 0 1.3rem #ffb30044; padding: .6rem .8rem;
}
.cinta {
  flex: none; display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  background: linear-gradient(#b3201c, #7e0f0f); color: #fff3d6; border: .16rem solid #fff0cf;
  border-radius: 2rem; padding: .15rem 1rem .2rem .2rem; font-size: 1.05rem; font-weight: 700; box-shadow: 0 .2rem 0 #4a0808;
}
.cinta-ico {
  width: 2rem; height: 2rem; border-radius: 50%; background: #fff6e4; border: .12rem solid var(--oro);
  display: grid; place-items: center; font-size: 1.1rem;
}
.cinta-roja {
  flex: none; text-align: center; background: linear-gradient(#b3201c, #7e0f0f); color: #fff3d6;
  border: .2rem solid #fff0cf; border-radius: 2rem; padding: .25rem 1.4rem .35rem; font-size: 1.7rem; font-weight: 700;
  line-height: 1.1; box-shadow: 0 .25rem 0 #4a0808, 0 0 1.5rem #ffb30055; animation: pop .6s cubic-bezier(.2,1.5,.4,1) both;
}
.cinta-peq {
  display: inline-block; background: linear-gradient(#b3201c, #7e0f0f); color: #fff3d6; border: .12rem solid #fff0cf;
  border-radius: 1.2rem; padding: .05rem 1rem .1rem; font-size: .95rem; font-weight: 700; box-shadow: 0 .12rem 0 #4a0808;
}
.chip-temp, .chip-t {
  background: #fff6e4; border: .13rem solid var(--oro); border-radius: 1.2rem; padding: .15rem .8rem .2rem;
  font-weight: 600; font-size: .95rem; box-shadow: 0 .15rem 0 #0004;
}
.chip-t.urge { animation: latido .5s infinite; color: #c4261e; border-color: #e53935; }

/* ---------- 1. carga ---------- */
.escena.centro { align-items: center; justify-content: center; color: #fff3d6; text-align: center; gap: .9rem; }
.carga-titulo { font-size: 1.5rem; font-weight: 700; color: #ffd54a; letter-spacing: .12rem; text-shadow: 0 .15rem 0 #000a; }
.barra-carga { width: 14rem; max-width: 80%; height: .8rem; border-radius: .5rem; background: #2b1008; border: .13rem solid var(--oro); overflow: hidden; }
.barra-carga i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd54a, #f7a600); }

/* ---------- 2. bienvenida ---------- */
.bienv { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: center; align-content: center; gap: .3rem .5rem; }
.centro-b { order: 0; flex: 1 1 100%; display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.bienv .pj-wrap { order: 1; width: 8rem; height: 10rem; }
.titulo-bienv { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; }
.cinta-titulo {
  background: linear-gradient(#fff6e4, #f6e2bd); color: #8e1212; border: .2rem solid var(--oro); border-radius: 2.2rem;
  padding: 0 1.1rem .1rem; font-size: 1.7rem; font-weight: 700; letter-spacing: .05rem; box-shadow: 0 .25rem 0 #6b3a0a; white-space: nowrap;
}
.sub-titulo {
  background: linear-gradient(#ffd54a, #f5ac00); color: #7a1212; border-radius: 1.2rem; padding: 0 1rem .05rem;
  font-size: .8rem; font-weight: 600; border: .12rem solid #fff3b0;
}
.centro-b .globo { margin-bottom: 0; text-align: center; max-width: 20rem; }
.centro-b .globo::after { display: none; }
.centro-b .globo-nombre { margin-left: auto; margin-right: auto; }

/* ---------- 3. cómo jugar ---------- */
.cj { align-items: center; justify-content: center; gap: .6rem; }
.cj-panel { width: 100%; padding: .7rem; touch-action: pan-y; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tile { background: #fff; border: .1rem solid #e2b86e; border-radius: .9rem; padding: .5rem .3rem; text-align: center; display: flex; flex-direction: column; gap: .05rem; }
.tile b { font-size: 1.5rem; line-height: 1.2; }
.tile span { font-weight: 700; font-size: .95rem; }
.tile small { font-size: .72rem; line-height: 1.1; opacity: .85; }
.rojo { color: #e53935; letter-spacing: .1rem; } .oro { color: #f5ac00; letter-spacing: .1rem; }
.lista-noches { display: flex; flex-direction: column; gap: .3rem; }
.lista-noches div { display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: .8rem; padding: .2rem .7rem; }
.lista-noches b { font-size: 1.5rem; width: 2rem; text-align: center; }
.lista-noches span { font-weight: 700; flex: 1; }
.lista-noches small { font-size: .78rem; opacity: .85; }
.escalera { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.peldano { border-radius: .8rem; padding: .25rem .6rem; font-weight: 700; background: #f6e2bd; border: .1rem solid #e2b86e; }
.p1 { width: 58%; } .p2 { width: 70%; } .p3 { width: 84%; }
.p4 { width: 100%; background: linear-gradient(#ffe27a, #ffc524); border-color: #f0a21a; }
.escalera small { font-size: .78rem; margin-top: .2rem; }
.paginas { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.pag-dot { width: .8rem; height: .8rem; border-radius: 50%; border: .13rem solid #fff3d6; background: #3a0c0c; }
.pag-dot.on { background: #ffc524; }
.flecha { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: .15rem solid #fff3d6; background: #a31c1c; color: #fff; font-size: 1.3rem; cursor: pointer; }

/* ---------- 4. alias ---------- */
.alias-panel { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: .8rem; }
.alias-panel small { font-size: .8rem; font-weight: 500; }
.input-alias {
  width: 100%; font-family: inherit; font-size: max(16px, 1.2rem); padding: .55rem 1rem; border-radius: 2rem;
  border: .15rem solid #8e1212; background: #fff; color: #6b1f10; outline: none; font-weight: 500; text-align: center;
  -webkit-user-select: text; user-select: text;
}
.input-alias:focus { box-shadow: 0 0 0 .25rem #ffc52499; }

/* ---------- 5. mapa de noches ---------- */
.noches-fila { display: flex; gap: .35rem; width: 100%; max-width: 34rem; justify-content: center; }
.nc {
  position: relative; flex: 1; min-width: 0; max-width: 6.5rem; padding: .9rem .1rem .4rem; text-align: center;
  border-radius: 1rem; background: var(--crema); border: .13rem solid var(--oro); box-shadow: 0 .25rem 0 #0005;
  color: var(--tinta); font-weight: 600; animation: pop .5s calc(var(--i) * .07s + .15s) cubic-bezier(.2,1.5,.4,1) both;
}
.nc .num {
  position: absolute; top: -.5rem; left: 50%; transform: translateX(-50%); background: #7a3a1a; color: #fff3d6;
  font-size: .7rem; padding: 0 .55rem; border-radius: .5rem; border: .1rem solid var(--oro);
}
.nc .ico { font-size: 1.9rem; line-height: 2.2rem; }
.nc .nom { font-size: .62rem; font-weight: 700; margin-top: .1rem; }
.nc .estr { margin-top: .15rem; line-height: 1; }
.nc.bloq { background: linear-gradient(#6a4a3a, #4a2c20); border-color: #8a6a4a; color: #d8bfa0; box-shadow: 0 .25rem 0 #0005; }
.nc.bloq .ico { opacity: .45; filter: grayscale(.5); }
.nc .cand { position: absolute; right: .15rem; top: .2rem; font-size: .75rem; }
.nc.actual { border: .22rem solid #ffd21a; box-shadow: 0 0 0 .12rem #fff4, 0 0 1.5rem #ffd21acc; animation: pop .5s calc(var(--i) * .07s + .15s) both, latido 1.4s 1s infinite; }
.nc.completa .check {
  position: absolute; right: -.35rem; top: -.35rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: #2e9a3a; color: #fff; border: .1rem solid #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.detalle { width: 100%; max-width: 34rem; display: flex; align-items: center; gap: .7rem; padding: .45rem .8rem; }
.det-ico { font-size: 2.3rem; }
.det-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.det-txt b { font-size: 1rem; } .det-txt span { font-size: .8rem; opacity: .85; }

/* ---------- estrellas, insignias, premios ---------- */
.estrellas { display: inline-flex; gap: .15rem; }
.est { color: #6b4a2a55; font-size: 1.4rem; line-height: 1; text-shadow: 0 .1rem 0 #00000022; }
.est.on { color: #ffc524; text-shadow: 0 0 .5rem #ffd54aaa, 0 .1rem 0 #b8860b; }
.estrellas.chicas .est { font-size: .8rem; }
.estrellas.grandes .est { font-size: 3.2rem; margin: 0 .1rem; }
.estrellas.grandes .est.on { animation: estrella .6s calc(var(--i) * .3s + .3s) cubic-bezier(.2,1.8,.4,1) both; }
.insignia {
  width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #f0b43a); border: .15rem solid #fff3b0; box-shadow: 0 .15rem 0 #a8721a, 0 0 .8rem #ffc52488;
}
.insignia.grande { width: 4.5rem; height: 4.5rem; font-size: 2.4rem; }
.insignia.apagada { background: #c9b79a; border-color: #e5d8c0; box-shadow: none; filter: grayscale(1); opacity: .6; }
.props { display: flex; gap: .6rem; font-size: 3rem; filter: drop-shadow(0 .3rem 0 #0005); }
.props span { animation: bob 1.6s calc(var(--i) * .2s) ease-in-out infinite; }
.premios { display: flex; gap: .5rem; justify-content: center; width: 100%; }
.premio {
  display: flex; align-items: center; gap: .4rem; background: #fff; border: .12rem dashed var(--oro); border-radius: 1rem;
  padding: .25rem .65rem .25rem .3rem; font-size: .82rem; font-weight: 600; line-height: 1.1; color: var(--tinta); text-align: left;
}
.premio.off { opacity: .75; }
.premio.clic { cursor: pointer; background: #fff6e4; animation: latido 1.8s infinite; }
.premio .gran { font-size: 1.8rem; }
.premios-intro .premio { padding-right: .8rem; }

/* ---------- resultados ---------- */
.res-card { width: 100%; max-width: 26rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; padding: .6rem .8rem .7rem; }
.res-nombre { font-size: 1.15rem; font-weight: 700; color: #7a1212; }
.pill-pts {
  background: linear-gradient(#ffe27a, #ffc524); border: .13rem solid #f0a21a; border-radius: 1.4rem;
  padding: 0 1.2rem .05rem; font-weight: 700; font-size: 1.6rem; color: #7a1212; min-width: 8rem; font-variant-numeric: tabular-nums;
}
.final-card { gap: .3rem; }
.hora-fin { font-size: .9rem; font-weight: 500; }
.mini-noches { display: flex; gap: .3rem; justify-content: center; width: 100%; }
.mini-n { flex: 1; max-width: 4rem; background: #fff; border: .1rem solid #e2b86e; border-radius: .7rem; padding: .15rem 0; text-align: center; animation: pop .4s calc(var(--i) * .08s + .3s) both; }
.mini-n .ico { display: block; font-size: 1.4rem; line-height: 1.6rem; }
.fila-final { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.fila-final .pill-pts { font-size: 1.4rem; min-width: 0; }
.rango-cinta {
  background: linear-gradient(#b3201c, #7e0f0f); color: #fff3d6; border: .13rem solid #fff0cf; border-radius: 1rem;
  padding: .05rem .9rem .15rem; font-weight: 700; font-size: .95rem; box-shadow: 0 .15rem 0 #4a0808;
}
.final-acc { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .4rem; }
.final-acc > .btn-sec:only-of-type { grid-column: 1 / -1; justify-self: center; width: 60%; }
.final-acc .btn-grande { grid-column: 1 / -1; grid-row: 1; max-width: none; margin: 0; }
.final-acc .btn-sec { flex-direction: column; gap: 0; font-size: .72rem; padding: .25rem .2rem .3rem; min-height: 2.9rem; line-height: 1.1; white-space: normal; text-align: center; }

/* ---------- avisos, efectos y ventanas ---------- */
.toast {
  position: absolute; left: 50%; bottom: 6.4rem; transform: translateX(-50%); z-index: 60; max-width: 92%;
  padding: .35rem 1rem .45rem; border-radius: 1.2rem; font-weight: 700; font-size: 1rem; text-align: center;
  border: .15rem solid #fff; box-shadow: 0 .3rem 0 #0006; animation: toast 2.2s both; pointer-events: none;
}
.toast.bien { background: #2e9a3a; color: #fff; }
.toast.mal { background: #c62828; color: #fff; }
.toast.info { background: #fff6e4; color: #7a1212; }
.flota {
  position: fixed; z-index: 70; transform: translate(-50%, 0); font-weight: 700; font-size: 1.5rem; color: #ffd54a;
  text-shadow: 0 .12rem 0 #000a, 0 0 .6rem #000a; pointer-events: none; white-space: nowrap; animation: sube 1s ease-out both;
}
.flota.mal { color: #ff6b6b; } .flota.bien { color: #8bff9c; }
.confeti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }
#modal { display: none; position: absolute; inset: 0; z-index: 90; }
.modal-fondo { position: absolute; inset: 0; background: #000b; display: grid; place-items: center; padding: 1rem; }
.modal-caja {
  background: var(--crema); border: .18rem solid var(--oro); border-radius: 1.3rem; padding: .9rem 1rem 1rem; text-align: center;
  max-width: 24rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; animation: pop .35s cubic-bezier(.2,1.5,.4,1) both;
}
.modal-cuerpo { font-size: .95rem; line-height: 1.3; font-weight: 500; }
.tabla-rank { margin: 0 auto; border-collapse: collapse; font-size: 1rem; }
.tabla-rank td { padding: .15rem .6rem; }

/* ---------- controles + y − ---------- */
.paso-fila { display: flex; align-items: center; justify-content: center; gap: .35rem; }
.paso-btn {
  width: 2.7rem; height: 2.7rem; flex: none; border-radius: 50%; border: .15rem solid #fff; cursor: pointer;
  background: linear-gradient(#b3201c, #7e0f0f); color: #fff; font-size: 1.6rem; font-weight: 700; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 .15rem 0 #4a0808;
}
.paso-btn:active { transform: translateY(.1rem); }
.paso-btn.grande { width: 3.3rem; height: 3.3rem; font-size: 2rem; }
.valor { min-width: 4.5rem; text-align: center; font-weight: 700; font-size: 1rem; background: #fff; border: .1rem solid #e2b86e; border-radius: .8rem; padding: .15rem .3rem; color: #7a1212; }
.valor.grande { min-width: 7.5rem; font-size: 1.7rem; border-radius: 1rem; background: linear-gradient(#ffe27a, #ffc524); border-color: #f0a21a; }

/* ---------- Noche 1 ---------- */
.grid-ing { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; width: 100%; max-width: 34rem; }
.ing {
  background: var(--crema); border: .13rem solid var(--oro); border-radius: 1rem; padding: .4rem .3rem .5rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .1rem; box-shadow: 0 .25rem 0 #0004;
  animation: pop .45s calc(var(--i) * .08s + .2s) cubic-bezier(.2,1.5,.4,1) both;
}
.ing .e { font-size: 1.8rem; line-height: 2rem; }
.ing b { font-size: .95rem; }
.ing small { font-size: .65rem; opacity: .75; margin-bottom: .2rem; }
.ing .valor { min-width: 4rem; font-size: .9rem; }
.ing.mal { animation: sacudir .4s; border-color: #e53935; background: #ffe3de; }
.ing.bien { border-color: #2e9a3a; background: #e3f9e5; }
.masa-zona { position: relative; width: 100%; max-width: 22rem; height: 8.5rem; display: grid; place-items: center; cursor: pointer; touch-action: manipulation; }
.masa-bola {
  width: 11rem; height: 5rem; border-radius: 50%; margin-top: 2.4rem;
  background: radial-gradient(ellipse at 40% 30%, #fff1cf, #e6c386 70%, #cfa05a); box-shadow: 0 .5rem 0 #0004, inset 0 -.4rem .5rem #b6823a55;
}
.manos { position: absolute; top: .3rem; font-size: 3.4rem; filter: drop-shadow(0 .3rem 0 #0004); pointer-events: none; }
.masa-zona.golpe .manos { animation: amasa .22s; }
.masa-zona.golpe .masa-bola { animation: aplasta .22s; }
.masa-zona .btn { position: absolute; z-index: 5; }
.ritmo { display: flex; gap: .7rem; padding: .35rem .8rem; background: #1b0a0ab0; border: .13rem solid var(--oro); border-radius: 2rem; }
.rc { position: relative; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #3a1a10; border: .15rem solid var(--oro); transition: background .1s; }
.rc .anillo { position: absolute; inset: -.15rem; border-radius: 50%; border: .18rem solid #ffd54a; opacity: 0; pointer-events: none; }
.rc.activo { background: #ffd54a; box-shadow: 0 0 1.3rem #ffd54a; }
.rc.ok { background: #4cd964; box-shadow: 0 0 1.3rem #4cd964; }
.rc.mal { background: #e53935; }
.contador { background: #fff6e4; border: .12rem solid var(--oro); border-radius: 1.2rem; padding: .05rem .9rem .1rem; font-weight: 600; font-size: .95rem; }
.contador .fallos { margin-left: .6rem; color: #c62828; }

/* ---------- Noche 2 ---------- */
.bowl { position: relative; width: 11rem; height: 6rem; flex: none; }
.bowl .cuerpo { position: absolute; left: 0; right: 0; bottom: 0; height: 3.4rem; border-radius: 0 0 5.5rem 5.5rem / 0 0 3.4rem 3.4rem; background: linear-gradient(#8a8f98, #4f545c); z-index: 2; box-shadow: 0 .3rem 0 #0004; }
.bowl .masa-b { position: absolute; left: 1.1rem; right: 1.1rem; bottom: 2.6rem; height: 2.6rem; border-radius: 50% 50% 10% 10%; background: radial-gradient(ellipse at 50% 20%, #fff1cf, #e6c386); transform-origin: bottom; transition: transform .25s; z-index: 1; }
.bowl .pano { position: absolute; left: .4rem; right: .4rem; bottom: 2.8rem; height: 1.2rem; z-index: 3; border-radius: .5rem; background: repeating-conic-gradient(#c8303a 0 25%, #fbeee0 0 50%) 0 0 / 1.2rem 1.2rem; opacity: .92; }
.latas { display: flex; gap: .5rem; width: 100%; max-width: 34rem; }
.lata {
  position: relative; flex: 1; min-width: 0; color: #fff3d6; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .2rem;
  background: #5a2e1acc; border: .15rem solid #8a4a28; border-radius: 1rem; padding: .35rem .3rem .45rem; transition: transform .15s, background .2s;
}
.lata.viva { border-color: #ffd54a; box-shadow: 0 0 .9rem #ffd54a88; }
.lata.viva:active { transform: scale(.96); }
.lata.hecha { cursor: default; }
.lata.perfecta { border-color: #4cd964; background: #2e5a2acc; box-shadow: 0 0 1rem #4cd96488; }
.lata.casi { border-color: #ffd54a; }
.lata.mala { border-color: #e53935; background: #6a1a1acc; }
.lata .tecla { position: absolute; top: .25rem; left: .3rem; background: #fff3d6; color: #7a1212; border-radius: .5rem; padding: 0 .4rem; font-size: .75rem; font-weight: 700; z-index: 5; }
.horno-l { position: relative; width: 100%; height: 5.4rem; }
.domo { position: absolute; left: 12%; right: 12%; bottom: 1.6rem; height: calc(var(--h, 20%) * .7); border-radius: 50% 50% 10% 10%; background: radial-gradient(ellipse at 50% 20%, #fff1cf, #e6c386); z-index: 2; transition: height .1s; }
.pano-l { position: absolute; left: 6%; right: 6%; bottom: 1.4rem; height: .7rem; z-index: 3; border-radius: .3rem; background: repeating-conic-gradient(#c8303a 0 25%, #fbeee0 0 50%) 0 0 / .7rem .7rem; }
.bandeja { position: absolute; left: 0; right: 0; bottom: 0; height: 1.6rem; background: #7a7f87; border-radius: .4rem .4rem 1rem 1rem; border: .13rem solid #5c6169; z-index: 4; }
.estado-l { font-size: .72rem; font-weight: 600; min-height: .95rem; text-align: center; }
.barra-l { position: relative; width: 100%; height: 1.1rem; border-radius: .6rem; background: #24100a; border: .13rem solid #fff3d6; overflow: hidden; }
.barra-l .zona { position: absolute; top: 0; bottom: 0; left: 70%; width: 20%; background: #3fbf5faa; border-left: .08rem solid #b8ffc8; border-right: .08rem solid #b8ffc8; }
.barra-l .relleno { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(#ffd54a, #f5ac00); }

/* ---------- Noche 3 ---------- */
.modelo-card { width: 100%; max-width: 34rem; padding: .4rem .7rem .5rem; }
.modelo-cab { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .95rem; }
.piezas i { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; background: #d9b36c; margin-left: .3rem; }
.piezas i.act { background: #ffc524; box-shadow: 0 0 .4rem #ffc524; } .piezas i.hecha { background: #2e9a3a; }
.modelo-barra { height: 1.2rem; border-radius: .7rem; background: #0000000d; margin-top: .25rem; overflow: hidden; }
.modelo-barra i { display: block; height: 100%; border-radius: .7rem; background: linear-gradient(#fbefd0, #e8c98a); border: .12rem solid #cf9f55; transition: width .3s; }
.regla-area { position: relative; width: calc(100% - 1.6rem); max-width: 32rem; height: 5rem; flex: none; margin: 0 .8rem; }
.tira { position: absolute; left: 0; top: .5rem; height: 1.8rem; border-radius: 1rem; background: linear-gradient(#fbefd0, #e0b872); border: .13rem solid #cf9f55; box-shadow: 0 .2rem 0 #0004; transition: box-shadow .2s; }
.tira.buena { box-shadow: 0 0 1rem #4cd964; } .tira.mala { box-shadow: 0 0 1rem #e53935; }
.guia-p { position: absolute; left: 0; top: .3rem; height: 2.2rem; border: .13rem dashed #fff; border-radius: 1.2rem; opacity: .9; pointer-events: none; }
.regla {
  position: absolute; left: 0; right: 0; top: 2.7rem; height: 1.3rem; border-radius: .2rem;
  background: repeating-linear-gradient(90deg, #3a1a10 0 .1rem, transparent .1rem 12.5%), linear-gradient(#e9c98c, #c99a5e);
}
.regla-num { position: absolute; top: 4.05rem; transform: translateX(-50%); font-size: .68rem; color: #fff3d6; font-weight: 600; text-shadow: 0 .08rem 0 #000a; }
.slider-fila { display: flex; align-items: center; gap: .5rem; width: 100%; max-width: 34rem; background: var(--crema); border: .13rem solid var(--oro); border-radius: 2.2rem; padding: .35rem .6rem; }
.slider-fila input[type=range] { flex: 1; min-width: 0; height: 2.4rem; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.slider-fila input[type=range]::-webkit-slider-runnable-track { height: .7rem; border-radius: .4rem; background: linear-gradient(90deg, #ffd54a, #c4a35a); }
.slider-fila input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 1.9rem; height: 1.9rem; margin-top: -.6rem; border-radius: 50%; background: #fff; border: .2rem solid #b3201c; box-shadow: 0 .15rem 0 #0004; }
.slider-fila input[type=range]::-moz-range-track { height: .7rem; border-radius: .4rem; background: linear-gradient(90deg, #ffd54a, #c4a35a); }
.slider-fila input[type=range]::-moz-range-thumb { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; border: .2rem solid #b3201c; }

/* ---------- Noche 4 ---------- */
.horno {
  --calor: 0; position: relative; width: 100%; max-width: 21rem; height: 8rem; flex: none; padding: .9rem .6rem .5rem;
  background: linear-gradient(#9aa0a8, #5c6169); border: .15rem solid #3d4148; border-radius: 1rem; box-shadow: 0 .3rem 0 #0005, 0 0 calc(var(--calor) * 2rem) rgba(255,140,40,.6);
}
.perillas { position: absolute; top: .2rem; left: 0; right: 0; display: flex; justify-content: space-around; padding: 0 30%; }
.perillas i { width: .7rem; height: .7rem; border-radius: 50%; background: #2a2d33; border: .1rem solid #c9ced6; }
.ventana { position: relative; height: 100%; border-radius: .6rem; border: .13rem solid #222; overflow: hidden; background: radial-gradient(ellipse at 50% 100%, rgba(255,170,50,calc(.2 + var(--calor) * .75)), #2a1208 78%); }
.brillo { position: absolute; inset: 0; pointer-events: none; }
.horno.encendido .brillo { background: radial-gradient(ellipse at 50% 110%, rgba(255,210,90,.55), transparent 65%); animation: brasa .7s ease-in-out infinite alternate; }
.panes { position: absolute; left: 0; right: 0; bottom: 1.1rem; display: flex; justify-content: space-around; }
.pan-h { width: 4.2rem; height: 2.3rem; border-radius: 50%; background: #f3dfb6; transform: rotate(-4deg); box-shadow: inset 0 -.3rem 0 #0003, 0 0 calc(var(--calor) * .8rem) rgba(255,160,40,.8); }
.pan-h:nth-child(2) { transform: rotate(3deg); }
.bandeja-h { position: absolute; left: 3%; right: 3%; bottom: .4rem; height: .7rem; background: #6c717a; border-radius: .3rem; }
.medidores { display: flex; gap: .5rem; width: 100%; max-width: 34rem; }
.medidor { flex: 1; background: var(--crema); border: .13rem solid var(--oro); border-radius: 1rem; padding: .3rem .5rem .45rem; text-align: center; box-shadow: 0 .2rem 0 #0004; }
.medidor .tit { font-size: .75rem; font-weight: 700; color: #7a1212; margin-bottom: .15rem; }
.medidor .valor { min-width: 4.4rem; font-size: 1.05rem; }
.medidor > .valor { display: block; margin: .15rem auto 0; background: #fff; }
.medidor .paso-btn { width: 2.3rem; height: 2.3rem; font-size: 1.3rem; }
.gauge { position: relative; height: .6rem; border-radius: .4rem; margin: .45rem .3rem 0; background: linear-gradient(90deg, #4aa3ff, #4cd964, #ffd54a, #e53935); }
.gauge .marca { position: absolute; top: -.25rem; width: .35rem; height: 1.1rem; border-radius: .2rem; background: #2b1008; border: .06rem solid #fff; transform: translateX(-50%); }
.medidor .barra { height: .7rem; border-radius: .4rem; background: #0002; overflow: hidden; margin-top: .45rem; }
.medidor .barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd54a, #f5ac00); }

/* ---------- Noche 5 ---------- */
.fila-estado { display: flex; gap: .5rem; justify-content: center; }
.tickets { display: flex; gap: .5rem; width: 100%; max-width: 34rem; justify-content: center; }
.pedido {
  position: relative; flex: 1; max-width: 6rem; background: var(--crema); border: .13rem solid var(--oro); border-radius: .9rem;
  text-align: center; padding: .85rem .2rem .25rem; box-shadow: 0 .2rem 0 #0004; transition: transform .2s, opacity .3s;
}
.pedido .num { position: absolute; top: -.55rem; left: 50%; transform: translateX(-50%); background: #7a3a1a; color: #fff3d6; border-radius: .5rem; padding: 0 .5rem; font-size: .72rem; border: .1rem solid var(--oro); }
.pedido .e { font-size: 1.8rem; line-height: 2rem; } .pedido .x { font-weight: 700; font-size: 1rem; }
.pedido.activo { border-color: #ffd21a; box-shadow: 0 0 1.2rem #ffd21acc; transform: translateY(-.2rem) scale(1.05); }
.pedido.hecho { opacity: .45; }
.pedido .ok { position: absolute; right: -.3rem; top: -.3rem; background: #2e9a3a; color: #fff; width: 1.2rem; height: 1.2rem; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; }
.estante { display: flex; gap: .5rem; width: 100%; max-width: 34rem; }
.pan-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 4.6rem; cursor: pointer;
  background: var(--crema); border: .13rem solid var(--oro); border-radius: 1rem; color: var(--tinta); font-weight: 600; box-shadow: 0 .2rem 0 #0004;
}
.pan-item span { font-size: 2.3rem; line-height: 1.2; pointer-events: none; }
.pan-item small { font-size: .7rem; pointer-events: none; }
.pan-item:active { transform: scale(.93); background: #ffe9b0; }
.bolsa {
  position: relative; width: 100%; max-width: 34rem; min-height: 4.6rem; padding: 1rem .5rem .4rem; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(#e6c08a, #c99a5e); border: .15rem dashed #fff3d6; border-radius: .9rem .9rem 1.3rem 1.3rem; text-align: center; box-shadow: 0 .25rem 0 #0004;
}
.bolsa .etq { position: absolute; top: -.7rem; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #8e1212; color: #fff3d6; padding: 0 .9rem; border-radius: 1rem; font-size: .78rem; font-weight: 700; border: .1rem solid #f3c26b; }
#contenido { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.chip-b { background: #fff; border-radius: 1rem; padding: .15rem .65rem; font-weight: 700; font-size: 1.15rem; cursor: pointer; border: .1rem solid var(--oro); animation: pop .25s both; }
.vacia { opacity: .75; font-weight: 600; font-size: .85rem; }
.bolsa.recibe { animation: pop .25s; }
.bolsa.mala { animation: sacudir .4s; border-color: #e53935; }
.camino { position: absolute; left: 0; right: 0; bottom: 0; height: 2.2rem; overflow: hidden; pointer-events: none; }
#camion { position: absolute; left: -3rem; bottom: 0; font-size: 2rem; }
#camion.sale { animation: conduce 1s ease-in both; }

/* ---------- animaciones ---------- */
@keyframes pop { 0% { opacity: 0; transform: translateY(.8rem) scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes sube-acc { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes sacudir { 0%,100% { transform: none; } 20% { transform: translateX(-.5rem); } 40% { transform: translateX(.5rem); } 60% { transform: translateX(-.3rem); } 80% { transform: translateX(.3rem); } }
@keyframes flota { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-.3rem) scale(1.015); } }
@keyframes latido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes estrella { 0% { opacity: 0; transform: scale(0) rotate(-90deg); } 100% { opacity: 1; transform: none; } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -.8rem) scale(.9); } 10%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -.4rem); } }
@keyframes sube { 0% { opacity: 0; transform: translate(-50%, .5rem) scale(.7); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -3rem) scale(1); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-.5rem) rotate(3deg); } }
@keyframes amasa { 0% { transform: translateY(0); } 50% { transform: translateY(1.6rem) scale(1.08); } 100% { transform: translateY(0); } }
@keyframes aplasta { 0% { transform: scale(1); } 50% { transform: scale(1.1, .82); } 100% { transform: scale(1); } }
@keyframes brasa { from { opacity: .55; } to { opacity: 1; } }
@keyframes conduce { from { left: -3rem; } to { left: 105%; } }

/* Celular vertical alto: se aprovecha el espacio con personaje y elementos más grandes */
@media (orientation: portrait) and (min-height: 760px) {
  .pj-wrap { width: 6.6rem; height: 8.2rem; }
  .globo { font-size: 1.02rem; margin-bottom: 1.6rem; }
  .contenido { gap: .95rem; }
  .props { font-size: 3.6rem; }
  .nc .ico { font-size: 2.2rem; line-height: 2.6rem; }
  .nc { padding-top: 1.1rem; padding-bottom: .6rem; }
  .ing .e { font-size: 2.2rem; line-height: 2.5rem; } .ing { padding: .7rem .3rem .7rem; }
  .masa-zona { height: 11rem; } .masa-bola { width: 13rem; height: 6rem; } .manos { font-size: 4.2rem; }
  .bowl { transform: scale(1.2); margin: .8rem 0; }
  .horno-l { height: 6.4rem; }
  .horno { height: 10rem; }
  .estrellas.grandes .est { font-size: 3.6rem; }
  .pan-item { min-height: 5.6rem; } .pan-item span { font-size: 2.8rem; }
  .pedido .e { font-size: 2.2rem; line-height: 2.4rem; }
  .res-card { padding: .9rem 1rem 1rem; gap: .55rem; }
}
/* Celulares angostos: el logo del HUD queda solo con el ícono */
@media (orientation: portrait) and (max-width: 420px) { .logo.mini b { display: none; } .logo.mini { padding: .1rem .35rem; } }

/* =========================================================
   CELULAR VERTICAL con poca altura (pantallas de 640 px o menos)
   ========================================================= */
@media (orientation: portrait) and (max-height: 700px) {
  .pj-wrap { width: 4.3rem; height: 5.4rem; }
  .bienv .pj-wrap { width: 6.5rem; height: 8rem; }
  .logo.xl { font-size: 1.7rem; }
  .props { font-size: 2.4rem; }
  .estrellas.grandes .est { font-size: 2.6rem; }
}

/* =========================================================
   HORIZONTAL (celular de lado, tablet o computador):
   el personaje va a la izquierda y la acción a la derecha
   ========================================================= */
@media (orientation: landscape) {
  #pantalla { padding: .4rem .8rem .6rem; gap: .4rem; }
  .escena { flex-direction: row; align-items: stretch; gap: 1rem; }
  .guia { flex: 0 0 28%; width: auto; flex-direction: column-reverse; align-items: center; justify-content: flex-end; gap: .5rem; }
  .pj-wrap { width: 7.2rem; height: 9rem; }
  .globo { flex: none; margin-bottom: 0; text-align: center; width: 100%; font-size: .9rem; }
  .globo .globo-nombre { margin-left: auto; margin-right: auto; }
  .globo::after { left: 50%; bottom: -.8rem; border-right-color: transparent; border-top-color: var(--oro); border-left-width: .4rem; transform: translateX(-50%); }
  .contenido { gap: .4rem; }
  .hud-in { padding-top: .35rem; }
  .hud-reloj { margin-top: .25rem; }
  .cinta { font-size: .95rem; }
  .cinta-ico { width: 1.7rem; height: 1.7rem; font-size: 1rem; }
  .cinta-roja { font-size: 1.4rem; padding: .15rem 1.2rem .25rem; }
  .logo.xl { font-size: 1.6rem; }
  .cinta-titulo { font-size: 1.4rem; }
  .bienv { flex-wrap: nowrap; align-items: center; }
  .bienv .pj-wrap { width: 8rem; height: 10rem; order: 0; }
  .bienv .m2 { order: 2; }
  .centro-b { order: 1; flex: 1 1 auto; }
  .acciones.centrada { flex-direction: row; }
  .escena.cj { flex-direction: column; align-items: center; justify-content: center; }
  .cj-panel { max-width: 40rem; }
  .noches-fila { max-width: 30rem; }
  .nc .ico { font-size: 1.9rem; }
  .nc .nom { font-size: .72rem; }
  .props { font-size: 2.6rem; }
  .estrellas.grandes .est { font-size: 2.4rem; }
  .res-card { gap: .2rem; padding: .4rem .7rem .5rem; }
  .pill-pts { font-size: 1.3rem; }
  .res-nombre { font-size: 1rem; }
  .grid-ing { grid-template-columns: repeat(4, 1fr); }
  .ing { padding: .3rem .15rem .4rem; }
  .ing .valor { min-width: 3.4rem; font-size: .8rem; }
  .ing .paso-btn { width: 2.2rem; height: 2.2rem; font-size: 1.2rem; }
  .masa-zona { height: 6.6rem; }
  .masa-bola { width: 9rem; height: 4rem; margin-top: 2rem; }
  .manos { font-size: 2.7rem; }
  .ritmo { padding: .25rem .7rem; } .rc { width: 2.4rem; height: 2.4rem; }
  .bowl { height: 4.6rem; width: 9rem; transform: scale(.95); }
  .bowl .cuerpo { height: 2.6rem; } .bowl .masa-b { bottom: 2rem; height: 2rem; } .bowl .pano { bottom: 2.2rem; height: 1rem; }
  .horno-l { height: 4rem; } .domo { bottom: 1.3rem; } .pano-l { bottom: 1.1rem; } .bandeja { height: 1.3rem; }
  .regla-area { height: 4.4rem; }
  .modelo-card { padding: .25rem .6rem .35rem; }
  .horno { height: 6rem; max-width: 18rem; padding-top: .8rem; }
  .pan-h { width: 3.6rem; height: 1.9rem; }
  .medidor { padding: .2rem .4rem .35rem; }
  .medidor .paso-btn { width: 2rem; height: 2rem; font-size: 1.1rem; }
  .tile b { font-size: 1.3rem; } .tile { padding: .3rem .2rem; }
  .cj-panel { padding: .5rem; }
  .final-acc { grid-template-columns: 1fr 1fr 1fr 1.6fr; }
  .final-acc .btn-grande { grid-column: 4; grid-row: 1; }
  .final-acc .btn-sec { grid-row: 1; }
  .mini-n .ico { font-size: 1.2rem; line-height: 1.3rem; }
  .toast { bottom: 5.2rem; }
  /* Noche 5: se reparte en dos columnas para que todo quepa */
  .n5 { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "cinta cinta" "instr instr" "estado bolsa" "tick bolsa" "estante estante"; align-content: center; gap: .45rem .7rem; }
  .n5 .cinta { grid-area: cinta; justify-self: center; }
  .n5 .instr { grid-area: instr; }
  .n5 .fila-estado { grid-area: estado; }
  .n5 .tickets { grid-area: tick; }
  .n5 .estante { grid-area: estante; max-width: none; }
  .n5 .bolsa { grid-area: bolsa; align-self: stretch; max-width: none; }
  .n5 .pan-item { min-height: 3.6rem; } .n5 .pan-item span { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* =========================================================
   v4 · INSTRUCCIONES, CARRITO, ALERTAS, DATOS, FOTO
   ========================================================= */
.globo-txt { display: block; }
.globo.habla { animation: pop .3s both; }

/* cinta amarilla de instrucciones */
.instr {
  flex: none; width: 100%; max-width: 34rem; display: flex; align-items: center; gap: .5rem;
  background: linear-gradient(#fff2a8, #ffd54a); color: #6b1f10; border: .15rem solid #fff; border-radius: 1.1rem;
  padding: .3rem .7rem .35rem .4rem; font-size: .95rem; font-weight: 600; line-height: 1.15; box-shadow: 0 .2rem 0 #b86f00, 0 0 1rem #ffd54a77; text-align: left;
}
.instr-ico { font-size: 1.6rem; line-height: 1; flex: none; animation: latido 1.4s infinite; }
.instr-txt b { color: #a31c1c; }
.solo-pc { display: none; font-weight: 500; opacity: .8; }
@media (hover: hover) and (pointer: fine) { .solo-pc { display: inline; } }

/* ---- Noche 1: carrito ---- */
.pedido-card { width: 100%; max-width: 34rem; padding: .3rem .6rem .4rem; text-align: center; }
.pedido-cab { font-size: 1.05rem; font-weight: 700; color: #7a1212; }
.pedido-rec { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; align-items: center; font-size: .78rem; }
.pchip { background: #fff; border: .08rem solid #e2b86e; border-radius: 1rem; padding: 0 .45rem; font-weight: 600; white-space: nowrap; }
.toks { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; width: 100%; max-width: 34rem; }
.tok {
  position: relative; display: flex; flex-direction: column; align-items: center; background: var(--crema); border: .13rem solid var(--oro);
  border-radius: 1rem; padding: .35rem .1rem .3rem; cursor: grab; box-shadow: 0 .25rem 0 #0004; line-height: 1.05; transition: transform .1s;
}
.tok .e { font-size: 2.1rem; line-height: 2.3rem; pointer-events: none; }
.tok b { font-size: .78rem; pointer-events: none; }
.tok small { font-size: .66rem; opacity: .8; pointer-events: none; }
.tok.levantado { opacity: .4; }
.tok:active { transform: scale(.95); }
.fantasma { position: fixed; z-index: 100; pointer-events: none; opacity: .95; transform: scale(1.15) rotate(-4deg); filter: drop-shadow(0 .5rem .4rem #0007); margin: 0; }
.mano-guia { position: absolute; right: -.2rem; bottom: -.9rem; font-size: 2rem; pointer-events: none; animation: mano 1s ease-in-out infinite; z-index: 3; filter: drop-shadow(0 .2rem 0 #0006); }
@keyframes mano { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-.4rem,-1rem); } }
.carrito {
  position: relative; width: 100%; max-width: 34rem; min-height: 5.6rem; display: flex; align-items: center; justify-content: center;
  background: #1b0a0a99; border: .2rem dashed var(--oro); border-radius: 1.2rem; padding: .4rem .5rem; transition: background .15s, transform .15s;
}
.carrito.sobre { background: #ffd54a55; transform: scale(1.03); border-style: solid; }
.carrito.mal { animation: sacudir .4s; border-color: #ff5a4f; }
.carro-svg { position: absolute; left: .4rem; bottom: .2rem; width: 4.4rem; opacity: .35; pointer-events: none; }
.carro-chips { position: relative; display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; max-width: 100%; }
.chip { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: .12rem solid var(--oro); background: #fff6e4; font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 .15rem 0 #0005; }
.chip.cae { animation: cae .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes cae { 0% { transform: translateY(-2rem) scale(1.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.carro-vacio { position: absolute; color: #fff3d6; font-weight: 600; opacity: .85; pointer-events: none; }

/* ---- Noche 1: amasar con aro ---- */
.masa-zona { cursor: pointer; }
.objetivo { position: absolute; left: 50%; top: 52%; width: 5rem; height: 5rem; transform: translate(-50%,-50%); border-radius: 50%; border: .25rem solid #fff; opacity: .9; z-index: 2; pointer-events: none; box-shadow: 0 0 1rem #0007; }
.aro { position: absolute; left: 50%; top: 52%; width: 5rem; height: 5rem; transform: translate(-50%,-50%) scale(2.6); border-radius: 50%; border: .3rem solid #ffd54a; opacity: 0; z-index: 3; pointer-events: none; }
.masa-zona.ya .objetivo { background: #4cd96466; border-color: #4cd964; box-shadow: 0 0 1.6rem #4cd964; }
.cuenta { position: absolute; z-index: 4; font-size: 3.4rem; font-weight: 700; color: #fff; text-shadow: 0 .2rem 0 #000a, 0 0 1rem #000a; pointer-events: none; }
.puntos-ritmo { display: flex; gap: .35rem; padding: .3rem .7rem; background: #1b0a0ab0; border: .12rem solid var(--oro); border-radius: 2rem; }
.puntos-ritmo i { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #3a1a10; border: .1rem solid var(--oro); }
.puntos-ritmo i.ok { background: #4cd964; box-shadow: 0 0 .6rem #4cd964; }
.puntos-ritmo i.mal { background: #e53935; }

/* ---- Noche 2: tiempos y latas ---- */
.tchips { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; width: 100%; max-width: 34rem; }
.tchip {
  display: flex; flex-direction: column; align-items: center; background: var(--crema); border: .13rem solid var(--oro); border-radius: 1rem;
  padding: .3rem .1rem .35rem; cursor: pointer; color: var(--tinta); box-shadow: 0 .25rem 0 #0004; line-height: 1.1;
}
.tchip .e { font-size: 1.6rem; } .tchip small { font-size: .68rem; font-weight: 600; } .tchip b { font-size: 1.05rem; color: #7a1212; }
.tchip.sel { background: linear-gradient(#fff2a8, #ffd54a); border-color: #fff; box-shadow: 0 0 1.2rem #ffd54a, 0 .25rem 0 #b86f00; transform: translateY(-.25rem) scale(1.06); }
.tchip.correcta { outline: .2rem solid #4cd964; }
.lata.ahora { border-color: #4cd964; background: #2e5a2acc; box-shadow: 0 0 1.4rem #4cd964; animation: latido .5s infinite; }
.lata.ahora .estado-l { color: #b8ffc8; font-weight: 700; }

/* ---- Noche 3: regla ---- */
.regla-area { cursor: ew-resize; touch-action: none; }
.regla-area::after { content: '↔'; position: absolute; right: 0; top: 0; font-size: 1.2rem; color: #fff3d6; opacity: .7; pointer-events: none; }
.cm-live { flex: 1; text-align: center; font-weight: 700; font-size: 1.5rem; color: #7a1212; background: linear-gradient(#ffe27a, #ffc524); border-radius: 1.2rem; padding: .1rem .5rem; font-variant-numeric: tabular-nums; }

/* ---- Noche 4: calor y medidor ---- */
.calores { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; width: 100%; max-width: 34rem; }
.calor { display: flex; flex-direction: column; align-items: center; background: var(--crema); border: .13rem solid var(--oro); border-radius: 1rem; padding: .25rem .1rem .3rem; cursor: pointer; color: var(--tinta); box-shadow: 0 .25rem 0 #0004; line-height: 1.1; }
.calor .e { font-size: 1.4rem; } .calor b { font-size: 1rem; } .calor small { font-size: .7rem; }
.calor.sel { background: linear-gradient(#fff2a8, #ffd54a); border-color: #fff; box-shadow: 0 0 1.1rem #ffd54a, 0 .25rem 0 #b86f00; transform: translateY(-.2rem); }
.pan-meter { width: 100%; max-width: 34rem; background: var(--crema); border: .13rem solid var(--oro); border-radius: 1.1rem; padding: .3rem .6rem .35rem; text-align: center; box-shadow: 0 .2rem 0 #0004; }
.pm-estado { font-size: 1.25rem; font-weight: 700; color: #7a1212; line-height: 1.2; }
.pm-estado.lista { color: #fff; background: #2e9a3a; border-radius: 1rem; animation: latido .45s infinite; }
.pm-estado.pasada { color: #fff; background: #e08a00; border-radius: 1rem; }
.pm-estado.quemada { color: #fff; background: #c62828; border-radius: 1rem; animation: latido .3s infinite; }
.pm-barra { position: relative; display: flex; height: 1.7rem; margin: .5rem 0 .3rem; border-radius: .9rem; overflow: visible; }
.pm-barra .z { display: grid; place-items: center; font-style: normal; font-size: .62rem; font-weight: 700; color: #fff; text-shadow: 0 .05rem 0 #0008; }
.z1 { flex: 70; background: #c9b189; border-radius: .9rem 0 0 .9rem; color: #5a3a1a !important; text-shadow: none !important; }
.z2 { flex: 20; background: #e0a24a; } .z3 { flex: 22; background: #2e9a3a; } .z4 { flex: 13; background: #e08a00; } .z5 { flex: 15; background: #c62828; border-radius: 0 .9rem .9rem 0; }
.pm-marca { position: absolute; top: -.3rem; width: .45rem; height: 2.3rem; border-radius: .25rem; background: #2b1008; border: .08rem solid #fff; transform: translateX(-50%); transition: left .1s linear; }
.pm-pie { font-size: .8rem; font-weight: 600; }
.btn-sacar { animation: none; font-size: 1.5rem; min-height: 3.8rem; }
.btn-sacar.listo { background: linear-gradient(#69e07a, #1f9a35); color: #fff; border-color: #d6ffdc; box-shadow: 0 .25rem 0 #0e6a1f, 0 0 1.8rem #4cd964; animation: latido .4s infinite; }
.btn-sacar.listo .tri { color: #fff; }

/* ---- Noche 5 ---- */
.vuela { position: fixed; z-index: 90; font-size: 2rem; pointer-events: none; transform: translate(-50%,-50%); }

/* ---- Datos (personaje que habla) ---- */
.premio .av { width: 2.4rem; height: 2.4rem; object-fit: cover; object-position: top; border-radius: 50%; border: .1rem solid var(--oro); background: #fff; }
.dato-btn span { font-size: .95rem; font-weight: 700; color: #7a1212; }
.modal-caja { width: 100%; }
.modal-btns { display: flex; flex-direction: column; gap: .4rem; align-items: center; width: 100%; }
.modal-p { font-size: 1rem; line-height: 1.3; }
.dato-escena { display: flex; align-items: flex-end; gap: .4rem; text-align: left; min-height: 9rem; }
.dato-pj { height: 9.5rem; width: auto; flex: none; filter: drop-shadow(0 .3rem .2rem #0005); animation: entra-pj .5s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes entra-pj { from { transform: translateX(-3rem); opacity: 0; } to { transform: none; opacity: 1; } }
.dato-globo { position: relative; flex: 1; background: #fff; border: .15rem solid var(--oro); border-radius: 1rem; padding: .4rem .7rem .5rem; font-size: 1rem; line-height: 1.25; min-height: 6rem; margin-bottom: 1rem; }
.dato-globo::after { content: ''; position: absolute; left: -.8rem; bottom: 1rem; border: .4rem solid transparent; border-right-color: var(--oro); }
.dato-nombre { display: block; width: max-content; background: #8e1212; color: #fff3d6; border-radius: 1rem; padding: 0 .6rem; font-size: .7rem; margin-bottom: .2rem; }
.cursor { animation: parpadeo .6s steps(2) infinite; color: #a31c1c; }
@keyframes parpadeo { 50% { opacity: 0; } }

/* ---- Final y foto ---- */
.cinta-roja.ganaste { font-size: 2.1rem; animation: pop .6s both, latido 1.2s .7s infinite; }
.foto-esc .contenido { gap: .4rem; }
.visor { position: relative; width: auto; height: auto; max-width: 100%; flex: 0 1 auto; min-height: 0; border: .3rem solid #fff; border-radius: .8rem; box-shadow: 0 .4rem 1.2rem #000a; overflow: hidden; cursor: pointer; background: #000; }
.visor canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 38vh; aspect-ratio: 1000/1120; object-fit: contain; }
.visor::before { content: ''; position: absolute; inset: .5rem; border: .15rem solid #ffffffaa; border-radius: .4rem; pointer-events: none; z-index: 2; clip-path: polygon(0 0, 18% 0, 18% 2%, 2% 2%, 2% 18%, 0 18%, 0 0, 0 100%, 0 82%, 2% 82%, 2% 98%, 18% 98%, 18% 100%, 0 100%); }
.visor.revelada::before { display: none; }
.visor.revelada { cursor: default; background: #fbf6ea; border-color: #fbf6ea; transform: rotate(-1.5deg); animation: revela .7s cubic-bezier(.2,1.4,.4,1); }
.visor.revelada canvas { max-height: 42vh; aspect-ratio: 1080/1350; }
@keyframes revela { from { transform: translateY(2rem) rotate(6deg) scale(.8); opacity: 0; filter: brightness(2); } to { transform: rotate(-1.5deg); opacity: 1; filter: none; } }
.obturador { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); width: 3.6rem; height: 3.6rem; border-radius: 50%; border: .25rem solid #fff; background: #ffffff33; z-index: 3; cursor: pointer; display: grid; place-items: center; animation: latido 1.2s infinite; }
.obturador i { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #fff; }
.destello { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 5; }
.destello.on { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.foto-txt { font-size: .92rem; font-weight: 600; text-align: center; background: #fff6e4; border: .12rem solid var(--oro); border-radius: 1rem; padding: .3rem .7rem; max-width: 30rem; line-height: 1.2; }
.foto-txt b { color: #a31c1c; }
.invit { width: 100%; max-width: 28rem; text-align: center; font-size: 1.05rem; line-height: 1.3; font-weight: 500; display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.invit-ico { font-size: 3rem; line-height: 1; }
.btn.pulso { background: linear-gradient(#ff8a65, #e53935); color: #fff; border-color: #ffe0d6; box-shadow: 0 .25rem 0 #8e1212, 0 0 1.4rem #ff6b4a99; }
.btn.pulso .tri { color: #fff; }

@media (max-height: 700px) and (orientation: portrait) { .opc-alta { display: none; } .visor canvas { max-height: 34vh; } }
@media (orientation: landscape) {
  .instr { font-size: .8rem; padding: .2rem .5rem; } .instr-ico { font-size: 1.3rem; }
  .pedido-card { padding: .15rem .5rem .2rem; } .pedido-cab { font-size: .9rem; } .pedido-rec { font-size: .68rem; }
  .tok .e { font-size: 1.6rem; line-height: 1.8rem; } .tok { padding: .2rem .1rem; }
  .carrito { min-height: 3.6rem; } .chip { width: 2.1rem; height: 2.1rem; font-size: 1.2rem; }
  .tchip .e { font-size: 1.3rem; } .tchip b { font-size: .9rem; }
  .calor .e { font-size: 1.1rem; } .pm-estado { font-size: 1rem; } .pm-barra { height: 1.3rem; margin: .4rem 0 .2rem; }
  .objetivo, .aro { width: 3.8rem; height: 3.8rem; }
  .dato-pj { height: 7rem; } .dato-escena { min-height: 7rem; }
  .visor canvas { max-height: 46vh; } .visor.revelada canvas { max-height: 50vh; }
  .cinta-roja.ganaste { font-size: 1.7rem; }
  .foto-esc { flex-direction: row; }
  .opc-alta { display: flex; }
}
