/* =========================================================================
   Clari's Cake Shop · App de clientes (estilos propios; tokens y componentes en theme.css)
   Mobile-first (360 px), con animaciones suaves y respeto a prefers-reduced-motion.
   ========================================================================= */

/* ---------- Base de la app ---------- */
body.app {
  overflow-x: hidden;
  background-color: var(--cream-50);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(160, 124, 20, .07) 1px, transparent 1.6px),
    radial-gradient(1100px 520px at 100% -8%, rgba(48, 162, 154, .13), transparent 62%),
    radial-gradient(900px 480px at -12% 6%, rgba(211, 170, 46, .14), transparent 60%),
    linear-gradient(180deg, #fdf9ee 0%, var(--cream-50) 45%, #f9f1dc 100%);
  background-size: 22px 22px, auto, auto, auto;
}

.salto {
  position: absolute; left: 12px; top: -80px; z-index: 300;
  padding: 10px 16px; border-radius: var(--r-md);
  background: var(--teal-700); color: #fff; font-weight: 700; text-decoration: none;
  transition: top .2s var(--ease-out);
}
.salto:focus { top: 12px; }

.app-main {
  display: block;
  min-height: calc(100dvh - var(--header-h));
  padding: var(--s-5) 0 calc(var(--s-10) + var(--safe-bottom));
  outline: none;
  /* Al devolverle el foco (p. ej. al cerrar un modal) no debe quedar debajo del encabezado fijo. */
  scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}
body.con-carrito .app-main,
body.con-barra .app-main { padding-bottom: calc(132px + var(--safe-bottom)); }
body.con-carrito .toasts,
body.con-barra .toasts { bottom: calc(104px + var(--safe-bottom)); }

.vista-entrar { animation: vista-entrar .42s var(--ease-out) backwards; }
/* Contenedores que se llenan después (avisos, sellos…) no dejan huecos mientras están vacíos. */
.stack > div:empty { display: none; }
.container--app { max-width: 880px; }

/* Objetivos táctiles de al menos 44 px */
body.app .btn--sm { min-height: 44px; }
body.app .stepper__btn { width: 44px; height: 44px; }
.btn > span[aria-hidden="true"]:last-child { transition: transform .2s var(--ease-out); }
.btn:hover > span[aria-hidden="true"]:last-child { transform: translateX(3px); }

@media (max-width: 400px) {
  body.app .card { padding: var(--s-4); }
}

.sin-js { max-width: 480px; margin: 40px auto; padding: 0 var(--s-4); text-align: center; font-weight: 700; }

/* ---------- Pantalla de arranque ---------- */
.arranque {
  min-height: 60vh;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  color: var(--text-muted); font-family: var(--font-head); font-weight: 500;
}
.arranque p { margin: 0; }
.arranque__logo { width: 109px; height: auto; animation: flotar 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(29, 52, 49, .15)); }
.arranque-error { padding-top: var(--s-8); text-align: center; }
.arranque-error .arranque__logo { margin: 0 auto; }
.arranque-error .empty { padding-top: var(--s-5); }

/* ---------- Encabezado ---------- */
.app-header {
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(var(--s-4), env(safe-area-inset-left, 0px));
  padding-right: max(var(--s-4), env(safe-area-inset-right, 0px));
}
.encabezado {
  width: 100%; max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
}
.encabezado__marca {
  display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0;
  color: inherit; text-decoration: none; border-radius: var(--r-md);
}
.encabezado__marca .app-header__logo { height: 46px; width: auto; transition: transform .3s var(--ease-spring); }
.encabezado__marca:hover .app-header__logo { transform: rotate(-4deg) scale(1.05); }
.encabezado__marca .app-header__title { min-width: 0; }
.encabezado__marca .app-header__title small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.encabezado__nombre-tienda {
  display: block; font-family: var(--font-brand); font-weight: 400; font-size: 1.12rem;
  color: var(--teal-500); line-height: 1.25; white-space: nowrap;
}
.encabezado__acciones { position: relative; flex: none; }

.menu-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 4px 14px 4px 4px;
  border-radius: var(--r-pill); border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink-900); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .15s var(--ease-out);
}
.menu-btn:hover { border-color: var(--teal-300); box-shadow: var(--shadow-md); }
.menu-btn:active { transform: scale(.96); }
.menu-btn__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-400), var(--teal-600)); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
}
.menu-btn__lineas { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-btn__lineas span { display: block; height: 2px; border-radius: 2px; background: var(--ink-700); transition: transform .25s var(--ease-out), opacity .2s; }
.menu-btn[aria-expanded="true"] .menu-btn__lineas span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__lineas span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__lineas span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-btn__punto {
  position: absolute; top: 0; left: 30px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold-400); border: 2px solid #fff;
  animation: pulso-anillo-dorado 1.8s ease-out infinite;
}

.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50;
  width: min(280px, calc(100vw - 32px));
  padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: menu-entrar .22s var(--ease-out);
}
.menu__hola {
  margin: 0 0 6px; padding: 8px 12px 10px;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-head); font-weight: 600; color: var(--ink-700);
  overflow-wrap: anywhere;
}
.menu__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 0; border-radius: 12px; background: none;
  color: var(--ink-900); text-decoration: none; text-align: left;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem; cursor: pointer;
  transition: background .15s;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--teal-50); }
.menu__icono { width: 24px; text-align: center; font-size: 1.15rem; }
.menu__contador {
  margin-left: auto; min-width: 24px; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--gold-400); color: var(--ink-900); font-size: .8rem; font-weight: 700; text-align: center;
}
.menu__divisor { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu__item--salir { color: var(--danger); }
.menu__item--salir:hover { background: var(--danger-bg); }

@media (max-width: 359px) {
  .encabezado__nombre-tienda { font-size: 1rem; }
  .menu-btn__lineas { display: none; }
  .menu-btn { padding-right: 4px; }
}

/* ---------- Encabezados de vista y secciones ---------- */
.vista-cabecera { display: flex; flex-direction: column; gap: 2px; }
.vista-cabecera__volver { align-self: flex-start; margin: 0 0 4px -12px; }
.vista-cabecera__titulo { margin: 0; }
.vista-cabecera__sub { margin: 0; }
.seccion__titulo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin: 0 0 var(--s-2); }
.seccion__cabecera { margin-bottom: var(--s-2); }
.seccion__cabecera .seccion__titulo { margin: 0; }
.seccion-titulo h2 { margin-bottom: 2px; }
.seccion-titulo p { margin: 0; }

/* ---------- Pasos de compra ---------- */
.pasos {
  list-style: none; margin: 0 0 var(--s-4); padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.pasos__item {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 500; font-size: .92rem; color: var(--ink-500);
}
.pasos__item + .pasos__item::before {
  content: ""; width: clamp(16px, 6vw, 48px); height: 2px; margin: 0 8px;
  border-radius: 2px; background: var(--line-strong);
}
.pasos__item.is-hecho + .pasos__item::before { background: var(--teal-400); }
.pasos__num {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--line-strong); background: var(--surface);
  font-weight: 600; font-size: .88rem;
}
.pasos__item.is-hecho .pasos__num { background: var(--teal-400); border-color: var(--teal-400); color: #fff; }
.pasos__item.is-actual { color: var(--ink-900); font-weight: 600; }
.pasos__item.is-actual .pasos__num {
  background: var(--teal-600); border-color: var(--teal-600); color: #fff;
  box-shadow: 0 0 0 4px var(--teal-100);
  animation: rebote .5s var(--ease-spring);
}
@media (max-width: 374px) {
  .pasos__item:not(.is-actual) .pasos__txt {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* =========================================================================
   Acceso (#/)
   ========================================================================= */
.acceso { display: grid; gap: var(--s-6); max-width: 1040px; padding-top: var(--s-2); }
.acceso__hero { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center; }
.acceso__logo-caja { position: relative; width: 150px; }
.acceso__logo-caja::before {
  content: ""; position: absolute; inset: 8% -18% -6%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 170, 46, .32), rgba(48, 162, 154, .12) 55%, transparent 72%);
}
.acceso__logo { width: 100%; height: auto; filter: drop-shadow(0 12px 18px rgba(29, 52, 49, .2)); animation: flotar 4s ease-in-out infinite; }
.acceso__titulo { margin: 0; font-size: clamp(1.9rem, 6vw + .4rem, 2.8rem); letter-spacing: -.5px; }
.acceso__titulo-script {
  display: inline-block; font-family: var(--font-brand); font-weight: 400; color: var(--teal-500);
  transform: rotate(-3deg); padding: 0 .1em;
}
.acceso__sub {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 500; letter-spacing: .5px; color: var(--gold-700);
}
.acceso__punto { color: var(--gold-400); }
.acceso__foto {
  position: relative; margin: var(--s-2) 0 var(--s-3); width: min(calc(100% - 16px), 420px);
  padding: 8px; border-radius: 26px; background: #fff; box-shadow: var(--shadow-md);
  transform: rotate(-2deg);
}
.acceso__foto img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; }
.acceso__sello-foto {
  position: absolute; right: -4px; bottom: -14px;
  padding: 6px 16px; border-radius: var(--r-pill);
  background: var(--gold-400); color: var(--ink-900);
  font-family: var(--font-brand); font-size: .98rem;
  transform: rotate(6deg); box-shadow: var(--shadow-md);
}

/* Tarjeta dorada de bienvenida */
.regalo {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  width: min(100%, 420px); padding: 14px 18px; text-align: left;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #f4da82 0%, var(--gold-400) 55%, #c4961d 100%);
  color: var(--ink-900);
  box-shadow: 0 10px 24px rgba(160, 124, 20, .28);
}
.regalo::after, .banner-descuento::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; left: 0; width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-180%) skewX(-20deg);
  animation: destello 3.4s ease-in-out 1s infinite;
  pointer-events: none;
}
.regalo__icono { font-size: 2.2rem; flex: none; transform-origin: 50% 85%; animation: menear 2.6s ease-in-out infinite; }
.regalo__texto { margin: 0; font-family: var(--font-head); font-size: 1.02rem; line-height: 1.25; }
.regalo__texto strong { display: block; font-size: 1.4rem; font-weight: 700; }

/* Muestra de la tarjeta de sellos */
.muestra-sellos {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(100%, 420px); padding: 14px 16px;
  border: 1.5px dashed var(--gold-200); border-radius: var(--r-lg);
  background: rgba(255, 253, 247, .85);
}
.muestra-sellos__fila { display: flex; gap: 6px; }
.mini-sello {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: .95rem;
  background: radial-gradient(circle at 35% 30%, var(--teal-100), var(--teal-200));
  border: 1.5px solid var(--teal-300);
  transform: rotate(var(--giro, 0deg));
  animation: estampar .55s var(--ease-spring) both;
  animation-delay: calc(500ms + var(--i, 0) * 170ms);
}
.mini-sello--meta {
  background: var(--gold-100); border: 1.5px dashed var(--gold-500);
  animation: latido 1.6s ease-in-out 1.6s infinite;
}
.muestra-sellos__texto { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: .86rem; color: var(--text-muted); line-height: 1.3; }
.muestra-sellos__texto strong { font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--ink-900); }
@media (min-width: 440px) {
  .muestra-sellos { flex-direction: row; text-align: left; }
}

/* Formulario de acceso */
.acceso__form { position: relative; overflow: hidden; padding: var(--s-6) var(--s-5); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.acceso__form::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--teal-400), var(--gold-400), var(--teal-400));
  background-size: 200% 100%; animation: cinta 6s linear infinite;
}
.acceso__form h2 { margin-bottom: var(--s-4); }
.acceso__intro { margin-bottom: var(--s-5); }
.acceso__boton { margin-top: 4px; }
.acceso__form .input { scroll-margin-top: calc(var(--header-h) + 24px); scroll-margin-bottom: 24px; }

/* Crear cuenta / Ingresar: control segmentado (pestañas) con una "pastilla" que se desliza al modo elegido */
.segmento {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 var(--s-4); padding: 4px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2);
}
.segmento::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: var(--r-pill); background: var(--teal-600); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out);
}
.segmento[data-modo="ingresar"]::before { transform: translateX(100%); }
.segmento__btn {
  position: relative; z-index: 1; min-width: 0; min-height: 46px; padding: 8px 10px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-700);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.15; cursor: pointer;
  transition: color .2s;
}
.segmento__btn:hover { color: var(--teal-800); }
.segmento__btn[aria-selected="true"] { color: #fff; }
.segmento__btn:focus-visible { outline-offset: -2px; border-radius: var(--r-pill); }
@media (forced-colors: active) {
  .segmento__btn[aria-selected="true"] { outline: 2px solid CanvasText; outline-offset: -4px; }
}
.acceso__panel--entra { animation: fade-in .25s ease-out; }

/* PIN: puntos grandes y botón Mostrar/Ocultar dentro del campo */
.input-pin { position: relative; display: flex; }
.input-pin .input {
  padding-right: 104px;
  font-family: var(--font-head); font-size: 1.3rem; letter-spacing: .3em; font-variant-numeric: tabular-nums;
}
.input-pin__ver {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  min-width: 44px; min-height: 44px; padding: 6px 14px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--teal-700);
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: background-color .2s;
}
.input-pin__ver:hover { background: var(--teal-50); }
.input-pin__ver:focus-visible { outline-offset: -2px; border-radius: var(--r-pill); }
.input-pin.is-completo .input { border-color: var(--teal-400); }
.field__hint.pin-coincide { color: var(--teal-700); font-weight: 700; }

/* Enlaces bajo el botón: "¿Olvidaste tu PIN?", "¿No tenés cuenta?" */
.acceso__enlaces { display: flex; flex-direction: column; gap: 0; }
.acceso__cambio { margin: 0; text-align: center; color: var(--text-muted); font-size: .95rem; }
.acceso__enlace {
  display: inline-block; padding: 10px 4px; border: 0; background: none;
  color: var(--teal-600); font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.acceso__enlace:hover { color: var(--teal-800); }
.acceso__beneficios {
  list-style: none; margin: var(--s-5) 0 0; padding: var(--s-4) 0 0;
  display: grid; gap: 8px; font-size: .92rem; color: var(--ink-700);
  border-top: 1px dashed var(--line-strong);
}
.acceso__beneficios li { display: flex; align-items: center; gap: 10px; }
.acceso__ayuda { margin: var(--s-4) 0 0; text-align: center; color: var(--text-muted); font-size: .95rem; }
.acceso__ayuda a { font-weight: 700; display: inline-block; padding: 10px 4px; }

@media (min-width: 900px) {
  .acceso { grid-template-columns: 1.05fr .95fr; align-items: start; gap: var(--s-10); padding-top: var(--s-8); }
  .acceso__lado { position: sticky; top: 24px; }
  .acceso__logo-caja { width: 180px; }
}

/* Celular con prefijo +506 */
.input-prefijo {
  position: relative; display: flex; align-items: stretch;
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color .2s, box-shadow .2s;
}
.input-prefijo:focus-within { border-color: var(--teal-400); box-shadow: 0 0 0 4px var(--teal-100); }
.input-prefijo__txt {
  display: flex; align-items: center; padding: 0 12px 0 16px;
  border-right: 1.5px solid var(--line);
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--ink-500);
}
.input-prefijo .input,
.field.has-error .input-prefijo .input {
  flex: 1; min-width: 0; border: 0; box-shadow: none; background: transparent;
  text-align: left; padding-left: 12px; padding-right: 48px;
}
.field.has-error .input-prefijo { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.input-ok {
  position: absolute; right: 12px; top: 50%; margin-top: -13px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-600); color: #fff; font-size: .85rem; font-weight: 800;
  opacity: 0; transform: scale(.3);
  transition: opacity .2s, transform .35s var(--ease-spring);
}
.input-prefijo.is-completo .input-ok { opacity: 1; transform: scale(1); }

/* Selector de ubicación: radios reales con forma de tarjeta, solo el nombre (2 columnas desde 340 px) */
.campo-sucursal { margin: 0; padding: 0; border: 0; min-width: 0; min-inline-size: 0; }
.campo-sucursal__leyenda { display: block; padding: 0; margin: 0 0 2px; }
.campo-sucursal__pista { margin: 0 0 10px; }
.campo-sucursal .field__error { margin: 8px 0 0; }
.opciones-sucursal { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 340px) {
  .opciones-sucursal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Una sola sucursal (o la última de una cantidad impar) ocupa todo el ancho. */
  .opciones-sucursal > .opcion-sucursal:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.opciones-sucursal__aviso { grid-column: 1 / -1; margin: 0; }
.opciones-sucursal__aviso strong { display: block; }
.opciones-sucursal__aviso-sub { margin: 2px 0 8px; }
.opcion-sucursal { position: relative; display: flex; min-width: 0; cursor: pointer; }
.opcion-sucursal__radio {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0;
  opacity: 0; pointer-events: none;
  /* Al enfocarlo por un error, que la pregunta quede visible bajo el encabezado fijo. */
  scroll-margin-top: calc(var(--header-h) + 64px);
}
.opcion-sucursal__caja {
  position: relative; flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-height: 64px; padding: 12px 12px 12px 14px;
  border: 2px solid var(--line-strong); border-radius: var(--r-lg);
  background: #fff;
  transition: border-color .2s, background-color .2s, box-shadow .2s, transform .15s var(--ease-out);
}
.opcion-sucursal:hover .opcion-sucursal__caja { border-color: var(--teal-300); box-shadow: var(--shadow-sm); }
.opcion-sucursal:active .opcion-sucursal__caja { transform: scale(.98); }
.opcion-sucursal__radio:checked + .opcion-sucursal__caja {
  border-color: var(--teal-400);
  background: linear-gradient(160deg, var(--teal-50), #fff 75%);
  box-shadow: 0 0 0 3px var(--teal-100), var(--shadow-sm);
}
.opcion-sucursal__radio:focus-visible + .opcion-sucursal__caja { outline: 3px solid var(--gold-400); outline-offset: 3px; }
.opcion-sucursal__check {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--line-strong); background: #fff;
  color: transparent; font-size: .78rem; font-weight: 800; line-height: 1;
  transition: background-color .2s, border-color .2s, color .2s;
}
.opcion-sucursal__radio:checked + .opcion-sucursal__caja .opcion-sucursal__check {
  background: var(--teal-600); border-color: var(--teal-600); color: #fff;
  animation: rebote .4s var(--ease-spring);
}
.opcion-sucursal__nombre {
  padding-right: 26px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  color: var(--ink-900); overflow-wrap: anywhere;
}
.campo-sucursal.has-error .opcion-sucursal__caja { border-color: var(--danger); }
.campo-sucursal.has-error .opcion-sucursal__check { border-color: #f0b8b2; }

/* Modal de bienvenida */
.modal--bienvenida { text-align: center; background: radial-gradient(circle at 50% 0%, var(--gold-50), var(--surface) 55%); }
.modal--bienvenida .modal__title { font-size: 1.5rem; }
.modal--bienvenida .modal__actions .btn { flex-basis: 100%; }
.bienvenida__regalo { font-size: 4rem; line-height: 1.1; margin-bottom: var(--s-2); animation: rebote-grande .9s var(--ease-spring) both; }
.bienvenida__destacado { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; color: var(--teal-700); margin-bottom: 4px; }
.bienvenida__sellos {
  display: flex; gap: 12px; align-items: center; margin-top: var(--s-4); padding: 12px 14px; text-align: left;
  border: 1px dashed var(--gold-200); border-radius: var(--r-md); background: var(--gold-50);
  font-size: .92rem;
}
.bienvenida__sellos p { margin: 0; }
.bienvenida__sellos > span { font-size: 1.7rem; }

/* =========================================================================
   Inicio (#/inicio)
   ========================================================================= */
.saludo { display: flex; align-items: flex-start; gap: var(--s-3); }
.saludo__hora { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 1.05rem; color: var(--ink-500); }
.saludo__nombre { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.3; }
.saludo__script { font-family: var(--font-brand); font-weight: 400; color: var(--teal-500); overflow-wrap: anywhere; }
.saludo__mano { display: inline-block; font-size: .8em; transform-origin: 70% 80%; animation: saludar 2.2s ease-in-out .5s 2; }
.saludo__sub { margin: 2px 0 0; }

.enlace-pedidos {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 14px;
  border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface);
  color: var(--teal-700); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease-out), box-shadow .2s;
}
.enlace-pedidos:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.enlace-pedidos__punto {
  position: absolute; top: -3px; right: -3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold-400); border: 2px solid #fff;
  animation: pulso-anillo-dorado 1.8s ease-out infinite;
}

.aviso-sub { margin: 2px 0 0; }

.pedido-activo, .carrito-pendiente {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--r-lg);
  color: var(--ink-900); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.pedido-activo:hover, .carrito-pendiente:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pedido-activo { background: linear-gradient(135deg, var(--teal-50), #fff); border: 1.5px solid var(--teal-200); }
.pedido-activo--listo { background: linear-gradient(135deg, var(--gold-50), #fff); border-color: var(--gold-200); }
.pedido-activo__pulso { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--teal-400); animation: pulso-anillo 1.8s ease-out infinite; }
.pedido-activo--listo .pedido-activo__pulso { background: var(--gold-400); animation-name: pulso-anillo-dorado; }
.pedido-activo__texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pedido-activo__texto .small { color: var(--ink-700); }
.pedido-activo__flecha { font-size: 1.3rem; color: var(--teal-600); transition: transform .2s var(--ease-out); }
.pedido-activo:hover .pedido-activo__flecha { transform: translateX(4px); }
.carrito-pendiente { background: var(--surface); border: 1.5px dashed var(--gold-400); }
.carrito-pendiente > .grow { display: flex; flex-direction: column; }
.carrito-pendiente__icono { font-size: 1.8rem; animation: menear 3s ease-in-out infinite; transform-origin: 50% 90%; }

/* Banner de descuento */
.banner-descuento {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: #fff; box-shadow: 0 10px 24px rgba(31, 125, 118, .28);
}
.banner-descuento__icono { font-size: 2.2rem; flex: none; transform-origin: 50% 85%; animation: menear 2.8s ease-in-out infinite; }
.banner-descuento__texto { display: flex; flex-direction: column; gap: 2px; }
.banner-descuento__texto strong { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.banner-descuento__texto span { font-size: .88rem; opacity: .92; }

/* Sucursales */
.sucursales { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .sucursales { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sucursal {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface);
  color: inherit; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s;
}
.sucursal:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--teal-200); }
.sucursal:active { transform: scale(.99); }
.sucursal__foto { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--cream-100); }
.sucursal__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.sucursal:hover .sucursal__foto img { transform: scale(1.06); }
.sucursal__foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20, 40, 38, .35)); }
.sucursal__etiqueta {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--gold-400); color: var(--ink-900);
  font-family: var(--font-head); font-weight: 600; font-size: .82rem; box-shadow: var(--shadow-md);
}
.sucursal__cuerpo { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: var(--s-4) var(--s-5) var(--s-5); }
.sucursal__nombre { margin: 0; font-size: 1.35rem; }
.sucursal__desc { margin: 0; color: var(--ink-700); font-size: .95rem; }
.sucursal__dir { margin: 0; display: flex; gap: 6px; color: var(--text-muted); font-size: .88rem; }
.sucursal__pie { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sucursal__meta {
  padding: 6px 12px; border-radius: var(--r-pill); background: var(--teal-50);
  color: var(--teal-700); font-family: var(--font-head); font-weight: 600; font-size: .88rem;
}
.sucursal__flecha {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--teal-600); color: #fff; font-size: 1.2rem;
  transition: transform .3s var(--ease-spring);
}
.sucursal:hover .sucursal__flecha { transform: translateX(4px); }

/* =========================================================================
   Tarjeta de sellos
   ========================================================================= */
.sellos {
  position: relative; overflow: hidden;
  padding: var(--s-5); border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .7), transparent 45%),
    linear-gradient(150deg, #fbf1cf 0%, var(--gold-100) 45%, #efd88f 100%);
  border: 1.5px solid var(--gold-200);
  box-shadow: 0 8px 22px rgba(160, 124, 20, .16);
  color: var(--ink-900);
}
.sellos::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1.5px dashed rgba(160, 124, 20, .35); border-radius: calc(var(--r-xl) - 8px);
}
.sellos > *:not(.sr-only) { position: relative; }
.sellos__cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: var(--s-4); }
.sellos__etiqueta { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: .75rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-700); }
.sellos__marca { margin: 0; font-family: var(--font-brand); font-size: 1.5rem; line-height: 1.25; color: var(--teal-600); }
.sellos__conteo { margin: 0; display: flex; align-items: baseline; font-family: var(--font-head); color: var(--gold-700); }
.sellos__conteo strong { font-size: 2.1rem; font-weight: 700; color: var(--teal-700); line-height: 1; }
.sellos__conteo span { font-size: 1.1rem; font-weight: 600; }

.sellos__grilla { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: clamp(6px, 2vw, 12px); }
.sello {
  position: relative; justify-self: center;
  width: 100%; max-width: 68px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 600;
}
.sello__icono { font-size: clamp(1.05rem, 5vw, 1.6rem); line-height: 1; }
.sello--vacio { border: 2px dashed rgba(160, 124, 20, .42); background: rgba(255, 255, 255, .5); color: rgba(124, 96, 15, .6); font-size: 1rem; }
.sello--lleno {
  background: radial-gradient(circle at 35% 30%, var(--teal-300), var(--teal-600) 72%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .22), 0 3px 8px rgba(31, 125, 118, .35);
  transform: rotate(var(--giro, 0deg));
  animation: estampar .6s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 110ms + 150ms);
}
.sello--lleno::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .55); }
.sello--lleno.es-nuevo { animation: estampar-nuevo 1s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 110ms + 450ms); }
.sello--lleno.es-nuevo::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid var(--gold-400);
  animation: onda 1s ease-out both; animation-delay: calc(var(--i, 0) * 110ms + 800ms);
}
.sello--verificacion {
  border: 2.5px dashed var(--teal-400); background: rgba(255, 255, 255, .65);
  animation: verificando 1.6s ease-in-out infinite;
}
.sello--verificacion .sello__icono { animation: voltear-reloj 2.4s ease-in-out infinite; }
.sello--meta {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px;
  border: 2px dashed var(--gold-500); background: rgba(255, 255, 255, .55);
}
.sello--meta .sello__icono { font-size: clamp(.95rem, 4.4vw, 1.4rem); opacity: .8; filter: grayscale(.3); }
.sello__pct { font-size: .68rem; font-weight: 700; color: var(--gold-700); line-height: 1; }
.sello--meta.is-desbloqueado {
  border: 2px solid #fff;
  background: radial-gradient(circle at 35% 30%, #ffe8a3, var(--gold-400) 75%);
  box-shadow: 0 0 0 3px var(--gold-400), 0 6px 16px rgba(160, 124, 20, .45);
  animation: latido 1.4s ease-in-out infinite;
}
.sello--meta.is-desbloqueado .sello__icono { opacity: 1; filter: none; }
.sello--meta.is-desbloqueado .sello__pct { color: var(--ink-900); }

.sellos__barra {
  position: relative; overflow: hidden;
  height: 8px; margin: var(--s-4) 0 var(--s-3); border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .65); box-shadow: inset 0 1px 2px rgba(124, 96, 15, .18);
}
.sellos__barra-llena {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--teal-400), var(--teal-600));
  transform-origin: left center; animation: llenar-barra 1s var(--ease-out) .3s both;
}
.sellos__barra-verif {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, rgba(48, 162, 154, .5) 0 6px, rgba(48, 162, 154, .18) 6px 12px);
  background-size: 17px 17px; animation: rayas .9s linear infinite;
}
.sellos__texto { margin: 0; font-family: var(--font-head); font-weight: 500; color: var(--ink-700); }
.sellos__verif { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: .88rem; font-weight: 700; color: var(--teal-700); }
.sellos__verif-punto { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--teal-400); animation: pulso-anillo 1.6s ease-out infinite; }
.sellos__premio {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: var(--s-3); padding: 12px 14px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600)); color: #fff;
  box-shadow: var(--shadow-md);
}
.sellos__premio strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.sellos__premio .tiny { display: block; opacity: .9; margin-top: 2px; }
.sellos__premio-icono { font-size: 1.8rem; flex: none; animation: rebote-grande 1s var(--ease-spring) .5s both; }
.sellos--premio { box-shadow: 0 0 0 3px rgba(211, 170, 46, .4), 0 12px 30px rgba(160, 124, 20, .3); }
.sellos--premio::after {
  content: ""; position: absolute; top: -50%; bottom: -50%; left: 0; width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent);
  transform: translateX(-200%) skewX(-20deg);
  animation: destello-ancho 3.8s ease-in-out .8s infinite;
  pointer-events: none;
}
.sellos--compacta { padding: var(--s-4); }

/* =========================================================================
   Catálogo (#/sucursal/{id})
   ========================================================================= */
.catalogo { max-width: 1080px; }
.catalogo__cabecera { display: flex; align-items: flex-end; gap: var(--s-3); margin-bottom: var(--s-4); }
.catalogo__kicker { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-700); }
.catalogo__titulo { margin: 0 0 2px; }
.catalogo__desc { margin: 0; }
.catalogo__desc:empty { display: none; }
.catalogo__cambiar { flex: none; }
.catalogo > .stack { margin-bottom: var(--s-4); }
.catalogo > .stack:empty { display: none; }

.tira-descuento {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--gold-100), var(--gold-50));
  border: 1px solid var(--gold-200); color: var(--gold-700); font-size: .92rem;
}
.tira-descuento strong { color: var(--ink-900); }

.productos { display: grid; gap: var(--s-3); }
.producto {
  position: relative;
  display: grid; grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas: "media cuerpo" "pie pie";
  gap: 12px 14px; padding: 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease-out);
}
.producto:hover { box-shadow: var(--shadow-md); }
.producto.is-en-carrito { border-color: var(--teal-300); box-shadow: 0 0 0 3px var(--teal-50), var(--shadow-md); }
.producto__media { grid-area: media; position: relative; }
.producto__cuerpo { grid-area: cuerpo; min-width: 0; }
.producto__nombre { margin: 2px 0 4px; font-size: 1.08rem; }
.producto__desc {
  margin: 0; font-size: .88rem; line-height: 1.4; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.producto__pie {
  grid-area: pie;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.producto__precio { font-size: 1.22rem; color: var(--teal-700); }
.producto__accion { display: flex; justify-content: flex-end; min-height: 50px; align-items: center; }
.producto__agregar { min-width: 124px; }
.producto__mas { font-size: 1.25rem; font-weight: 700; line-height: 1; }
.producto__stepper { background: var(--teal-50); }
.producto__insignia {
  position: absolute; top: -8px; right: -8px; z-index: 1;
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--gold-400); color: var(--ink-900); border: 2px solid #fff;
  font-family: var(--font-head); font-weight: 700; font-size: .82rem;
  box-shadow: var(--shadow-md); animation: pop-in .35s var(--ease-spring);
}

@media (min-width: 680px) {
  .productos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
  .producto { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "cuerpo" "pie"; padding: 12px 12px 16px; }
  .producto .producto-foto { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .producto .producto-foto__emoji { font-size: 3rem; }
  .producto__insignia { top: 10px; right: 10px; }
}
@media (min-width: 980px) {
  .productos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Foto / emoji de producto */
.producto-foto {
  position: relative; overflow: hidden;
  width: 96px; height: 96px; border-radius: var(--r-md);
  background: var(--cream-100);
}
.producto-foto img { width: 100%; height: 100%; object-fit: cover; animation: fade-in .45s ease-out; transition: transform .5s var(--ease-out); }
.producto:hover .producto-foto img { transform: scale(1.05); }
.producto-foto--emoji {
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--cream-100), var(--cream-200));
}
.producto-foto__emoji {
  width: 84%; max-width: 150px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fffdf7, var(--cream-100) 60%, var(--cream-200));
  box-shadow: inset 0 -4px 10px rgba(160, 124, 20, .12), 0 4px 10px rgba(160, 124, 20, .14);
  font-size: 2.1rem; letter-spacing: -3px; line-height: 1;
}

/* "+1" que vuela al carrito */
.vuela {
  position: fixed; z-index: 150; pointer-events: none;
  translate: -50% -50%;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--gold-400); color: var(--ink-900);
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  box-shadow: var(--shadow-md); will-change: transform, opacity;
}

/* ---------- Carrito flotante ---------- */
.carrito-flotante {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 0 12px calc(12px + var(--safe-bottom));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  pointer-events: none;
  animation: subir .5s var(--ease-spring) both;
}
.carrito-flotante__caja {
  pointer-events: auto;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 24px;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: #fff;
  box-shadow: 0 14px 34px rgba(20, 79, 74, .38), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.carrito-flotante__icono {
  position: relative; flex: none;
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: rgba(255, 255, 255, .16);
}
.carrito-flotante__contador {
  position: absolute; top: -6px; right: -6px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--gold-400); color: var(--ink-900); border: 2px solid var(--teal-700);
  font-family: var(--font-head); font-weight: 700; font-size: .78rem;
}
.carrito-flotante__info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.carrito-flotante__linea1 { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; opacity: .92; }
.carrito-flotante__chip { padding: 1px 7px; border-radius: var(--r-pill); background: var(--gold-400); color: var(--ink-900); font-size: .72rem; font-weight: 800; }
.carrito-flotante__linea2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.carrito-flotante__total { font-size: 1.25rem; }
.carrito-flotante__tachado { font-size: .84rem; opacity: .75; }
.carrito-flotante__btn { flex: none; min-height: 48px; padding: 10px 16px; }

/* ---------- Barra de acción inferior (entrega / pago) ---------- */
.barra-accion {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(255, 253, 247, .95);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(29, 52, 49, .08);
  animation: subir .45s var(--ease-out) both;
}
.barra-accion__caja { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.barra-accion__info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.barra-accion__etiqueta { font-size: .74rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.barra-accion__montos { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.barra-accion__total { font-size: 1.4rem; color: var(--teal-700); }
.barra-accion__tachado { font-size: .85rem; color: var(--text-muted); }
.barra-accion__pista { font-size: .78rem; font-weight: 700; color: var(--gold-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-accion__btn { flex: none; min-width: 150px; padding-left: 20px; padding-right: 20px; }

/* =========================================================================
   Entrega (#/pedido/entrega)
   ========================================================================= */
.lineas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.linea {
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas: "foto info" "foto lado";
  gap: 8px 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
  transition: opacity .25s, transform .25s var(--ease-out);
}
.linea:last-child { border-bottom: 0; }
.linea.is-saliendo { opacity: 0; transform: translateX(32px); }
.linea__foto.producto-foto { grid-area: foto; align-self: start; width: 56px; height: 56px; border-radius: 14px; }
.linea__foto .producto-foto__emoji { font-size: 1.2rem; letter-spacing: -2px; }
.linea__info { grid-area: info; min-width: 0; }
.linea__nombre { margin: 0; font-family: var(--font-head); font-weight: 600; line-height: 1.25; }
.linea__unitario { display: inline-block; margin-right: 10px; font-size: .84rem; color: var(--text-muted); }
.linea__quitar {
  display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0 -12px; padding: 0 6px;
  border: 0; background: none; cursor: pointer;
  color: var(--danger); font-size: .84rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.linea__lado { grid-area: lado; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.linea__subtotal { font-size: 1.05rem; color: var(--ink-900); }
@media (min-width: 560px) {
  .linea { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "foto info lado"; }
  .linea__lado { flex-direction: column; align-items: flex-end; gap: 6px; }
}

/* Fechas tipo calendario */
.fechas { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin: var(--s-3) 0; }
.fechas > .empty, .fechas > .alert { grid-column: 1 / -1; }
.fecha {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  min-height: 112px; padding: 0 0 10px;
  border: 2px solid var(--line-strong); border-radius: 18px; background: #fff;
  color: var(--ink-900); font-family: var(--font-head); cursor: pointer;
  transition: transform .25s var(--ease-spring), border-color .2s, box-shadow .2s, background .2s, color .2s;
}
.fecha__dia {
  align-self: stretch; padding: 6px 0; text-align: center;
  background: var(--teal-50); border-bottom: 1px solid var(--teal-100); color: var(--teal-700);
  font-size: .8rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.fecha__numero { margin-top: 6px; font-size: 2rem; font-weight: 600; line-height: 1.1; }
.fecha__mes { font-size: .9rem; font-weight: 500; color: var(--ink-500); }
.fecha__tag { margin-top: 4px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--gold-100); color: var(--gold-700); font-size: .68rem; font-weight: 700; }
.fecha__motivo { margin-top: 4px; padding: 0 6px; text-align: center; font-family: var(--font-body); font-size: .7rem; font-weight: 700; line-height: 1.2; color: var(--ink-500); }
.fecha__check {
  position: absolute; top: 5px; right: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-400); color: var(--ink-900); font-size: .7rem; font-weight: 800;
  opacity: 0; transform: scale(.3); transition: opacity .2s, transform .35s var(--ease-spring);
}
.fecha:not(.is-no-disponible):hover { border-color: var(--teal-300); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.fecha.is-seleccionada {
  border-color: var(--teal-600); background: var(--teal-600); color: #fff;
  box-shadow: 0 8px 20px rgba(31, 125, 118, .35); transform: translateY(-2px);
}
.fecha.is-seleccionada:hover { border-color: var(--teal-700); }
.fecha.is-seleccionada .fecha__dia { background: var(--teal-700); border-color: transparent; color: #fff; }
.fecha.is-seleccionada .fecha__mes { color: rgba(255, 255, 255, .88); }
.fecha.is-seleccionada .fecha__tag { background: rgba(255, 255, 255, .2); color: #fff; }
.fecha.is-seleccionada .fecha__check { opacity: 1; transform: scale(1); }
.fecha.is-no-disponible { cursor: not-allowed; border-style: dashed; background: var(--cream-100); opacity: .66; }
.fecha.is-no-disponible .fecha__dia { background: var(--cream-200); border-color: transparent; color: var(--ink-500); }
.fecha.is-no-disponible .fecha__numero { color: var(--ink-500); text-decoration: line-through; text-decoration-thickness: 2px; }
.fecha-elegida { margin: 4px 0 0; min-height: 1.5em; color: var(--teal-800); font-weight: 600; }
.fecha-elegida strong { font-family: var(--font-head); }
.seccion-fecha { transition: border-color .2s, box-shadow .2s; }
.seccion-fecha.has-error { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.fechas__vacio a { font-weight: 700; }

.recordatorio { align-items: center; }
.recordatorio__icono { font-size: 1.4rem; }

/* Montos */
.montos { display: flex; flex-direction: column; gap: 8px; }
.montos__fila { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--ink-700); }
.montos__fila--descuento {
  margin: 0 -4px; padding: 8px 12px; border-radius: 12px;
  background: var(--gold-50); border: 1px dashed var(--gold-200);
  color: var(--gold-700); font-weight: 700;
}
.montos__descuento-etq { display: flex; align-items: baseline; gap: 6px; }
.montos__fila > .money { flex: none; white-space: nowrap; }
.money { white-space: nowrap; }
.montos__fila--total { align-items: center; color: var(--ink-900); font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.montos__total-valor { display: inline-block; font-size: 1.7rem; color: var(--teal-700); }
.montos .divider { margin: 6px 0; }
.montos.is-cargando .money { animation: pulso 1s ease-in-out infinite; }
.montos__error { margin-top: 6px; align-items: center; }

/* =========================================================================
   Pago (#/pedido/pago)
   ========================================================================= */
.pago-tarjeta {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--s-6) var(--s-5); border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, .18), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(211, 170, 46, .22), transparent 45%),
    linear-gradient(155deg, var(--teal-500), var(--teal-700));
  box-shadow: 0 16px 36px rgba(20, 79, 74, .32);
}
.pago-tarjeta > *:not(.sr-only):not(.pago-tarjeta__brillo) { position: relative; }
.pago-tarjeta.pago-tarjeta--error { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.pago-tarjeta--error .empty { padding: var(--s-5) 0; }
.pago-tarjeta--error .empty h3 { color: var(--ink-700); }
.pago-cerrado__acciones { margin: var(--s-3) 0 0; }
.pago-tarjeta__brillo {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .16) 50%, transparent 70%);
  transform: translateX(-100%); animation: barrido 4.5s ease-in-out 1.2s infinite;
}
.pago-tarjeta__etiqueta { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; opacity: .92; }
.pago-tarjeta__monto { margin: 2px 0 6px; font-size: clamp(2.5rem, 12vw, 3.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -.5px; text-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
.pago-tarjeta__ahorro { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0 0 var(--s-3); }
.pago-tarjeta__ahorro s { opacity: .78; }
.pago-tarjeta__chip { padding: 3px 10px; border-radius: var(--r-pill); background: var(--gold-400); color: var(--ink-900); font-size: .82rem; font-weight: 800; }
.pago-tarjeta__copiar { display: flex; justify-content: center; }
.pago-tarjeta__div { border: 0; border-top: 1.5px dashed rgba(255, 255, 255, .38); margin: var(--s-5) 0 var(--s-4); }
.pago-tarjeta__numero-fila { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; margin-top: 2px; }
.pago-tarjeta__numero { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.9rem, 9vw, 2.4rem); letter-spacing: 1px; }
.pago-tarjeta__titular { margin: 8px 0 0; font-size: .92rem; opacity: .92; }
.skeleton--monto { height: 230px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .18); }

.btn-copiar--claro { --btn-bg: rgba(255, 255, 255, .16); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .5); }
.btn-copiar--claro:hover { --btn-bg: rgba(255, 255, 255, .28); }
.btn-copiar.is-copiado { --btn-bg: var(--gold-400); --btn-fg: var(--ink-900); --btn-bd: var(--gold-400); animation: rebote .4s var(--ease-spring); }

.pasos-pago { list-style: none; counter-reset: paso; margin: var(--s-2) 0 0; padding: 0; display: grid; gap: 14px; }
.pasos-pago li { counter-increment: paso; position: relative; min-height: 34px; padding: 5px 0 0 48px; color: var(--ink-700); }
.pasos-pago li::before {
  content: counter(paso);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-50); border: 2px solid var(--teal-200); color: var(--teal-700);
  font-family: var(--font-head); font-weight: 700;
}
.pasos-pago strong { color: var(--ink-900); }

/* Comprobante */
.comprobante {
  padding: var(--s-5) var(--s-4); text-align: center;
  border: 2.5px dashed var(--teal-200); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--teal-50), rgba(255, 255, 255, .7));
  transition: border-color .2s, background .2s, transform .2s var(--ease-out);
}
.comprobante.is-arrastrando { border-color: var(--teal-500); background: var(--teal-100); transform: scale(1.01); }
.comprobante.is-lista { text-align: left; border-style: solid; border-color: var(--teal-300); background: #fff; }
.comprobante__vacio { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.comprobante__vacio p { margin: 0; }
.comprobante__icono { font-size: 2.6rem; animation: flotar 3s ease-in-out infinite; }
.comprobante__boton { width: 100%; max-width: 340px; }
.comprobante__arrastrar { display: none; }
@media (hover: hover) and (pointer: fine) { .comprobante__arrastrar { display: block; } }
.comprobante__procesando { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: var(--s-5) 0; color: var(--text-muted); font-weight: 700; }
.comprobante__lista { display: flex; align-items: center; gap: 14px; }
.comprobante__vista {
  position: relative; flex: none; margin: 0;
  width: 96px; height: 128px; border-radius: 14px; overflow: hidden;
  background: var(--cream-100); box-shadow: var(--shadow-md);
}
.comprobante__vista img { width: 100%; height: 100%; object-fit: cover; }
.comprobante__ok {
  position: absolute; right: 6px; bottom: 6px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-600); color: #fff; font-weight: 800;
  box-shadow: 0 0 0 3px #fff; animation: pop-in .4s var(--ease-spring) .15s both;
}
.comprobante__info { flex: 1; min-width: 0; }
.comprobante__info p { margin: 0 0 4px; }
.comprobante__info .row { margin-top: 8px; gap: 8px; }
.comprobante__titulo { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--teal-700); }

/* Resúmenes */
.datos { display: grid; gap: 8px; margin: 0 0 var(--s-3); }
.datos > div { display: flex; justify-content: space-between; gap: 12px; }
.datos dt { color: var(--text-muted); font-size: .9rem; }
.datos dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.lineas-mini { list-style: none; margin: 0 0 var(--s-3); padding: var(--s-3) 0 0; display: grid; gap: 8px; border-top: 1px dashed var(--line); }
.lineas-mini li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.lineas-mini__emoji {
  flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--cream-100); font-size: .85rem; letter-spacing: -2px;
}
.resumen-pago__descuento { margin: 0; color: var(--gold-700); font-weight: 700; font-size: .92rem; }

/* =========================================================================
   Pedido (#/pedido/{id})
   ========================================================================= */
.celebracion {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--s-8) var(--s-5) var(--s-6); border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .22), transparent 55%),
    linear-gradient(160deg, var(--teal-500), var(--teal-700));
  box-shadow: 0 18px 40px rgba(20, 79, 74, .3);
}
.celebracion > *:not(.celebracion__brillo):not(.sr-only) { position: relative; }
.celebracion__brillo {
  position: absolute; left: 50%; top: 88px;
  width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .09) 0deg 10deg, transparent 10deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 68%);
  mask-image: radial-gradient(circle, #000 20%, transparent 68%);
  animation: girar 24s linear infinite; pointer-events: none;
}
.celebracion__check { width: 96px; height: 96px; margin: 0 auto var(--s-4); animation: pop-in .5s var(--ease-spring) both; }
.celebracion__titulo { margin-bottom: 6px; font-size: clamp(1.6rem, 6vw, 2.1rem); }
.celebracion__texto { margin-bottom: var(--s-4); opacity: .96; }
.celebracion__wa {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 10px 14px; border-radius: var(--r-md); text-align: left;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3);
  font-size: .95rem; font-weight: 700;
}

.check-animado { width: 100%; height: 100%; overflow: visible; }
.check-animado__fondo { fill: rgba(255, 255, 255, .16); }
.check-animado__circulo {
  fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  transform: rotate(-90deg); transform-origin: center; transform-box: fill-box;
  animation: dibujar .7s var(--ease-out) .25s forwards;
}
.check-animado__marca {
  fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  animation: dibujar .45s var(--ease-out) .85s forwards;
}

.estado-pedido { --st-color: var(--teal-400); --st-fondo: var(--teal-50); border-top: 5px solid var(--st-color); }
.estado-pedido--pendiente { --st-color: var(--gold-400); --st-fondo: var(--gold-50); }
.estado-pedido--listo { --st-color: var(--teal-400); --st-fondo: var(--teal-50); }
.estado-pedido--entregado { --st-color: var(--st-entregado); --st-fondo: var(--st-entregado-bg); }
.estado-pedido--cancelado { --st-color: var(--danger); --st-fondo: var(--danger-bg); }
.estado-pedido__cabecera { display: flex; align-items: flex-start; gap: 14px; margin-bottom: var(--s-4); }
.estado-pedido__emoji {
  flex: none; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem;
  background: var(--st-fondo); animation: rebote-grande .7s var(--ease-spring) both;
}
.estado-pedido__kicker { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.estado-pedido__titulo { margin: 0 0 2px; font-size: 1.35rem; }
.estado-pedido__desc { margin: 0; color: var(--ink-700); }
.estado-pedido__aviso {
  display: flex; align-items: center; gap: 8px; margin: var(--s-4) 0 0; padding: 10px 14px;
  border-radius: var(--r-md); background: var(--teal-50); color: var(--teal-800); font-weight: 700; font-size: .92rem;
}

.linea-tiempo { list-style: none; margin: 0; padding: 0; }
.lt__paso {
  position: relative; display: flex; gap: 14px; padding-bottom: var(--s-4);
  animation: entrar-arriba .45s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 120ms + 200ms);
}
.lt__paso:last-child { padding-bottom: 0; }
.lt__paso:not(:last-child)::before,
.lt__paso--hecho:not(:last-child)::after {
  content: ""; position: absolute; left: 18px; top: 40px; bottom: 2px;
  width: 3px; margin-left: -1.5px; border-radius: 3px;
}
.lt__paso:not(:last-child)::before { background: var(--line-strong); }
.lt__paso--hecho:not(:last-child)::after {
  background: var(--teal-400); transform-origin: top;
  animation: llenar-vertical .6s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 120ms + 450ms);
}
.lt__punto {
  position: relative; z-index: 1; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem; font-weight: 800;
  background: var(--surface); border: 2.5px solid var(--line-strong); color: var(--ink-500);
}
.lt__paso--hecho .lt__punto { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }
.lt__paso--actual .lt__punto { background: var(--gold-50); border-color: var(--gold-400); animation: pulso-anillo-dorado 1.8s ease-out infinite; }
.lt__paso--pendiente { opacity: .6; }
.lt__paso--cancelado .lt__punto { background: var(--danger); border-color: var(--danger); color: #fff; }
.lt__paso--cancelado .lt__titulo { color: var(--danger); }
.lt__texto { min-width: 0; padding-top: 6px; }
.lt__titulo { margin: 0; font-family: var(--font-head); font-weight: 600; }
.lt__detalle { margin: 2px 0 0; font-size: .88rem; color: var(--text-muted); overflow-wrap: anywhere; }

.en-vivo {
  display: flex; align-items: center; gap: 8px;
  margin: var(--s-4) 0 0; padding-top: var(--s-3); border-top: 1px dashed var(--line);
  font-size: .82rem; font-weight: 700; color: var(--text-muted);
}
.en-vivo__punto { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--teal-400); animation: pulso-anillo 1.6s ease-out infinite; }

.detalle-pedido .montos { margin-top: var(--s-2); }
.detalle-pedido__nota { margin: var(--s-4) 0 var(--s-2); padding: 10px 14px; border-radius: var(--r-md); background: var(--cream-100); overflow-wrap: anywhere; }
.detalle-pedido > .small { margin: var(--s-2) 0 0; }
.acciones-pedido { display: grid; gap: var(--s-3); margin-top: var(--s-5); }

/* =========================================================================
   Mis pedidos (#/mis-pedidos)
   ========================================================================= */
.seccion-lista__titulo { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; color: var(--ink-700); }
.pedido-card {
  position: relative; overflow: hidden; display: block;
  padding: var(--s-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1.5px solid var(--line);
  color: inherit; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s;
}
.pedido-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--teal-200); }
.pedido-card--activo { border-color: var(--teal-200); background: linear-gradient(135deg, #fff, var(--teal-50)); box-shadow: 0 6px 18px rgba(31, 125, 118, .12); }
.pedido-card--activo::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--teal-400), var(--gold-400)); }
.pedido-card--activo.pedido-card--listo { border-color: var(--gold-200); background: linear-gradient(135deg, #fff, var(--gold-50)); }
.pedido-card--cancelado { opacity: .8; }
.pedido-card__cabecera { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.pedido-card__numero { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--ink-900); }
.pedido-card__fecha { margin: 0; display: flex; gap: 6px; font-size: .95rem; font-weight: 700; color: var(--ink-700); }
.pedido-card__emojis { margin: 6px 0; font-size: 1.25rem; letter-spacing: 2px; line-height: 1.3; overflow-wrap: anywhere; }
.pedido-card__pie { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
.pedido-card__meta { font-size: .9rem; color: var(--text-muted); }
.pedido-card__montos { display: flex; align-items: baseline; gap: 8px; }
.pedido-card__tachado { font-size: .85rem; color: var(--text-muted); }
.pedido-card__total { font-size: 1.2rem; color: var(--teal-700); }
.pedido-card__extra { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pedido-card__desc { padding: 2px 8px; border-radius: var(--r-pill); background: var(--gold-50); color: var(--gold-700); font-size: .78rem; font-weight: 800; }
.pedido-card__ver { margin-left: auto; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--teal-600); transition: transform .2s var(--ease-out); }
.pedido-card:hover .pedido-card__ver { transform: translateX(3px); }

/* ---------- Skeletons ---------- */
.skeleton--sucursal { height: 270px; border-radius: var(--r-xl); }
.skeleton--producto { height: 168px; border-radius: var(--r-lg); }
.skeleton--linea { height: 64px; margin: 8px 0; }
.skeleton--fecha { height: 112px; border-radius: 18px; }
.skeleton--titulo { height: 72px; }
.skeleton--estado { height: 250px; border-radius: var(--r-lg); }
.skeleton--detalle { height: 260px; border-radius: var(--r-lg); }
.skeleton--pedido { height: 150px; border-radius: var(--r-lg); }
.skeleton--opcion { height: 64px; border-radius: var(--r-lg); }
.producto-foto:not(.is-cargada):not(.producto-foto--emoji)::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  transform: translateX(-100%); animation: brillo 1.3s infinite;
}

/* ---------- Animaciones propias ---------- */
@keyframes vista-entrar { from { opacity: 0; transform: translateY(10px); } }
@keyframes subir { from { transform: translateY(130%); } }
@keyframes menu-entrar { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
@keyframes destello { 0% { transform: translateX(-180%) skewX(-20deg); } 45%, 100% { transform: translateX(420%) skewX(-20deg); } }
@keyframes destello-ancho { 0% { transform: translateX(-200%) skewX(-20deg); } 50%, 100% { transform: translateX(460%) skewX(-20deg); } }
@keyframes barrido { 0% { transform: translateX(-100%); } 40%, 100% { transform: translateX(100%); } }
@keyframes cinta { to { background-position: 200% 0; } }
@keyframes menear { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-12deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-6deg); } }
@keyframes saludar { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-8deg); } 30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes rebote-grande { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes estampar {
  0% { opacity: 0; transform: scale(2.2) rotate(calc(var(--giro, 0deg) - 30deg)); }
  55% { opacity: 1; transform: scale(.88) rotate(calc(var(--giro, 0deg) + 6deg)); }
  100% { opacity: 1; transform: scale(1) rotate(var(--giro, 0deg)); }
}
@keyframes estampar-nuevo {
  0% { opacity: 0; transform: scale(3) rotate(-40deg); }
  50% { opacity: 1; transform: scale(.85) rotate(calc(var(--giro, 0deg) + 8deg)); }
  70% { transform: scale(1.08) rotate(var(--giro, 0deg)); }
  100% { opacity: 1; transform: scale(1) rotate(var(--giro, 0deg)); }
}
@keyframes onda { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes verificando {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(48, 162, 154, .35); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(48, 162, 154, 0); }
}
@keyframes voltear-reloj { 0%, 40% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes llenar-barra { from { transform: scaleX(0); } }
@keyframes llenar-vertical { from { transform: scaleY(0); } }
@keyframes rayas { to { background-position: 17px 0; } }
@keyframes pulso-anillo {
  0% { box-shadow: 0 0 0 0 rgba(48, 162, 154, .55); }
  70% { box-shadow: 0 0 0 12px rgba(48, 162, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 162, 154, 0); }
}
@keyframes pulso-anillo-dorado {
  0% { box-shadow: 0 0 0 0 rgba(211, 170, 46, .6); }
  70% { box-shadow: 0 0 0 12px rgba(211, 170, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(211, 170, 46, 0); }
}
@keyframes dibujar { from { opacity: 1; stroke-dashoffset: 1; } to { opacity: 1; stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .regalo::after, .banner-descuento::after, .sellos--premio::after, .pago-tarjeta__brillo,
  .celebracion__brillo, .producto-foto::before { display: none; }
}

/* =========================================================================
   Recomendá y ganá (#/recomendar) y bono por recomendar (inicio, menú, montos, pago, mis pedidos)
   ========================================================================= */
.menu__bono {
  margin-left: auto; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--gold-100); color: var(--gold-700); font-size: .78rem; font-weight: 800; white-space: nowrap;
}

/* Inicio: saldo del bono e invitación a recomendar */
.bono-inicio {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--gold-50), #fff);
  border: 1.5px dashed var(--gold-400);
  color: var(--ink-900); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.bono-inicio--saldo { border-style: solid; border-color: var(--gold-200); background: linear-gradient(135deg, var(--gold-100), var(--gold-50) 60%, #fff); }
a.bono-inicio:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bono-inicio__fila { display: flex; align-items: center; gap: 14px; }
.bono-inicio__icono { flex: none; font-size: 2rem; transform-origin: 50% 85%; animation: menear 3s ease-in-out infinite; }
.bono-inicio__texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bono-inicio__texto strong { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.bono-inicio__texto span { font-size: .9rem; color: var(--ink-700); }
.bono-inicio__cta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; border-top: 1px dashed var(--gold-200);
  font-family: var(--font-head); font-weight: 600; color: var(--teal-700);
}
.bono-inicio:not(.bono-inicio--saldo) .bono-inicio__cta { padding-top: 0; border-top: 0; justify-content: flex-end; font-size: .95rem; }
.bono-inicio__flecha { font-size: 1.3rem; transition: transform .2s var(--ease-out); }
a.bono-inicio:hover .bono-inicio__flecha { transform: translateX(4px); }

/* Montos (entrega, detalle del pedido) */
.montos__fila--bono {
  margin: 0 -4px; padding: 8px 12px; border-radius: 12px;
  background: var(--teal-50); border: 1px dashed var(--teal-200);
  color: var(--teal-800); font-weight: 700;
}
.montos__cubre {
  margin: 4px 0 0; padding: 10px 12px; border-radius: 12px;
  background: var(--gold-100); border: 1px solid var(--gold-200);
  color: var(--ink-900); font-family: var(--font-head); font-weight: 600; text-align: center;
}

/* Pago */
.pago-tarjeta__chip--bono { background: #fff; color: var(--teal-800); }
.pago-tarjeta__gratis { margin: 2px 0 var(--s-3); font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; line-height: 1.25; }
.pago-tarjeta__nota { margin: var(--s-2) 0 0; font-size: .95rem; opacity: .95; }
.resumen-pago__bono { margin: 4px 0 0; color: var(--teal-700); font-weight: 700; font-size: .92rem; }

/* Mis pedidos */
.pedido-card__extra { flex-wrap: wrap; }
.pedido-card__bono { padding: 2px 8px; border-radius: var(--r-pill); background: var(--teal-50); color: var(--teal-700); font-size: .78rem; font-weight: 800; white-space: nowrap; }

/* Pantalla #/recomendar */
.recomendar > .vista-cabecera__volver { margin-bottom: -4px; }
.ref-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--s-6) var(--s-5) var(--s-5); border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, .7), transparent 42%),
    linear-gradient(150deg, var(--gold-100), var(--gold-50) 55%, var(--cream-0));
  border: 1px solid var(--gold-200);
  box-shadow: 0 12px 28px rgba(160, 124, 20, .16);
}
.ref-hero__icono { display: inline-block; font-size: 3rem; line-height: 1; margin-bottom: var(--s-2); transform-origin: 50% 85%; animation: menear 2.8s ease-in-out infinite; }
.ref-hero__titulo { margin: 0 0 6px; font-size: clamp(1.65rem, 7vw, 2.3rem); line-height: 1.15; overflow-wrap: anywhere; }
.ref-hero__monto { display: inline-block; color: var(--teal-700); white-space: nowrap; }
.ref-hero__sub { margin: 0 auto var(--s-4); max-width: 32em; color: var(--ink-700); }
.ref-hero__sub strong { color: var(--ink-900); white-space: nowrap; }
.ref-reglas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.ref-reglas li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .72); border: 1px solid var(--gold-100);
  font-size: .95rem; line-height: 1.35; color: var(--ink-700);
}
.ref-reglas__icono { flex: none; width: 26px; text-align: center; font-size: 1.15rem; }
@media (min-width: 540px) { .ref-reglas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ref-inactivo {
  text-align: center; padding: var(--s-6) var(--s-5); border-radius: var(--r-xl);
  background: var(--surface); border: 1px dashed var(--line-strong); box-shadow: var(--shadow-sm);
}
.ref-inactivo__icono { display: block; font-size: 2.6rem; margin-bottom: var(--s-2); }
.ref-inactivo__titulo { margin: 0 0 6px; font-size: clamp(1.4rem, 6vw, 1.8rem); }
.ref-inactivo p { margin: 0; }

.monedero {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
  padding: var(--s-5); border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--teal-700), var(--teal-600));
  color: #fff; box-shadow: 0 10px 24px rgba(31, 125, 118, .25);
}
.monedero__principal { flex: 1 1 200px; min-width: 0; }
.monedero__etiqueta { margin: 0; font-family: var(--font-body); font-size: .78rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255, 255, 255, .92); }
.monedero__saldo { margin: 2px 0 4px; font-size: clamp(2.2rem, 10vw, 2.8rem); line-height: 1.05; color: #fff; }
.monedero__nota { margin: 0; font-size: .92rem; color: rgba(255, 255, 255, .94); }
.monedero__stats { flex: 1 1 190px; margin: 0; display: grid; gap: 8px; }
.monedero__stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .14); }
.monedero__stats dt { font-size: .88rem; color: rgba(255, 255, 255, .94); }
.monedero__stats dd { margin: 0; font-family: var(--font-head); font-weight: 600; }

.ref-form__cuerpo { display: flex; flex-direction: column; gap: var(--s-4); }
.ref-form__cuerpo > .alert { margin: 0; }
.ref-form__pendientes { margin: -6px 0 0; text-align: center; }
.ref-contactos { gap: 8px; }
.ref-o { display: flex; align-items: center; gap: 10px; margin: -4px 0; color: var(--text-muted); font-size: .85rem; font-weight: 700; }
.ref-o::before, .ref-o::after { content: ""; flex: 1; border-top: 1px dashed var(--line-strong); }
.ref-exito {
  display: flex; flex-direction: column; gap: var(--s-3);
  margin-bottom: var(--s-4); padding: var(--s-4); border-radius: var(--r-md);
  background: var(--teal-50); border: 1.5px solid var(--teal-200);
}
.ref-exito__cabecera { display: flex; align-items: flex-start; gap: 12px; }
.ref-exito__check {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--teal-600); color: #fff; font-weight: 800;
  animation: rebote-grande .6s var(--ease-spring) both;
}
.ref-exito__titulo { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; line-height: 1.3; color: var(--teal-800); overflow-wrap: anywhere; }
.ref-exito__titulo:focus { outline: none; }
.ref-exito .small { margin: 2px 0 0; color: var(--ink-700); }
.ref-exito__otra { align-self: center; }

.ref-lista__conteo { color: var(--text-muted); font-weight: 500; }
.recomendar .seccion-lista__titulo:focus { outline: none; }
.ref-lista__resumen { margin: -4px 0 0; }
.ref-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ref-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.ref-item--ganado { border-color: var(--gold-200); background: linear-gradient(135deg, var(--gold-50), #fff); }
.ref-item__avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream-100); color: var(--teal-700);
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
}
.ref-item--registrado .ref-item__avatar { background: var(--teal-50); }
.ref-item--ganado .ref-item__avatar { background: var(--gold-100); color: var(--gold-700); }
.ref-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ref-item__nombre { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.ref-item__tel { margin: 0; font-size: .9rem; color: var(--ink-700); font-variant-numeric: tabular-nums; }
.ref-item__estado { margin: 4px 0 0; }
.ref-item__meta { margin: 2px 0 0; font-size: .85rem; color: var(--text-muted); }
.ref-item__acciones { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 -10px; }
.ref-item__quitar { --btn-fg: var(--danger); }
.ref-item__quitar:hover { --btn-bg: var(--danger-bg); }
.ref-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 800; line-height: 1.3;
}
.ref-chip--invitado { background: var(--cream-100); color: var(--ink-700); border: 1px dashed var(--line-strong); }
.ref-chip--registrado { background: var(--teal-50); color: var(--teal-700); border: 1px solid var(--teal-100); }
.ref-chip--ganado { background: var(--gold-400); color: var(--ink-900); }

.skeleton--ref-hero { height: 340px; border-radius: var(--r-xl); }
.skeleton--monedero { height: 140px; border-radius: var(--r-lg); }
.skeleton--ref { height: 96px; border-radius: var(--r-lg); }

/* ---------- Revisión: invitación vencida, bono devuelto, "Usar otro número" ---------- */
.ref-item--vencida { background: var(--cream-50, var(--surface)); }
.ref-item--vencida .ref-item__avatar { opacity: .7; }
.ref-chip--vencida { background: var(--surface); color: var(--text-muted); border: 1px dashed var(--line-strong); }
.montos__devuelto { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-800); }
.acceso__otro-numero { margin-top: calc(-1 * var(--s-2, 8px)); text-align: left; font-size: .9rem; }
