/* Costeo de platillos · Cocina Tres Comales
   Paleta: estraza (papel de mercado), papel de ticket, tinta de comal,
   rojo chile, verde nopal, amarillo cempasúchil y rosa mexicano. */
:root {
  --estraza: #cba978;
  --estraza-2: #bf9a66;
  --estraza-claro: #e2cba2;
  --papel: #fbf6ea;
  --papel-2: #f3ead6;
  --tinta: #2b1b12;
  --tinta-2: #5a4334;
  --chile: #b42318;
  --chile-osc: #7a140d;
  --nopal: #2e6b30;
  --cempa: #e9a21b;
  --rosa: #c8195e;
  --rosa-osc: #a3124b;
  --wa: #0f7a6e;
  --wa-osc: #0b6359;
  --cab: 150px;
  --f-rotulo: 'Alfa Slab One', 'Rockwell', serif;
  --f-cuerpo: 'Archivo', system-ui, sans-serif;
  --f-ticket: 'Courier Prime', 'Courier New', monospace;
  --sombra: 0 1px 0 rgba(43, 27, 18, .12), 0 6px 18px -8px rgba(43, 27, 18, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--cab) + .5rem); }
body {
  margin: 0;
  font-family: var(--f-cuerpo);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tinta);
  background-color: var(--estraza);
  /* fibra del papel de estraza */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: 0; background: var(--tinta); color: var(--papel); padding: .5rem 1rem; z-index: 100; }
.saltar:focus { left: .5rem; }
[hidden] { display: none !important; }

/* ── Cabecera ─────────────────────────────────── */
.cabecera { position: sticky; top: 0; z-index: 30; background: var(--estraza); box-shadow: 0 2px 0 rgba(43, 27, 18, .18); }
.demo-banner { background: #2b2620; color: #f2ece1; text-align: center; font-size: .8rem; line-height: 1.35; padding: .35rem .9rem; letter-spacing: .01em; }
@media (min-width: 640px) { .demo-banner { font-size: .88rem; } }
.barra { display: flex; align-items: center; justify-content: space-between; gap: .6rem; max-width: 1120px; margin: 0 auto; padding: .5rem 1rem .3rem; }
.marca { display: flex; align-items: center; gap: .55rem; text-decoration: none; min-width: 0; }
.marca-comales { display: grid; grid-template-columns: repeat(3, 12px); gap: 3px; }
.marca-comales i { width: 12px; height: 12px; border-radius: 50%; background: var(--tinta); box-shadow: inset 0 0 0 2.5px var(--chile); }
.marca-comales i:nth-child(2) { box-shadow: inset 0 0 0 2.5px var(--cempa); }
.marca-comales i:nth-child(3) { box-shadow: inset 0 0 0 2.5px var(--nopal); }
.marca-texto { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.marca-texto strong { font-family: var(--f-rotulo); font-weight: 400; font-size: 1.12rem; letter-spacing: .01em; white-space: nowrap; }
.marca-texto small { font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.barra-acciones { display: flex; gap: .4rem; flex-shrink: 0; }
.icono-btn, .restaurar { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: 0 .6rem; border: 2px solid var(--tinta); border-radius: 999px; background: transparent; cursor: pointer; font-weight: 700; font-size: .85rem; }
.icono-btn { width: 40px; justify-content: center; padding: 0; }
.icono-btn svg, .restaurar svg { width: 20px; height: 20px; }
.icono-btn .ico-off { display: none; }
.icono-btn[aria-pressed="false"] .ico-on { display: none; }
.icono-btn[aria-pressed="false"] .ico-off { display: block; }
.icono-btn:hover, .restaurar:hover { background: var(--tinta); color: var(--estraza-claro); }
@media (max-width: 420px) { .restaurar span { display: none; } .restaurar { width: 40px; justify-content: center; padding: 0; } }

.pestanas { display: flex; gap: .3rem; max-width: 1120px; margin: 0 auto; padding: .25rem 1rem .55rem; overflow-x: auto; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas a { flex: 0 0 auto; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 700; font-size: .9rem; padding: .42rem .7rem; border-radius: 999px; border: 2px solid transparent; white-space: nowrap; }
.pestanas a:hover { border-color: var(--tinta); }
.pestanas a.activa { background: var(--tinta); color: var(--papel); }
@media (max-width: 420px) { .pestanas { gap: 0; padding-left: .5rem; padding-right: .5rem; } .pestanas a { font-size: .8rem; padding: .4rem .5rem; letter-spacing: -.01em; } }

main { max-width: 1120px; margin: 0 auto; padding: 0 1rem 4rem; }
.vista { padding-top: 1rem; }

/* ── Intro ────────────────────────────────────── */
.intro { display: grid; gap: .9rem; margin-bottom: 1.1rem; }
.intro-foto { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); aspect-ratio: 21 / 8; }
.intro-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%; }
.eyebrow { margin: 0 0 .2rem; font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
h1, h2 { font-family: var(--f-rotulo); font-weight: 400; line-height: 1.08; letter-spacing: .005em; margin: 0; }
h1 { font-size: clamp(2rem, 8.5vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 5.5vw, 2rem); }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; font-weight: 800; }
.intro-texto p { margin: .5rem 0 0; max-width: 56ch; }
.sello-ejemplo { display: inline-block; margin-top: .7rem !important; padding: .25rem .6rem; border: 2px dashed var(--tinta); border-radius: 6px; font-size: .82rem; font-weight: 700; transform: rotate(-1deg); }
@media (min-width: 860px) {
  .intro { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2rem; }
  .intro-foto { aspect-ratio: 4 / 3; order: 2; }
}

/* ── Simulador ────────────────────────────────── */
.sim { background: var(--papel); border-radius: 16px; padding: .9rem .9rem 1rem; box-shadow: var(--sombra); position: relative; }
.sim-cabeza { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; }
.sim-cabeza h2 { font-size: clamp(1.3rem, 5.4vw, 1.9rem); }
.sim-cabeza .sim-ayuda:not(.guia-inline) { display: none; }
@media (min-width: 700px) { .sim-cabeza .sim-ayuda:not(.guia-inline) { display: block; } }
#sim-nombre { color: var(--chile); }
.sim-ayuda { margin: 0; font-size: .92rem; color: var(--tinta-2); }
.sim-ayuda.guia-inline { color: #fff; background: var(--rosa); border-radius: 8px; padding: .35rem .6rem; font-weight: 700; margin-top: .3rem; animation: latido 1.4s ease-in-out infinite; }
.sim-ayuda.guia-inline button { all: unset; cursor: pointer; text-decoration: underline; margin-left: .4rem; font-weight: 600; }
@keyframes latido { 50% { transform: scale(1.02); } }
.vista-cabeza .sim-ayuda { color: var(--tinta); margin-top: .3rem; max-width: 60ch; }
.sim-insumos { display: flex; gap: .45rem; margin: .7rem 0 .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sim-insumos::-webkit-scrollbar { display: none; }
.insumo { flex: 0 0 auto; display: flex; align-items: center; gap: .4rem; padding: .2rem .7rem .2rem .2rem; border: 2px solid var(--papel-2); background: var(--papel-2); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .88rem; }
.insumo img { width: 34px; height: 34px; object-fit: contain; }
.insumo[aria-checked="true"] { border-color: var(--tinta); background: #fff; }
.insumo .mult { font-size: .75rem; color: var(--chile); }
.sim-control { display: grid; gap: .25rem; }
.sim-precio { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; font-size: .95rem; }
.sim-precio span { color: var(--tinta-2); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.sim-precio b { font-size: 1.5rem; font-weight: 800; }
.sim-precio em { font-style: normal; font-weight: 800; font-size: .9rem; padding: .05rem .45rem; border-radius: 6px; background: var(--papel-2); }
.sim-precio em.sube { background: var(--chile); color: #fff; }
.sim-precio em.baja { background: var(--nopal); color: #fff; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--nopal), var(--cempa) 50%, var(--chile)); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--nopal), var(--cempa) 50%, var(--chile)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -12px; border-radius: 50%; background: var(--papel); border: 4px solid var(--tinta); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--papel); border: 4px solid var(--tinta); }

.sim-botones { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .1rem; }
.sim-botones .btn { min-height: 40px; padding: .35rem .75rem; font-size: .86rem; border-radius: 999px; }
.sim-resumen { margin: .6rem 0 0; font-size: .92rem; font-weight: 600; }
.sim-resumen b { font-weight: 800; }
.sim-resumen .rojo { color: var(--chile); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem; border-radius: 10px; border: 2px solid var(--tinta); font-weight: 800; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.15; text-align: center; }
.btn-tinta { background: var(--tinta); color: var(--papel); }
.btn-tinta:hover { background: #000; }
.btn-claro { background: transparent; color: var(--tinta); }
.btn-claro:hover { background: var(--papel-2); }
.btn-chile { background: var(--chile); border-color: var(--chile); color: #fff; }
.btn-chile:hover { background: var(--chile-osc); border-color: var(--chile-osc); }
.btn-rosa { background: var(--rosa); border-color: var(--rosa); color: #fff; }
.btn-rosa:hover { background: var(--rosa-osc); border-color: var(--rosa-osc); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; font-size: 1.02rem; padding: .7rem 1.2rem; }
.btn-wa:hover { background: var(--wa-osc); }
.btn-wa svg { width: 22px; height: 22px; }

/* ── La comanda (lista del simulador) ─────────── */
.comanda { list-style: none; margin: 1rem 0 0; padding: 1rem .8rem 1.4rem; background: var(--papel); border-radius: 4px 4px 0 0; box-shadow: var(--sombra); position: relative;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x; }
.comanda-fila { position: relative; border-bottom: 1px dashed rgba(43, 27, 18, .28); transition: background-color .35s; }
.comanda-fila > button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: .3rem .65rem; padding: .45rem .1rem .55rem; }
.comanda-fila > button:focus-visible { outline: 3px solid var(--rosa); outline-offset: -2px; }
.comanda-fila:last-child { border-bottom: 0; }
.comanda-fila img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.cf-nombre { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.cf-sub { display: block; font-size: .8rem; color: var(--tinta-2); font-weight: 500; }
.cf-num { text-align: right; line-height: 1.15; }
.cf-gana { font-weight: 800; font-size: 1.02rem; display: block; }
.cf-pct { display: inline-block; font-size: .78rem; font-weight: 800; padding: .05rem .4rem; border-radius: 5px; margin-top: .1rem; }
.cf-barra { grid-column: 2 / 4; height: 6px; border-radius: 999px; background: var(--papel-2); overflow: hidden; }
.cf-barra i { display: block; height: 100%; border-radius: 999px; transition: width .25s ease-out, background-color .25s; }
.st-sano .cf-pct { background: var(--nopal); color: #fff; }
.st-sano .cf-barra i { background: var(--nopal); }
.st-justo .cf-pct { background: var(--cempa); color: var(--tinta); }
.st-justo .cf-barra i { background: var(--cempa); }
.st-nodeja .cf-pct, .st-pierde .cf-pct { background: var(--chile); color: #fff; }
.st-nodeja .cf-barra i, .st-pierde .cf-barra i { background: var(--chile); }
.comanda-fila.st-nodeja, .comanda-fila.st-pierde { background: rgba(180, 35, 24, .1); }
.st-nodeja .cf-gana, .st-pierde .cf-gana { color: var(--chile); }

/* El sello de goma: la firma del sitio */
.sello { position: absolute; left: 3.9rem; bottom: .05rem; transform: rotate(-4deg); font-family: var(--f-rotulo); font-size: .68rem; line-height: 1; letter-spacing: .05em; color: var(--chile); border: 2.5px solid var(--chile); border-radius: 5px; padding: .12rem .35rem; background: var(--papel); pointer-events: none; white-space: nowrap; box-shadow: 0 1px 0 rgba(43,27,18,.15); }
.st-pierde .sello { background: var(--chile); color: #fff; }
.sella { animation: sellar .42s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes sellar { from { transform: rotate(-20deg) scale(2.6); opacity: 0; } 70% { opacity: 1; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.sacude { animation: sacudir .5s ease-in-out; }
@keyframes sacudir { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-7px) rotate(-.6deg); } 30% { transform: translateX(6px) rotate(.5deg); } 45% { transform: translateX(-5px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.nota-costos { font-size: .82rem; margin: .8rem 0 0; max-width: 70ch; }
@media (min-width: 960px) {
  #vista-simulador { display: grid; grid-template-columns: 400px 1fr; gap: 0 1.5rem; align-items: start; }
  #vista-simulador .intro { grid-column: 1 / -1; }
  .sim { position: sticky; top: calc(var(--cab) + 1rem); }
  .comanda { margin-top: 0; grid-column: 2; grid-row: 2 / span 2; }
  #vista-simulador .nota-costos { grid-column: 1; grid-row: 3; }
}

/* ── Cabezas de vista ─────────────────────────── */
.vista-cabeza { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .6rem 1rem; margin-bottom: 1rem; }
.vista-cabeza > div, .vista-cabeza h2 { flex: 1 1 260px; }

/* ── Tarjetas de la carta ─────────────────────── */
.tarjetas { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 720px) { .tarjetas { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1000px) { .tarjetas { grid-template-columns: repeat(4, 1fr); } }
.tarjeta { background: var(--papel); border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; position: relative; }
.tarjeta-abrir { all: unset; cursor: pointer; display: block; }
.tarjeta-abrir:focus-visible { outline: 3px solid var(--rosa); outline-offset: -3px; }
.tarjeta img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.tarjeta-lugar { position: absolute; top: .45rem; left: .45rem; background: var(--tinta); color: var(--papel); font-family: var(--f-rotulo); font-size: .85rem; min-width: 1.8rem; height: 1.8rem; border-radius: 999px; display: grid; place-items: center; padding: 0 .4rem; }
.tarjeta-cuerpo { padding: .55rem .65rem .2rem; }
.tarjeta h3 { font-size: .95rem; margin: 0 0 .25rem; line-height: 1.2; }
.tarjeta-precio { display: flex; justify-content: space-between; align-items: baseline; gap: .3rem; }
.tarjeta-precio b { font-family: var(--f-rotulo); font-weight: 400; font-size: 1.25rem; }
.tarjeta-datos { font-size: .8rem; color: var(--tinta-2); margin: .2rem 0 0; line-height: 1.35; }
.tarjeta-datos strong { color: var(--tinta); }
.tarjeta-acciones { display: flex; gap: .25rem; padding: .45rem .55rem .6rem; margin-top: auto; }
.mini { flex: 1; min-height: 38px; border-radius: 8px; border: 1.5px solid var(--tinta); background: transparent; font-weight: 700; font-size: .78rem; cursor: pointer; padding: 0 .3rem; }
.mini:hover { background: var(--papel-2); }
.vacio { grid-column: 1 / -1; background: var(--papel); border-radius: 14px; padding: 1.4rem 1rem; text-align: center; font-weight: 600; }
.vacio .btn { margin-top: .7rem; }

/* ── Despensa ─────────────────────────────────── */
.buscar input { width: 100%; min-height: 46px; padding: .5rem .9rem; border-radius: 10px; border: 2px solid var(--tinta); background: var(--papel); }
.despensa { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .5rem; }
@media (min-width: 760px) { .despensa { grid-template-columns: 1fr 1fr; } }
.ing { display: grid; grid-template-columns: 52px 1fr auto; gap: .2rem .65rem; align-items: center; background: var(--papel); border-radius: 12px; padding: .45rem .6rem; box-shadow: 0 1px 0 rgba(43, 27, 18, .12); }
.ing img, .ing .sin-foto { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; grid-row: span 2; }
.sin-foto { display: grid; place-items: center; background: var(--papel-2); font-family: var(--f-rotulo); font-size: 1.2rem; }
.ing-nombre { font-weight: 700; line-height: 1.2; }
.ing-uso { font-size: .78rem; color: var(--tinta-2); grid-column: 2; }
.ing-precio { display: flex; align-items: center; gap: .2rem; grid-row: span 2; }
.ing-precio input { width: 5.2rem; min-height: 42px; text-align: right; padding: 0 .4rem; border: 1.5px solid var(--tinta-2); border-radius: 8px; background: #fff; font-weight: 700; }
.ing-precio small { font-size: .78rem; white-space: nowrap; }
.ing-borrar { all: unset; cursor: pointer; font-size: .75rem; text-decoration: underline; color: var(--chile); }
.ing-borrar:disabled { color: var(--tinta-2); text-decoration: none; cursor: default; }
.desp-nuevo { margin-top: 1.2rem; background: var(--papel); border-radius: 14px; padding: 1rem; display: grid; gap: .6rem; box-shadow: var(--sombra); }
.desp-nuevo label { display: grid; gap: .2rem; font-weight: 700; font-size: .88rem; }
.desp-nuevo input, .desp-nuevo select { min-height: 44px; padding: 0 .7rem; border: 1.5px solid var(--tinta-2); border-radius: 8px; background: #fff; }
@media (min-width: 760px) { .desp-nuevo { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; } .desp-nuevo h3 { grid-column: 1 / -1; } }

/* ── Mapa: estrellas y lastres ────────────────── */
.mapa { position: relative; width: 100%; max-width: 640px; aspect-ratio: 1; margin: 0 auto; background: var(--papel); border-radius: 14px; box-shadow: var(--sombra); overflow: hidden; }
.cuadro { position: absolute; width: 50%; height: 50%; padding: .5rem .6rem; font-family: var(--f-rotulo); font-size: clamp(.78rem, 3.2vw, 1.05rem); line-height: 1.1; }
.cuadro small { display: block; font-family: var(--f-cuerpo); font-weight: 600; font-size: .72rem; margin-top: .15rem; }
.c-renta { right: 0; top: 0; background: rgba(46, 107, 48, .14); text-align: right; }
.c-joyas { left: 0; top: 0; background: rgba(233, 162, 27, .18); }
.c-consentidos { right: 0; bottom: 0; background: rgba(200, 25, 94, .1); text-align: right; display: flex; flex-direction: column; justify-content: flex-end; }
.c-estorban { left: 0; bottom: 0; background: rgba(180, 35, 24, .1); display: flex; flex-direction: column; justify-content: flex-end; }
.eje { position: absolute; font-size: .72rem; font-weight: 700; background: var(--papel); padding: 0 .3rem; border-radius: 4px; }
.eje-x { bottom: .3rem; left: 50%; transform: translateX(-50%); }
.eje-y { left: .2rem; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: left center; margin-left: .7rem; }
.punto { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; padding: 0; border: 3px solid var(--nopal); background: var(--papel); cursor: pointer; overflow: hidden; transition: left .5s cubic-bezier(.3, 1.3, .5, 1), top .5s cubic-bezier(.3, 1.3, .5, 1), transform .2s; box-shadow: 0 2px 6px rgba(43, 27, 18, .35); }
.punto img { width: 100%; height: 100%; object-fit: cover; }
.punto.st-justo { border-color: var(--cempa); }
.punto.st-nodeja, .punto.st-pierde { border-color: var(--chile); }
.punto[aria-pressed="true"] { transform: scale(1.35); z-index: 5; border-color: var(--rosa); }
.mapa-detalle { max-width: 640px; margin: .8rem auto 0; }
.detalle { background: var(--papel); border-radius: 14px; padding: .9rem 1rem; box-shadow: var(--sombra); display: grid; grid-template-columns: 64px 1fr; gap: .3rem .8rem; }
.detalle img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; grid-row: span 3; }
.detalle .grupo { font-family: var(--f-rotulo); font-size: .95rem; color: var(--rosa); }
.detalle h3 { margin: 0; }
.detalle p { margin: 0; font-size: .93rem; }
.detalle .consejo { grid-column: 1 / -1; margin-top: .4rem; padding: .6rem .7rem; background: var(--papel-2); border-left: 4px solid var(--rosa); border-radius: 0 8px 8px 0; }

/* ── CTA final y pie ──────────────────────────── */
.cta-final { margin-top: 2.2rem; background: var(--tinta); color: var(--papel); border-radius: 16px; overflow: hidden; display: grid; box-shadow: var(--sombra); }
.cta-final img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }
.cta-texto { padding: 1.2rem 1.1rem 1.4rem; }
.cta-texto h2 { color: var(--papel); font-size: clamp(1.35rem, 5.4vw, 2rem); }
.cta-texto p { margin: .6rem 0 1rem; max-width: 52ch; }
.cta-texto .cta-tel { font-size: .92rem; margin: .9rem 0 0; }
.cta-texto .cta-tel a { color: #ffd9e8; font-weight: 700; }
@media (min-width: 860px) { .cta-final { grid-template-columns: 1fr 1fr; align-items: center; } .cta-final img { height: 100%; aspect-ratio: auto; } .cta-texto { padding: 2rem; } }
.pie { text-align: center; padding: 1.2rem 1rem 5.5rem; font-size: .85rem; }
.pie p { margin: .3rem 0; }
.pie .credito a { font-weight: 700; }
.pie-imagenes { font-style: italic; }

.cta-flotante { position: fixed; left: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 25; background: var(--papel); color: var(--tinta); border: 2px solid var(--tinta); border-radius: 999px; padding: .5rem .85rem; font-size: .8rem; font-weight: 800; text-decoration: none; box-shadow: var(--sombra); max-width: calc(100% - 1.5rem); min-height: 42px; display: inline-flex; align-items: center; }
.cta-flotante:hover { background: var(--tinta); color: var(--papel); }
body.capa-abierta .cta-flotante, body.guia-abierta .cta-flotante, body.sim-activo .cta-flotante { display: none; }

/* ── Capas (editor, ticket, confirmación) ─────── */
body.capa-abierta { overflow: hidden; }
.capa { position: fixed; inset: var(--cab) 0 0 0; z-index: 40; background: var(--estraza); display: flex; flex-direction: column; }
.ed-barra { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; background: var(--tinta); color: var(--papel); }
.ed-volver { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.ed-volver svg { width: 24px; height: 24px; }
.ed-volver:focus-visible { outline: 3px solid var(--rosa); }
.ed-nombre { flex: 1; min-width: 0; }
.ed-nombre input { width: 100%; background: transparent; border: 0; border-bottom: 2px dashed rgba(251, 246, 234, .45); color: var(--papel); font-family: var(--f-rotulo); font-size: 1.15rem; padding: .2rem 0; }
.ed-nombre input:focus { outline: none; border-bottom-color: var(--papel); }
.ed-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.escenario { position: sticky; top: 0; z-index: 3; background: var(--estraza); display: grid; grid-template-columns: 1fr 42%; align-items: center; gap: .2rem .4rem; padding: .7rem .8rem .5rem; box-shadow: 0 6px 10px -8px rgba(43, 27, 18, .6); max-width: 760px; margin: 0 auto; }
.plato-zona { position: relative; }
.plato { position: relative; width: 100%; aspect-ratio: 1; }
.plato-img { width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(43, 27, 18, .45)); }
.plato-piezas { position: absolute; inset: 0; }
.pieza { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(var(--s, 1)); filter: drop-shadow(0 3px 2px rgba(43, 27, 18, .45)); transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); pointer-events: none; }
.pieza.cae { animation: caer .55s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes caer { 0% { transform: translate(-50%, -260%) rotate(calc(var(--r, 0deg) - 40deg)) scale(calc(var(--s, 1) * 1.5)); opacity: 0; } 55% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(var(--s, 1)); opacity: 1; } }
.pieza.sale { animation: salir .3s ease-in both; }
@keyframes salir { to { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
.vapor { position: absolute; left: 50%; top: 18%; width: 60%; height: 60%; transform: translateX(-50%); pointer-events: none; z-index: 2; }
.vapor i { position: absolute; bottom: 0; width: 26%; height: 70%; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 65%); filter: blur(6px); opacity: 0; animation: vapor 3.6s ease-out infinite; }
.vapor i:nth-child(1) { left: 18%; }
.vapor i:nth-child(2) { left: 40%; animation-delay: 1.2s; }
.vapor i:nth-child(3) { left: 62%; animation-delay: 2.4s; }
.plato-vacio .vapor { display: none; }
@keyframes vapor { 0% { transform: translateY(10%) scaleX(.8); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-70%) scaleX(1.3); opacity: 0; } }
.medidor { text-align: center; }
.medidor svg { width: 100%; height: auto; overflow: visible; }
.med-aguja { transform-origin: 100px 108px; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.med-margen { margin: -.2rem 0 0; font-family: var(--f-rotulo); font-size: clamp(1.5rem, 7vw, 2.2rem); line-height: 1; }
.med-ganas { margin: .15rem 0 0; font-weight: 800; font-size: .9rem; }
.med-etiqueta { display: inline-block; margin: .3rem 0 0; font-weight: 800; font-size: .78rem; padding: .1rem .5rem; border-radius: 6px; }
.medidor.st-sano .med-etiqueta { background: var(--nopal); color: #fff; }
.medidor.st-justo .med-etiqueta { background: var(--cempa); color: var(--tinta); }
.medidor.st-nodeja .med-etiqueta, .medidor.st-pierde .med-etiqueta { background: var(--chile); color: #fff; }
.medidor.st-nodeja .med-margen, .medidor.st-pierde .med-margen { color: var(--chile); }
.ed-agregar { grid-column: 1 / -1; }
.ed-agregar-t { margin: 0 0 .2rem; font-weight: 800; font-size: .85rem; }
.tira-ing { display: flex; gap: .4rem; overflow-x: auto; padding: .1rem 0 .3rem; scrollbar-width: thin; }
.chip-ing { flex: 0 0 auto; width: 66px; display: grid; justify-items: center; gap: .1rem; padding: .25rem .1rem .3rem; border-radius: 10px; border: 2px solid transparent; background: var(--papel); cursor: pointer; font-size: .68rem; font-weight: 700; line-height: 1.1; text-align: center; }
.chip-ing img, .chip-ing .sin-foto { width: 42px; height: 42px; object-fit: contain; border-radius: 6px; font-size: .9rem; }
.chip-ing:active { transform: scale(.94); }
.chip-ing.en-plato { border-color: var(--tinta); }
.ed-cuerpo { max-width: 760px; margin: 0 auto; padding: .9rem .8rem 3rem; }
.receta { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.r-linea { display: grid; grid-template-columns: 40px 1fr auto; gap: .1rem .55rem; align-items: center; background: var(--papel); border-radius: 10px; padding: .4rem .5rem; }
.r-linea img, .r-linea .sin-foto { width: 40px; height: 40px; object-fit: contain; grid-row: span 2; font-size: .9rem; }
.r-nombre { font-weight: 700; font-size: .9rem; line-height: 1.15; }
.r-costo { font-size: .78rem; color: var(--tinta-2); grid-column: 2; }
.r-cant { display: flex; align-items: center; gap: .2rem; grid-row: span 2; grid-column: 3; }
.r-cant button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--tinta); background: transparent; font-weight: 800; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.r-cant input { width: 3.9rem; min-height: 40px; text-align: center; border: 1.5px solid var(--tinta-2); border-radius: 8px; background: #fff; font-weight: 700; padding: 0 .2rem; }
.r-cant small { font-size: .72rem; width: 1.7rem; }
.r-quitar { all: unset; cursor: pointer; font-size: .74rem; color: var(--chile); text-decoration: underline; display: inline-flex; align-items: center; min-height: 40px; padding: 0 .5rem; margin: -.7rem 0 -.7rem -.3rem; }
.receta .vacio { padding: 1rem; }
.ed-total { font-weight: 800; margin: .7rem 0 0; }
.ed-precio { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.ed-precio label, .justo label { display: grid; gap: .25rem; font-weight: 700; font-size: .88rem; }
.ed-precio input { min-height: 46px; border: 1.5px solid var(--tinta-2); border-radius: 8px; background: #fff; padding: 0 .6rem; font-weight: 800; font-size: 1.1rem; width: 100%; }
.peso-input { display: flex; align-items: center; gap: .3rem; font-size: 1.1rem; }
.justo { margin-top: 1.1rem; background: var(--papel); border-radius: 14px; padding: .9rem; box-shadow: var(--sombra); }
.justo b { font-size: 1rem; color: var(--rosa); }
.justo-sug { margin: .2rem 0 .7rem; font-size: .95rem; }
.justo-sug strong { font-family: var(--f-rotulo); font-weight: 400; font-size: 1.6rem; display: block; }
.ed-acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.btn-borrar { border-color: var(--chile-osc); color: var(--chile-osc); }
.ed-guardado { font-size: .8rem; margin: .8rem 0 0; }

/* Ticket */
.capa-ticket { background: rgba(43, 27, 18, .9); align-items: center; padding: .8rem 1rem 1rem; overflow-y: auto; }
.impresora { width: min(340px, 92%); height: 34px; background: linear-gradient(#3b2a20, #1d120c); border-radius: 10px 10px 6px 6px; position: relative; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); z-index: 2; }
.ranura { position: absolute; left: 7%; right: 7%; bottom: 7px; height: 5px; background: #000; border-radius: 3px; }
.ticket-salida { width: min(300px, 82%); overflow: hidden; margin-top: -10px; flex-shrink: 0; padding-bottom: 12px; }
.ticket-papel { background: #fffdf7; color: #222; font-family: var(--f-ticket); font-size: .84rem; line-height: 1.35; padding: 1.2rem 1rem 1.6rem; box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 8px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 8px repeat-x; }
.ticket-papel.imprime { animation: imprimir 1.9s steps(14, end) both; }
@keyframes imprimir { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.tk-centro { text-align: center; }
.tk-titulo { font-weight: 700; font-size: 1rem; letter-spacing: .04em; }
.tk-foto { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: .5rem auto; filter: saturate(.85) contrast(1.05); }
.tk-linea { display: flex; justify-content: space-between; gap: .5rem; }
.tk-linea span:last-child { white-space: nowrap; }
.tk-sep { border: 0; border-top: 1.5px dashed #555; margin: .5rem 0; }
.tk-grande { font-weight: 700; font-size: .98rem; }
.tk-estado { margin-top: .5rem; text-align: center; font-weight: 700; border: 2px solid currentColor; padding: .2rem; transform: rotate(-2deg); }
.tk-estado.st-sano { color: var(--nopal); }
.tk-estado.st-justo { color: #8a5a00; }
.tk-estado.st-nodeja, .tk-estado.st-pierde { color: var(--chile); }
.ticket-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .9rem; }
.capa-ticket .ticket-botones { position: sticky; bottom: 0; z-index: 3; width: calc(100% + 2rem); margin: .4rem -1rem -1rem; padding: .7rem 1rem calc(.8rem + env(safe-area-inset-bottom)); background: rgba(43, 27, 18, .96); }
.capa-ticket .btn-claro { color: var(--papel); border-color: var(--papel); }
.capa-ticket .btn-claro:hover { background: rgba(255, 255, 255, .1); }
.capa-ticket .btn-tinta { background: var(--papel); color: var(--tinta); border-color: var(--papel); }

.capa-confirma { inset: 0; z-index: 60; background: rgba(43, 27, 18, .7); align-items: center; justify-content: center; padding: 1rem; }
.confirma-caja { background: var(--papel); border-radius: 14px; padding: 1.2rem; max-width: 360px; box-shadow: var(--sombra); }
.confirma-caja p { margin: 0; font-weight: 700; }
.confirma-caja .btn-claro { color: var(--tinta); border-color: var(--tinta); }

/* Guía */
.guia { position: fixed; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 50; max-width: 440px; margin: 0 auto; background: var(--tinta); color: var(--papel); border-radius: 14px; padding: .8rem 1rem .9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.guia.arriba { bottom: auto; top: calc(var(--cab) + .6rem); }
.guia-paso { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffb3cf; }
.guia-texto { margin: .2rem 0 .6rem; font-size: .98rem; font-weight: 600; }
.guia-botones { display: flex; align-items: center; gap: .8rem; }
.guia-saltar { all: unset; cursor: pointer; text-decoration: underline; font-size: .85rem; }
.guia-saltar:focus-visible { outline: 2px solid #fff; }
body.guia-abierta main { padding-bottom: 9rem; }
.resalta { position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--rosa), var(--sombra) !important; }

/* Toast */
.toast { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); bottom: calc(4.2rem + env(safe-area-inset-bottom)); z-index: 70; background: var(--tinta); color: var(--papel); padding: .6rem 1rem; border-radius: 10px; font-weight: 700; font-size: .92rem; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.ver { opacity: 1; transform: translateY(0); }
body.guia-abierta .toast { bottom: auto; top: calc(var(--cab) + .6rem); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .vapor { display: none; }
}
@media (min-width: 760px) { .escenario { grid-template-columns: 330px 1fr; } .medidor { max-width: 320px; justify-self: center; width: 100%; } }

/* Simulador compacto y fijo en celular: el deslizador y la comanda en la misma pantalla */
@media (max-width: 959px) {
  .sim { position: sticky; top: var(--cab); z-index: 6; padding: .6rem .75rem .65rem; border-radius: 0 0 16px 16px; margin: 0 -1rem; }
  .sim-cabeza h2 { font-size: 1.2rem; }
  .sim-insumos { margin: .4rem 0 .15rem; }
  .insumo { padding: .1rem .6rem .1rem .15rem; font-size: .82rem; }
  .insumo img { width: 30px; height: 30px; }
  .sim-precio { gap: .4rem; font-size: .85rem; }
  .sim-precio b { font-size: 1.15rem; }
  .sim-precio em { font-size: .8rem; }
  input[type="range"] { height: 38px; }
  .sim-botones { flex-wrap: nowrap; gap: .3rem; }
  .sim-botones .btn { min-height: 38px; padding: .3rem .6rem; font-size: .8rem; white-space: nowrap; }
  .sim-resumen { margin-top: .35rem; font-size: .82rem; line-height: 1.35; }
  .comanda { margin-top: .6rem; }
}
