/* Kayibal · el mercado de tu comunidad (kayibal.com)
   Plaza con casetas tipo contenedor en 2D. Se recorre en todas direcciones;
   al tocar una caseta se ve por dentro y lleva a su tienda en línea. */
/* Plaza de mercado con casetas tipo contenedor (2D): se recorre en todas direcciones; al tocar una caseta se ve por dentro. */
:root {
  --cielo: #f3ead9; --suelo: #e6dccb; --adoquin: #cfc3ad; --adoquin-osc: #bcae95; --banqueta: #ddd3c2;
  --madera: #b07a46; --madera-osc: #7c5230; --tinta: #23201b; --suave: #6d6457; --papel: #fffaf0; --crema: #f6f1e4;
  --jade: #2f7d5b; --maiz: #e2a92f; --rojo: #b8322a; --anil: #2c4a7a;
  --luz: rgba(255, 214, 140, .75);
  --display: "Sora", "Inter", system-ui, sans-serif; --texto: "Inter", system-ui, sans-serif;
  color-scheme: light;
}
html, body { height: 100%; }
[hidden] { display: none !important; }
body { background: var(--cielo); color: var(--tinta); font-family: var(--texto); overflow: hidden; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Barra ---------- */
.barra { position: relative; z-index: 30; display: grid; gap: 10px; padding-block: 12px 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--cielo); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.barra__fila { display: flex; align-items: center; gap: 10px; }
.marca { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.marca__logo { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; background: var(--tinta); color: var(--maiz); font: 800 1.1rem var(--display); }
.marca b { display: block; font: 800 1.15rem var(--display); letter-spacing: -.02em; }
.marca small { color: var(--suave); font-size: .75rem; }
.boton-claro { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid rgba(0,0,0,.15); border-radius: 10px; background: var(--papel); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.boton-claro svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.buscar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid rgba(0,0,0,.12); border-radius: 14px; background: var(--papel); }
.buscar input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1rem; color: inherit; outline: none; }
.buscar svg { width: 18px; height: 18px; fill: none; stroke: var(--suave); stroke-width: 2; }
.calles-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.calles-nav::-webkit-scrollbar { display: none; }
.calles-nav button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid rgba(0,0,0,.15); border-radius: 99px; background: var(--papel); font-size: .82rem; font-weight: 600; }
.calles-nav button.activo { background: var(--tinta); border-color: var(--tinta); color: var(--papel); }
.calles-nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ---------- Plaza ---------- */
.plaza { touch-action: pan-x pan-y; position: absolute; inset: 0; top: var(--alto-barra, 150px); overflow: auto; scrollbar-width: none; overscroll-behavior: contain; cursor: grab; }
.plaza::-webkit-scrollbar { display: none; }
.plaza.arrastrando { cursor: grabbing; }
.plano { zoom: var(--zoom, 1); position: relative; width: max-content; min-width: 100%; padding: 50px 50vw 160px 40px; background: var(--suelo); transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform .7s cubic-bezier(.6,0,.2,1), opacity .5s; }
.plano.entrando { transform: scale(2.4); opacity: 0; }
.calle { position: relative; display: flex; align-items: flex-end; gap: 30px; padding-right: 30px; }
/* Guirnalda de focos sobre cada calle (se encienden de noche) */
.calle::before { content: ""; position: absolute; left: -40px; right: -50vw; top: -34px; height: 16px; z-index: 0; background: radial-gradient(circle at 12px 10px, #fff3c4 0 3px, transparent 4px) 0 0 / 46px 16px repeat-x; border-top: 1px solid rgba(0,0,0,.25); border-radius: 50%; opacity: .5; }
.calle > * { position: relative; z-index: 1; }
.letrero { flex-shrink: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; width: 120px; }
.letrero span { padding: 10px 12px; border: 3px solid #fff; border-radius: 8px; background: #1f5f3a; color: #fff; font: 800 .9rem var(--display); text-align: center; line-height: 1.2; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.letrero small { display: block; margin-top: 2px; font: 600 .7rem var(--texto); opacity: .85; }
.letrero i { flex: 1; width: 6px; background: linear-gradient(90deg, #3b3b3b, #6a6a6a); border-radius: 3px; }

/* ---------- Caseta tipo contenedor ---------- */
.caseta { --cont: color-mix(in srgb, var(--c) 30%, #c8cdc4); --cont-osc: color-mix(in srgb, var(--c) 40%, #8d968c);
  position: relative; flex-shrink: 0; width: 290px; height: 340px; padding: 0; border: 0; background: none; color: var(--tinta); text-align: left; transition: transform .25s, opacity .3s; }
.caseta:hover, .caseta:focus-visible { transform: translateY(-5px); outline: none; }
.caseta:focus-visible .marquesina { outline: 3px solid var(--anil); }
.caseta.atenuado { opacity: .28; }
.caseta.resaltado .marquesina { box-shadow: 0 0 0 4px var(--maiz); }

.deck { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--madera) 0 34px, var(--madera-osc) 34px 36px); box-shadow: 0 6px 10px rgba(0,0,0,.18); }
.deck::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 3px; border-radius: 2px; background: #ffe2a3; opacity: 0; box-shadow: 0 0 14px 4px rgba(255,210,130,.8); transition: opacity .4s; }
.contenedor { position: absolute; left: 12px; right: 12px; bottom: 26px; height: 274px; background: repeating-linear-gradient(90deg, var(--cont-osc) 0 2px, var(--cont) 2px 14px); border-radius: 2px; box-shadow: inset 0 -10px 0 rgba(0,0,0,.08); }
.marquesina { position: absolute; z-index: 2; left: 4px; right: 4px; bottom: 270px; height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border-radius: 3px; background: var(--crema); box-shadow: 0 4px 0 rgba(0,0,0,.12); transition: box-shadow .4s; }
.marquesina i { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font: 800 .9rem var(--display); font-style: normal; }
.marquesina b { overflow: hidden; font: 800 .92rem var(--display); letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.focos { position: absolute; z-index: 2; left: 30px; right: 30px; bottom: 262px; display: flex; justify-content: space-between; }
.focos span { width: 10px; height: 5px; border-radius: 0 0 6px 6px; background: #f8e7b5; }
.redondo { position: absolute; z-index: 3; right: -8px; bottom: 214px; display: grid; place-items: center; width: 58px; height: 58px; border: 4px solid var(--cont-osc); border-radius: 50%; background: var(--crema); text-align: center; font: 800 .62rem/1.1 var(--display); text-transform: uppercase; color: var(--c); transition: box-shadow .4s; }
.redondo b { display: block; font-size: 1.5rem; }

/* Ventanilla: se ve hacia adentro */
.ventana { position: absolute; z-index: 1; left: 26px; width: 158px; bottom: 120px; height: 110px; overflow: hidden; border: 4px solid var(--cont-osc); background: linear-gradient(#5a4632, #3d2f22); }
.ventana::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 70px at 50% 0%, rgba(255,214,140,.6), transparent 70%); }
.ventana .repisa { position: absolute; left: 6px; right: 6px; height: 3px; background: #d7b48a; }
.ventana .repisa--1 { top: 34px; } .ventana .repisa--2 { top: 62px; }
.ventana .prods { position: absolute; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: flex-end; }
.ventana .prods--1 { top: 16px; } .ventana .prods--2 { top: 44px; }
.p { width: 9px; height: 18px; border-radius: 3px 3px 2px 2px; background: var(--k); }
.p--olla { width: 20px; height: 12px; border-radius: 2px 2px 10px 10px; background: #2c2c2c; }
.p--bolsa { width: 14px; height: 16px; border-radius: 2px; background: #f1ece2; box-shadow: inset 0 -5px 0 var(--k); }
.p--herr { width: 4px; height: 18px; border-radius: 1px; background: #8d8d8d; }
.p--caja { width: 14px; height: 14px; border-radius: 2px; }
.vendedora { position: absolute; left: 58px; bottom: 0; width: 42px; height: 58px; }
.vendedora::before { content: ""; position: absolute; top: 0; left: 11px; width: 20px; height: 22px; border-radius: 50%; background: #c8906a; box-shadow: 0 -4px 0 -1px #2d1f17; }
.vendedora::after { content: ""; position: absolute; bottom: 0; left: 2px; width: 38px; height: 36px; border-radius: 14px 14px 0 0; background: var(--c); }
.mostrador { position: absolute; z-index: 2; left: 16px; width: 186px; bottom: 112px; height: 11px; border-radius: 2px; background: linear-gradient(#d3a26c, var(--madera)); box-shadow: 0 4px 6px rgba(0,0,0,.25); }
/* Refrigerador con productos bajo el mostrador */
.refri { position: absolute; z-index: 1; left: 30px; width: 120px; bottom: 34px; height: 70px; border: 4px solid #9aa19a; border-radius: 3px; background: linear-gradient(160deg, rgba(255,255,255,.5), rgba(255,255,255,.08) 45%), #f3efe6; overflow: hidden; }
.refri::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(4px 8px at 50% 50%, var(--k1) 98%, transparent) 0 6px / 14px 26px,
  radial-gradient(4px 8px at 50% 50%, var(--k2) 98%, transparent) 7px 32px / 14px 26px; opacity: .9; }
/* Pizarra con el menú */
.pizarra { position: absolute; z-index: 1; right: 26px; width: 74px; bottom: 112px; height: 118px; padding: 8px 7px; border: 3px solid #4d5a50; border-radius: 3px; background: #2f3a33; color: #e9efe9; }
.pizarra b { display: block; margin-bottom: 6px; font: 700 .62rem var(--display); text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.pizarra span { display: flex; justify-content: space-between; gap: 2px; margin-bottom: 5px; font-size: .5rem; line-height: 1.15; opacity: .9; }
.pizarra span em { font-style: normal; color: var(--maiz); }
/* Planta, caballete y estado */
.planta { position: absolute; z-index: 3; right: 14px; bottom: 26px; width: 30px; height: 26px; border-radius: 3px 3px 9px 9px; background: repeating-linear-gradient(45deg, #b9874f 0 3px, #8f6236 3px 6px); }
.planta::before { content: ""; position: absolute; bottom: 22px; left: -8px; width: 46px; height: 46px; background: radial-gradient(ellipse 9px 16px at 30% 60%, #3f8a4e 98%, transparent), radial-gradient(ellipse 9px 16px at 70% 55%, #2f7344 98%, transparent), radial-gradient(ellipse 8px 15px at 50% 35%, #4b9a5a 98%, transparent); }
.caballete { position: absolute; z-index: 3; left: -14px; bottom: 26px; width: 64px; height: 62px; padding: 10px 8px 6px; clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); background: #2f3a33; color: #fff; font: 700 .5rem/1.25 var(--display); text-align: center; text-transform: uppercase; }
.estado { position: absolute; z-index: 4; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 3px 10px; border-radius: 99px; background: var(--papel); font-size: .68rem; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.estado::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--jade); }
.cerca .marquesina::after { content: "Cerca de ti"; position: absolute; top: -11px; left: 10px; padding: 2px 8px; border-radius: 99px; background: var(--maiz); color: var(--tinta); font-size: .62rem; font-weight: 800; }
/* Cerrada: cortina de metal abajo y letreros apagados */
.cortina { position: absolute; z-index: 3; left: 22px; width: 166px; bottom: 30px; height: 204px; display: grid; place-items: center; background: repeating-linear-gradient(#a7aeb0 0 9px, #899094 9px 11px); border-radius: 2px; transform: scaleY(0); transform-origin: top; transition: transform .6s; }
.cortina span { padding: 6px 10px; border-radius: 6px; background: var(--papel); font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.3; }
.caseta.cerrada .cortina { transform: scaleY(1); }
.caseta.cerrada .estado::before { background: var(--rojo); }

/* ---------- Noche ---------- */
.noche { --cielo: #161a28; --suelo: #2a2733; --adoquin: #3b3743; --adoquin-osc: #312e38; --banqueta: #48434f; }
.noche body, body.noche { color: #efe6d6; }
.noche .barra { box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.noche .marca small { color: #b9b0a2; }
.noche .buscar, .noche .calles-nav button, .noche .boton-claro { background: #262b3e; border-color: #3a4159; color: #efe6d6; }
.noche .calles-nav button.activo { background: var(--maiz); border-color: var(--maiz); color: var(--tinta); }
.noche .contenedor, .noche .planta, .noche .deck { filter: brightness(.55); }
.noche .caseta:not(.cerrada) .marquesina { box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 0 34px 6px var(--luz); }
.noche .caseta:not(.cerrada) .redondo { box-shadow: 0 0 24px 6px var(--luz); }
.noche .caseta:not(.cerrada) .ventana { box-shadow: 0 0 40px 12px rgba(255,190,100,.35); }
.noche .caseta:not(.cerrada) .refri { box-shadow: 0 0 24px 4px rgba(255,240,200,.4); }
.noche .caseta:not(.cerrada) .deck::after { opacity: 1; }
.noche .caseta:not(.cerrada) .focos span { box-shadow: 0 6px 16px 6px var(--luz); }
.noche .caseta.cerrada .marquesina, .noche .caseta.cerrada .redondo { filter: brightness(.6); }
.noche .calle::before { opacity: 1; filter: drop-shadow(0 0 6px #ffd98a); }

/* ---------- Pista y minimapa ---------- */
.pista { position: absolute; z-index: 20; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; background: rgba(35,32,27,.88); color: #fffaf0; font-size: .86rem; font-weight: 600; white-space: nowrap; transition: opacity .4s; pointer-events: none; }
.pista svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pista.oculta { opacity: 0; }
.mini { position: absolute; z-index: 20; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: 92px; padding: 6px; border-radius: 10px; background: rgba(255,250,240,.92); box-shadow: 0 4px 14px rgba(0,0,0,.15); pointer-events: none; }
.mini__mapa { position: relative; padding: 2px 0; border-radius: 4px; background: #cfc3ad; }
.mini__fila { height: 8px; margin: 4px; border-radius: 2px; background: rgba(35,32,27,.35); }
.mini__vista { position: absolute; border: 2px solid var(--rojo); border-radius: 3px; }

/* ---------- Adentro (ilustración plana, con detalle) ---------- */
.tienda { position: absolute; z-index: 40; inset: 0; overflow-y: auto; background: var(--papel); color: var(--tinta); opacity: 0; pointer-events: none; transition: opacity .35s .3s; }
.tienda.abierta { opacity: 1; pointer-events: auto; }
.adentro { --pared-in: color-mix(in srgb, var(--c) 10%, #f7f0e1); position: relative; height: 430px; overflow: hidden;
  background:
    linear-gradient(transparent 62%, rgba(0,0,0,.06) 62% 63%, transparent 63%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(0,0,0,.05) 38px 39px) 0 62% / 100% 38% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(0,0,0,.05) 38px 39px) 0 100% / 100% 38% no-repeat,
    linear-gradient(var(--pared-in) 0 62%, #fbf8f1 62%); }
/* Luz cálida desde arriba */
.adentro::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(500px 240px at 30% 0%, rgba(255,226,160,.45), transparent 70%), radial-gradient(400px 200px at 78% 0%, rgba(255,226,160,.35), transparent 70%); }
.lampara { position: absolute; top: 0; width: 46px; height: 64px; }
.lampara::before { content: ""; position: absolute; left: 22px; top: 0; width: 2px; height: 34px; background: #3b3b3b; }
.lampara::after { content: ""; position: absolute; top: 32px; left: 0; width: 46px; height: 22px; border-radius: 23px 23px 4px 4px; background: #2f3a33; box-shadow: 0 16px 30px 6px rgba(255,214,140,.55); }
.lampara span { position: absolute; top: 52px; left: 16px; width: 14px; height: 8px; border-radius: 0 0 8px 8px; background: #ffe7a6; }
.cartel { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 10px; background: var(--c); color: #fff; font: 800 1rem var(--display); letter-spacing: .03em; text-transform: uppercase; box-shadow: 0 4px 0 rgba(0,0,0,.2); white-space: nowrap; }
.cartel i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--c); font-style: normal; }
/* Repisas con productos etiquetados */
.estantes { position: absolute; top: 84px; left: max(12px, 3%); width: min(52%, 470px); display: grid; gap: 30px; padding: 10px 10px 0; border-radius: 8px; background: linear-gradient(#c79a6a, #b8895a); box-shadow: inset 0 0 0 6px #9b6c40; }
.estante { position: relative; display: flex; justify-content: space-around; align-items: flex-end; height: 50px; padding: 0 6px; border-bottom: 8px solid #7b5230; }
.a { position: relative; width: 22px; height: 40px; border-radius: 6px 6px 3px 3px; background: var(--k); box-shadow: inset -4px 0 0 rgba(0,0,0,.14); }
.a::before { content: ""; position: absolute; top: -6px; left: 6px; width: 10px; height: 7px; border-radius: 2px; background: color-mix(in srgb, var(--k) 65%, #000); }
.a::after { content: ""; position: absolute; left: 3px; right: 3px; top: 14px; height: 12px; border-radius: 2px; background: rgba(255,255,255,.85); }
.a--olla { width: 44px; height: 26px; border-radius: 4px 4px 20px 20px; background: #3a3734; }
.a--olla::before { left: 4px; right: 4px; width: auto; top: -5px; height: 5px; background: #514d48; }
.a--olla::after { display: none; }
.a--bolsa { width: 30px; height: 40px; border-radius: 4px; background: #f6f2ea; box-shadow: inset 0 -12px 0 var(--k), inset 0 0 0 1px rgba(0,0,0,.08); }
.a--bolsa::before { display: none; } .a--bolsa::after { top: 8px; height: 8px; background: var(--k); opacity: .4; }
.a--herr { width: 8px; height: 44px; border-radius: 2px; background: #7d7d7d; box-shadow: none; }
.a--herr::before { width: 24px; left: -8px; height: 10px; top: -2px; background: var(--k); }
.a--herr::after { display: none; }
.a--caja { width: 32px; height: 30px; border-radius: 3px; }
.a--caja::before { display: none; } .a--caja::after { top: 9px; }
/* Pizarra de precios en la pared */
.precios { position: absolute; top: 84px; right: max(12px, 3%); width: min(30%, 230px); padding: 12px 14px; border: 6px solid #8a5a34; border-radius: 6px; background: #2c362f; color: #eef3ee; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.precios b { display: block; margin-bottom: 8px; font: 800 .85rem var(--display); letter-spacing: .06em; text-transform: uppercase; text-align: center; color: var(--maiz); }
.precios span { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: .78rem; border-bottom: 1px dashed rgba(255,255,255,.15); padding-bottom: 4px; }
.precios em { font-style: normal; font-weight: 700; color: var(--maiz); white-space: nowrap; }
.maceta-in { position: absolute; bottom: 120px; left: max(18px, 4%); width: 36px; height: 30px; border-radius: 3px 3px 10px 10px; background: #c46b3b; }
.maceta-in::before { content: ""; position: absolute; bottom: 26px; left: -14px; width: 64px; height: 60px; background: radial-gradient(ellipse 11px 22px at 30% 60%, #3f8a4e 98%, transparent), radial-gradient(ellipse 11px 22px at 70% 55%, #2f7344 98%, transparent), radial-gradient(ellipse 10px 20px at 50% 30%, #4b9a5a 98%, transparent); }
/* Quien atiende */
.persona { position: absolute; left: 50%; bottom: 112px; width: 130px; height: 200px; transform: translateX(-30%); }
.persona__pelo { position: absolute; top: 0; left: 30px; width: 70px; height: 92px; border-radius: 35px 35px 22px 22px; background: #4a2e1b; }
.persona__cara { position: absolute; top: 14px; left: 38px; width: 54px; height: 60px; border-radius: 27px 27px 25px 25px; background: #e9b892; }
.persona__cara::before { content: ""; position: absolute; top: 25px; left: 13px; width: 28px; height: 7px; background: radial-gradient(circle, #3b2a20 0 2.8px, transparent 3.2px) 0 0 / 14px 7px; animation: parpadeo 4s infinite; }
.persona__cara::after { content: ""; position: absolute; top: 38px; left: 17px; width: 20px; height: 9px; border-bottom: 3px solid #b3573f; border-radius: 0 0 12px 12px; }
@keyframes parpadeo { 94% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.persona__fleco { position: absolute; top: 6px; left: 34px; width: 50px; height: 22px; border-radius: 22px 30px 10px 22px; background: #4a2e1b; }
.persona__cuello { position: absolute; top: 68px; left: 54px; width: 22px; height: 16px; border-radius: 0 0 10px 10px; background: #dba57f; }
.persona__cuerpo { position: absolute; top: 76px; left: 16px; width: 98px; height: 124px; border-radius: 36px 36px 8px 8px; background: #f3efe6; }
.persona__delantal { position: absolute; top: 98px; left: 34px; width: 62px; height: 102px; border-radius: 10px 10px 4px 4px; background: var(--c); }
.persona__delantal::before { content: ""; position: absolute; top: -18px; left: 8px; right: 8px; height: 18px; border: 3px solid var(--c); border-bottom: 0; border-radius: 10px 10px 0 0; }
.persona__delantal::after { content: attr(data-l); position: absolute; top: 18px; left: 0; right: 0; text-align: center; color: #fff; font: 800 1.1rem var(--display); }
.persona__brazo { position: absolute; top: 92px; left: -4px; width: 26px; height: 78px; border-radius: 13px; background: #f3efe6; transform-origin: top center; transform: rotate(40deg); animation: invitar 2.2s ease-in-out infinite; }
.persona__brazo::after { content: ""; position: absolute; bottom: -8px; left: 2px; width: 22px; height: 20px; border-radius: 50%; background: #e9b892; }
@keyframes invitar { 50% { transform: rotate(58deg); } }
/* Mostrador con vitrina */
.mostrador-in { position: absolute; left: 0; right: 0; bottom: 0; height: 112px; background: repeating-linear-gradient(90deg, #a8703f 0 60px, #9a6537 60px 62px); box-shadow: 0 -4px 0 rgba(0,0,0,.08); }
.mostrador-in::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 16px; background: linear-gradient(#dcae78, #c38d55); box-shadow: 0 4px 6px rgba(0,0,0,.2); }
.vitrina-in { position: absolute; bottom: 14px; left: max(16px, 6%); width: min(46%, 400px); height: 78px; border: 5px solid #7b5230; border-radius: 4px; background: linear-gradient(160deg, rgba(255,255,255,.65), rgba(255,255,255,.15) 45%), #fdf6e6; display: flex; justify-content: space-around; align-items: flex-end; padding: 0 8px 8px; box-shadow: inset 0 0 20px rgba(255,220,150,.5); }
.caja-registradora { position: absolute; right: max(30px, 10%); bottom: 112px; width: 112px; height: 52px; border-radius: 6px 6px 2px 2px; background: #3a3a3a; }
.caja-registradora::before { content: ""; position: absolute; top: -40px; left: 28px; width: 54px; height: 36px; border-radius: 4px; background: #5f8f7a; box-shadow: inset 0 0 0 5px #3a3a3a; }
.caja-registradora::after { content: ""; position: absolute; top: 12px; left: 12px; right: 12px; height: 10px; background: repeating-linear-gradient(90deg, #6a6a6a 0 10px, transparent 10px 14px); }
.canasta-in { position: absolute; right: max(160px, 30%); bottom: 112px; width: 60px; height: 30px; border-radius: 0 0 12px 12px; background: repeating-linear-gradient(45deg, #b07a3c 0 5px, #8a5a28 5px 10px); }
.canasta-in::before { content: ""; position: absolute; top: -16px; left: 6px; right: 6px; height: 20px; border-radius: 50% 50% 0 0; background: radial-gradient(circle at 25% 60%, #e74c3c 0 7px, transparent 8px), radial-gradient(circle at 55% 50%, #f1c40f 0 7px, transparent 8px), radial-gradient(circle at 80% 65%, #8bc34a 0 7px, transparent 8px); }
/* Globo y botón de ordenar */
.globo { position: absolute; z-index: 2; top: 80px; left: calc(50% + 70px); width: min(260px, 40%); padding: 12px 14px; border-radius: 18px 18px 18px 4px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.18); font-size: .92rem; line-height: 1.35; animation: globo .5s .6s both; }
.globo b { display: block; font: 800 1.1rem var(--display); }
@keyframes globo { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.adentro.cerrada { filter: brightness(.48) grayscale(.35); }
.adentro.cerrada .persona { display: none; }
.volver { position: absolute; z-index: 3; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); padding: 8px 12px; border: 0; border-radius: 10px; background: rgba(35,32,27,.78); color: #fff; font-weight: 600; }
.cuerpo { display: grid; gap: 14px; width: 100%; max-width: 760px; margin: 0 auto; padding-block: 20px 110px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.cuerpo h2 { margin: 0; font: 800 1.6rem var(--display); letter-spacing: -.02em; text-wrap: balance; }
.cuerpo > p { margin: -10px 0 0; color: var(--suave); }
.cuerpo h3 { margin: 6px 0 0; font: 700 1rem var(--display); }
.aviso-cerrado { padding: 12px 14px; border: 1px solid #f1c27d; border-radius: 12px; background: #fff3dc; font-weight: 600; font-size: .9rem; }
.productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.producto { display: grid; gap: 4px; padding: 10px; border: 1px solid rgba(0,0,0,.1); border-radius: 14px; background: #fff; }
.producto .foto { height: 80px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, #fff); display: grid; place-items: center; font: 800 1.4rem var(--display); color: var(--c); }
.producto b { font-size: .9rem; } .producto span { color: var(--suave); font-size: .86rem; font-weight: 700; }
.producto button { margin-top: 4px; min-height: 36px; border: 1px solid var(--c); border-radius: 10px; background: #fff; color: var(--c); font-weight: 700; font-size: .84rem; }
.ordenar-barra { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(255,250,240,.95); backdrop-filter: blur(8px); box-shadow: 0 -8px 20px rgba(0,0,0,.08); }
.ordenar-barra small { flex: 1; min-width: 0; color: var(--suave); font-size: .82rem; line-height: 1.3; }
.ordenar-barra small b { display: block; color: var(--tinta); font-size: .92rem; }
.ordenar { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--c); color: #fff; font-weight: 800; font-size: 1rem; box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 35%, transparent); white-space: nowrap; text-decoration: none; }
.ordenar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nota { margin: 0; color: var(--suave); font-size: .8rem; text-align: center; }
@media (max-width: 640px) {
  .adentro { height: 470px; }
  .cartel { top: 58px; font-size: .82rem; }
  .estantes { top: 108px; width: calc(100% - 24px); left: 12px; gap: 22px; }
  .estante:nth-child(n+2) { display: none; }
  .precios { display: none; }
  .persona { left: 26%; bottom: 112px; transform: none; }
  .globo { top: 206px; left: auto; right: 12px; width: 50%; }
  .canasta-in { display: none; }
  .vitrina-in { width: 52%; }
  .caja-registradora { right: 12px; width: 92px; }
  .ordenar-barra small { display: none; }
  .ordenar { flex: 1; }
}
/* ---------- Lista, comunidad y resultados ---------- */
.lista { position: absolute; z-index: 25; inset: 0; top: var(--alto-barra, 150px); overflow-y: auto; display: grid; gap: 8px; align-content: start; padding-block: 8px 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--cielo); }
.lista button, .resultados button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(0,0,0,.1); border-radius: 14px; background: var(--papel); color: var(--tinta); text-align: left; }
.lista i, .resultados i { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--c); color: #fff; font: 800 1rem var(--display); font-style: normal; }
.lista span, .resultados span { flex: 1; min-width: 0; }
.lista b, .resultados b { display: block; } .lista small, .resultados small { color: var(--suave); font-size: .8rem; }
.lista em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--jade); } .lista em.no { color: var(--rojo); }
.resultados { position: absolute; z-index: 35; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); top: calc(var(--alto-barra, 150px) - 6px); max-height: 46vh; overflow-y: auto; display: grid; gap: 4px; padding: 6px; border-radius: 16px; background: var(--papel); box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.resultados button { border: 0; }
.resultados strong { color: var(--tinta); font-variant-numeric: tabular-nums; }
.resultados p { margin: 0; padding: 12px; color: var(--suave); font-size: .88rem; }
.donde { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(35,32,27,.55); backdrop-filter: blur(4px); }
.donde__caja { width: min(420px, 100%); padding: 22px; border-radius: 22px; background: var(--papel); color: var(--tinta); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.donde__caja h2 { margin: 0 0 4px; font: 800 1.4rem var(--display); }
.donde__caja p { margin: 0 0 16px; color: var(--suave); }
.donde__aldeas { display: grid; gap: 8px; }
.donde__aldeas button { display: flex; justify-content: space-between; padding: 14px; border: 1px solid rgba(0,0,0,.12); border-radius: 14px; background: #fff; font-weight: 700; }
.donde__aldeas small { color: var(--suave); font-weight: 500; }
.donde__todas { margin-top: 12px; border: 0; background: none; color: var(--anil); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Estados de carga ---------- */
.mensaje { position: absolute; z-index: 15; inset: 0; top: var(--alto-barra, 150px); display: grid; place-items: center; padding: 24px; text-align: center; }
.mensaje div { max-width: 360px; }
.mensaje b { display: block; margin-bottom: 6px; font: 800 1.2rem var(--display); }
.mensaje p { margin: 0 0 14px; color: var(--suave); }
.mensaje button { padding: 10px 16px; border: 0; border-radius: 12px; background: var(--tinta); color: var(--papel); font-weight: 700; }
.marquesina img, .cartel img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.marquesina i, .cartel i { overflow: hidden; }
.pasos-pedir span { justify-content: flex-start !important; gap: 10px !important; }
.pasos-pedir span em { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--maiz); color: var(--tinta) !important; font-size: .72rem; flex-shrink: 0; }
.pie { position: absolute; z-index: 20; left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); padding: 8px 12px; border-radius: 10px; background: rgba(255,250,240,.92); color: var(--tinta); font-size: .78rem; font-weight: 600; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.pie:hover { text-decoration: underline; }
@media (max-width: 640px) { .pie { display: none; } }

/* ---------- Avenida entre calles: banqueta, asfalto, cebra, semáforo, gente y un carro ----------
   Todo es CSS; solo se mueven transform (liviano para el celular). */
:root { --asfalto: #5b5f66; --raya: #f2f2f2; }
.noche { --asfalto: #2b2e35; --raya: #b9b9b9; }
.via { position: relative; z-index: 0; height: 196px; margin: 0 -50vw 34px -40px; overflow-x: clip; overflow-y: visible; }
.via__banqueta { position: absolute; left: 0; right: 0; top: 0; height: 22px; background: repeating-linear-gradient(90deg, var(--banqueta) 0 58px, var(--adoquin-osc) 58px 60px); box-shadow: inset 0 -4px 0 #a9a196; }
.via__asfalto { position: absolute; left: 0; right: 0; top: 22px; bottom: 64px; background: var(--asfalto); }
.via__asfalto::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 2px); height: 4px; background: repeating-linear-gradient(90deg, var(--raya) 0 34px, transparent 34px 64px); opacity: .8; }
.via__abajo { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(var(--banqueta) 0 18px, #8fb56f 18px); box-shadow: inset 0 4px 0 #a9a196; }
.via__cebra { position: absolute; top: 22px; bottom: 64px; left: 150px; width: 56px; background: repeating-linear-gradient(180deg, var(--raya) 0 9px, transparent 9px 18px); opacity: .85; }
.via__rotulo { position: absolute; left: 230px; top: 50px; padding: 3px 10px; border-radius: 4px; background: #1f4f8a; color: #fff; font: 700 .72rem var(--texto); white-space: nowrap; border: 2px solid #fff; }
.semaforo { position: absolute; left: 118px; top: -48px; width: 14px; height: 70px; }
.semaforo::before { content: ""; position: absolute; left: 5px; top: 30px; width: 4px; height: 40px; background: #3b3b3b; }
.semaforo span { position: absolute; left: 0; top: 0; display: grid; gap: 2px; width: 14px; padding: 2px; border-radius: 4px; background: #222; }
.semaforo i { width: 10px; height: 8px; border-radius: 50%; background: #444; animation: luz 9s infinite steps(1); }
.semaforo i:nth-child(1) { --on: #e74c3c; animation-delay: -6s; }
.semaforo i:nth-child(2) { --on: #f1c40f; animation-delay: -3s; }
.semaforo i:nth-child(3) { --on: #2ecc71; }
@keyframes luz { 0% { background: var(--on); box-shadow: 0 0 6px var(--on); } 33.3% { background: #444; box-shadow: none; } }
.carro { position: absolute; top: 34px; left: 0; width: 64px; height: 26px; border-radius: 8px 12px 6px 6px; background: var(--k, #c0392b); animation: andar-carro 26s linear infinite; will-change: transform; }
.carro::before { content: ""; position: absolute; left: 14px; top: -11px; width: 32px; height: 13px; border-radius: 8px 8px 0 0; background: inherit; box-shadow: inset 0 0 0 3px rgba(0,0,0,.08); }
.carro::after { content: ""; position: absolute; left: 8px; bottom: -6px; width: 12px; height: 12px; border-radius: 50%; background: #1c1c1c; box-shadow: 34px 0 #1c1c1c; }
.carro--2 { top: 84px; animation-duration: 33s; animation-direction: reverse; animation-delay: -12s; }
@keyframes andar-carro { from { transform: translateX(-120px); } to { transform: translateX(2600px); } }
.persona-c { position: absolute; bottom: 48px; width: 10px; height: 26px; animation: caminar 40s linear infinite; will-change: transform; }
.persona-c::before { content: ""; position: absolute; left: 1px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #8a5a3c; }
.persona-c::after { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 18px; border-radius: 4px 4px 2px 2px; background: var(--k, #2c4a7a); }
.persona-c--arriba { bottom: auto; top: -2px; animation-duration: 52s; animation-direction: reverse; }
@keyframes caminar { from { transform: translateX(-40px); } to { transform: translateX(2600px); } }
@media (prefers-reduced-motion: reduce) { .carro, .persona-c, .semaforo i { animation: none; } }

/* ---------- Acercar / alejar ---------- */
.zoom { position: absolute; z-index: 20; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(150px + env(safe-area-inset-bottom, 0px)); display: grid; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.zoom button { width: 40px; height: 40px; border: 0; background: rgba(255,250,240,.95); color: var(--tinta); font: 700 1.3rem var(--texto); }
.zoom button + button { border-top: 1px solid rgba(0,0,0,.12); }
.zoom button:disabled { opacity: .35; }
.noche .zoom button { background: #262b3e; color: #efe6d6; }

/* Productos dentro del local */
.vitrina-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }
.vitrina-prods a { color-scheme: light; display: grid; gap: 4px; padding: 8px; border-radius: 12px; background: #fff; color: #2a2420; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.vitrina-prods img { background: #fff; object-fit: contain; }
.vitrina-prods img, .vitrina-prods .sin-foto { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: #fff; border: 1px solid #eee5d8; }
.vitrina-prods b { font-size: .85rem; line-height: 1.25; }
.vitrina-prods strong { color: var(--c); }

/* ---------- Árbol grande al final de cada cuadra (del alto de un local) ---------- */
.arbol { flex-shrink: 0; position: relative; width: 150px; margin: 0 -20px; height: 340px; pointer-events: none; }
.arbol::before { content: ""; position: absolute; left: calc(50% - 11px); bottom: 0; width: 22px; height: 150px; border-radius: 6px 6px 2px 2px; background: linear-gradient(90deg, #5a3c24, #7a5434 60%, #5a3c24); }
.arbol::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 230px; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #8cc777 0 22%, transparent 23%),
    radial-gradient(circle at 70% 38%, #6fae5f 0 26%, transparent 27%),
    radial-gradient(circle at 30% 68%, #5e9f52 0 28%, transparent 29%),
    radial-gradient(circle at 68% 72%, #4f8f4a 0 30%, transparent 31%),
    radial-gradient(circle at 50% 50%, #4a8a45 0 50%, transparent 51%);
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
.arbol--b::after { top: 20px; height: 210px; filter: hue-rotate(-12deg) drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
.noche .arbol { filter: brightness(.55) saturate(.8); }
.noche .via__abajo { background: linear-gradient(var(--banqueta) 0 18px, #3e5236 18px); }

/* ---------- Cruce entre cuadras: una calle pequeña que atraviesa ---------- */
.cruce { flex-shrink: 0; align-self: stretch; position: relative; width: 96px; margin-bottom: -34px; background: var(--asfalto); box-shadow: inset 8px 0 0 var(--banqueta), inset -8px 0 0 var(--banqueta); }
.cruce::before { content: ""; position: absolute; left: calc(50% - 2px); top: 0; bottom: 40px; width: 4px; background: repeating-linear-gradient(180deg, var(--raya) 0 26px, transparent 26px 50px); opacity: .7; }
.cruce::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 40px; background: repeating-linear-gradient(90deg, var(--raya) 0 8px, transparent 8px 16px); opacity: .85; }
.cruce span { position: absolute; top: 20px; left: 50%; transform: translateX(-50%) rotate(-90deg); transform-origin: center; padding: 2px 8px; border-radius: 4px; background: #1f4f8a; color: #fff; font: 700 .65rem var(--texto); white-space: nowrap; border: 2px solid #fff; margin-top: 40px; }

/* ---------- Kayibal Envíos: central, motos y aviso dentro del local ---------- */
.moto { position: absolute; width: 46px; height: 30px; }
.moto::before { content: ""; position: absolute; left: 6px; top: 0; width: 20px; height: 16px; border-radius: 3px; background: var(--maiz); box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.moto::after { content: ""; position: absolute; left: 2px; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #1c1c1c; box-shadow: 28px 0 #1c1c1c, 14px -8px 0 -2px #c0392b; }
.moto--via { top: 86px; left: 0; animation: andar-carro 22s linear infinite reverse; will-change: transform; }
.central { flex-shrink: 0; position: relative; display: block; width: 300px; height: 340px; text-decoration: none; color: #fff; }
.central__muro { position: absolute; inset: 40px 0 0; border-radius: 4px 4px 0 0; background: #f7f4ee; box-shadow: inset 0 -60px 0 #23273a, 0 10px 20px rgba(0,0,0,.18); }
.noche .central__muro { background: #d9d3c8; }
.central__franja { position: absolute; left: 0; right: 0; top: 40px; height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 4px 4px 0 0; background: #1d2134; }
.central__franja b { display: block; font: 800 1.05rem var(--display); line-height: 1; }
.central__franja small { display: block; color: var(--maiz); font-weight: 600; font-size: .66rem; }
.k-logo { flex-shrink: 0; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--maiz); color: #1d2134; font: 800 1rem var(--display); }
.central__luz { position: absolute; left: 0; right: 0; top: 98px; height: 5px; background: var(--maiz); }
.noche .central__luz, .noche .central__franja .k-logo { filter: drop-shadow(0 0 8px #f4c650); }
.central__vidrio { position: absolute; left: 14px; right: 14px; top: 118px; height: 150px; overflow: hidden; border: 6px solid #23273a; background: linear-gradient(160deg, rgba(255,255,255,.6), rgba(190,225,240,.55) 40%, rgba(160,205,225,.6)); }
.central__pantalla { position: absolute; left: 10px; top: 10px; width: 116px; padding: 7px 8px; border-radius: 6px; background: #0d0f19; font: 600 .58rem var(--texto); line-height: 1.5; }
.central__pantalla b { display: block; color: var(--maiz); font: 800 .7rem var(--display); }
.central__pantalla i { font-style: normal; color: #7dffb0; }
.central__repartidor { position: absolute; right: 56px; bottom: 0; width: 44px; height: 96px; }
.central__repartidor::before { content: ""; position: absolute; left: 10px; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #8a5a3c; box-shadow: 0 -6px 0 -1px var(--maiz); }
.central__repartidor::after { content: ""; position: absolute; left: 2px; top: 28px; width: 42px; height: 68px; border-radius: 14px 14px 0 0; background: var(--maiz); }
.central__mostrador { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: #23273a; box-shadow: 0 -6px 0 var(--maiz); }
.caja-p { position: absolute; border-radius: 2px; background: #c99a5b; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.12); }
.caja-p::after { content: ""; position: absolute; left: 45%; top: 0; bottom: 0; width: 10%; background: rgba(255,255,255,.35); }
.central__boton { position: absolute; right: 8px; bottom: 16px; padding: 8px 16px; border-radius: 99px; background: var(--maiz); color: #1d2134; font: 800 .78rem var(--texto); box-shadow: 0 4px 10px rgba(0,0,0,.25); }
/* Moto de reparto dibujada (central y vallas) */
.motok { position: absolute; width: 58px; height: 40px; }
.motok i { position: absolute; bottom: 0; width: 16px; height: 16px; border-radius: 50%; background: #1c1c1c; box-shadow: inset 0 0 0 4px #1c1c1c, inset 0 0 0 6px #888; }
.motok i:nth-of-type(1) { left: 0; } .motok i:nth-of-type(2) { right: 0; }
.motok b { position: absolute; left: 8px; right: 10px; bottom: 8px; height: 9px; border-radius: 5px; background: #c0392b; }
.motok em { position: absolute; left: 2px; bottom: 16px; width: 26px; height: 22px; border-radius: 3px; background: var(--maiz); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.motok em::after { content: "K"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 .7rem var(--display); color: #1d2134; }
.motok s { position: absolute; right: 6px; bottom: 16px; width: 4px; height: 16px; background: #333; transform: rotate(18deg); }

/* Valla de publicidad de Kayibal Envíos, en lugar de algunos árboles */
.valla { flex-shrink: 0; position: relative; display: block; width: 200px; height: 340px; margin: 0 -10px; text-decoration: none; color: #fff; }
.valla::before, .valla::after { content: ""; position: absolute; bottom: 0; width: 8px; height: 170px; background: linear-gradient(90deg, #3b3b3b, #6a6a6a); }
.valla::before { left: 50px; } .valla::after { right: 50px; }
.valla__cartel { position: absolute; z-index: 1; left: 0; right: 0; top: 40px; height: 140px; padding: 12px 14px; border: 6px solid #151826; border-radius: 6px; background: linear-gradient(135deg, #1d2134 55%, #2a2f45); box-shadow: 0 8px 16px rgba(0,0,0,.2); }
.valla__cartel b { display: block; font: 800 1rem var(--display); line-height: 1.15; }
.valla__cartel small { display: block; margin-top: 4px; color: var(--maiz); font-weight: 700; font-size: .7rem; }
.valla__cartel .motok { right: 10px; bottom: 8px; }
.valla__cartel .k-logo { position: absolute; left: 12px; bottom: 10px; width: 26px; height: 26px; font-size: .85rem; }
.valla__focos { position: absolute; z-index: 2; left: 30px; right: 30px; top: 26px; height: 12px; background: radial-gradient(circle, #555 0 4px, transparent 5px) 0 0 / 46px 12px repeat-x; }
.noche .valla__cartel { box-shadow: 0 0 22px rgba(244,198,80,.35); }
.aviso-envios { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 70px; border-radius: 14px; background: #23273a; color: #fff; text-decoration: none; }
.aviso-envios .moto { left: 14px; top: calc(50% - 15px); }
.aviso-envios b { display: block; color: var(--maiz); }

/* ---------- Mercado en 3D (mercado3d.js) ---------- */
.escena3d { display: none; position: absolute; left: 0; right: 0; bottom: 0; top: var(--alto-barra, 150px); width: 100%; height: calc(100% - var(--alto-barra, 150px)); touch-action: none; }
.modo3d .escena3d { display: block; }
.modo3d .plaza, .modo3d .mini, .modo3d .zoom { display: none; }
.modo3d .donde__todas { display: none; }
.vista3d, .palanca { display: none; }
.modo3d .vista3d { display: block; position: absolute; z-index: 20; left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); padding: 10px 14px; border: 0; border-radius: 99px; background: rgba(255,250,240,.95); color: var(--tinta); font-weight: 700; font-size: .85rem; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.modo3d .palanca:not([hidden]) { display: grid; place-items: center; position: absolute; z-index: 20; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 120px; height: 120px; border-radius: 50%; background: rgba(255,250,240,.28); border: 2px solid rgba(255,255,255,.7); box-shadow: 0 4px 14px rgba(0,0,0,.2); touch-action: none; }
.palanca span { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,250,240,.95); box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none; }
.noche .vista3d { background: #262b3e; color: #efe6d6; }
.modo3d .pista { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
.modo3d .pie { display: none; }

/* ---------- El local por dentro en 3D (local3d.js) ---------- */
.local3d { position: fixed; inset: 0; z-index: 60; background: #b9c4b5; }
.local3d[hidden] { display: none; }
/* La pantalla (tienda web) va detrás y el dibujo 3D encima, con un hueco donde está la pantalla:
   así lo que está delante la tapa. El dibujo deja pasar los toques. */
.local3d__pantalla { position: absolute; inset: 0; z-index: 0; touch-action: none; }
.local3d canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.local3d__volver { position: absolute; z-index: 2; left: max(12px, env(safe-area-inset-left, 0px)); top: max(12px, env(safe-area-inset-top, 0px)); padding: 9px 14px; border: 0; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-weight: 700; font-size: .85rem; }
.local3d__globo { position: absolute; z-index: 2; left: 50%; top: max(64px, calc(env(safe-area-inset-top, 0px) + 56px)); transform: translateX(-50%); width: max-content; max-width: min(300px, calc(100% - 32px)); padding: 10px 14px; border-radius: 14px; background: #fff; font-size: .85rem; line-height: 1.35; text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.15); transition: opacity .4s; pointer-events: none; }
.local3d__globo b { display: block; font-family: var(--display); }
.local3d__globo.oculto { opacity: 0; }
.local3d__palanca { position: absolute; z-index: 2; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%; background: rgba(255,250,240,.3); border: 2px solid rgba(255,255,255,.8); touch-action: none; }
.local3d__palanca span { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,250,240,.95); box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none; }
.local3d__botones { position: absolute; z-index: 2; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(14px, env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; }
.local3d__botones > * { flex: 1; display: flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 12px; border: 0; border-radius: 14px; font-weight: 800; font-size: .92rem; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.local3d__ver { background: var(--papel); color: var(--tinta); }
.local3d__catalogo { background: var(--c, var(--jade)); color: #fff; }
.local3d__catalogo[hidden] { display: none; }

/* Que no se seleccione texto ni salga el menú al dejar presionado (menos en el buscador). */
.modo3d body, .local3d, .barra, .escena3d, .palanca, .vista3d, .pista, .mini, .zoom, .accion3d {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.modo3d input, .local3d iframe { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* ---------- Tarjeta de bienvenida (la primera vez) ---------- */
.bienvenida { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(20,22,34,.45); }
.bienvenida[hidden] { display: none; }
.bienvenida__tarjeta { width: min(360px, 100%); padding: 20px 18px 18px; border-radius: 20px; background: var(--papel); color: var(--tinta); box-shadow: 0 14px 30px rgba(0,0,0,.25); }
.bienvenida__k { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 12px; background: var(--tinta); color: var(--maiz); font: 800 1.1rem var(--display); }
.bienvenida__tarjeta h2 { margin: 0; font: 800 1.2rem var(--display); }
.bienvenida__tarjeta > p { margin: 4px 0 10px; color: var(--suave); font-size: .86rem; }
.bienvenida__paso { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #eadfcb; font-size: .86rem; }
.bienvenida__paso:first-of-type { border-top: 0; }
.bienvenida__paso p { margin: 0; }
.bienvenida__paso span { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #f1e7d2; }
.bienvenida__paso svg { width: 22px; height: 22px; fill: none; stroke: var(--tinta); stroke-width: 2; }
.bienvenida__paso svg .lleno { fill: var(--tinta); }
.bienvenida button { width: 100%; margin-top: 12px; padding: 14px; border: 0; border-radius: 12px; background: var(--jade); color: #fff; font-weight: 800; font-size: 1rem; }
.noche .bienvenida__tarjeta { background: #262b3e; color: #efe6d6; }

/* Botón «Entrar al cine» que aparece al llegar a la puerta (juegos/cine). */
.accion3d { position: absolute; z-index: 21; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 13px 20px; border: 0; border-radius: 99px; background: #e2a92f; color: #1d2134; font: 800 .95rem Sora, Inter, sans-serif; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; }
.accion3d[hidden] { display: none; }
/* Dentro del cine: se esconde lo de arriba del mercado. */
.jugando .barra, .jugando .pista, .jugando .mini, .jugando .zoom, .jugando .resultados { display: none !important; }
.jugando .escena3d { top: 0; height: 100%; }
