/* assets/css/app_clientes.css - La app de los clientes v2 (app_clientes.php), de la maqueta v2 aprobada: crema y el color
   de la marca solo en las acciones, esquinas suaves, los dibujos (emojis) de los platos, a 390 px. El color de la marca
   (--naranja, --naranja-osc, --naranja-s) lo pone app_clientes.php desde marcaClientes(): aquí no se escribe.
   --naranja: el logo, los iconos (también el «+» de añadir: 22 px en negrita, texto grande), los bordes, el foco y las rayitas. --naranja-osc (el tostado, ≥ 4,5:1): todo fondo con
   letra blanca encima y el naranja como letra pequeña. --naranja-s: el fondo de lo elegido. */
:root {
    --tinta: #2A1D16; --gris: #7A6A60; --gris-claro: #A39388; --linea: #F1E6DB;
    --crema: #FFF8F1; --crema-2: #FCEBDD;
    --verde: #1E7A44; --verde-s: #E4F4EA; --ambar: #8A5A00; --ambar-s: #FFF1C9; --rojo: #B42318; --rojo-s: #FDECEA;
    --r: 24px; --r-s: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--tinta); font: 500 15px/1.4 Onest, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { max-width: 430px; margin: 0 auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; font-size: 16px; } /* 16 px: con menos, Safari del iPhone amplía la página al tocar la casilla (la hoja del correo quedaba pegada al borde) */
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; border-radius: 12px; }
.pantalla { min-height: 100vh; padding-bottom: 104px; }
.em { font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; line-height: 1; }
.icono { width: 20px; height: 20px; flex: none; }
.cargando { min-height: 60vh; display: grid; place-items: center; color: var(--gris-claro); font-weight: 800; font-size: 20px; }
.oculto-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- cabecera ---------- */
.cabecera { background: linear-gradient(180deg, var(--crema) 0%, #fff 100%); padding: 16px 16px 6px; border-radius: 0 0 28px 28px; }
.cab-arriba { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cab-arriba .marca { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.cab-arriba img { width: 34px; height: 34px; border-radius: 11px; }
.cab-arriba img.nombre-img { width: auto; height: 22px; border-radius: 0; }
.avatar { width: 38px; height: 38px; border-radius: 99px; background: var(--naranja-s); color: var(--naranja-osc); display: grid; place-items: center; font-weight: 800; flex: none; }
.entrar-chico { padding: 9px 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--linea); font-weight: 800; font-size: 14px; }
.saludo { margin: 14px 0 2px; color: var(--gris); font-weight: 600; }
.pregunta { margin: 0 0 14px; font-size: 27px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.chip-dir { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--linea); border-radius: 22px; padding: 6px 6px 6px 12px; box-shadow: 0 6px 18px rgba(196,104,40,.08); }
.chip-dir .donde { flex: 1; min-width: 0; }
.chip-dir small { display: block; color: var(--gris); font-size: 12px; font-weight: 600; }
.chip-dir b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.interruptor { display: flex; background: var(--crema); border-radius: 16px; padding: 3px; flex: none; }
.interruptor button { padding: 7px 10px; border-radius: 13px; font-weight: 800; font-size: 13px; color: var(--gris); }
.interruptor button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.14); }
.buscador { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; background: var(--crema); border-radius: 20px; padding: 0 16px; color: var(--gris); font-weight: 600; min-height: 48px; width: 100%; text-align: left; }
.buscador input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 13px 0; font-weight: 600; color: var(--tinta); }
.buscador input::placeholder { color: var(--gris); }

/* ---------- categorías ---------- */
.cats { display: flex; gap: 12px; overflow-x: auto; padding: 16px 16px 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 84px; text-align: center; font-size: 12.5px; font-weight: 700; }
.cat .circ { width: 66px; height: 66px; margin: 0 auto 6px; border-radius: 99px; background: var(--crema); border: 1.5px solid var(--crema-2); display: grid; place-items: center; font-size: 34px; }
.cat[aria-pressed="true"] .circ { background: var(--naranja-s); border-color: var(--naranja); }

/* ---------- secciones por tipo de negocio y filtros (punto 5, 4-oct) ---------- */
/* Las secciones llevan a su lista y los filtros se encienden y se apagan: lo elegido, con el fondo elegido y el borde de
   la marca, como la categoría elegida (nunca pastillas negras: docs/CLIENTES_APP.md, 1). En el teléfono, cada fila se
   desliza. */
.secs { display: flex; gap: 10px; overflow-x: auto; padding: 16px 16px 2px; scrollbar-width: none; }
.secs::-webkit-scrollbar { display: none; }
.sec { flex: none; display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 8px 16px 8px 8px; border-radius: 18px; background: var(--crema); border: 1.5px solid var(--crema-2); font-weight: 800; font-size: 14px; white-space: nowrap; }
.sec .em { width: 36px; height: 36px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 21px; }
.sec[aria-current="page"] { background: var(--naranja-s); border-color: var(--naranja); color: var(--naranja-osc); }
.filtros { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 2px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 99px; background: #fff; border: 1.5px solid var(--linea); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.filtro .icono { width: 16px; height: 16px; }
.filtro[aria-pressed="true"] { background: var(--naranja-s); border-color: var(--naranja); color: var(--naranja-osc); }
/* «Todo», por secciones: unas pocas de cada una (3 en el teléfono) y «Ver los N». */
.grupo + .grupo { margin-top: 24px; }
.grupo h3 { margin: 0 0 12px; font-size: 17px; font-weight: 800; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.grupo h3 .ver { font-size: 14px; color: var(--naranja-osc); font-weight: 800; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin: -12px -6px; }
.seccion h2 .h2-acc { display: inline-flex; gap: 16px; }
.seccion h2 .h2-acc > * { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; } /* «Ver todos» y «Cambiar», con sitio para el dedo */
.locales.recorte > .local:nth-child(n+4) { display: none; }

/* ---------- secciones ---------- */
.seccion { padding: 22px 16px 0; }
.seccion h2 { margin: 0 0 12px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.seccion h2 button, .seccion h2 a { font-size: 14px; color: var(--naranja-osc); font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: var(--crema); font-size: 13px; font-weight: 700; }
.chip.abierto { background: var(--verde-s); color: var(--verde); }
.chip.cerrado { background: #F3EEEA; color: var(--gris); }
.chip.ambar { background: var(--ambar-s); color: var(--ambar); }
.chip.ejemplo { background: #fff; color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--tinta); }
/* Valoraciones (f67): la nota, las opiniones de la ficha y valorar el pedido. Las estrellas, en ámbar (sin naranja). */
.nota-chica { color: var(--tinta); font-weight: 700; white-space: nowrap; }
.nota-chica .est, .op-est { color: var(--ambar); }
.nota-chica .n { color: var(--gris); font-weight: 500; }
button.chip.nota { border: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--tinta); cursor: pointer; }
.op-est { letter-spacing: 1px; white-space: nowrap; }
.op-est.grande { font-size: 26px; line-height: 1; }
.opiniones { margin: 28px 16px 8px; }
@media (min-width: 768px) and (min-height: 500px), (min-width: 1024px) { .opiniones { margin: 28px 0 8px; } }
.opiniones h2 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.op-resumen { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 18px; border-radius: var(--r-s); background: var(--crema); }
.op-grande { display: grid; justify-items: center; gap: 4px; min-width: 92px; }
.op-grande b { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.op-grande small { color: var(--gris); font-size: 13px; }
.op-barras { display: grid; gap: 5px; }
.op-barra { display: grid; grid-template-columns: 34px minmax(0, 1fr) 28px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--gris); }
.op-barra i { display: block; height: 8px; border-radius: 999px; background: #fff; overflow: hidden; }
.op-barra i b { display: block; height: 100%; border-radius: 999px; background: var(--ambar); }
.opinion { padding: 14px 0; border-bottom: 1px solid var(--linea); }
.op-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.op-fecha { color: var(--gris); font-size: 13px; }
.opinion > p { margin: 6px 0 0; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.op-resp { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--crema); font-size: 14px; }
.op-resp p { margin: 4px 0 0; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.valorar .op-resp { background: #fff; }
.op-denunciar { margin-top: 6px; padding: 6px 0; border: 0; background: none; color: var(--gris); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.op-denunciada { display: inline-block; margin-top: 8px; color: var(--gris); font-size: 13px; }
.op-cargando { color: var(--gris); }
.op-mas { margin-top: 14px; }
.op-motivos { display: grid; gap: 8px; margin: 12px 0 4px; }
.op-motivo { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 14px; background: var(--crema); font-weight: 600; cursor: pointer; }
.op-motivo input { width: 18px; height: 18px; accent-color: var(--tinta); }
.valorar { display: grid; gap: 8px; margin: 0 0 16px; padding: 16px; border-radius: var(--r-s); background: var(--crema); }
.valorar h2 { margin: 0; font-size: 18px; font-weight: 800; }
.valorar > p { margin: 0; color: var(--gris); font-size: 14px; line-height: 1.45; }
.valorar .valorar-txt { color: var(--tinta); white-space: pre-line; overflow-wrap: anywhere; }
.valorar .valorar-nota { font-size: 13px; }
/* «¿Problema con tu pedido?» (f72): el aviso (con su etiqueta de estado), el enlace discreto y su etiqueta en Mis pedidos. */
.problema-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.problema-cab .chip { flex: none; }
.problema-caja .btn-crema { background: #fff; } /* «Ya se resolvió»: en blanco sobre la tarjeta crema (como las estrellas de valorar) */
.enlace-problema { display: block; min-height: 44px; margin: 0 auto 8px; padding: 10px 14px; border: 0; background: none; color: var(--gris); font: inherit; font-size: 14px; font-weight: 700;
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.problema-chip { font-weight: 700; color: var(--ambar); }
.problema-chip.visto { color: var(--gris); }
.problema-chip.atendido { color: var(--verde); }
.pedido .acc .discreto { flex: 0 0 auto; background: none; box-shadow: none; color: var(--gris); text-decoration: underline; text-underline-offset: 3px; }
.estrellas-elegir { display: flex; gap: 8px; }
.estrellas-elegir button { width: 48px; height: 48px; border: 0; border-radius: 14px; background: #fff; color: var(--gris); font-size: 28px; line-height: 1; cursor: pointer; }
.estrellas-elegir button.si { color: var(--ambar); }
.estrellas-elegir button:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
/* «Mismo precio que en el local» (punto 7): con su icono, sin naranja (el naranja es de las acciones). */
.mismo-precio .icono { width: 15px; height: 15px; }
.local .datos .mismo-precio { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--tinta); font-size: 12.5px; font-weight: 700; }
.chip.agotado-chip { flex: none; background: #F3EEEA; color: var(--gris); }
.plato.agotado .ph img, .plato.agotado .ph.em { filter: grayscale(1); opacity: .55; }
.plato.agotado b, .plato.agotado .precio { color: var(--gris); }
.opcion.agotada { opacity: .55; cursor: not-allowed; }
.opcion.agotada small { color: var(--gris); }
.linea.agotada .ph { filter: grayscale(1); opacity: .6; }
.se-agoto { color: var(--rojo); font-weight: 800; }
.local .foto .ejemplo { position: absolute; left: 10px; bottom: 10px; z-index: 1; }
.vacio { padding: 26px 18px; border-radius: var(--r); background: var(--crema); text-align: center; color: var(--gris); }
.vacio .em { font-size: 40px; display: block; margin-bottom: 8px; }
.vacio b { display: block; color: var(--tinta); font-size: 16px; margin-bottom: 4px; }
.vacio .btn-chico { margin-top: 12px; }

/* El de siempre */
.colmado { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--crema); border: 1.5px solid var(--crema-2); }
.colmado .logo { width: 62px; height: 62px; border-radius: 18px; overflow: hidden; flex: none; background: #fff; display: grid; place-items: center; font-size: 30px; }
.colmado .logo img { width: 100%; height: 100%; object-fit: cover; }
.colmado > div:last-child { flex: 1; min-width: 0; }
.colmado b { font-size: 16px; font-weight: 800; }
.colmado p { margin: 2px 0 10px; color: var(--gris); font-size: 13px; }
.btn-chico { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 14px; background: var(--naranja-osc); color: #fff; font-weight: 800; font-size: 14px; }

/* Lo nuestro: efectivo y WhatsApp */
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aviso { padding: 14px; border-radius: var(--r-s); min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; }
.aviso .em { font-size: 32px; }
.aviso b { display: block; font-size: 15px; line-height: 1.2; font-weight: 800; }
.aviso small { display: block; margin-top: 4px; color: var(--gris); font-size: 12.5px; }
.aviso.efectivo { background: #FFF4D6; }
.aviso.wa { background: #E7F7EC; }

/* Tarjeta de local: toda la tarjeta lleva al local (el enlace la cubre; el corazón queda encima) */
.local { position: relative; display: block; border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--linea); margin-bottom: 18px; background: #fff; }
.local > a::after { content: ''; position: absolute; inset: 0; }
.local .foto { position: relative; height: 150px; background: var(--crema); display: grid; place-items: center; }
.local .foto img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.local .foto .em.grande { font-size: 64px; }
.local .corazon, .portada .fav { color: var(--naranja-osc); }
.local .corazon { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 99px; background: rgba(255,255,255,.95); display: grid; place-items: center; z-index: 1; }
.corazon[aria-pressed="true"] svg path, .fav[aria-pressed="true"] svg path { fill: currentColor; }
.local .estado { position: absolute; left: 10px; top: 10px; z-index: 1; }
.local .datos { padding: 12px 14px 4px; }
.local .datos b { font-size: 17px; font-weight: 800; }
.local .datos p { margin: 2px 0 0; color: var(--gris); font-size: 13.5px; }
.local .datos:last-child { padding-bottom: 14px; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 14px 14px; }
.mini { background: var(--crema); border-radius: 16px; padding: 8px; text-align: center; }
.mini .em { font-size: 30px; display: block; margin: 2px 0 4px; }
.mini img { width: 100%; height: 44px; object-fit: cover; border-radius: 10px; margin-bottom: 4px; }
.mini span { display: block; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini span.em { overflow: visible; } /* el dibujo pinta un poco por encima de su línea: el «…» de los nombres no lo corta */
.mini small { display: block; font-size: 12px; color: var(--naranja-osc); font-weight: 800; }
.local.cerrada .foto img { filter: grayscale(.55); opacity: .75; }

/* ---------- barra de abajo ---------- */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 406px; display: grid; grid-template-columns: repeat(4, 1fr);
        background: #fff; border: 1.5px solid var(--linea); border-radius: 26px; padding: 6px; z-index: 20; box-shadow: 0 10px 30px rgba(80,40,20,.12); }
.tabs a { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--gris); padding: 6px 0; border-radius: 20px; position: relative; }
.tabs a[aria-current="page"] { color: var(--naranja-osc); background: var(--naranja-s); }
.tabs .icono { width: 23px; height: 23px; }
.tabs .punto { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--naranja-osc); color: #fff; font-size: 11px; display: grid; place-items: center; }

/* ---------- buscar ---------- */
.rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cuadro { background: var(--crema); border-radius: var(--r-s); padding: 14px 6px 12px; text-align: center; font-weight: 700; font-size: 13px; }
.cuadro .em { font-size: 40px; display: block; margin-bottom: 8px; }
.cuadro[aria-pressed="true"] { background: var(--naranja-s); box-shadow: inset 0 0 0 1.5px var(--naranja); }
.recientes { list-style: none; margin: 0; padding: 0; }
.recientes button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; border-bottom: 1px solid var(--linea); font-weight: 600; text-align: left; }

/* ---------- local ---------- */
.portada { position: relative; height: 220px; background: var(--crema); display: grid; place-items: center; }
.portada img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.portada .em.grande { font-size: 84px; }
.portada .b { position: absolute; top: 14px; width: 44px; height: 44px; border-radius: 15px; background: rgba(255,255,255,.95); display: grid; place-items: center; z-index: 1; }
.portada .atras { left: 14px; } .portada .fav { right: 14px; }
.hoja-local { position: relative; margin-top: -26px; background: #fff; border-radius: 28px 28px 0 0; padding: 18px 16px 4px; }
.hoja-local h1 { margin: 0; font-size: 26px; line-height: 1.12; font-weight: 800; letter-spacing: -.015em; }
.hoja-local .sub { margin: 4px 0 10px; color: var(--gris); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.info { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-s); background: var(--crema); display: grid; gap: 8px; font-size: 14px; }
.info div { display: flex; gap: 10px; align-items: flex-start; }
.menu-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 14px 16px 6px; position: sticky; top: 0; background: #fff; z-index: 5; }
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tabs button { flex: none; padding: 9px 14px; border-radius: 16px; font-weight: 700; background: var(--crema); }
.menu-tabs button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; }
.cat-titulo { margin: 18px 16px 2px; font-size: 18px; font-weight: 800; }
.plato { display: flex; gap: 12px; align-items: center; padding: 12px 16px; width: 100%; text-align: left; }
.plato .ph { position: relative; flex: none; width: 84px; height: 84px; border-radius: 22px; background: var(--crema); display: grid; place-items: center; font-size: 42px; overflow: hidden; }
.plato .ph img { width: 100%; height: 100%; object-fit: cover; }
.plato > div { flex: 1; min-width: 0; }
.plato b { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; }
.plato p { margin: 3px 0 4px; color: var(--gris); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plato .precio { display: block; margin-top: 4px; font-weight: 800; color: var(--naranja-osc); }
.mas { flex: none; width: 40px; height: 40px; border-radius: 14px; background: var(--naranja); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.cant { flex: none; display: flex; align-items: center; gap: 4px; background: var(--naranja-s); border-radius: 14px; padding: 3px; }
.cant button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-weight: 800; font-size: 18px; color: var(--naranja-osc); }
.cant b { min-width: 16px; text-align: center; }
.barra-pedido { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 406px; z-index: 20; }
.btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 58px; padding: 0 18px; border-radius: 22px; font-weight: 800; font-size: 16px; }
.btn-naranja { background: var(--naranja-osc); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.btn-naranja:disabled { opacity: .55; box-shadow: none; }
.btn-crema { background: var(--crema); justify-content: center; }
.btn-centro { justify-content: center; }
.num { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 10px; background: rgba(255,255,255,.24); }

/* ---------- carrito ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 12px; position: sticky; top: 0; background: #fff; z-index: 5; }
.top .b { width: 44px; height: 44px; border-radius: 15px; background: var(--crema); display: grid; place-items: center; flex: none; }
.top h1 { margin: 0; font-size: 20px; font-weight: 800; }
.top small { display: block; color: var(--gris); font-weight: 600; font-size: 13px; }
.caja { margin: 0 16px 12px; padding: 14px; border-radius: var(--r); background: var(--crema); }
.caja h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.linea { display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.linea .ph { width: 52px; height: 52px; border-radius: 16px; background: #fff; display: grid; place-items: center; font-size: 28px; flex: none; overflow: hidden; }
.linea .ph img { width: 100%; height: 100%; object-fit: cover; }
.linea > div { flex: 1; min-width: 0; }
.linea small { display: block; color: var(--gris); }
.campo { display: block; width: 100%; border: 1.5px solid var(--linea); border-radius: 16px; padding: 12px 14px; background: #fff; min-height: 48px; }
.campo:focus { border-color: var(--naranja); outline: none; }
.campo.lleno { border-color: var(--verde); }
.etq { display: block; font-size: 13px; font-weight: 700; color: var(--gris); margin: 12px 0 6px; }
.etq:first-of-type { margin-top: 2px; }
.ayuda { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--gris); font-weight: 600; }
.ayuda.ok { color: var(--verde); }
.ayuda.mal { color: var(--rojo); }
.ayuda.ambar { color: var(--ambar); }
.enlace { color: var(--naranja-osc); font-weight: 800; }
.dos-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #fff; border-radius: 16px; padding: 4px; }
.dos-botones button { text-align: center; padding: 10px 4px; border-radius: 13px; font-weight: 800; font-size: 14px; color: var(--gris); }
.dos-botones button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; }
.dos-botones button:disabled { opacity: .5; }
/* La propina para el motorista: Nada · 5 % · 10 % · Otra, como «¿Cómo lo quieres?» pero en cuatro. */
.propina-botones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: #fff; border-radius: 16px; padding: 4px; }
.propina-botones button { text-align: center; padding: 10px 2px; border-radius: 13px; font-weight: 800; font-size: 14px; color: var(--gris); }
.propina-botones button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; }
.caja h3 .opcional { font-weight: 500; color: var(--gris); font-size: 13px; }
.guardadas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 4px; }
.guardadas button { flex: none; padding: 8px 12px; border-radius: 14px; background: #fff; font-weight: 700; font-size: 13.5px; border: 1.5px solid transparent; }
.guardadas button[aria-pressed="true"] { border-color: var(--naranja); color: var(--naranja-osc); }
.pago { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; margin-bottom: 8px; border: 1.5px solid transparent; width: 100%; text-align: left; }
.pago[aria-pressed="true"] { border-color: var(--naranja); }
.pago .em { font-size: 24px; }
.pago div { flex: 1; }
.pago small { display: block; color: var(--gris); font-weight: 500; }
.resumen div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; color: var(--gris); }
.resumen div span:last-child { white-space: nowrap; }
.resumen div.total { color: var(--tinta); font-weight: 800; font-size: 18px; padding-top: 8px; }
.wa-nota { display: flex; gap: 10px; align-items: flex-start; margin: 0 16px; padding: 12px 14px; border-radius: var(--r-s); background: #E7F7EC; color: #155C34; font-size: 14px; }
.error-nota { margin: 0 16px 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--rojo-s); color: var(--rojo); font-weight: 600; font-size: 14px; }

/* ---------- seguimiento ---------- */
.seg-cab { background: linear-gradient(180deg, var(--crema) 0%, #fff 100%); padding: 12px 16px 18px; border-radius: 0 0 28px 28px; }
.seg-cab .b { width: 44px; height: 44px; border-radius: 15px; background: #fff; display: grid; place-items: center; }
.seg-cab .grande { font-size: 72px; text-align: center; margin: 4px 0 0; }
/* El mapa del motorista mientras va en camino (punto 3): el lienzo se conserva entre repintados. */
.seg-cab.con-mapa { position: relative; padding: 0; overflow: hidden; background: var(--crema); }
.seg-cab.con-mapa .b { position: absolute; top: 12px; left: 16px; z-index: 500; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.seg-mapa, .seg-mapa-lienzo { height: 300px; }
.seg-mapa > .grande { height: 100%; display: flex; align-items: center; justify-content: center; margin: 0; } /* mientras carga el mapa */
.seg-cab:not(.con-mapa) .seg-mapa-nota { background: transparent; text-align: center; padding: 6px 0 0; }
.seg-mapa-nota { margin: 0; padding: 10px 16px 14px; font-size: 14px; color: var(--gris, #6b6258); background: #fff; }
.seg-mapa-nota b { color: var(--tinta, #1f1a16); }
.seg-mapa-nota.sin b { color: #B42318; }
.seg-pin { background: none; border: 0; }
.seg-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; font-size: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.seg-pin.moto span { width: 38px; height: 38px; font-size: 21px; border: 3px solid var(--naranja, #F05A1A); }
.seg-pin.moto.sin span { filter: grayscale(1); opacity: .7; border-color: #9a9188; }
.seg { padding: 14px 16px 0; }
.seg h1 { margin: 0; font-size: 25px; font-weight: 800; }
.seg .llega { color: var(--gris); margin: 4px 0 16px; }
.pasos { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; margin-bottom: 18px; }
.pasos::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 27px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--naranja) 0 var(--avance, 0%), var(--linea) var(--avance, 0%) 100%); }
.paso { position: relative; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--gris-claro); }
.paso .circ { width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 99px; background: #fff; border: 2px solid var(--linea); display: grid; place-items: center; font-size: 28px; filter: grayscale(1); opacity: .6; }
.paso.hecho, .paso.ahora { color: var(--tinta); }
.paso.hecho .circ { filter: none; opacity: 1; border-color: var(--naranja); background: var(--naranja-s); }
.paso.ahora .circ { filter: none; opacity: 1; border-color: var(--naranja); background: #fff; box-shadow: 0 0 0 6px var(--naranja-s); }
.codigo { margin-bottom: 12px; padding: 16px; border-radius: var(--r); background: var(--tinta); color: #fff; text-align: center; }
.codigo small { display: block; color: #E9D9CC; font-weight: 600; }
.codigo b { display: block; margin: 6px 0 2px; font-size: 44px; letter-spacing: .28em; font-weight: 800; padding-left: .28em; }
.codigo span { font-size: 13px; color: #E9D9CC; }
.motorista { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-s); background: var(--crema); margin-bottom: 12px; }
.motorista .av { width: 46px; height: 46px; border-radius: 16px; background: #fff; display: grid; place-items: center; font-size: 26px; flex: none; }
.motorista div { flex: 1; min-width: 0; }
.motorista small { display: block; color: var(--gris); }
.motorista .wa { width: 44px; height: 44px; border-radius: 15px; background: #25A35A; color: #fff; display: grid; place-items: center; flex: none; }
.cancelado { padding: 14px; border-radius: var(--r-s); background: var(--rojo-s); color: var(--rojo); font-weight: 600; margin-bottom: 12px; }

/* ---------- pedido enviado: el permiso de avisos ---------- */
.enviado { padding: 40px 20px 0; text-align: center; }
.enviado .grande { font-size: 64px; }
.enviado h1 { margin: 10px 0 4px; font-size: 26px; font-weight: 800; }
.enviado > p { color: var(--gris); margin: 0 0 22px; }
.permiso { text-align: left; padding: 18px; border-radius: var(--r); background: var(--crema); border: 1.5px solid var(--crema-2); }
.permiso .fila { display: flex; gap: 12px; align-items: flex-start; }
.permiso .em { font-size: 34px; }
.permiso b { display: block; font-size: 17px; font-weight: 800; }
.permiso small { display: block; color: var(--gris); margin-top: 4px; }
.permiso .btns { display: grid; gap: 8px; margin-top: 14px; }
.permiso .no { text-align: center; color: var(--gris); font-weight: 700; padding: 10px; }
.ios { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-s); background: #fff; font-size: 13.5px; color: var(--gris); }
.ios b { color: var(--tinta); font-size: 13.5px; display: inline; }

/* ---------- yo ---------- */
.yo-cab { display: flex; gap: 14px; align-items: center; padding-top: 8px; }
.yo-cab .avatar { width: 58px; height: 58px; font-size: 22px; }
.yo-cab b { font-size: 20px; font-weight: 800; }
.yo-cab small { display: block; color: var(--gris); }
.ajuste { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-s); background: var(--crema); margin-bottom: 10px; width: 100%; text-align: left; }
.ajuste .em { font-size: 24px; }
.ajuste > div { flex: 1; min-width: 0; }
.ajuste small { display: block; color: var(--gris); font-size: 13px; }
.ajuste .flecha { transform: rotate(-90deg); color: var(--gris); }
.dos-op { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; background: #fff; border-radius: 16px; padding: 4px; }
.dos-op button { text-align: center; padding: 9px 0; border-radius: 13px; font-weight: 800; font-size: 13.5px; color: var(--gris); }
.dos-op button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; }
.dos-op.tres { grid-template-columns: repeat(3, 1fr); } /* los avisos: en la app, por WhatsApp o ninguno */
.dos-op.tres button { padding: 9px 4px; line-height: 1.15; }
.pie { text-align: center; color: var(--gris); font-size: 12.5px; margin-top: 10px; }
/* Entrar con Google, Apple, Facebook o el correo (cada botón, solo si está encendido en el servidor), «Formas de entrar»,
   «Borrar mi cuenta» y los enlaces legales. Los colores de cada marca, los suyos. */
.separa { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--gris-claro); font-weight: 700; font-size: 13px; }
.separa::before, .separa::after { content: ''; flex: 1; height: 1.5px; background: var(--linea); }
.entrar-con { display: grid; gap: 8px; }
.btn-prov { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px; border-radius: 18px; font-weight: 800; font-size: 15px;
    background: #fff; color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn-prov .icono { width: 20px; height: 20px; flex: none; }
.btn-prov.apple { background: #000; color: #fff; box-shadow: none; }
.btn-prov.facebook { background: #1877F2; color: #fff; box-shadow: none; }
.btn-prov:disabled { opacity: .6; }
.legal-nota { margin: 14px 0 0; color: var(--gris); font-size: 12.5px; text-align: center; }
.legal-nota a, .legal a { color: var(--naranja-osc); font-weight: 700; }
.legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 16px 0 4px; font-size: 12.5px; }
.para-negocios { margin: 20px 0 0; text-align: center; font-size: 14px; }
.para-negocios a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--linea); border-radius: 999px; color: var(--tinta); text-decoration: none; background: var(--blanco); }
.para-negocios b { color: var(--naranja-osc); }
.forma-fila { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--crema); margin-bottom: 8px; }
.forma-fila > div { flex: 1; min-width: 0; }
.forma-fila small { display: block; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forma-fila button { color: var(--naranja-osc); font-weight: 800; font-size: 13px; padding: 8px; flex: none; }
.forma-fila .quitar { color: var(--rojo); }
.ico-forma { width: 36px; height: 36px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; color: var(--tinta); }
.ico-forma .icono { width: 20px; height: 20px; }
.ico-forma.telefono { color: #1E9E55; }
.ico-forma.apple { background: #000; color: #fff; }
.ico-forma.facebook { background: #1877F2; color: #fff; }
.sub-hoja { margin: 18px 0 8px; font-size: 15px; font-weight: 800; }
.ajuste-aviso { background: var(--ambar-s); }
.btn-borrar { display: block; margin: 14px auto 0; color: var(--rojo); font-weight: 800; font-size: 14px; padding: 10px 14px; border-radius: 12px; }
.btn-rojo { background: var(--rojo); color: #fff; }
.btn-rojo:disabled { opacity: .55; }

/* ---------- mis pedidos ---------- */
.seg-ped { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 16px 0; background: var(--crema); border-radius: 18px; padding: 4px; }
.seg-ped button { text-align: center; padding: 10px 0; border-radius: 14px; font-weight: 800; color: var(--gris); }
.seg-ped button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; }
.pedido { padding: 14px; border-radius: var(--r); background: var(--crema); margin-bottom: 12px; }
.pedido .fila { display: flex; gap: 12px; align-items: center; }
.pedido .ph { width: 58px; height: 58px; border-radius: 18px; background: #fff; display: grid; place-items: center; font-size: 30px; flex: none; }
.pedido .fila div { flex: 1; min-width: 0; }
.pedido b { font-size: 16px; font-weight: 800; }
.pedido p { margin: 2px 0 0; color: var(--gris); font-size: 13.5px; }
.pedido .estado { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.pedido .estado .em { font-size: 20px; }
.pedido .acc { display: flex; gap: 8px; margin-top: 12px; }
.pedido .acc button, .pedido .acc a { flex: 1; text-align: center; padding: 11px 0; border-radius: 14px; font-weight: 800; font-size: 14px; background: #fff; }
.pedido .acc .fuerte { background: var(--naranja-osc); color: #fff; }

/* ---------- hoja de abajo (entrar, opciones de un plato, direcciones) ---------- */
.hoja-fondo { position: fixed; inset: 0; z-index: 40; background: rgba(42,29,22,.42); display: flex; align-items: flex-end; justify-content: center; }
.hoja-fondo[hidden] { display: none; }
.sheet { width: 100%; max-width: 430px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; padding: 10px 16px max(18px, env(safe-area-inset-bottom)); }
.sheet .asa { width: 44px; height: 5px; border-radius: 9px; background: var(--linea); margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.sheet > p { margin: 0 0 14px; color: var(--gris); }
.sheet .acciones { display: grid; gap: 8px; margin-top: 16px; }
.sheet .foto-plato { height: 190px; border-radius: 22px; background: var(--crema); display: grid; place-items: center; font-size: 80px; overflow: hidden; margin-bottom: 12px; }
.sheet .foto-plato img { width: 100%; height: 100%; object-fit: cover; }
.opcion { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--crema); margin-bottom: 8px; cursor: pointer; }
.opcion input { width: 20px; height: 20px; accent-color: var(--naranja); }
.opcion span { flex: 1; font-weight: 700; }
.opcion small { color: var(--naranja-osc); font-weight: 800; }
.codigo-campo { font-size: 28px; letter-spacing: .4em; text-align: center; font-weight: 800; }
.dir-fila { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--crema); margin-bottom: 8px; }
.dir-fila > button:first-child { flex: 1; min-width: 0; text-align: left; }
.dir-fila small { display: block; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-fila .quitar { color: var(--rojo); font-weight: 800; font-size: 13px; padding: 8px; }

/* ---------- reservar mesa (Parte C, fase 3): la ficha, «Reservar», la reserva y «Mis pedidos · Reservas» ---------- */
.chip.rojo { background: var(--rojo-s); color: var(--rojo); }
.chip .icono { width: 15px; height: 15px; }
.local .foto .reservas-chip { position: absolute; right: 10px; bottom: 10px; z-index: 1; background: #fff; color: var(--tinta); }
.btn-reservar { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; margin-top: 12px; border-radius: 18px; background: #fff;
                color: var(--naranja-osc); box-shadow: inset 0 0 0 1.5px var(--naranja); font-weight: 800; font-size: 15px; }
.panel-reservar { display: none; }
.barra-reservar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 406px; z-index: 20; }
.barra-reservar .btn .icono { width: 22px; height: 22px; }
.rv-boton { display: grid; justify-items: center; gap: 1px; line-height: 1.15; text-align: center; }
.rv-boton small { font-size: 13px; font-weight: 700; opacity: .92; }
/* Sin hora elegida, el botón se ve apagado pero opaco: lo de detrás no se transparenta */
.barra-reservar .btn-naranja:disabled { opacity: 1; background: #F3E6DC; color: var(--gris); box-shadow: 0 8px 22px rgba(42,29,22,.12); }
.rv-error { margin: 0 0 8px; padding: 10px 14px; border-radius: 16px; background: var(--rojo-s); color: var(--rojo); font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px rgba(42,29,22,.10); }
.rv-error a { color: var(--rojo); text-decoration: underline; font-weight: 800; }
.pantalla-reservar { padding-bottom: 150px; }
.pantalla-reservar .wa-nota { margin-bottom: 12px; }
.rv-personas { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 18px; padding: 6px; }
.rv-personas button { width: 48px; height: 48px; border-radius: 14px; background: var(--naranja-s); color: var(--naranja-osc); font-size: 24px; font-weight: 800; display: grid; place-items: center; }
.rv-personas button:disabled { opacity: .4; cursor: default; }
.rv-personas b { font-size: 18px; font-weight: 800; }
.rv-dias { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.rv-dias::-webkit-scrollbar { display: none; }
.rv-dias button { flex: none; width: 64px; padding: 8px 4px 9px; border-radius: 16px; background: #fff; text-align: center; }
.rv-dias small { display: block; font-size: 12px; font-weight: 700; color: var(--gris); }
.rv-dias b { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }
.rv-dias i { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--gris); }
.rv-dias button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; }
.rv-dias button[aria-pressed="true"] small { color: rgba(255,255,255,.85); }
.rv-dias button:disabled { opacity: .45; cursor: default; }
.rv-horas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rv-horas button { min-height: 48px; padding: 6px 4px; border-radius: 14px; background: #fff; font-weight: 800; font-size: 14.5px; line-height: 1.15; }
.rv-horas button small { display: block; font-size: 11px; font-weight: 700; color: var(--gris); }
.rv-horas button[aria-pressed="true"] { background: var(--naranja-osc); color: #fff; }
.rv-horas button[aria-pressed="true"] small { color: rgba(255,255,255,.85); }
.rv-horas button:disabled { background: transparent; color: var(--gris-claro); text-decoration: line-through; box-shadow: inset 0 0 0 1.5px var(--linea); cursor: default; }
.rv-cargando { opacity: .55; pointer-events: none; }
.rv-parte { margin: 14px 0 8px; font-size: 13px; font-weight: 800; color: var(--gris); }
.rv-parte:first-child { margin-top: 0; }
.rv-ayuda { margin: 10px 0 0; color: var(--gris); font-size: 13.5px; }
.rv-nota-mal { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--ambar-s); color: var(--ambar); font-weight: 700; font-size: 14px; }
.rv-nota-mal .enlace { color: var(--ambar); text-decoration: underline; }
.rv-reglas ul { margin: 0; padding: 0 0 0 18px; color: var(--gris); font-size: 14px; display: grid; gap: 6px; }
.rv-reglas li::marker { color: var(--naranja); }
textarea.campo { resize: vertical; min-height: 64px; }
/* La reserva */
.rv-hero { margin: 0 16px 12px; padding: 20px 16px 18px; border-radius: var(--r); background: linear-gradient(180deg, var(--crema) 0%, var(--crema-2) 100%); text-align: center; }
.rv-hero .grande { display: block; font-size: 52px; margin-bottom: 10px; }
.rv-hero h2 { margin: 10px 0 4px; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.rv-cuando { margin: 0; color: var(--gris); font-size: 15px; }
.rv-cuando b { color: var(--tinta); }
.rv-aviso { margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--ambar-s); color: var(--ambar); font-weight: 700; font-size: 14px; }
.rv-aviso.mal { background: var(--rojo-s); color: var(--rojo); }
.rv-local .fila { display: flex; gap: 12px; align-items: center; }
.rv-local .logo { width: 52px; height: 52px; border-radius: 16px; background: #fff; overflow: hidden; display: grid; place-items: center; font-size: 26px; flex: none; }
.rv-local .logo img { width: 100%; height: 100%; object-fit: cover; }
.rv-local .fila > div { min-width: 0; }
.rv-local b { display: block; font-size: 16px; font-weight: 800; }
.rv-local small { display: block; color: var(--gris); font-size: 13.5px; }
.rv-contacto { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.rv-contacto a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: #fff; font-weight: 800; font-size: 13px; }
.rv-contacto .icono { color: var(--naranja-osc); }
.rv-texto { margin: 0; white-space: pre-line; }
.rv-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 16px 0; }
.rv-acciones .rv-ics, .rv-acciones .btn-naranja { grid-column: 1 / -1; }
.rv-acciones .btn { min-height: 52px; justify-content: center; font-size: 15px; }
.rv-acciones .rv-cancelar { color: var(--rojo); }
.rv-ics .icono { color: var(--naranja-osc); }
.rv-permiso { margin: 0 16px 12px; }
/* Mis pedidos · Reservas, y la reserva de hoy en el inicio */
.mis-tabs { display: flex; gap: 24px; margin: 0 16px 12px; border-bottom: 1.5px solid var(--linea); }
.mis-tabs button { position: relative; padding: 8px 0 12px; font-weight: 800; font-size: 16px; color: var(--gris); }
.mis-tabs button[aria-pressed="true"] { color: var(--tinta); }
.mis-tabs button[aria-pressed="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 3px; border-radius: 3px; background: var(--naranja); }
.pedido .ph { overflow: hidden; }
.pedido .ph img { width: 100%; height: 100%; object-fit: cover; }
.rv-inicio { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; border-radius: var(--r); background: var(--verde-s); color: var(--verde); }
.rv-inicio.pendiente { background: var(--ambar-s); color: var(--ambar); }
.rv-inicio .em { font-size: 28px; }
.rv-inicio > div { flex: 1; min-width: 0; }
.rv-inicio b { display: block; font-size: 15px; line-height: 1.25; font-weight: 800; color: var(--tinta); }
.rv-inicio small { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; }
.rv-inicio .flecha { transform: rotate(-90deg); }

/* ---------- aviso flotante ---------- */
.aviso-flot { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 50; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 16px; background: var(--tinta); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.aviso-flot[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
    .sheet { animation: subir .22s ease-out; }
    @keyframes subir { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* ---------- tableta (≥768 px) y escritorio (≥1200 px): el mismo HTML, en columnas ---------- */
::selection { background: var(--naranja-s); color: var(--tinta); }
input, textarea { caret-color: var(--naranja); }
.cab-web, .panel-pedido { display: none; }

@media (min-width: 768px) and (min-height: 500px), (min-width: 1024px) {
    :root { --cab-alto: 72px; --lado: 24px; --ancho: 1360px; }
    body { max-width: none; }
    .pantalla { max-width: var(--ancho); min-height: calc(100vh - var(--cab-alto)); margin: 0 auto; padding: 0 var(--lado) 64px; }
    .pantalla-media { max-width: 1040px; margin-left: max(0px, calc((100% - var(--ancho)) / 2)); margin-right: auto; }
    .tabs, .pantalla:not(.pantalla-carrito) .barra-pedido { display: none; }
    .pantalla-carrito .barra-pedido { position: static; transform: none; width: 100%; max-width: 480px; margin: 16px 0 0; }
    .aviso-flot { bottom: 32px; }

    /* La cabecera de arriba (en el teléfono, la barra de abajo) */
    .cab-web { display: block; position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--linea); }
    .cw-in { max-width: var(--ancho); height: var(--cab-alto); margin: 0 auto; padding: 0 var(--lado); display: flex; align-items: center; gap: 16px; }
    .cw-marca { display: flex; align-items: center; gap: 10px; flex: none; font-weight: 800; font-size: 18px; }
    .cw-marca img { width: 36px; height: 36px; border-radius: 11px; }
    .cw-marca img.nombre-img { width: auto; height: 24px; border-radius: 0; }
    .cw-dir { display: none; }
    .cw-buscar { flex: 1 1 auto; min-width: 0; max-width: 560px; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 18px; background: var(--crema); color: var(--gris); }
    .cw-buscar:focus-within { box-shadow: inset 0 0 0 1.5px var(--naranja); }
    .cw-buscar input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-weight: 600; color: var(--tinta); }
    .cw-buscar input::placeholder { color: var(--gris); }
    .cw-buscar input::-webkit-search-cancel-button, .buscador input::-webkit-search-cancel-button {
        -webkit-appearance: none; appearance: none; width: 18px; height: 18px; cursor: pointer; background: var(--gris);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 16px no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 16px no-repeat; }
    .cw-der { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
    .cw-nav a { display: block; padding: 11px 14px; border-radius: 14px; font-weight: 700; color: var(--gris); }
    .cw-nav a[aria-current="page"] { color: var(--naranja-osc); background: var(--naranja-s); }
    .cw-yo { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 99px; font-weight: 700; }
    .cw-yo .avatar { width: 38px; height: 38px; }
    .cw-yo-nombre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .cw-yo[aria-current="page"] .avatar { box-shadow: 0 0 0 2px var(--naranja); }
    .cw-pedido { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 16px; background: var(--crema); font-weight: 800; }
    .cw-pedido.lleno { background: var(--naranja-osc); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.14); }
    .cw-pedido .num { min-width: 26px; height: 26px; }
    .cw-pedido .num[hidden] { display: none; }

    /* Inicio y lo común */
    .cabecera { background: none; border-radius: 0; padding: 28px 0 4px; }
    .cab-arriba, .cabecera .buscador { display: none; }
    .saludo { margin-top: 0; }
    .pregunta { font-size: 34px; }
    .chip-dir { max-width: 560px; }
    .cats { padding: 18px 0 4px; }
    .seccion { padding: 28px 0 0; }
    .seccion h2 { font-size: 22px; }
    .vacio { max-width: 560px; margin: 0 auto; }
    .locales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .locales .local { margin-bottom: 0; }
    .secs { padding: 20px 0 2px; flex-wrap: wrap; overflow: visible; }
    .filtros { padding: 12px 0 2px; flex-wrap: wrap; overflow: visible; }
    .grupo h3 { font-size: 19px; }
    .locales.recorte > .local:nth-child(n+4) { display: block; }
    .locales.recorte > .local:nth-child(n+5) { display: none; }
    .grupo h3 .ver:not(.m4) { display: none; }
    .aviso { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
    .aviso .em { flex: none; font-size: 30px; }

    /* El local: el menú y, a la derecha, el pedido fijo (se completa ahí) */
    .pantalla-local { padding-top: 24px; }
    .portada { height: 260px; border-radius: 28px; overflow: hidden; }
    .portada:not(:has(img:not(.emo))) { height: 180px; } /* sin foto de portada, una franja más baja con el dibujo */
    .hoja-local { margin-top: 0; border-radius: 0; padding: 22px 0 4px; }
    .hoja-local h1 { font-size: 32px; }
    .hoja-local .buscador { max-width: 520px; }
    .local-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
    .menu-tabs { top: var(--cab-alto); padding: 12px 0 8px; margin-top: 6px; }
    .cat-titulo { margin: 22px 0 4px; font-size: 20px; }
    .plato { padding: 12px 0; }
    .panel-pedido { display: block; position: sticky; top: calc(var(--cab-alto) + 16px); margin-top: 22px; padding: 16px 16px 0; border: 1.5px solid var(--linea); border-radius: var(--r); background: #fff;
                    max-height: calc(100vh - var(--cab-alto) - 96px); max-height: calc(100dvh - var(--cab-alto) - 96px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--linea) transparent; }
    .panel-cab { padding: 0 2px 12px; }
    .panel-cab h2 { margin: 0; font-size: 20px; font-weight: 800; }
    .panel-cab small { display: block; color: var(--gris); font-weight: 600; font-size: 13px; }
    .panel-pedido .caja { padding: 12px; }
    .panel-pedido .dos-botones button { line-height: 1.2; font-size: 13px; }
    .panel-pedir { position: sticky; bottom: 0; margin: 0 -16px; padding: 12px 16px 16px; background: linear-gradient(rgba(255,255,255,0), #fff 18px); }
    .panel-vacio { padding: 28px 8px 32px; text-align: center; color: var(--gris); }
    .panel-vacio .em { display: block; font-size: 40px; margin-bottom: 8px; }
    .panel-vacio b { display: block; color: var(--tinta); font-size: 16px; margin-bottom: 4px; }
    .panel-vacio .btn-chico { margin-top: 12px; }

    /* Mi pedido (vacío), seguimiento y avisos: sin márgenes de teléfono */
    .top { position: static; padding: 24px 0 8px; }
    .caja, .error-nota, .wa-nota { margin: 0 0 12px; }

    /* Buscar: el buscador es el de la cabecera */
    .cab-buscar .pregunta { margin-bottom: 0; }
    .rejilla { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .recientes { max-width: 560px; }

    /* Seguimiento: lo visual a la izquierda (el mapa, cuando llegue) y los pasos a la derecha */
    .seg-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; padding-top: 24px; }
    .seg-visual { position: sticky; top: calc(var(--cab-alto) + 24px); }
    .seg-cab { min-height: 380px; display: flex; flex-direction: column; padding: 16px; border-radius: 28px; background: linear-gradient(180deg, var(--crema) 0%, var(--crema-2) 100%); }
    .seg-cab .grande { margin: auto; font-size: 120px; }
    .seg-cab.con-mapa { display: block; min-height: 0; padding: 0; }
    .seg-mapa, .seg-mapa-lienzo { height: 420px; }
    .seg { padding: 6px 0 0; }
    .seg h1 { font-size: 30px; }

    .enviado { max-width: 520px; margin: 0 auto; }

    /* Mis pedidos y Yo, en dos columnas */
    .seg-ped { max-width: 380px; margin: 4px 0 0; }
    .lista-pedidos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .lista-pedidos .pedido { margin-bottom: 0; }
    .yo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
    .yo-grid .ajuste { margin-bottom: 0; }
    .btn-salir { max-width: 320px; }
    .pie { text-align: left; }

    /* Las hojas de abajo, en pantallas anchas, son una ventana en el centro */
    .hoja-fondo { align-items: center; padding: 24px; }
    .sheet { max-width: 480px; max-height: 86vh; border-radius: 28px; padding: 22px 20px 20px; }
    .sheet .asa { display: none; }
}

/* Reservar mesa en tableta y escritorio: lo que se elige a la izquierda y, a la derecha, las reglas con el botón */
@media (min-width: 768px) and (min-height: 500px), (min-width: 1024px) {
    .pantalla-reservar { padding-bottom: 64px; }
    .rv-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
    .rv-lado { position: sticky; top: calc(var(--cab-alto) + 16px); }
    .barra-reservar { position: static; transform: none; width: 100%; max-width: none; }
    .barra-ficha { display: none; }
    .rv-horas { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
    .rv-dias { scrollbar-width: thin; scrollbar-color: var(--linea) transparent; padding-bottom: 8px; }
    .rv-dias::-webkit-scrollbar { display: block; height: 6px; }
    .rv-dias::-webkit-scrollbar-thumb { background: var(--linea); border-radius: 6px; }
    .panel-reservar { display: block; position: sticky; top: calc(var(--cab-alto) + 16px); margin-top: 22px; padding: 22px 20px 20px; border: 1.5px solid var(--linea); border-radius: var(--r); background: #fff; text-align: center; }
    .panel-reservar .em { display: block; font-size: 40px; margin-bottom: 8px; }
    .panel-reservar h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
    .panel-reservar p { margin: 0 0 16px; color: var(--gris); font-size: 14px; }
    .btn-reservar { max-width: 520px; }
    .mis-tabs { margin: 0 0 12px; max-width: 380px; }
    .rv-ficha, .rv-inicio { max-width: 640px; }
    .rv-hero, .rv-acciones, .rv-permiso { margin-left: 0; margin-right: 0; }
}

@media (min-width: 1200px) {
    :root { --lado: 32px; }
    .cw-in { gap: 18px; }
    .cw-dir { display: flex; align-items: center; gap: 6px; flex: 0 1 300px; min-width: 0; height: 46px; padding: 3px 3px 3px 12px; border: 1.5px solid var(--linea); border-radius: 18px; background: #fff; }
    .cw-donde { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: left; }
    .cw-donde .icono { color: var(--naranja); }
    .cw-donde > span { min-width: 0; }
    .cw-donde small { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.15; color: var(--gris); }
    .cw-donde b { display: block; font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cw-dir .interruptor button { padding: 7px 9px; font-size: 12.5px; }
    .cw-yo { padding: 4px 14px 4px 4px; }
    .cw-yo-nombre { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .cw-yo[aria-current="page"] { background: var(--naranja-s); }
    .cw-yo[aria-current="page"] .avatar { box-shadow: none; }
    .cabecera .chip-dir { display: none; }
    .pregunta { font-size: 40px; }
    .locales { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .locales.recorte > .local:nth-child(n+5) { display: block; }
    .locales.recorte > .local:nth-child(n+7) { display: none; }
    .grupo h3 .ver:not(.m6) { display: none; }
    .destacados { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px 20px; padding-top: 28px; }
    .destacados:not(:has(.colmado)) { grid-template-columns: 1fr 1fr; }
    .destacados > .seccion, .destacados .dos { display: contents; }
    .destacados h2 { grid-column: 1 / -1; margin: 0; }

    /* El local: categorías a la izquierda, platos en dos columnas y el pedido a la derecha */
    .portada { height: 300px; }
    .portada:not(:has(img:not(.emo))) { height: 200px; }
    .local-cuerpo { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
    .menu-zona { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
    .menu-tabs { top: calc(var(--cab-alto) + 16px); flex-direction: column; gap: 2px; padding: 0; margin: 0;
                 max-height: calc(100vh - var(--cab-alto) - 32px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--linea) transparent; }
    .menu-tabs button { text-align: left; background: none; padding: 10px 12px; border-radius: 14px; color: var(--gris); }
    .menu-tabs button[aria-pressed="true"] { background: var(--naranja-s); color: var(--naranja-osc); }
    .menu-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }
    .menu-lista:only-child, .menu-lista > .cat-titulo, .menu-lista > .seccion { grid-column: 1 / -1; }
    .menu-lista > .cat-titulo { margin: 14px 0 0; }
    .menu-lista > .cat-titulo:first-child { margin-top: 0; }
    /* El plato como en las webs de delivery: el texto a la izquierda, la foto a la derecha y el «+» sobre su esquina */
    .plato { position: relative; flex-direction: row-reverse; align-items: flex-start; min-height: 124px; padding: 12px; border: 1.5px solid var(--linea); border-radius: var(--r-s); background: #fff; }
    .plato .ph { width: 96px; height: 96px; }
    .plato .mas, .plato .cant { position: absolute; top: 64px; right: 16px; box-shadow: 0 4px 12px rgba(42,29,22,.18); }
    .plato .cant { background: #fff; }
    .plato .agotado-chip { position: absolute; top: 72px; right: 16px; }
}

@media (min-width: 1700px) {
    :root { --ancho: 1600px; }
    .locales { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .locales.recorte > .local:nth-child(n+7) { display: block; }
    .locales.recorte > .local:nth-child(n+9) { display: none; }
    .grupo h3 .ver:not(.m8) { display: none; }
}

@media (hover: hover) and (min-width: 1024px) {
    .local { transition: box-shadow .18s ease-out, transform .18s ease-out; }
    .local:hover { box-shadow: 0 12px 28px rgba(80,40,20,.10); transform: translateY(-2px); }
    .cw-nav a:hover, .menu-tabs button:not([aria-pressed="true"]):hover { background: var(--crema); }
    .cw-pedido:not(.lleno):hover { background: var(--crema-2); }
}
@media (prefers-reduced-motion: reduce) {
    .local { transition: none; }
    .local:hover { transform: none; }
}

/* «Marca dónde te lo llevamos» (punto 12): el mapa a casi toda la pantalla y el alfiler fijo en el centro (su punta es
   el punto; el mapa se mueve debajo). */
.sheet.sheet-mapa { display: flex; flex-direction: column; height: min(92vh, 760px); height: min(92dvh, 760px); position: relative; }
.sheet-mapa .hoja-cerrar { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--crema-2); color: var(--tinta); cursor: pointer; }
.sheet-mapa .hoja-cerrar .icono { width: 20px; height: 20px; }
.sheet-mapa h2 { padding-right: 52px; }
.mapa-marco .leaflet-bar a, .mapa-marco .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
.sheet-mapa .mapa-guia { margin: 0 0 10px; color: var(--gris); }
.mapa-marco { position: relative; flex: 1; min-height: 260px; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--linea); background: var(--crema-2); }
.mapa-lienzo { position: absolute; inset: 0; }
.mapa-lienzo:focus-visible { outline: 3px solid var(--naranja); outline-offset: -3px; }
.mapa-alfiler { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); pointer-events: none; z-index: 500; line-height: 0; filter: drop-shadow(0 3px 3px rgba(42, 29, 22, .35)); }
.mapa-marco::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 5px; margin: -2px 0 0 -6px; border-radius: 50%; background: rgba(42, 29, 22, .35); z-index: 499; pointer-events: none; }
.sheet-mapa .acciones { margin-top: 12px; }
#mapaAviso:empty { margin: 0; min-height: 0; } /* vacío pero en el árbol: role=status anuncia lo que llegue */
#mapaAviso.mal { color: var(--rojo); }
#mapaAviso.duda { color: var(--ambar); } /* «¿Es ahí?» es una pregunta, no un error */
.dir-acciones { display: inline-flex; flex-wrap: wrap; gap: 0 14px; min-width: 0; } /* se parten los enlaces, no la línea con el alfiler */
.dir-acciones .enlace, #cDirAyuda .enlace, .ayuda.sugerida .enlace { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
#cDirAyuda { align-items: center; }
.ayuda.suave { color: var(--gris); margin-top: 2px; }
.ayuda.sugerida { margin: 6px 0 0; }
.dir-fila .dir-mapa { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }

/* «¿Cuándo?» (punto 11): los días, con su toque de 44 px. */
.dias-prog { margin: 12px 0 8px; }
.dias-prog button, .cuando-botones button { min-height: 44px; }

/* Promociones y cupones (punto 10): la etiqueta en la foto de la tarjeta, el chip y la línea de la ficha, el cupón y las
   líneas del resumen (en verde: lo que se ahorra). */
.local .foto .promo-chip { position: absolute; left: 10px; bottom: 10px; z-index: 1; background: var(--tinta); color: #fff; }
.chip.promo { background: var(--tinta); color: #fff; }
.info .promo-info b { color: var(--tinta); }
.cupon-caja { padding-top: 6px; padding-bottom: 6px; }
.cupon-caja:has(.cupon-fila) { padding-top: 14px; padding-bottom: 14px; }
.cupon-abrir { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--tinta); text-align: left; cursor: pointer; }
.cupon-abrir span { flex: 1; }
.cupon-abrir b { color: var(--naranja-osc); font-weight: 800; }
.cupon-abrir .icono, .cupon-puesto .icono { width: 20px; height: 20px; flex: none; color: var(--naranja); }
.cupon-caja .etq { margin-top: 0; }
.cupon-fila { display: flex; gap: 8px; align-items: stretch; }
.cupon-fila .campo { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.cupon-fila .campo::placeholder { text-transform: none; letter-spacing: 0; }
.cupon-fila .btn-chico { flex: none; min-height: 48px; border: 0; cursor: pointer; }
.cupon-puesto { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.cupon-puesto > span { flex: 1; min-width: 0; }
.cupon-puesto .enlace { min-height: 44px; display: inline-flex; align-items: center; }
.cupon-caja .ayuda { margin: 0 0 8px 30px; }
.cupon-puesto b { letter-spacing: .04em; }
.cupon-caja .ayuda:empty { display: none; }
.resumen div.promo { color: var(--verde); font-weight: 700; }
.resumen div.promo s { color: var(--gris); font-weight: 500; margin-right: 4px; }

/* Los emoji (assets/js/emoji.js): del tamaño de la letra de donde estén, también donde suele ir una foto. Las reglas de
   las fotos (`.foto img`, `.portada img`, `.mini img`…: a todo el hueco, recortadas, con esquinas y filtros) no les
   tocan: esta va al final y con la clase repetida para ganarles. Pintan de -0,2 a 0,95 em de la línea base, pero con los
   márgenes negativos ocupan lo que una letra: no agrandan la línea ni mueven lo de abajo. */
img.emo.emo.emo { position: static; display: inline-block; width: 1.15em; height: 1.15em; min-width: 0; min-height: 0; max-width: none; max-height: none;
    margin: -.1em 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; object-fit: contain; vertical-align: -.1em; filter: none; opacity: 1; }
