:root {
  --oliva: #69723E; --oliva-osc: #4C5429; --oliva-cl: #8A9358;
  --bosque: #1E3B2C; --caramelo: #D88B4A; --caramelo-osc: #B9692C;
  --crema: #F7F2E8; --papel: #FFFDF8; --tinta: #2A2118;
  --pizarra: #A8B7C4; --pizarra-osc: #7F909E; --rosa: #B23A5B;
  --cafe: #6B4528; --madera-osc: #3A2618;
  --sombra: 0 14px 30px -14px rgba(42, 25, 10, .55);
  --r: 22px;
  --sans: 'Montserrat', system-ui, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --mano: 'Caveat', 'Bradley Hand', cursive;
  --ancho: 480px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--sans); color: var(--tinta); background: var(--oliva-osc);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { max-width: 100%; display: block; }
input { font: inherit; }

#app {
  position: relative; max-width: var(--ancho); margin: 0 auto; min-height: 100dvh;
  background: #C8924F url(assets/madera.webp) center top / 100% auto repeat-y;
  overflow: clip; padding-bottom: 110px;
}

/* ---------- cabecera ---------- */
.cab {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 10px; background: var(--oliva); color: var(--crema);
  transition: box-shadow .3s;
}
.cab.sombra { box-shadow: 0 10px 24px -14px rgba(0,0,0,.6); }
.marca { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.marca-chez { font-family: var(--serif); font-weight: 700; font-size: 30px; letter-spacing: .06em; }
.marca-bajada { font-size: 9.5px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; opacity: .85; margin-top: 3px; }
.cab-der { display: flex; gap: 8px; align-items: center; }
.pildora {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 99px;
  background: var(--crema); color: var(--oliva-osc); font-weight: 800; font-size: 12px; letter-spacing: .02em;
  box-shadow: 0 3px 0 rgba(0,0,0,.18); transition: transform .15s;
}
.pildora:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.pildora.mesa { background: var(--caramelo); color: #fff; }
.pildora .punto { width: 8px; height: 8px; border-radius: 50%; background: #8BC34A; box-shadow: 0 0 0 3px rgba(139,195,74,.25); }

/* ---------- vistas ---------- */
.vista { animation: entraVista .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes entraVista { from { opacity: 0; transform: translateY(14px); } }
.barrido { position: absolute; inset: 0; z-index: 25; background: var(--oliva); pointer-events: none;
  clip-path: circle(0 at var(--x, 50%) var(--y, 100%)); animation: barre .55s ease-in forwards; }
@keyframes barre { 50% { clip-path: circle(150% at var(--x) var(--y)); opacity: 1; } 100% { clip-path: circle(150% at var(--x) var(--y)); opacity: 0; } }

/* ---------- inicio: bloque oliva ---------- */
.saludo {
  position: relative; background: var(--oliva); color: var(--crema); padding: 6px 22px 150px;
  border-radius: 0 0 50% 50% / 0 0 46px 46px;
}
.saludo-chico { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.saludo-grande {
  font-weight: 900; font-size: clamp(30px, 9vw, 40px); line-height: .98; letter-spacing: -.01em; text-transform: uppercase; margin: 8px 0 0;
}
.saludo-grande em { font-style: normal; color: var(--caramelo); white-space: nowrap; }
.saludo-mano { font-family: var(--mano); font-size: 22px; color: #F3D9B5; margin-top: 4px; }

/* bloque de la mesa (solo con ?mesa=N) */
.mesa-bloque { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.mesa-bloque > * {
  height: 74px; border-radius: 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  background: rgba(255,255,255,.12); color: var(--crema); font-weight: 800; font-size: 12px; text-align: center; line-height: 1.1;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22);
}
.mesa-bloque .mesa-n { background: var(--crema); color: var(--oliva-osc); box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.mesa-bloque .mesa-n b { font-size: 26px; font-weight: 900; line-height: 1; }
.mesa-bloque svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- la taza del socio ---------- */
.taza-zona { position: relative; margin-top: -142px; display: flex; justify-content: center; z-index: 2; }
.taza {
  position: relative; width: min(78vw, 300px); aspect-ratio: 668 / 689;
  filter: drop-shadow(0 22px 22px rgba(40, 20, 5, .45));
  animation: tazaFlota 6s ease-in-out infinite;
}
@keyframes tazaFlota { 50% { transform: translateY(-5px) rotate(-1.2deg); } }
.taza > img { width: 100%; height: 100%; }
.espuma {
  position: absolute; left: 49%; top: 47.9%; width: 56.6%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; display: grid; place-items: center; overflow: hidden;
}
.espuma svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.espuma .tinta { fill: #6E4426; mix-blend-mode: multiply; }
.espuma .tinta-borde { fill: none; stroke: #6E4426; stroke-width: 2.4; mix-blend-mode: multiply; }
.espuma-num {
  position: relative; text-align: center; color: #6E4426; mix-blend-mode: multiply; line-height: .9;
  font-family: var(--serif); font-weight: 700; font-variant-numeric: lining-nums;
}
.espuma-num b { display: block; font-size: clamp(54px, 17vw, 72px); letter-spacing: -.02em; line-height: .8; }
.espuma-num small { display: block; font-family: var(--sans); font-weight: 800; font-size: 9.5px; letter-spacing: .18em; margin-top: 2px; }
.espuma .marca-visita { opacity: .18; transition: opacity .4s; }
.espuma .marca-visita.llena { opacity: .95; }
.espuma .marca-visita.nueva { animation: imprime .9s .3s both; }
@keyframes imprime { from { opacity: 0; transform: scale(1.8); transform-origin: center; transform-box: fill-box; } }
.taza-toque { position: absolute; inset: 0; border-radius: 50%; }

/* chips flotando alrededor de la taza */
.etiqueta-papel {
  position: absolute; background: var(--papel); color: var(--tinta); border-radius: 6px; padding: 7px 10px 6px;
  font-family: var(--mano); font-size: 19px; line-height: 1; box-shadow: var(--sombra); white-space: nowrap;
}
.etiqueta-papel::before { content: ''; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--crema); box-shadow: inset 0 0 0 1.5px #c9b79a; transform: translateY(-50%); }
.etiqueta-papel { padding-left: 21px; }
.taza-zona .etiqueta-papel.e1 { left: 10px; bottom: 26%; transform: rotate(-7deg); }
.taza-zona .etiqueta-papel.e2 { right: 6px; top: 6%; transform: rotate(6deg); }

/* ---------- tarjetas de la mesa ---------- */
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 16px 0; position: relative; z-index: 3; }
.tarjeta {
  position: relative; border-radius: var(--r); padding: 14px 14px 13px; box-shadow: var(--sombra);
  background: var(--papel); overflow: hidden; text-align: left; min-height: 128px; display: flex; flex-direction: column;
}
.tarjeta h3 { margin: 0; font-size: 13px; font-weight: 900; text-transform: uppercase; line-height: 1.05; letter-spacing: .01em; }
.tarjeta p { margin: 4px 0 0; font-size: 11.5px; line-height: 1.3; font-weight: 600; opacity: .8; }
.tarjeta .chico { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.tarjeta .boton-mini {
  margin-top: auto; align-self: flex-start; height: 32px; padding: 0 14px; border-radius: 99px; font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; background: var(--oliva); color: var(--crema); box-shadow: 0 3px 0 var(--oliva-osc);
}
.tarjeta.regalo .producto { position: absolute; right: -22px; bottom: -14px; width: 92px; transform: rotate(-10deg); filter: drop-shadow(0 8px 8px rgba(0,0,0,.25)); }
.tarjeta.regalo h3, .tarjeta.regalo p { max-width: 74%; }
.tarjeta.juego-t { background: var(--caramelo); color: #fff; }
.tarjeta.juego-t .boton-mini { background: #fff; color: var(--caramelo-osc); box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.tiradas { display: flex; gap: 4px; margin-top: 7px; }
.tiradas i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.tiradas i.si { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 15.5C5 12 3.5 9.5 4.6 7.3c.9-1.8 3.6-2 5.4.2 1.8-2.2 4.5-2 5.4-.2C16.5 9.5 15 12 10 15.5z' fill='%23D88B4A'/%3E%3C/svg%3E") center/80% no-repeat; }
.latte-mini { position: absolute; right: -24px; bottom: -26px; width: 92px; transform: rotate(14deg); filter: drop-shadow(0 8px 8px rgba(0,0,0,.25)); }
.tarjeta.juego-t h3, .tarjeta.juego-t p { max-width: 80%; }

/* ---------- riel de platos ---------- */
.seccion-t { display: flex; align-items: baseline; justify-content: space-between; padding: 26px 20px 4px; color: #fff; text-shadow: 0 1px 8px rgba(60,30,5,.45); }
.seccion-t h2 { margin: 0; font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: -.005em; }
.seccion-t button { font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.riel {
  display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 10px; scrollbar-width: none;
  scroll-padding-left: 16px;
}
.riel::-webkit-scrollbar { display: none; }
.riel img { -webkit-user-drag: none; user-select: none; }
.riel.arrastra { scroll-snap-type: none; cursor: grabbing; }
@media (hover: hover) { .riel { cursor: grab; } }
.plato {
  flex: 0 0 64%; scroll-snap-align: start; position: relative; padding: 18px 6px 6px; text-align: center;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s; transform: scale(.82); opacity: .82; transform-origin: 50% 70%;
}
.plato.foco { transform: scale(1); opacity: 1; }
.plato-img { position: relative; aspect-ratio: 1.15; display: grid; place-items: end center; }
.plato-img img { width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 18px 14px rgba(50,25,5,.45)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.plato.foco .plato-img img { transform: translateY(-6px) rotate(-3deg); }
.plato-img img.alto { width: auto; height: 118%; margin-bottom: -4%; }
.plato .etiqueta-papel { right: 14px; top: 10px; transform: rotate(8deg); font-size: 20px; z-index: 2; }
.plato .etiqueta-papel.nuevo { background: var(--rosa); color: #fff; font-family: var(--sans); font-weight: 900; font-size: 11px; letter-spacing: .12em; padding: 8px 10px 7px 21px; }
.plato-pie { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; }
.plato-nombre {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border-radius: 99px; background: rgba(255,253,248,.96);
  font-weight: 900; font-size: 12px; line-height: 1.1; text-transform: uppercase; box-shadow: var(--sombra); max-width: calc(100% - 46px); text-align: left;
}
.plato-ver { height: 38px; padding: 0 14px; border-radius: 99px; background: var(--rosa); color: #fff; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; box-shadow: 0 3px 0 #85263F; }
.mas {
  width: 38px; height: 38px; border-radius: 50%; background: var(--oliva); color: #fff; display: inline-grid; place-items: center;
  box-shadow: 0 3px 0 var(--oliva-osc); font-size: 22px; font-weight: 700; line-height: 1; flex: none;
}
.mas:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--oliva-osc); }
.puntos { display: flex; justify-content: center; gap: 6px; padding: 0 0 4px; }
.puntos i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.55); transition: width .3s, background .3s; }
.puntos i.si { width: 22px; background: #fff; }

/* ---------- servilleta: invitar ---------- */
.servilleta {
  position: relative; margin: 22px 18px 0; padding: 20px 20px 18px; background: #fff; border-radius: 4px; transform: rotate(-1.4deg);
  box-shadow: 0 18px 30px -16px rgba(50,25,5,.6);
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.025) 0 2px, transparent 2px 9px), repeating-linear-gradient(0deg, rgba(0,0,0,.02) 0 2px, transparent 2px 9px);
}
.servilleta::after { content: ''; position: absolute; right: 0; bottom: 0; width: 46px; height: 46px; background: linear-gradient(135deg, #fff 50%, #e8e1d5 50%); box-shadow: -4px -4px 8px rgba(0,0,0,.06); }
.servilleta .chico { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--oliva); }
.servilleta h3 { margin: 6px 0 0; font-weight: 900; font-size: 24px; line-height: 1; text-transform: uppercase; }
.servilleta h3 em { font-style: normal; color: var(--caramelo); }
.servilleta .mano { font-family: var(--mano); font-size: 22px; color: var(--cafe); margin: 8px 0 12px; line-height: 1.05; }
.servilleta .cookie { position: absolute; right: 12px; top: -26px; width: 104px; transform: rotate(12deg); filter: drop-shadow(0 10px 10px rgba(0,0,0,.28)); }
.deudas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.deudas span { font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 99px; background: var(--crema); }
.deudas span b { color: var(--oliva); }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 99px;
  font-weight: 800; font-size: 14px; background: var(--oliva); color: #fff; box-shadow: 0 4px 0 var(--oliva-osc); transition: transform .12s, box-shadow .12s;
}
.boton:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--oliva-osc); }
.boton.caramelo { background: var(--caramelo); box-shadow: 0 4px 0 var(--caramelo-osc); }
.boton.claro { background: var(--crema); color: var(--oliva-osc); box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.boton.ancho { width: 100%; }
.boton[disabled] { opacity: .45; pointer-events: none; }

/* ---------- placa (cumple, horarios) ---------- */
.placa {
  margin: 22px 16px 0; border-radius: var(--r); padding: 22px 20px; color: var(--crema); background: var(--bosque); box-shadow: var(--sombra);
  position: relative; overflow: hidden;
}
.placa .chico { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.placa h3 { margin: 6px 0 10px; font-weight: 900; font-size: 24px; line-height: 1; text-transform: uppercase; }
.placa h3 em { font-style: normal; color: var(--caramelo); }
.placa p { margin: 0 0 14px; font-size: 13px; line-height: 1.4; opacity: .85; max-width: 30ch; }
.precios-cumple { display: flex; gap: 10px; margin-bottom: 16px; }
.precios-cumple div { flex: 1; border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.precios-cumple b { display: block; font-size: 20px; font-weight: 900; }
.precios-cumple small { font-size: 11px; opacity: .8; font-weight: 600; }
.placa.oliva { background: var(--oliva); }
.placa .deco { position: absolute; right: -30px; bottom: -36px; width: 160px; opacity: .95; transform: rotate(-14deg); }
.info-local { display: grid; gap: 8px; font-size: 13px; font-weight: 600; }
.info-local div { display: flex; gap: 10px; align-items: center; }
.info-local svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--caramelo); stroke-width: 2; }
.pie { text-align: center; padding: 26px 20px 8px; color: rgba(255,255,255,.85); font-size: 11px; font-weight: 600; text-shadow: 0 1px 6px rgba(60,30,5,.4); }

/* ---------- bandeja (barra inferior) ---------- */
.bandeja {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: min(calc(100% - 24px), calc(var(--ancho) - 24px)); height: 72px; border-radius: 26px; display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #5A3B24, #3A2618); box-shadow: 0 18px 30px -12px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.12), inset 0 -3px 0 rgba(0,0,0,.25);
  padding: 7px; isolation: isolate;
}
.bandeja::before { content: ''; position: absolute; inset: 7px; border-radius: 20px; z-index: -2;
  background: repeating-linear-gradient(178deg, rgba(255,255,255,.035) 0 3px, transparent 3px 11px); }
.bandeja button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #E9D7BF; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; transition: color .3s; }
.bandeja button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.bandeja button.activo { color: var(--tinta); }
.bandeja button.activo svg { transform: translateY(-1px) scale(1.08); }
.bandeja-plato {
  position: absolute; z-index: -1; top: 7px; height: 58px; border-radius: 50%; width: 0; left: 0;
  background: radial-gradient(circle at 50% 45%, #C6D2DC 0 52%, #B5C3CF 53% 70%, #EFE6D6 72%);
  box-shadow: 0 6px 10px rgba(0,0,0,.35); transition: left .5s cubic-bezier(.3,1.4,.5,1), width .3s;
}
.cuenta { position: absolute; top: 3px; right: calc(50% - 22px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--caramelo); color: #fff; font-size: 10.5px; display: grid; place-items: center; font-weight: 900; box-shadow: 0 0 0 2px #3A2618; }
.cuenta.salta { animation: salta .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes salta { 40% { transform: scale(1.5); } }

/* ---------- carta ---------- */
.carta-cab { background: var(--oliva); color: var(--crema); padding: 4px 20px 16px; }
.carta-cab h1 { margin: 0; font-weight: 900; font-size: 34px; text-transform: uppercase; line-height: 1; }
.carta-cab p { margin: 6px 0 0; font-size: 12.5px; opacity: .85; font-weight: 600; }
.rubros { position: sticky; top: 64px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 12px; background: var(--oliva); scrollbar-width: none; box-shadow: 0 10px 18px -14px rgba(0,0,0,.6); }
.rubros::-webkit-scrollbar { display: none; }
.rubros button { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.14); color: var(--crema); transition: background .25s, color .25s; }
.rubros button.si { background: var(--crema); color: var(--oliva-osc); }
.rubro { padding: 18px 14px 0; scroll-margin-top: 130px; }
.rubro h2 { margin: 0 6px 10px; font-size: 18px; font-weight: 900; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(60,30,5,.5); }
.rubro .nota { margin: -6px 6px 10px; font-family: var(--mano); font-size: 19px; color: #fff; text-shadow: 0 1px 6px rgba(60,30,5,.6); }
.lista { background: var(--papel); border-radius: var(--r); box-shadow: var(--sombra); overflow: hidden; }
.fila { display: flex; gap: 12px; align-items: center; padding: 12px 14px; width: 100%; text-align: left; border-bottom: 1px solid #EFE7DA; }
.fila:last-child { border-bottom: 0; }
.fila-mini { flex: none; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, #E6D3B6 0 60%, #D8BD97 61%); display: grid; place-items: center; overflow: visible; }
.fila-mini img { width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(0,0,0,.25)); }
.fila-mini img.alto { height: 106%; width: auto; max-height: none; }
.fila-txt { flex: 1; min-width: 0; }
.fila-txt b { display: block; font-size: 14px; font-weight: 800; }
.fila-txt small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.3; color: #6d6253; margin-top: 3px; font-weight: 500; }
.fila-txt .precio { display: block; font-size: 13.5px; font-weight: 900; color: var(--oliva-osc); margin-top: 4px; }

/* ---------- hoja (ficha, registro, etc.) ---------- */
.velo { position: fixed; inset: 0; z-index: 60; background: rgba(25,18,10,.5); backdrop-filter: blur(3px); animation: aparece .3s both; }
@keyframes aparece { from { opacity: 0; } }
.hoja {
  position: fixed; z-index: 61; left: 50%; bottom: 0; width: min(100%, var(--ancho)); max-height: 92dvh; transform: translateX(-50%);
  background: var(--papel); border-radius: 28px 28px 0 0; display: flex; flex-direction: column; animation: sube .45s cubic-bezier(.2,.9,.2,1) both;
  box-shadow: 0 -20px 40px -20px rgba(0,0,0,.5);
}
.hoja.cierra { animation: baja .3s ease-in both; }
@keyframes sube { from { transform: translate(-50%, 100%); } }
@keyframes baja { to { transform: translate(-50%, 100%); } }
.hoja-asa { width: 44px; height: 5px; border-radius: 9px; background: #d9cfbf; margin: 10px auto 0; flex: none; }
.hoja-cuerpo { overflow-y: auto; padding: 8px 20px calc(env(safe-area-inset-bottom, 0px) + 20px); overscroll-behavior: contain; }
.hoja h2 { margin: 6px 0 4px; font-weight: 900; font-size: 26px; text-transform: uppercase; line-height: 1; }
.hoja .sub { margin: 0 0 14px; font-size: 13.5px; line-height: 1.45; color: #5f5446; }
.ficha-foto {
  margin: 8px -20px 0; aspect-ratio: 4/3; display: grid; place-items: center; padding: 18px 30px 10px;
  background: #C8924F url(assets/madera.webp) center / cover;
}
.ficha-foto img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 16px rgba(50,25,5,.5)); animation: fichaEntra .6s .1s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes fichaEntra { from { transform: translateY(30px) scale(.85) rotate(-6deg); opacity: 0; } }
.ficha-precio { font-weight: 900; font-size: 22px; color: var(--oliva-osc); }
.ficha-pie {
  position: sticky; bottom: 0; margin: 16px -6px 0; padding: 10px; border-radius: 99px; display: flex; align-items: center; gap: 10px;
  background: var(--tinta); box-shadow: 0 14px 28px -10px rgba(0,0,0,.55);
}
.cant { display: flex; align-items: center; gap: 2px; background: rgba(255,255,255,.1); border-radius: 99px; color: #fff; }
.cant button { width: 40px; height: 40px; font-size: 22px; font-weight: 700; color: #fff; }
.cant b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.ficha-pie .boton { flex: 1; height: 46px; box-shadow: none; background: var(--caramelo); }
.campo { display: block; margin-bottom: 12px; }
.campo span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--oliva-osc); margin-bottom: 6px; }
.campo input { width: 100%; height: 50px; border-radius: 14px; border: 2px solid #E6DCCB; background: #fff; padding: 0 14px; font-size: 16px; font-weight: 600; outline: none; }
.campo input:focus { border-color: var(--oliva); }
.burbuja { background: #DCF8C6; border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: 14px; line-height: 1.4; margin: 6px 0 14px; box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.codigo { font-variant-numeric: lining-nums tabular-nums; font-family: var(--serif); font-weight: 700; font-size: 64px; letter-spacing: .14em; text-align: center; color: var(--oliva-osc); margin: 8px 0; font-variant-numeric: tabular-nums; }

/* ---------- club ---------- */
.club-cab { background: var(--oliva); color: var(--crema); padding: 4px 22px 120px; border-radius: 0 0 50% 50% / 0 0 40px 40px; }
.club-cab h1 { margin: 6px 0 0; font-weight: 900; font-size: 34px; line-height: .98; text-transform: uppercase; }
.club-cab h1 em { font-style: normal; color: var(--caramelo); white-space: nowrap; }
.club-cab .socio { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.14); }
.recorrido { position: relative; margin: -96px 14px 0; padding: 18px 12px 16px; border-radius: var(--r); background: var(--papel); box-shadow: var(--sombra); }
.recorrido-tazas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; }
.tz { position: relative; text-align: center; }
.tz-circ {
  position: relative; width: 100%; max-width: 74px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle, #F4EEE6 0 46%, #fff 47% 56%, var(--pizarra) 57% 92%, #EFE6D6 93%);
  box-shadow: 0 6px 10px -4px rgba(0,0,0,.25); display: grid; place-items: center;
}
.tz-circ svg { width: 40%; height: 40%; }
.tz.hecha .tz-circ { background: radial-gradient(circle, #B07A45 0 30%, #9A6436 46%, #fff 47% 56%, var(--pizarra) 57% 92%, #EFE6D6 93%); }
.tz.hecha .tz-circ svg path { fill: #FBF3E6; }
.tz:not(.hecha) .tz-circ svg path { fill: none; stroke: #CDBFAE; stroke-width: 1.4; stroke-dasharray: 2 2; }
.tz.hito .tz-circ::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--caramelo); }
.tz.ahora .tz-circ { animation: late 1.6s ease-in-out infinite; }
@keyframes late { 50% { transform: scale(1.07); } }
.tz small { display: block; margin-top: 6px; font-size: 10px; font-weight: 800; line-height: 1.15; color: #6d6253; }
.tz.hito small { color: var(--caramelo-osc); }
.tz img.regalo-img { position: absolute; width: 50px; right: -8px; top: -12px; transform: rotate(10deg); filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
.barra-prog { height: 8px; border-radius: 9px; background: #EEE5D6; margin: 16px 6px 6px; overflow: hidden; }
.barra-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--oliva), var(--caramelo)); border-radius: 9px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.prog-txt { margin: 0 6px; font-size: 12.5px; font-weight: 700; }
.regalos { padding: 0 14px; display: grid; gap: 12px; }
.regalo-fila { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--papel); border-radius: 18px; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.regalo-fila img { width: 68px; flex: none; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.regalo-fila div { flex: 1; min-width: 0; }
.regalo-fila b { display: block; font-size: 14px; font-weight: 800; }
.regalo-fila small { font-size: 12px; color: #6d6253; font-weight: 600; }
.regalo-fila .boton { height: 38px; padding: 0 14px; font-size: 12px; }
.regalo-fila.canjeado { opacity: .55; }
.vacio { padding: 18px; border-radius: 18px; background: rgba(255,253,248,.92); font-size: 13px; font-weight: 600; text-align: center; box-shadow: var(--sombra); }

/* ---------- pedido ---------- */
.ped-cab { background: var(--oliva); color: var(--crema); padding: 4px 22px 22px; }
.ped-cab h1 { margin: 0; font-size: 34px; font-weight: 900; text-transform: uppercase; line-height: 1; }
.ped-cab p { margin: 6px 0 0; font-size: 13px; font-weight: 600; opacity: .9; }
.ticket { margin: 18px 14px 0; background: var(--papel); border-radius: 18px; box-shadow: var(--sombra); padding: 6px 16px; position: relative; }
.ticket::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -8px; height: 16px; background: radial-gradient(circle at 8px 0, transparent 7px, var(--papel) 7.5px) 0 0 / 16px 16px repeat-x; }
.lin { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px dashed #E3D8C6; }
.lin:last-child { border-bottom: 0; }
.lin img { width: 46px; flex: none; }
.lin .n { flex: 1; font-size: 13.5px; font-weight: 700; }
.lin .n small { display: block; font-weight: 600; color: #7c6f5d; font-size: 11.5px; }
.lin .p { font-weight: 900; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.lin .cant { background: #F1EADF; color: var(--tinta); }
.lin .cant button { color: var(--tinta); width: 32px; height: 32px; font-size: 18px; }
.lin.premio .n { color: var(--caramelo-osc); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 12px; font-weight: 900; font-size: 20px; }
.total small { font-size: 12px; font-weight: 700; color: var(--oliva); }
.jugar-cierre { margin: 26px 14px 0; border-radius: var(--r); padding: 18px 16px; background: var(--caramelo); color: #fff; display: flex; gap: 14px; align-items: center; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.jugar-cierre img { width: 84px; flex: none; margin: -6px -4px -10px -6px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.3)); }
.jugar-cierre b { display: block; font-size: 16px; font-weight: 900; text-transform: uppercase; line-height: 1.05; }
.jugar-cierre small { display: block; font-size: 12px; font-weight: 600; margin-top: 4px; opacity: .95; }
.jugar-cierre .boton { margin-top: 10px; height: 38px; font-size: 12.5px; background: #fff; color: var(--caramelo-osc); box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.acciones-ped { padding: 20px 14px 0; display: grid; gap: 10px; }
.seguimiento { margin: 18px 14px 0; padding: 20px 18px; border-radius: var(--r); background: var(--papel); box-shadow: var(--sombra); }
.seguimiento .num { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--oliva); text-transform: uppercase; }
.seguimiento h2 { margin: 4px 0 14px; font-size: 30px; font-weight: 900; text-transform: uppercase; line-height: 1; }
.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: relative; }
.paso { text-align: center; font-size: 11px; font-weight: 800; color: #A89C8A; }
.paso i { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 50%; background: #EEE6D9; transition: background .4s, transform .4s; font-style: normal; font-size: 18px; }
.paso.si { color: var(--tinta); }
.paso.si i { background: var(--oliva); color: #fff; transform: scale(1.08); }
.paso.ahora i { animation: late 1.2s ease-in-out infinite; background: var(--caramelo); }
.visita-sumada { margin: 18px 14px 0; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--bosque); color: var(--crema); box-shadow: var(--sombra); }
.visita-sumada .mini-taza { width: 70px; flex: none; position: relative; }
.visita-sumada b { display: block; font-size: 15px; font-weight: 900; text-transform: uppercase; }
.visita-sumada small { font-size: 12px; opacity: .85; font-weight: 600; }

/* ---------- juego: latte art ---------- */
.juego { position: fixed; inset: 0; z-index: 70; background: var(--oliva); color: var(--crema); display: flex; flex-direction: column; align-items: center; overflow-y: auto; animation: aparece .3s both; }
.juego-in { width: min(100%, var(--ancho)); padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 30px; display: flex; flex-direction: column; align-items: center; min-height: 100%; }
.juego-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.cerrar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.cerrar svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.juego h2 { margin: 14px 0 0; font-weight: 900; font-size: 32px; text-transform: uppercase; line-height: .98; text-align: center; }
.juego h2 em { font-style: normal; color: var(--caramelo); }
.juego .instr { margin: 8px 0 0; text-align: center; font-size: 13.5px; font-weight: 600; opacity: .9; max-width: 30ch; line-height: 1.35; min-height: 2.7em; }
.juego-taza { position: relative; width: min(88vw, 360px); aspect-ratio: 668 / 689; margin: 14px 0 0; filter: drop-shadow(0 24px 24px rgba(0,0,0,.35)); }
.juego-taza > img { width: 100%; height: 100%; }
.juego-taza canvas { position: absolute; left: 49%; top: 47.9%; width: 56.6%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; touch-action: none; cursor: crosshair; }
.medidor { margin-top: 12px; width: 100%; max-width: 330px; }
.medidor-barra { position: relative; height: 14px; border-radius: 9px; background: rgba(0,0,0,.18); overflow: hidden; }
.medidor-barra i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #F3D9B5, var(--caramelo)); border-radius: 9px; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.medidor-barra u { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #fff; left: 70%; border-radius: 2px; }
.medidor-txt { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; margin-top: 6px; }
.medidor-txt b { font-size: 15px; font-variant-numeric: tabular-nums; min-width: 4ch; display: inline-block; text-align: right; }
.juego .boton-fila { display: flex; gap: 10px; margin-top: 16px; width: 100%; max-width: 330px; }
.juego .boton-fila .boton { flex: 1; }
.premio-carta { margin-top: 74px; width: 100%; max-width: 340px; border-radius: var(--r); background: var(--papel); color: var(--tinta); padding: 18px 16px; text-align: center; position: relative; box-shadow: 0 20px 34px -16px rgba(0,0,0,.55); animation: premioEntra .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes premioEntra { from { transform: translateY(40px) scale(.8); opacity: 0; } }
.premio-carta img { width: 150px; margin: -70px auto 0; filter: drop-shadow(0 12px 12px rgba(0,0,0,.3)); }
.premio-carta b { display: block; font-size: 20px; font-weight: 900; text-transform: uppercase; margin-top: 4px; }
.premio-carta small { display: block; font-size: 13px; font-weight: 600; color: #6d6253; margin-top: 4px; }
.confeti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confeti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: cae 1.6s ease-in forwards; }
@keyframes cae { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- aviso ---------- */
.aviso {
  position: fixed; z-index: 90; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 74px); transform: translateX(-50%);
  max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 16px; background: var(--tinta); color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 16px 30px -12px rgba(0,0,0,.6); animation: avisoEntra .4s cubic-bezier(.2,1.4,.4,1) both; text-align: center;
}
@keyframes avisoEntra { from { transform: translate(-50%, -20px); opacity: 0; } }

/* ---------- producto que vuela al pedido ---------- */
.vuela { position: fixed; z-index: 95; width: 90px; pointer-events: none; transition: transform .75s cubic-bezier(.5,-0.3,.6,1), opacity .75s; filter: drop-shadow(0 8px 8px rgba(0,0,0,.3)); }

/* ---------- entrada ---------- */
.entrada { position: fixed; inset: 0; z-index: 100; background: var(--oliva); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.entrada-taza { position: relative; width: min(70vw, 300px); aspect-ratio: 668/689; animation: entradaTaza 2.4s cubic-bezier(.6,0,.3,1) both; filter: drop-shadow(0 24px 24px rgba(0,0,0,.35)); }
.entrada-img { width: 100%; height: 100%; }
.entrada-corazon { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: circle(0% at 49% 47.9%); animation: vierte 1.1s .55s cubic-bezier(.5,0,.2,1) forwards; }
@keyframes vierte { 0% { clip-path: circle(0% at 49% 47.9%); filter: brightness(1.15); } 100% { clip-path: circle(29% at 49% 47.9%); filter: none; } }
.entrada-chorro { position: absolute; left: 49%; top: -60%; width: 9px; height: 108%; margin-left: -4.5px; border-radius: 9px; background: linear-gradient(#fff0, #FBF3E6 30%); transform-origin: top; transform: scaleY(0); animation: chorro 1.15s .35s ease-in-out forwards; }
@keyframes chorro { 0% { transform: scaleY(0); } 35% { transform: scaleY(1); opacity: 1; } 80% { transform: scaleY(1) translateY(0); opacity: 1; } 100% { transform: scaleY(.2) translateY(-40%); opacity: 0; } }
@keyframes entradaTaza { 0% { transform: translateY(40px) scale(.8) rotate(-20deg); opacity: 0; } 25% { opacity: 1; transform: none; } 100% { transform: none; } }
.entrada-marca { text-align: center; color: var(--crema); line-height: 1; animation: marcaEntra .7s 1.2s both; }
.entrada-marca span { display: block; font-family: var(--serif); font-weight: 700; font-size: 58px; letter-spacing: .1em; }
.entrada-marca small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; margin-top: 4px; opacity: .85; }
@keyframes marcaEntra { from { opacity: 0; transform: translateY(14px); letter-spacing: .4em; } }
.entrada.sale { animation: entradaSale .7s cubic-bezier(.7,0,.3,1) forwards; }
@keyframes entradaSale { to { clip-path: circle(0 at 50% 30%); } }
.entrada { clip-path: circle(150% at 50% 30%); }

/* teléfonos con poca altura útil (Safari con barras): la taza se achica para que regalo y juego queden a la vista */
@media (max-width: 699px) and (max-height: 760px) {
  .saludo { padding-bottom: 108px; }
  .saludo-grande { font-size: clamp(28px, 8.4vw, 34px); margin-top: 4px; }
  .taza-zona { margin-top: -104px; }
  .taza { width: min(60vw, 236px); }
  .taza-zona .etiqueta-papel.e2 { top: 2%; }
  .taza-zona .etiqueta-papel.e1 { bottom: 18%; }
  .tarjeta { min-height: 118px; padding: 12px 12px 11px; }
  .tarjeta p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- pantallas anchas: el teléfono no cambia ---------- */
@media (min-width: 700px) {
  :root { --ancho: 760px; }
  body { background: var(--oliva-osc) radial-gradient(circle at 20% 10%, rgba(255,255,255,.06), transparent 40%); }
  .saludo { padding: 14px 36px 170px; }
  .saludo-grande { font-size: 46px; }
  .taza-zona { margin-top: -160px; }
  .taza { width: 340px; }
  .taza-zona .etiqueta-papel.e1 { left: 60px; }
  .taza-zona .etiqueta-papel.e2 { right: 60px; }
  .dos { padding: 10px 28px 0; gap: 16px; }
  .tarjeta { min-height: 150px; padding: 18px; }
  .tarjeta h3 { font-size: 16px; }
  .tarjeta p { font-size: 13px; }
  .tarjeta.regalo .producto { width: 120px; }
  .plato { flex-basis: 38%; }
  .riel { padding-left: 28px; scroll-padding-left: 28px; }
  .seccion-t { padding-left: 34px; padding-right: 34px; }
  .servilleta, .placa { margin-left: 28px; margin-right: 28px; }
  .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .duo .placa { margin-right: 10px; }
  .duo .placa + .placa { margin-left: 10px; margin-right: 28px; }
  .rubro { padding-left: 24px; padding-right: 24px; }
  .lista { display: grid; grid-template-columns: 1fr 1fr; }
  .fila { border-right: 1px solid #EFE7DA; }
  .recorrido, .regalos { margin-left: 28px; margin-right: 28px; }
  .regalos { padding: 0; grid-template-columns: 1fr 1fr; }
  .tz-circ { max-width: 96px; }
  .ticket, .jugar-cierre, .seguimiento, .visita-sumada, .acciones-ped { margin-left: 28px; margin-right: 28px; }
  .acciones-ped { padding-left: 0; padding-right: 0; }
  .hoja { border-radius: 28px; bottom: 50%; transform: translate(-50%, 50%); width: min(560px, 92vw); max-height: 88dvh; animation-name: subeCentro; }
  .hoja.cierra { animation-name: bajaCentro; }
  @keyframes subeCentro { from { transform: translate(-50%, 60%); opacity: 0; } }
  @keyframes bajaCentro { to { transform: translate(-50%, 60%); opacity: 0; } }
  .ficha-foto { margin-left: -20px; margin-right: -20px; }
}
@media (min-width: 1100px) {
  :root { --ancho: 860px; }
  .plato { flex-basis: 32%; }
}
