/* Pantalla del chofer: legible a 1 m, de reojo, de día y de noche. */

:root {
  --tinta: #071017; /* texto oscuro sobre amarillo/verde/azul */
  --fase: var(--amarillo);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
body[data-fase="chofer"] {
  --fase: var(--verde);
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.25;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
body {
  background:
    radial-gradient(
      120% 60% at 50% 0%,
      color-mix(in srgb, var(--fase) 14%, transparent),
      transparent 70%
    ),
    var(--fondo);
  transition: background-color 0.6s;
}
body[data-vista="inicio"],
body[data-vista="terminos"],
body[data-vista="corte"],
body[data-vista="cargando"],
body[data-vista="error"] {
  --fase: var(--verde);
}
[hidden] {
  display: none !important;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 3px;
}
.tenue {
  color: var(--tenue);
}

.vista {
  height: 100dvh;
  width: 100vw;
  padding: calc(12px + var(--safe-top)) 16px calc(12px + var(--safe-bottom));
}
.centro {
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

/* ───────── Botones comunes ───────── */
.b-grande {
  display: block;
  width: 100%;
  min-height: 72px;
  border: 0;
  border-radius: var(--radio);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--tinta);
  background: var(--texto);
  transition:
    transform 0.08s,
    filter 0.15s;
}
.b-grande:active {
  transform: scale(0.98);
}
.b-iniciar {
  background: var(--verde);
  min-height: 96px;
  font-size: 32px;
  box-shadow: 0 10px 40px color-mix(in srgb, var(--verde) 35%, transparent);
}
.b-peligro {
  background: var(--rosa);
  color: #fff;
}
.b-neutro {
  background: var(--panel-2);
  color: var(--texto);
  border: 2px solid var(--borde);
}
.b-icono {
  flex: none;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--tenue);
}
.b-icono svg {
  width: 28px;
  height: 28px;
}
.b-icono:active {
  background: var(--panel-2);
}
#b-voz .voz-off,
#b-voz.apagada .voz-on {
  display: none;
}
#b-voz.apagada .voz-off {
  display: inline;
}
#b-voz.apagada {
  color: var(--rosa);
}

/* ───────── Marca ───────── */
.marca {
  display: flex;
  justify-content: center;
}
.logo {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--borde);
}
.logo::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amarillo) 50%, var(--verde) 50%);
  vertical-align: 1px;
}

/* ───────── Cargando / error ───────── */
.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 5px solid var(--borde);
  border-top-color: var(--verde);
  animation: girar 0.9s linear infinite;
}
@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}
.error-icono {
  font-size: 56px;
  margin: 0;
}
.error-titulo {
  font-size: 28px;
  margin: 0;
}
.error-texto {
  font-size: 20px;
  color: var(--tenue);
  max-width: 28ch;
  margin: 0;
}

/* ───────── Inicio ───────── */
.inicio {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.inicio-cuerpo {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.hola {
  margin: 0;
  font-size: 24px;
  color: var(--tenue);
}
.i-nombre {
  margin: 0;
  font-size: clamp(40px, 12vw, 64px);
  line-height: 1.05;
  font-weight: 900;
}
.i-unidad {
  margin: 8px 0 18px;
  font-size: 20px;
  color: var(--tenue);
}
.i-unidad b {
  color: var(--texto);
}
.i-cuenta {
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 10px;
  padding: 18px 22px;
  border-radius: var(--radio);
  background: var(--panel);
  border: 2px solid color-mix(in srgb, var(--amarillo) 60%, var(--borde));
}
.i-cuenta-et {
  font-size: 22px;
}
.i-cuenta b {
  font-size: 44px;
  font-weight: 900;
  color: var(--amarillo);
}
.i-dia {
  font-size: 22px;
  color: var(--tenue);
}
.aviso {
  margin: 14px auto 0;
  max-width: 30ch;
  padding: 12px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--amarillo) 14%, var(--panel));
  font-size: 17px;
}

/* ───────── Términos ───────── */
.terminos {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  user-select: auto;
  -webkit-user-select: auto;
}
.t-titulo {
  margin: 4px 0 0;
  font-size: 32px;
  font-weight: 900;
}
.t-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.t-lista li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: var(--panel);
  font-size: 19px;
}
.t-ico {
  font-size: 26px;
  line-height: 1;
}
.t-enlace {
  color: var(--azul);
  font-size: 18px;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.t-form {
  display: grid;
  gap: 14px;
  margin-top: auto;
}
.t-casilla {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  font-size: 20px;
  font-weight: 700;
}
.t-casilla input {
  width: 32px;
  height: 32px;
  accent-color: var(--verde);
  flex: none;
}
.t-nombre {
  display: grid;
  gap: 6px;
  font-size: 17px;
  color: var(--tenue);
}
.t-nombre input {
  min-height: 56px;
  font: inherit;
  font-size: 22px;
  color: var(--texto);
  background: var(--panel);
  border: 2px solid var(--borde);
  border-radius: 14px;
  padding: 0 14px;
}

/* ───────── Cobro ───────── */
.cobro {
  --qr: clamp(60vmin, calc(100dvh - 486px), 88vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "top" "qr" "estado";
  row-gap: 8px;
  padding-top: calc(4px + var(--safe-top));
}
.c-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 56px;
}
.c-unidad {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--tenue);
}
.c-unidad b {
  color: var(--texto);
  margin-right: 6px;
}
.c-qr-zona {
  grid-area: qr;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.c-paga {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
}
.c-paga .num {
  color: var(--fase);
  transition: color 0.6s;
}
.c-marco {
  position: relative;
  width: var(--qr);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 26px;
  background: #fff;
  border: 10px solid var(--fase);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--fase) 25%, transparent),
    0 18px 60px color-mix(in srgb, var(--fase) 30%, transparent);
  transition:
    border-color 0.6s,
    box-shadow 0.6s;
}
.c-qr,
.c-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.c-activando {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  color: var(--tinta);
  font-size: 20px;
  font-weight: 700;
}
.c-activando p {
  margin: 0;
}
.c-activando-ico {
  font-size: 44px;
}
.c-escanea {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: var(--texto);
  opacity: 0.85;
}

/* Tarjeta de pago: se pone encima del QR */
.tarjeta {
  position: absolute;
  inset: -10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 26px;
  background: var(--fase);
  color: var(--tinta);
  text-align: center;
  box-shadow: 0 20px 70px color-mix(in srgb, var(--fase) 55%, transparent);
}
.tarjeta-check {
  display: grid;
  place-items: center;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tinta);
  color: var(--fase);
  font-size: calc(var(--qr) * 0.17);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}
.tarjeta-pagado {
  font-size: calc(var(--qr) * 0.11);
  font-weight: 900;
  line-height: 1;
}
.tarjeta-monto {
  font-size: calc(var(--qr) * 0.22);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}
.tarjeta-banco {
  font-size: calc(var(--qr) * 0.08);
  font-weight: 800;
  min-height: 1em;
  opacity: 0.85;
}
.tarjeta.entra {
  animation: tarjeta-entra 0.28s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.tarjeta.entra .tarjeta-check {
  animation: check-pop 0.45s 0.08s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.tarjeta.sale {
  animation: tarjeta-sale 0.18s ease-in both;
}
@keyframes tarjeta-entra {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes check-pop {
  from {
    transform: scale(0.2) rotate(-30deg);
  }
  to {
    transform: none;
  }
}
@keyframes tarjeta-sale {
  to {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* Estado: cuenta, lo tuyo, botones */
.c-estado {
  grid-area: estado;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.c-cuenta {
  padding: 10px 14px 10px;
  border-radius: var(--radio);
  background: var(--panel);
}
.c-cuenta-fila {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.c-cuenta-de {
  font-size: 19px;
  font-weight: 700;
}
.c-falta {
  font-size: 26px;
  font-weight: 900;
  color: var(--amarillo);
  white-space: nowrap;
}
body[data-fase="chofer"] .c-falta {
  color: var(--verde);
}
.barra {
  height: 16px;
  margin: 8px 0 6px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
}
.barra-relleno {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--amarillo);
  transition:
    width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.6s;
}
body[data-fase="chofer"] .barra-relleno {
  background: linear-gradient(90deg, var(--amarillo), var(--verde));
}
.c-cuenta-txt {
  margin: 0;
  font-size: 17px;
  color: var(--tenue);
}
.c-tuyo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 0 4px;
}
.c-tuyo-et {
  font-size: 22px;
  font-weight: 700;
}
.c-tuyo-monto {
  font-size: 40px;
  font-weight: 900;
  color: var(--verde);
  line-height: 1;
}
.c-pasajes {
  margin: 0;
  padding: 0 4px;
  font-size: 18px;
  color: var(--tenue);
}
.c-botones {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.b-efectivo,
.b-menos {
  min-height: 76px;
  border: 0;
  border-radius: var(--radio);
  font-weight: 900;
  transition: transform 0.08s;
}
.b-efectivo {
  flex: 1;
  font-size: 30px;
  color: var(--tinta);
  background: var(--azul);
  box-shadow: 0 8px 30px color-mix(in srgb, var(--azul) 30%, transparent);
}
.b-menos {
  flex: none;
  width: 76px;
  font-size: 24px;
  color: var(--texto);
  background: var(--panel-2);
  border: 2px solid var(--borde);
}
.b-efectivo:active,
.b-menos:active {
  transform: scale(0.97);
}
.toque {
  animation: toque 0.25s ease-out;
}
@keyframes toque {
  40% {
    transform: scale(0.95);
    filter: brightness(1.25);
  }
}
.b-cerrar {
  align-self: center;
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  background: transparent;
  color: var(--tenue);
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.b-sonido {
  position: fixed;
  left: 50%;
  top: calc(4px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 5;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--texto);
  color: var(--tinta);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.5);
  white-space: nowrap;
}

/* ───────── Corte ───────── */
.corte {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  overflow-y: auto;
}
.k-titulo {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--tenue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.k-principal {
  padding: 22px 16px;
  border-radius: var(--radio);
  background: var(--amarillo);
  color: var(--tinta);
}
.k-principal p {
  margin: 0;
}
.k-linea1,
.k-linea2 {
  font-size: 26px;
  font-weight: 800;
}
.k-monto {
  display: block;
  font-size: clamp(64px, 20vw, 104px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.k-principal.k-nada {
  background: var(--verde);
}
.k-nada .k-linea1 {
  font-size: 64px;
  line-height: 1;
}
.k-nada .k-monto {
  display: none;
}
.k-nada .k-linea2 {
  font-size: 30px;
  margin-top: 6px;
}
.k-tuyo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 18px;
  border-radius: var(--radio);
  background: var(--panel);
  font-size: 22px;
  font-weight: 700;
}
.k-tuyo b {
  font-size: 44px;
  font-weight: 900;
  color: var(--verde);
}
.k-detalle {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0;
  padding: 0 18px;
  text-align: left;
  font-size: 18px;
}
.k-detalle dt {
  color: var(--tenue);
}
.k-detalle dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.b-listo {
  margin-top: auto;
}

/* ───────── Cuenta completa ───────── */
.celebra {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--amarillo);
  color: var(--tinta);
  text-align: center;
}
.celebra-verde {
  position: absolute;
  inset: 0;
  background: var(--verde);
  clip-path: circle(0% at 50% 55%);
}
.celebra.entra .celebra-verde {
  animation: barrido 0.95s 0.25s cubic-bezier(0.7, 0, 0.25, 1) forwards;
}
@keyframes barrido {
  to {
    clip-path: circle(150% at 50% 55%);
  }
}
.celebra-texto {
  position: relative;
  z-index: 2;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Halo verde detrás del texto: el confeti pasa por detrás y no tapa las letras. Aparece cuando
   el barrido verde ya cubrió la pantalla, así no se nota sobre el amarillo. */
.celebra-texto::before {
  content: "";
  position: absolute;
  inset: -14% -18%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--verde) 72%, transparent);
  opacity: 0;
  pointer-events: none;
}
.celebra.entra .celebra-texto::before {
  animation: halo 0.3s 0.85s ease-out forwards;
}
@keyframes halo {
  to {
    opacity: 1;
  }
}
.celebra-check {
  display: grid;
  place-items: center;
  width: clamp(88px, 26vmin, 150px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tinta);
  color: var(--verde);
  font-size: clamp(56px, 16vmin, 96px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 14px;
}
.celebra-titulo {
  margin: 0;
  text-wrap: balance;
  font-size: clamp(48px, 13vw, 112px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}
.celebra-sub {
  margin: 16px 0 0;
  text-wrap: balance;
  max-width: 22ch;
  font-size: clamp(24px, 6.4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
}
.celebra.entra .celebra-check {
  animation: pop 0.6s 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.celebra.entra .celebra-titulo {
  animation: pop 0.6s 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.celebra.entra .celebra-sub {
  animation: sube 0.5s 0.95s ease-out both;
}
.celebra.sale {
  animation: desvanece 0.42s ease-in forwards;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sube {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes desvanece {
  to {
    opacity: 0;
    transform: scale(1.04);
  }
}
.confeti {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.confeti i {
  position: absolute;
  top: -24px;
  left: var(--x);
  width: var(--w);
  height: calc(var(--w) * 1.6);
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  animation: cae var(--t) var(--d) cubic-bezier(0.3, 0.6, 0.5, 1) forwards;
}
@keyframes cae {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), 105dvh) rotate(var(--r));
  }
}

/* ───────── Modales, toast, reconectando, modo prueba ───────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  background: rgb(0 0 0 / 0.72);
}
.modal-caja {
  width: min(100%, 480px);
  display: grid;
  gap: 12px;
  padding: 22px 18px 18px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--borde);
}
.modal-titulo {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
}
.modal-texto {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--tenue);
}
.modal .b-grande {
  min-height: 64px;
  font-size: 22px;
}
.h-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.h-lista li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "hora banco monto" "hora para monto";
  column-gap: 14px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--borde);
}
.h-lista li.h-vacio {
  display: block;
  color: var(--tenue);
  border: 0;
}
.h-hora {
  grid-area: hora;
  font-size: 20px;
  font-weight: 700;
}
.h-banco {
  grid-area: banco;
  font-size: 19px;
}
.h-para {
  grid-area: para;
  font-size: 15px;
  color: var(--tenue);
}
.h-chofer {
  color: var(--verde);
}
.h-monto {
  grid-area: monto;
  font-size: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(48px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--rosa);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.5);
  animation: baja 0.25s ease-out;
}
.toast[data-tipo="info"] {
  background: var(--texto);
  color: var(--tinta);
}
@keyframes baja {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}

.reconectando {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: calc(40px + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--rosa);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.punto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  animation: late 1s ease-in-out infinite;
}
@keyframes late {
  50% {
    opacity: 0.25;
  }
}

.mock {
  position: fixed;
  left: 8px;
  bottom: calc(8px + var(--safe-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.75;
}
.mock-insignia {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px dashed var(--tenue);
  color: var(--tenue);
  font-size: 12px;
  font-weight: 700;
}
.mock-boton {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--texto);
  font-size: 13px;
  font-weight: 700;
}
.mock:hover {
  opacity: 1;
}
body.con-mock .vista {
  padding-bottom: calc(48px + var(--safe-bottom));
}

/* ───────── Horizontal: QR a la izquierda, estado a la derecha ───────── */
@media (orientation: landscape) and (max-height: 640px) {
  .vista {
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
  }
  .cobro {
    --qr: clamp(60vmin, calc(100dvh - 104px), 46vw);
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "qr top" "qr estado";
    column-gap: 20px;
    row-gap: 4px;
    padding-top: calc(8px + var(--safe-top));
    padding-bottom: calc(8px + var(--safe-bottom));
  }
  .c-qr-zona {
    justify-content: center;
    gap: 6px;
  }
  .c-paga {
    font-size: 24px;
  }
  .c-escanea {
    font-size: 16px;
  }
  .c-top {
    min-height: 48px;
  }
  .b-icono {
    width: 48px;
    height: 48px;
  }
  .c-estado {
    gap: 6px;
  }
  .c-cuenta {
    padding: 8px 12px;
  }
  .barra {
    margin: 6px 0 4px;
  }
  .c-tuyo-monto {
    font-size: 36px;
  }
  .b-efectivo,
  .b-menos {
    min-height: 72px;
  }
  .b-cerrar {
    min-height: 44px;
  }
  .inicio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    align-items: center;
    column-gap: 24px;
  }
  .inicio .marca {
    grid-column: 1 / -1;
  }
  .i-nombre {
    font-size: 44px;
  }
  .i-unidad {
    margin: 4px 0 10px;
    font-size: 18px;
  }
  .i-cuenta {
    padding: 10px 16px;
  }
  .i-cuenta b {
    font-size: 36px;
  }
  .corte {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 10px 20px;
    align-items: stretch;
  }
  .k-titulo {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 16px;
  }
  .k-principal {
    grid-row: 2 / 5;
    display: grid;
    place-content: center;
    padding: 12px;
  }
  .k-monto {
    font-size: 72px;
  }
  .k-tuyo {
    padding: 10px 16px;
  }
  .k-tuyo b {
    font-size: 36px;
  }
  .k-detalle {
    font-size: 17px;
    align-content: center;
  }
  .b-listo {
    grid-column: 2;
    min-height: 64px;
  }
  .celebra-titulo {
    font-size: clamp(48px, 9vw, 96px);
  }
  .celebra-sub {
    max-width: 30ch;
    font-size: clamp(22px, 4vw, 34px);
  }
  .celebra-check {
    width: 20vmin;
    font-size: 12vmin;
    margin-bottom: 8px;
  }
  .modal {
    place-items: center;
  }
  .modal-caja {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  .terminos {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 8px 24px;
    align-content: start;
  }
  .terminos .marca {
    grid-column: 1 / -1;
  }
  .t-titulo {
    grid-column: 1;
    margin: 0;
    font-size: 26px;
  }
  .t-lista {
    grid-column: 1;
    gap: 6px;
  }
  .t-lista li {
    padding: 8px 12px;
    font-size: 17px;
  }
  .t-enlace {
    grid-column: 1;
  }
  .t-form {
    grid-column: 2;
    grid-row: 2 / 5;
    align-self: center;
    margin: 0;
  }
  .t-form .b-grande {
    min-height: 72px;
    font-size: 26px;
  }
  .mock {
    left: auto;
    right: 8px;
  }
  .b-sonido {
    left: auto;
    right: 120px;
    transform: none;
  }
  body.con-mock .vista {
    padding-bottom: calc(8px + var(--safe-bottom));
  }
  body.con-mock .corte {
    padding-bottom: calc(48px + var(--safe-bottom));
  }
  body.con-mock .b-cerrar {
    align-self: flex-start;
  }
}

/* Pantallas muy bajitas en vertical (barras del navegador): se compacta */
@media (orientation: portrait) and (max-height: 760px) {
  .cobro {
    --qr: clamp(60vmin, calc(100dvh - 450px), 88vw);
    row-gap: 4px;
  }
  .c-paga {
    font-size: 26px;
  }
  .c-tuyo-monto {
    font-size: 34px;
  }
  .b-efectivo,
  .b-menos {
    min-height: 72px;
  }
  .b-cerrar {
    min-height: 48px;
  }
}

/* ───────── Movimiento reducido ───────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .celebra-verde {
    clip-path: none;
  }
  .celebra-texto::before {
    opacity: 1;
  }
  .confeti {
    display: none;
  }
  .spinner {
    animation: none;
  }
}
