/* Foodie Mesa · menú del comensal (rediseño 2026-10-18). Paleta "Midnight": fondo #121212, tarjetas #1E1E1E,
   coral #FF5A5F solo de acento y botón principal. Urbanist, radios 16–24, sin emojis ni brillos. */
:root {
  --fondo: #121212;
  --tarjeta: #1E1E1E;
  --tarjeta-2: #272727;
  --hoja: #181818;
  --coral: #FF5A5F;
  --coral-suave: rgba(255, 90, 95, 0.14);
  --sobre-coral: #1B0A0B;
  --texto: #F4F4F5;
  --tenue: rgba(244, 244, 245, 0.62);
  --tenue-2: rgba(244, 244, 245, 0.4);
  --linea: rgba(255, 255, 255, 0.08);
  --vidrio: rgba(255, 255, 255, 0.10);
  --exito: #6FDCA4;
  --sombra: 0 18px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --curva-hoja: cubic-bezier(.32, .72, 0, 1);
  --curva-salida: cubic-bezier(.2, .8, .2, 1);
  --cab-h: 64px;
  --arriba: env(safe-area-inset-top, 0px);
  --abajo: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 500 15px/1.45 'Urbanist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.ic { width: 1em; height: 1em; flex: none; display: block; }
main { max-width: 640px; margin: 0 auto; min-height: 100svh; }

/* Cabecera fija ------------------------------------------------------------------------- */
.cab {
  position: sticky; top: 0; z-index: 20; height: calc(var(--cab-h) + var(--arriba)); padding: var(--arriba) 16px 0 20px;
  display: flex; align-items: center; gap: 12px; background: var(--fondo);
}
.logo {
  width: 42px; height: 42px; border-radius: 50%; flex: none; background: var(--tarjeta-2) center / cover;
  box-shadow: 0 0 0 2px var(--fondo), 0 0 0 3px var(--linea); display: grid; place-items: center;
}
.logo i { width: 14px; height: 14px; border-radius: 50%; background: var(--coral); }
.saludo { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.saludo span { font-size: 13px; color: var(--tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saludo b { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bolsa {
  position: relative; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: var(--vidrio); color: var(--tenue); font-size: 23px; transition: background .3s, color .3s;
}
.bolsa.llena { color: var(--coral); background: var(--coral-suave); }
.bolsa .insignia {
  position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px;
  background: var(--coral); color: var(--sobre-coral); font-size: 12px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--fondo); transform: scale(0); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.bolsa.llena .insignia { transform: scale(1); }
.bolsa .punto {
  position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--exito);
  box-shadow: 0 0 0 2px var(--fondo); transform: scale(0); transition: transform .3s;
}
.bolsa.activa:not(.llena) .punto { transform: scale(1); }

/* Vistas (Menú, Mesero, Asistente) */
.vista { padding-bottom: calc(120px + var(--abajo)); }

/* Platos estrella: anillo coral si no lo has visto, gris si ya lo viste */
.historias { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 8px 20px 16px; scroll-snap-type: x mandatory; }
.historias::-webkit-scrollbar { display: none; }
.historia { flex: none; width: 74px; display: grid; justify-items: center; gap: 7px; scroll-snap-align: start; }
.anillo { width: 70px; height: 70px; border-radius: 50%; padding: 5px; background: var(--coral); transition: background .4s; }
.historia.vista-ya .anillo { background: var(--tarjeta-2); }
.anillo i { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--tarjeta-2) center / cover; box-shadow: 0 0 0 2.5px var(--fondo); }
.h-nombre { font-size: 12px; font-weight: 600; color: var(--tenue); max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Categorías: texto con línea coral que se desliza */
.cats { position: sticky; top: calc(var(--cab-h) + var(--arriba)); z-index: 15; background: var(--fondo); transition: box-shadow .2s; }
.cats.pegada { box-shadow: 0 1px 0 var(--linea), 0 10px 20px rgba(0, 0, 0, 0.35); }
.cats-in { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 20px; }
.cats-in::-webkit-scrollbar { display: none; }
.cat { position: relative; z-index: 1; flex: none; padding: 10px 10px 12px; font-weight: 600; font-size: 15px; color: var(--tenue); white-space: nowrap; transition: color .25s; }
.cat.activa { color: var(--texto); }
.ind {
  position: absolute; left: 0; bottom: 8px; height: 3px; border-radius: 3px; background: var(--coral); pointer-events: none;
  transition: transform .45s var(--curva-hoja), width .45s var(--curva-hoja);
}

/* Platos: cuadrícula de 2 columnas, solo foto, nombre y precio */
.seccion { padding: 18px 20px 6px; }
.seccion h2 { margin: 0 0 14px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plato { display: block; width: 100%; text-align: left; transition: transform .16s ease; }
.plato:active { transform: scale(.97); }
.marco-foto { position: relative; display: block; }
.foto { position: relative; display: block; aspect-ratio: 1; border-radius: 20px; background: var(--tarjeta-2) center / cover; overflow: hidden; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); }
.foto .sin { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; color: var(--tenue-2); }
.plato.agotado .foto { filter: grayscale(1) brightness(.55); }
.plato.agotado .nombre, .plato.agotado .precio { color: var(--tenue-2); }
.etq-agotado { position: absolute; z-index: 2; left: 10px; top: 10px; padding: 5px 9px; border-radius: 10px; background: rgba(0, 0, 0, 0.72); font-size: 12px; font-weight: 700; }
.cuantos {
  position: absolute; z-index: 2; right: 8px; top: 8px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px;
  background: var(--coral); color: var(--sobre-coral); font-size: 13px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45); transform: scale(0); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.cuantos.si { transform: scale(1); }
.plato .nombre { display: -webkit-box; margin-top: 10px; font-weight: 700; font-size: 15px; line-height: 1.25; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plato .precio { display: block; margin-top: 3px; font-weight: 600; color: var(--tenue); font-variant-numeric: tabular-nums; }
.vacio { margin: 24px 20px; color: var(--tenue); }
.pie-pagina { margin: 36px 16px 0; color: var(--tenue-2); font-size: 13px; text-align: center; }
.pie-pagina b { color: var(--tenue); font-weight: 700; }

.rev { opacity: 0; transform: translateY(22px) scale(.97); }
.rev.in { opacity: 1; transform: none; transition: opacity .55s ease, transform .7s var(--curva-salida); }

/* Barra inferior flotante: fondo sólido, ícono coral y línea coral arriba que se desliza ---------- */
.nav {
  position: fixed; z-index: 25; left: 50%; bottom: calc(16px + var(--abajo)); transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 608px; height: 68px; padding: 0 6px; display: flex; border-radius: 24px; overflow: hidden;
  background: var(--fondo); box-shadow: 0 0 0 1px var(--linea), var(--sombra);
}
.nav button {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--tenue-2); font-weight: 600; font-size: 12px; transition: color .3s;
}
.nav button .ic { font-size: 24px; }
.nav button.activo { color: var(--coral); }
.nav-ind { position: absolute; top: 0; left: 0; width: 40px; height: 3px; border-radius: 0 0 3px 3px; background: var(--coral); transition: transform .5s var(--curva-hoja); }

/* Mesero y Asistente */
.vista-in { padding: 12px 20px 0; display: grid; gap: 14px; align-content: start; }
.vista-in > h2 { margin: 6px 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.grande {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; text-align: left;
  padding: 18px; border-radius: 24px; background: var(--tarjeta); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3); overflow: hidden; transition: transform .16s;
}
.grande:active { transform: scale(.98); }
.grande .icono { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; background: var(--coral-suave); color: var(--coral); transition: background .4s, color .4s; }
.grande .txt b { display: block; font-size: 19px; font-weight: 700; }
.grande .txt span { color: var(--tenue); }
.grande.avisado { cursor: default; }
.grande.avisado .icono { background: var(--coral); color: var(--sobre-coral); }
.grande .onda { position: absolute; left: 50px; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--coral-suave); transform: scale(0); pointer-events: none; }
.sacudir { animation: sacudir .6s ease; }
@keyframes sacudir { 15% { transform: rotate(-16deg); } 35% { transform: rotate(13deg); } 55% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); } }
.tarjeta-info { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 20px; background: var(--tarjeta); }
.tarjeta-info > .ic { font-size: 32px; color: var(--coral); }
.tarjeta-info span { display: grid; }
.tarjeta-info b { font-size: 17px; }
.tarjeta-info span span { color: var(--tenue); }

.filtros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.filtro { display: grid; gap: 10px; padding: 14px; border-radius: 20px; background: var(--tarjeta); text-align: left; transition: background .25s, transform .16s; }
.filtro:active { transform: scale(.97); }
.filtro > .ic { font-size: 24px; color: var(--coral); }
.filtro span { display: grid; }
.filtro b { font-weight: 700; }
.filtro small { color: var(--tenue-2); font-weight: 600; font-size: 13px; }
.filtro.si { background: var(--coral-suave); }
.resultados { display: grid; gap: 12px; padding-top: 6px; scroll-margin-top: calc(var(--cab-h) + var(--arriba) + 8px); }
.resultados h3 { margin: 6px 0 0; font-size: 18px; font-weight: 700; }

/* Capas: hojas desde abajo ----------------------------------------------------------------- */
.capa { position: fixed; inset: 0; z-index: 40; }
.velo { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.velo-suave { background: rgba(0, 0, 0, 0.35); }
.panel { position: absolute; display: flex; flex-direction: column; overflow: hidden; }
.hoja {
  left: 50%; bottom: 0; width: 100%; max-width: 640px; margin-left: -320px; max-height: calc(100% - 48px - var(--arriba));
  border-radius: 26px 26px 0 0; background: var(--hoja); box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
}
@media (max-width: 640px) { .hoja { left: 0; margin-left: 0; } }
.hoja-cuenta { height: calc(100% - 48px - var(--arriba)); }
.asa { position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 26px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.asa::before { content: ''; width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); }
.cerrar { position: absolute; z-index: 4; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(18, 18, 18, 0.72); font-size: 18px; }
.desplaza { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.desplaza::-webkit-scrollbar { display: none; }

/* Detalle del plato */
.det-foto { position: relative; height: min(300px, 42svh); flex: none; background: var(--tarjeta-2) center / cover; touch-action: none; }
.det-foto video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.det-foto video.lista { opacity: 1; }
.det-foto .sin { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; color: var(--tenue-2); }
.det-cuerpo { padding: 22px 20px 24px; display: grid; gap: 16px; }
.det-cuerpo > * { animation: subir .5s var(--curva-salida) both; }
.det-cuerpo > :nth-child(2) { animation-delay: .05s; }
.det-cuerpo > :nth-child(3) { animation-delay: .1s; }
.det-cuerpo > :nth-child(4) { animation-delay: .15s; }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } }
.det-titulo { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.det-titulo h3 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.det-titulo .precio { flex: none; padding-top: 3px; font-size: 20px; font-weight: 700; color: var(--coral); font-variant-numeric: tabular-nums; }
.det-desc { margin: 0; color: var(--tenue); line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 12px; background: var(--vidrio); font-size: 13px; font-weight: 600; }
.chip .ic { font-size: 15px; color: var(--coral); }
.nota-campo { display: grid; gap: 8px; }
.nota-campo span { font-size: 13px; font-weight: 700; color: var(--tenue); letter-spacing: .04em; }
textarea {
  width: 100%; resize: none; padding: 14px 16px; border-radius: 16px; border: 0; background: var(--tarjeta); color: var(--texto);
  font: 500 16px/1.45 'Urbanist', system-ui, sans-serif;
}
textarea::placeholder { color: var(--tenue-2); }

.pie-fijo { flex: none; display: flex; gap: 12px; align-items: center; padding: 14px 16px calc(16px + var(--abajo)); background: inherit; box-shadow: 0 -1px 0 var(--linea); }
.paso { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 18px; background: var(--tarjeta); flex: none; }
.paso button { width: 42px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 18px; transition: background .2s; }
.paso button:active { background: var(--vidrio); }
.paso button:disabled { opacity: .3; }
.num { position: relative; width: 28px; height: 26px; overflow: hidden; text-align: center; font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }
.num i { position: absolute; inset: 0; font-style: normal; line-height: 26px; }
.paso.chico button { width: 36px; height: 36px; font-size: 15px; border-radius: 11px; }
.paso.chico .num { width: 22px; font-size: 16px; }

.cta {
  flex: 1; min-height: 56px; padding: 0 18px; border-radius: 18px; background: var(--coral); color: var(--sobre-coral);
  font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  box-shadow: 0 10px 24px rgba(255, 90, 95, 0.28); transition: transform .14s; white-space: nowrap;
}
.cta:active { transform: scale(.97); }
.cta:disabled { background: var(--tarjeta-2); color: var(--tenue-2); box-shadow: none; }
.cta .ic { font-size: 20px; }
.cta.chica { flex: none; min-height: 48px; margin-top: 20px; }
.cta.hecho { animation: hecho .45s ease; }
@keyframes hecho { 40% { transform: scale(.96); } }
.sec { min-height: 50px; padding: 0 18px; border-radius: 16px; background: var(--vidrio); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sec .ic { font-size: 18px; }
.sec.ancho { width: 100%; }
.sec:disabled { opacity: .6; }

/* Venta cruzada */
.sugerencia {
  left: 12px; right: 12px; bottom: calc(16px + var(--abajo)); max-width: 616px; margin: 0 auto;
  border-radius: 26px; background: #1C1C1C; box-shadow: 0 0 0 1px var(--linea), 0 24px 60px rgba(0, 0, 0, 0.7);
  padding: 20px 18px 18px; display: grid; gap: 16px;
}
.sug-tit { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.sug-fila { display: flex; gap: 14px; align-items: center; }
.sug-fila .foto { width: 76px; height: 76px; border-radius: 18px; flex: none; }
.sug-fila .foto .sin { font-size: 28px; }
.sug-fila b { display: block; font-size: 17px; font-weight: 700; }
.sug-fila span { color: var(--tenue); font-weight: 600; }
.sug-botones { display: flex; gap: 10px; }
.sug-botones .cta { min-height: 52px; font-size: 15px; }
.tiempo { position: absolute; left: 24px; right: 24px; bottom: 7px; height: 3px; border-radius: 2px; background: var(--linea); overflow: hidden; }
.tiempo i { display: block; height: 100%; background: var(--tenue-2); transform-origin: left; animation: tiempo 9s linear forwards; }
@keyframes tiempo { to { transform: scaleX(0); } }

/* Mi cuenta */
.cuenta-cab { padding: 26px 66px 6px 20px; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.cuenta-cab h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.cuenta-cab span { color: var(--tenue); font-weight: 600; white-space: nowrap; }
.bloque { padding: 14px 20px 6px; display: grid; gap: 12px; }
.bloque h4 { margin: 0; font-size: 13px; font-weight: 700; color: var(--tenue); letter-spacing: .1em; text-transform: uppercase; }
.linea { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 18px; background: var(--tarjeta); overflow: hidden; }
.linea .foto { width: 54px; height: 54px; border-radius: 14px; box-shadow: none; }
.linea .foto .sin { font-size: 22px; }
.linea .txt { display: grid; gap: 2px; min-width: 0; }
.linea b { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linea small { color: var(--tenue-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linea .sub { color: var(--tenue); font-weight: 600; font-variant-numeric: tabular-nums; }
.mas-platos { justify-self: start; }
.totales { display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: var(--tarjeta); font-variant-numeric: tabular-nums; }
.totales div { display: flex; justify-content: space-between; gap: 12px; color: var(--tenue); font-weight: 600; }
.totales .final { color: var(--texto); font-size: 20px; font-weight: 800; padding-top: 8px; border-top: 1px solid var(--linea); }
.totales .final.sin-linea { padding-top: 0; border-top: 0; }
.totales .final b { color: var(--coral); }
.vacia { padding: 60px 30px; display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--tenue); }
.vacia > .ic { font-size: 54px; color: var(--tenue-2); }
.vacia b { color: var(--texto); font-size: 18px; }
.orden { padding: 14px; border-radius: 18px; background: var(--tarjeta); display: grid; gap: 10px; }
.orden-cab { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.orden-cab small { color: var(--tenue-2); font-weight: 600; font-size: 13px; }
.barra-pasos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.barra-pasos i { position: relative; height: 4px; border-radius: 2px; background: var(--linea); overflow: hidden; }
.barra-pasos i::after { content: ''; position: absolute; inset: 0; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--curva-salida); }
.barra-pasos i.si::after { transform: scaleX(1); }
.orden-estado { display: flex; align-items: center; gap: 8px; color: var(--coral); font-weight: 600; font-size: 14px; }
.orden.por_confirmar .orden-estado { color: var(--tenue); }
.orden.rechazado .orden-estado { color: var(--tenue); }
.orden.rechazado .orden-items { text-decoration: line-through; }
.orden-items { display: grid; gap: 3px; color: var(--tenue); font-size: 14px; }
.orden-items div { display: flex; justify-content: space-between; gap: 12px; }
.orden-items i { font-style: normal; color: var(--tenue-2); }
.motivo { margin: 0; color: var(--tenue); font-size: 14px; }
.error { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--coral-suave); }
.letra-chica { margin: 0; color: var(--tenue-2); font-size: 13px; text-align: center; }

/* Calificar */
.calificar { padding: 18px; border-radius: 22px; background: var(--tarjeta); display: grid; gap: 14px; }
.calif-tit { font-size: 17px; }
.caras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cara { display: grid; justify-items: center; gap: 4px; padding: 8px 0; border-radius: 14px; color: var(--tenue-2); font-size: 12px; font-weight: 600; transition: color .2s, background .2s; }
.cara .ic { font-size: 32px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.cara.si { color: var(--coral); background: var(--coral-suave); }
.cara.si .ic { transform: scale(1.12); }
.calificado { display: flex; align-items: center; gap: 12px; }
.calificado > .ic { font-size: 40px; color: var(--coral); }
.calificado div { flex: 1; min-width: 0; display: grid; }
.calificado span { color: var(--tenue); font-size: 14px; }
.calificado button { color: var(--tenue); font-size: 14px; font-weight: 600; text-decoration: underline; padding: 8px 0 8px 8px; }
.en-foodie { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--linea); }
.en-foodie p { margin: 0; color: var(--tenue); }
.en-foodie p b { color: var(--texto); }
.sello { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.sello .ic { font-size: 18px; color: var(--coral); }

/* A mitad de la comida (si el local lo activa) */
.mitad {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--abajo));
  width: calc(100% - 32px); max-width: 608px; padding: 14px 12px 12px 16px; border-radius: 22px; background: #1C1C1C;
  box-shadow: 0 0 0 1px var(--linea), var(--sombra);
}
.fila-mitad { display: flex; align-items: center; gap: 8px; }
.fila-mitad b { flex: 1; }
.quitar { width: 40px; height: 40px; display: grid; place-items: center; color: var(--tenue); font-size: 18px; }
.mitad .caras { grid-template-columns: repeat(3, 1fr); margin-top: 6px; }

/* Envío a cocina y seguimiento ---------------------------------------------------------------- */
.envio {
  position: fixed; inset: 0; z-index: 60; background: var(--fondo); display: grid; align-content: center; justify-items: center;
  gap: 18px; padding: calc(30px + var(--arriba)) 26px calc(30px + var(--abajo)); text-align: center; overflow-y: auto;
}
.envio > * { width: 100%; max-width: 440px; }
.envio.seguimiento { align-content: start; padding-top: calc(56px + var(--arriba)); }
.envio h3 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.envio p { margin: 0; color: var(--tenue); line-height: 1.5; }
.textos { display: grid; gap: 8px; }
.escena { position: relative; width: 220px !important; height: 200px; display: grid; place-items: center; }
.envio.seguimiento .escena { transform: scale(.62); margin: -40px 0 -46px; }
.puntos i { display: inline-block; font-style: normal; animation: punto 1.2s infinite; }
.puntos i:nth-child(2) { animation-delay: .2s; }
.puntos i:nth-child(3) { animation-delay: .4s; }
@keyframes punto { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.ranura { position: absolute; top: 14px; width: 200px; height: 14px; border-radius: 7px; background: #000; box-shadow: inset 0 0 0 1px var(--linea); z-index: 2; }
.comanda-caja { position: absolute; top: 21px; width: 180px; height: 180px; overflow: hidden; }
.comanda {
  width: 180px; padding: 16px 14px 22px; background: #F4F1EC; color: #1D1D1D; text-align: left; font-size: 12px; font-weight: 700;
  display: grid; gap: 7px; transform: translateY(-100%); animation: imprimir 1.8s .2s steps(14) forwards;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 8px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 8px repeat-x;
}
.comanda .tit { padding-bottom: 6px; border-bottom: 1px dashed #999; font-size: 11px; letter-spacing: .14em; text-align: center; }
.c-fila { display: flex; justify-content: space-between; gap: 8px; }
.c-fila span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-fila span:last-child { white-space: nowrap; }
@keyframes imprimir { to { transform: translateY(0); } }
.escena.sale .comanda-caja { animation: salir .7s .1s cubic-bezier(.5, 0, .75, 0) forwards; }
@keyframes salir { to { transform: translateY(-260px) rotate(-6deg); opacity: 0; } }
.escena.ok .ranura { opacity: 0; transition: opacity .3s; }
.escena .listo { position: absolute; inset: 0; display: grid; place-items: center; }
.escena .listo i { width: 92px; height: 92px; border-radius: 50%; background: var(--coral); color: var(--sobre-coral); display: grid; place-items: center; font-size: 46px; transform: scale(0); }
.escena.ok .listo i { animation: aparece .55s cubic-bezier(.34, 1.56, .64, 1) forwards; }
.escena.error .listo i { background: var(--tarjeta-2); color: var(--texto); }
@keyframes aparece { to { transform: scale(1); } }

/* Campana cuando el pedido está listo */
.cloche { width: 200px; height: 190px; overflow: visible; color: var(--tenue-2); }
.cloche .tapa { fill: var(--coral); transform-origin: 160px 132px; animation: tapa 1.6s ease-in-out infinite; }
@keyframes tapa { 0%, 100% { transform: none; } 45%, 60% { transform: translate(6px, -16px) rotate(9deg); } }
.cloche .plato-base { fill: var(--tarjeta-2); }
.cloche .plato-borde { fill: #3A3A3A; }
.cloche .vapor path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: vapor 1.6s ease-in-out infinite; }
.cloche .vapor path:nth-child(2) { animation-delay: .2s; }
.cloche .vapor path:nth-child(3) { animation-delay: .4s; }
@keyframes vapor { 0% { stroke-dashoffset: 60; opacity: 0; } 30% { opacity: 1; } 70% { stroke-dashoffset: 0; opacity: .9; } 100% { stroke-dashoffset: -60; opacity: 0; } }

.seguir { display: grid; padding: 8px 18px; border-radius: 22px; background: var(--tarjeta); text-align: left; margin-top: 6px; }
.etapa { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 58px; }
.seguir.entra .etapa { animation: subir .5s var(--curva-salida) both; }
.seguir.entra .etapa:nth-child(2) { animation-delay: .08s; }
.seguir.entra .etapa:nth-child(3) { animation-delay: .16s; }
.seguir.entra .etapa:nth-child(4) { animation-delay: .24s; }
.etapa + .etapa::before { content: ''; position: absolute; left: 16px; top: -12px; height: 24px; width: 2px; background: var(--linea); }
.etapa.hecha + .etapa::before { background: var(--coral); transition: background .5s; }
.bola { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tarjeta-2); color: var(--tenue-2); font-size: 17px; transition: background .4s, color .4s; }
.etapa.hecha .bola { background: var(--coral); color: var(--sobre-coral); }
.etapa.ahora .bola { background: var(--coral-suave); color: var(--coral); }
.giro { position: absolute; inset: -3px; width: 40px; height: 40px; animation: girar 1.1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.etapa b { display: block; font-weight: 700; }
.etapa small { color: var(--tenue-2); font-size: 13px; }
.etapa:not(.hecha):not(.ahora) b { color: var(--tenue-2); }
.acciones { display: grid; gap: 10px; margin-top: 4px; animation: subir .5s .3s var(--curva-salida) both; }

/* Visor de platos estrella */
.visor { position: fixed; inset: 0; z-index: 70; background: #000; }
.visor video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.visor::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0) 20%, rgba(0,0,0,0) 55%, rgba(0,0,0,.85)); }
.visor .barras { position: absolute; z-index: 2; top: calc(14px + var(--arriba)); left: 12px; right: 12px; display: flex; gap: 4px; }
.visor .barras i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.visor .barras b { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.visor .barras i.lleno b { transform: scaleX(1); }
.visor .zona { position: absolute; z-index: 1; top: 70px; bottom: 160px; width: 40%; }
.visor .zona.izq { left: 0; }
.visor .zona.der { right: 0; }
.visor .cerrar { top: calc(28px + var(--arriba)); }
.visor .info { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: calc(28px + var(--abajo)); display: grid; gap: 12px; max-width: 600px; margin: 0 auto; }
.visor .info span { color: rgba(255, 255, 255, 0.8); font-weight: 600; }
.visor .info b { font-size: 26px; font-weight: 800; }

/* Avisos cortos (encima de la barra) */
.avisos { position: fixed; z-index: 80; left: 16px; right: 16px; bottom: calc(100px + var(--abajo)); display: grid; justify-items: center; pointer-events: none; }
.aviso { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 16px; border-radius: 16px; background: #2B2B2B; box-shadow: var(--sombra); font-weight: 600; font-size: 14px; }
.aviso .ic { font-size: 19px; color: var(--exito); }

/* Animaciones que viajan sobre la página */
.heroe { position: fixed; z-index: 45; background: var(--tarjeta-2) center / cover; pointer-events: none; }
.vuela { position: fixed; z-index: 90; left: 0; top: 0; pointer-events: none; }
.vuela i { display: block; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--tarjeta-2) center / cover; box-shadow: 0 0 0 3px var(--fondo), 0 10px 24px rgba(0, 0, 0, 0.6); }
.vuela i.sin-foto { background: var(--coral); }

/* Cargando y estados */
.esqueleto { padding: calc(14px + var(--arriba)) 20px 24px; display: grid; gap: 16px; }
.esq-cab { display: flex; align-items: center; gap: 12px; height: 50px; }
.esq-cab i { width: 42px; height: 42px; border-radius: 50%; background: var(--tarjeta); }
.esq-cab b { width: 50%; height: 22px; border-radius: 8px; background: var(--tarjeta); }
.esq-historias { display: flex; gap: 14px; }
.esq-historias i { width: 70px; height: 70px; border-radius: 50%; background: var(--tarjeta); }
.esq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.esq-grid i { aspect-ratio: 1; border-radius: 20px; background: var(--tarjeta); }
.estado { min-height: 80svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.estado > .ic { font-size: 48px; color: var(--tenue-2); }
.estado h1 { margin: 16px 0 6px; font-size: 22px; }
.estado p { margin: 0; color: var(--tenue); max-width: 320px; }
.marca { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 700; font-size: 18px; }
.marca i { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.aviso-js { padding: 24px 16px; }

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