/* Rapidísimo La Barca · Cliente final
   Dirección: "arcilla 3D" en rojo y blanco. Superficies con volumen (luz arriba, sombra roja abajo),
   botones con canto que se hunden al tocarlos, y una escena 3D en el inicio. Móvil primero. */
:root {
  --red: #E3141B; --red-hi: #FF4A4F; --red-deep: #A80E13; --red-ink: #8A0A0E; --red-soft: #FFE9E8; --red-line: #F6CACA;
  --bg: #FFF7F6; --card: #FFFFFF; --card-lo: #FFF2F1; --fg: #231213; --muted: #82696A; --line: #F1DEDD;
  --ok: #19935A; --ok-soft: #E1F6EB; --warn: #B06A00; --warn-soft: #FFF2D9;
  --sh-card: inset 0 1px 0 #fff, 0 1px 2px rgba(120, 10, 14, .06), 0 14px 28px -14px rgba(170, 14, 20, .30);
  --sh-press: inset 0 2px 6px rgba(120, 10, 14, .12);
  --f-display: 'Fredoka', 'Baloo 2', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --red: #F0242B; --red-hi: #FF5A5F; --red-deep: #9C0C11; --red-ink: #FFB3B5; --red-soft: #3B1517; --red-line: #5A2326;
    --bg: #150B0C; --card: #241416; --card-lo: #1D1012; --fg: #FCEFEF; --muted: #C3A2A3; --line: #3B2426;
    --ok: #4CD08A; --ok-soft: #12301F; --warn: #F3B13E; --warn-soft: #33250D;
    --sh-card: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .4), 0 14px 28px -14px rgba(0, 0, 0, .7);
    --sh-press: inset 0 2px 6px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px; line-height: 1.45; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red-hi); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--f-display); font-weight: 600; }
small { font-size: 13px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row-b { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.stack { display: grid; gap: 10px; }
.err { color: var(--red); font-weight: 700; font-size: 13px; }
.ok-t { color: var(--ok); font-weight: 700; }
.lnk { background: none; border: 0; color: var(--red); font-weight: 700; padding: 4px 0; }

/* ---------- Superficies 3D ---------- */
.card3d { background: linear-gradient(180deg, var(--card), var(--card-lo)); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-card); }
button.card3d, [role="button"].card3d { transition: transform .18s cubic-bezier(.3, .7, .4, 1.4), box-shadow .18s; text-align: left; }
button.card3d:active, [role="button"].card3d:active { transform: translateY(2px) scale(.985); box-shadow: var(--sh-press); }
.btn3d { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border: 0; border-radius: 18px;
  background: linear-gradient(180deg, var(--red-hi), var(--red) 55%); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .01em; text-decoration: none;
  box-shadow: 0 5px 0 var(--red-deep), 0 12px 22px -8px rgba(200, 16, 22, .6), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .08s, box-shadow .08s; }
.btn3d:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 1px 0 var(--red-deep), 0 4px 10px -6px rgba(200, 16, 22, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn3d[disabled] { opacity: .55; cursor: not-allowed; }
.btn3d.big { min-height: 58px; font-size: 17px; border-radius: 20px; }
.block { width: 100%; }
.btn-soft { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), var(--card-lo)); color: var(--fg); font-weight: 700; text-decoration: none; box-shadow: 0 3px 0 var(--line), 0 8px 16px -10px rgba(150, 12, 18, .35); }
.btn-soft:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.btn-soft.danger { color: var(--red); }
.round { width: 42px; height: 42px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; background: var(--card); color: var(--fg); font-size: 22px; font-weight: 800; box-shadow: 0 3px 0 var(--line), 0 6px 14px -6px rgba(0, 0, 0, .25); text-decoration: none; flex: none; }
.round.green { background: #25D366; color: #fff; box-shadow: 0 3px 0 #179447; }
.camlbl { position: relative; overflow: hidden; cursor: pointer; }
.camlbl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Inicio: escena 3D ---------- */
.hero3d { position: relative; overflow: hidden; color: #fff; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 26px max(16px, env(safe-area-inset-left, 0px));
  background: radial-gradient(120% 90% at 50% 0%, #FF5459 0%, #E3141B 45%, #B10E14 100%); border-radius: 0 0 36px 36px; box-shadow: 0 18px 40px -20px rgba(150, 10, 15, .7); }
.sky .cloud { position: absolute; background: rgba(255, 255, 255, .9); border-radius: 999px; filter: blur(.3px); opacity: .22; animation: drift linear infinite; }
.sky .cloud::before, .sky .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud.c1 { width: 120px; height: 34px; top: 92px; left: 70%; animation-duration: 26s; }
.cloud.c1::before { width: 56px; height: 56px; left: 18px; top: -26px; } .cloud.c1::after { width: 40px; height: 40px; left: 62px; top: -16px; }
.cloud.c2 { width: 80px; height: 24px; top: 150px; left: 10%; animation-duration: 34s; animation-delay: -12s; }
.cloud.c2::before { width: 40px; height: 40px; left: 12px; top: -20px; } .cloud.c2::after { width: 28px; height: 28px; left: 42px; top: -12px; }
.cloud.c3 { width: 100px; height: 28px; top: 60px; left: 30%; animation-duration: 40s; animation-delay: -25s; }
.cloud.c3::before { width: 46px; height: 46px; left: 16px; top: -22px; } .cloud.c3::after { width: 32px; height: 32px; left: 54px; top: -14px; }
@keyframes drift { from { transform: translateX(40vw); } to { transform: translateX(-120vw); } }
.hero-top { position: relative; z-index: 2; display: flex; gap: 10px; align-items: center; max-width: 720px; margin: 0 auto; }
.chip-addr { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; border: 0; text-align: left; color: #fff; padding: 9px 14px; border-radius: 18px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -10px rgba(0, 0, 0, .5); backdrop-filter: blur(8px); }
.chip-addr small { display: block; opacity: .85; font-size: 11px; font-weight: 600; }
.chip-addr b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.hero-av { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .2); font-size: 22px; overflow: hidden; padding: 0; flex: none; }
.hero-av img { width: 100%; height: 100%; object-fit: cover; }
.stage { position: relative; height: clamp(210px, 52vw, 300px); max-width: 620px; margin: 0 auto; }
.rider { position: absolute; inset: 0; z-index: 1; touch-action: pan-y; }
.rider-canvas { display: block; cursor: grab; }
.rider-canvas:active { cursor: grabbing; }
.rider-fallback::after { content: "🛵"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .3)); animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.road { position: absolute; left: -10%; right: -10%; bottom: 10px; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(90, 0, 4, .45), transparent); }
.road::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 26px, transparent 26px 52px); animation: roadmove .5s linear infinite; opacity: .6; }
@keyframes roadmove { to { background-position: -52px 0; } }
.logo3d { position: relative; z-index: 2; text-align: center; margin-top: -8px; line-height: .9; font-family: var(--f-display); font-weight: 700; }
.logo3d span { display: block; font-size: clamp(42px, 12.5vw, 76px); letter-spacing: .01em; color: #fff;
  text-shadow: 0 1px 0 #FFE1E2, 0 2px 0 #F7C3C5, 0 3px 0 #D2161C, 0 4px 0 #C2131A, 0 5px 0 #B01117, 0 6px 0 #9D0E13, 0 7px 0 #890B10, 0 14px 18px rgba(60, 0, 3, .45); }
.logo3d small { display: inline-block; margin-top: 10px; padding: 5px 16px; border-radius: 999px; background: #fff; color: var(--red); font-size: clamp(14px, 4vw, 18px); font-weight: 700; letter-spacing: .32em; box-shadow: 0 4px 0 #F2C2C3, 0 10px 18px -8px rgba(0, 0, 0, .45); }
.hero-sub { position: relative; z-index: 2; text-align: center; margin: 14px 0 12px; font-weight: 600; opacity: .95; }
.search-fake { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; margin: 0 auto; border: 0; border-radius: 18px; padding: 15px 18px; background: #fff; color: #82696A; font-weight: 600; text-align: left;
  box-shadow: 0 5px 0 #F1C9CA, 0 16px 26px -12px rgba(60, 0, 3, .55); }
.search-fake:active { transform: translateY(3px); box-shadow: 0 2px 0 #F1C9CA; }

/* ---------- Página ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 6px; }
.has-nav { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.sec { display: grid; gap: 12px; margin-top: 12px; min-width: 0; }
.sec > h2, .sec .row-b h2 { font-size: 20px; }
.hs { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 12px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hs::-webkit-scrollbar { display: none; }
.hs > * { scroll-snap-align: start; }
.note-box { background: var(--warn-soft); color: var(--warn); border-radius: 16px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.promo-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-weight: 700; color: var(--red-ink); background: linear-gradient(180deg, var(--red-soft), var(--card)); }
.pb-ic { font-size: 28px; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .2)); }

/* Categorías como fichas 3D */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
@media (min-width: 560px) { .cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat { border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: 6px; color: var(--fg); }
.cat-ic { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; font-size: 32px;
  background: linear-gradient(160deg, var(--card) 0%, var(--red-soft) 100%); border: 1px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .9), 0 5px 0 var(--red-line), 0 12px 18px -10px rgba(170, 14, 20, .5); transition: transform .2s cubic-bezier(.3, .7, .4, 1.5); }
.cat-ic { filter: drop-shadow(0 0 0 transparent); }
.cat:active .cat-ic { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .9), 0 1px 0 var(--red-line); }
.cat.on .cat-ic { background: linear-gradient(180deg, var(--red-hi), var(--red)); border-color: var(--red); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 5px 0 var(--red-deep), 0 12px 18px -8px rgba(200, 16, 22, .7); transform: translateY(-3px); }
.cat-l { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.15; max-width: 76px; }

/* Cupones */
.coupon { position: relative; width: 156px; border: 0; padding: 14px 16px 12px; border-radius: 20px; color: #fff; text-align: left; display: grid; gap: 2px;
  background: linear-gradient(150deg, #FF5A5F, #D9141A 60%, #A80E13); box-shadow: 0 5px 0 #8A0A0E, 0 14px 24px -12px rgba(170, 14, 20, .7), inset 0 1px 0 rgba(255, 255, 255, .4); }
.coupon::before, .coupon::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); top: 54%; }
.coupon::before { left: -9px; } .coupon::after { right: -9px; }
.cp-big { font-family: var(--f-display); font-size: 30px; font-weight: 700; line-height: 1; }
.cp-sub { font-size: 12px; opacity: .9; font-weight: 600; }
.cp-code { margin-top: 8px; padding-top: 8px; border-top: 2px dashed rgba(255, 255, 255, .45); font-weight: 800; letter-spacing: .08em; font-size: 13px; }
.coupon:active { transform: translateY(3px); box-shadow: 0 2px 0 #8A0A0E; }

/* Tarjetas de producto y negocio */
.pimg { width: var(--s); height: var(--s); max-width: 100%; border-radius: 18px; overflow: hidden; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--red-soft) 70%); box-shadow: inset 0 -6px 12px rgba(170, 14, 20, .10); }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg i { font-style: normal; font-size: calc(var(--s) * .48); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .22)); }
.pcard { position: relative; width: 156px; padding: 10px; display: grid; gap: 8px; border: 1px solid var(--line); }
.pcard .pimg { width: 100%; height: 120px; }
.pc-b { display: grid; gap: 1px; }
.pc-b b { font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-b small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.price s { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.price.big { font-size: 26px; font-family: var(--f-display); }
.badge-promo { position: absolute; top: 16px; left: 16px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; box-shadow: 0 3px 0 var(--red-deep); }
.again { display: flex; gap: 10px; align-items: center; padding: 10px 12px; width: 250px; }
.again span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.again small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.again-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 800; box-shadow: 0 3px 0 var(--red-deep); }
.fav-mini { width: 110px; padding: 12px 8px; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13px; }
.nlogo { width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3); overflow: hidden; display: grid; place-items: center; flex: none; background: var(--card); border: 3px solid var(--card);
  box-shadow: 0 4px 0 var(--line), 0 10px 18px -8px rgba(0, 0, 0, .3); }
.nlogo img { width: 100%; height: 100%; object-fit: cover; }
.nlogo i { font-style: normal; font-size: calc(var(--s) * .5); }
.ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ncard { overflow: hidden; cursor: pointer; }
.ncov { position: relative; height: 104px; padding: 12px; display: flex; align-items: flex-end; overflow: hidden;
  background: linear-gradient(135deg, #FF5A5F, #E3141B 55%, #B10E14); }
.ncov-emo { position: absolute; right: -6px; top: -14px; font-size: 104px; opacity: .3; transform: rotate(-12deg); filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .3)); }
.nbody { padding: 12px 14px 14px; display: grid; gap: 3px; }
.nbody b { font-size: 17px; font-family: var(--f-display); font-weight: 600; }
.nbody small { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.meta.center { justify-content: center; }
.tag-ok, .tag-off { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.tag-ok { background: #fff; color: var(--ok); box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.tag-off { background: rgba(0, 0, 0, .55); color: #fff; }
.tag-ok.inline, .tag-off.inline { position: static; display: inline-block; margin-top: 6px; }
.prow .tag-off { position: static; background: var(--line); color: var(--muted); }
.closed { filter: grayscale(.7); opacity: .75; }
.heart { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--red); font-size: 20px; line-height: 1; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); z-index: 3; }
.heart.on { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.3); } }
.skel { height: 210px; background: linear-gradient(100deg, var(--card) 30%, var(--card-lo) 50%, var(--card) 70%); background-size: 300% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }
.plist { display: grid; gap: 10px; }
.prow { display: flex; gap: 12px; align-items: center; padding: 10px; cursor: pointer; }
.prow b { display: block; font-size: 15px; }
.prow small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); }
.plus { width: 44px; height: 44px; border-radius: 15px; border: 0; flex: none; background: linear-gradient(180deg, var(--red-hi), var(--red)); color: #fff; font-size: 22px; font-weight: 800;
  box-shadow: 0 4px 0 var(--red-deep), 0 8px 14px -6px rgba(200, 16, 22, .6), inset 0 1px 0 rgba(255, 255, 255, .4); }
.plus:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-deep); }
.live { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--red); }
.live-ic { font-size: 30px; animation: bob 1.2s ease-in-out infinite; }
.live b { display: block; } .live small { color: var(--muted); }
.live-bar { flex-basis: 100%; height: 8px; border-radius: 99px; background: var(--red-soft); overflow: hidden; }
.live-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red-hi), var(--red)); transition: width .6s; }

/* ---------- Barra de navegación ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 40; width: min(560px, calc(100% - 24px));
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end; padding: 8px 6px; border-radius: 26px; background: var(--card); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 18px 30px -12px rgba(120, 10, 14, .4); }
.tabbar > button:not(.cartfab) { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; position: relative; }
.tabbar .ic { font-size: 22px; filter: grayscale(1) opacity(.6); transition: transform .2s; }
.tabbar button.on { color: var(--red); }
.tabbar button.on .ic { filter: none; transform: translateY(-3px) scale(1.12); }
.tabbar em { position: absolute; top: -2px; right: 14%; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-style: normal; font-size: 10px; display: grid; place-items: center; padding: 0 5px; }
.cartfab { justify-self: center; width: 68px; height: 68px; border-radius: 24px; border: 0; transform: translateY(-14px); position: relative; font-size: 30px;
  background: linear-gradient(180deg, var(--red-hi), var(--red) 60%); box-shadow: 0 6px 0 var(--red-deep), 0 16px 24px -8px rgba(200, 16, 22, .7), inset 0 2px 0 rgba(255, 255, 255, .45); }
.cartfab:active { transform: translateY(-10px); box-shadow: 0 2px 0 var(--red-deep); }
.cartfab b { position: absolute; top: -6px; right: -6px; min-width: 26px; height: 26px; border-radius: 13px; background: #fff; color: var(--red); font-size: 13px; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); padding: 0 6px; }
.cartfab.full { animation: wiggle 2.8s ease-in-out infinite; }
@keyframes wiggle { 0%, 88%, 100% { rotate: 0deg; } 92% { rotate: -8deg; } 96% { rotate: 8deg; } }
.flydot { position: fixed; z-index: 100; width: 40px; height: 40px; font-size: 30px; display: grid; place-items: center; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .3)); }

/* ---------- Barras de título ---------- */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.bar h1 { flex: 1; font-size: 22px; }
.search-bar .sbox { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; box-shadow: var(--sh-press); }
.sbox input { flex: 1; border: 0; background: none; padding: 13px 0; outline: none; font-size: 16px; min-width: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 15px; font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 var(--line); }
.pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.pill.on { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 3px 0 var(--red-deep); }

/* ---------- Tienda ---------- */
.store-cov { position: relative; height: calc(170px + env(safe-area-inset-top, 0px)); overflow: hidden; background: radial-gradient(120% 120% at 70% 10%, #FF5A5F, #E3141B 50%, #A80E13); }
.sc-emo { position: absolute; right: 6%; bottom: -30px; font-size: 170px; transform: rotate(-10deg); filter: drop-shadow(0 18px 14px rgba(0, 0, 0, .35)); }
.round.float { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); }
.store-cov .heart { top: calc(14px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.store { margin-top: -64px; position: relative; z-index: 2; }
.store-card { text-align: center; padding: 0 18px 18px; display: grid; justify-items: center; gap: 4px; }
.store-card .nlogo { margin-top: -40px; }
.store-card h1 { font-size: 26px; margin-top: 6px; }
.store-card p { margin: 0; color: var(--muted); max-width: 46ch; }
.ctabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; background: var(--bg); scrollbar-width: none; }
.ctabs button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 0 var(--line); }
.psheet { display: grid; gap: 10px; justify-items: start; }
.psheet .pimg { width: 100%; height: 220px; border-radius: 24px; }
.psheet p { margin: 0; }
.psheet .f { width: 100%; }
.sheet-act { display: flex; gap: 12px; width: 100%; align-items: center; margin-top: 4px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--card-lo); border: 1px solid var(--line); border-radius: 16px; padding: 4px; box-shadow: var(--sh-press); }
.stepper button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--card); font-size: 20px; font-weight: 800; color: var(--red); box-shadow: 0 3px 0 var(--line); }
.stepper button:active { transform: translateY(2px); box-shadow: none; }
.stepper b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper.sm button { width: 32px; height: 32px; font-size: 17px; }

/* ---------- Pago ---------- */
.alert { display: grid; gap: 8px; padding: 16px; border: 2px solid var(--red); }
.alert b { font-size: 16px; } .alert span { color: var(--muted); }
.crow { display: flex; gap: 12px; align-items: center; padding: 10px; }
.crow b { display: block; } .crow small { color: var(--muted); }
.form { display: grid; gap: 12px; padding: 16px; }
.card3d.form { padding: 16px; }
label.f { display: grid; gap: 5px; font-weight: 700; font-size: 13px; }
label.f .h { font-weight: 500; color: var(--muted); }
.i { width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 16px; min-height: 48px; box-shadow: var(--sh-press); }
.i.mini { min-height: 36px; padding: 6px 10px; font-size: 14px; margin-top: 6px; border-radius: 10px; }
textarea.i { min-height: 90px; resize: vertical; }
.i:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .g2 { grid-template-columns: 1fr; } }
.pays { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay { display: grid; gap: 3px; padding: 14px; border: 2px solid var(--line); }
.pay-ic { font-size: 30px; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .2)); }
.pay small { color: var(--muted); font-size: 12px; }
.pay.on { border-color: var(--red); background: linear-gradient(180deg, var(--card), var(--red-soft)); transform: translateY(-2px); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.kv span { color: var(--muted); }
.sum { display: grid; gap: 7px; padding: 16px; font-variant-numeric: tabular-nums; }
.sum > div { display: flex; justify-content: space-between; gap: 10px; }
.sum .tot { font-family: var(--f-display); font-size: 22px; font-weight: 700; border-top: 2px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.sum.small { padding: 10px 0 0; font-size: 14px; }

/* ---------- Seguimiento ---------- */
.ocard { display: flex; gap: 12px; align-items: center; padding: 12px; width: 100%; }
.ocard .grow { display: grid; gap: 4px; justify-items: start; }
.ocard small { color: var(--muted); }
.rate-me { font-size: 12px; font-weight: 800; color: var(--red); white-space: nowrap; }
.track { padding: 16px; display: grid; gap: 12px; }
.eta { font-family: var(--f-display); font-size: 38px; font-weight: 700; line-height: 1; color: var(--red); }
.lane { position: relative; height: 120px; margin: 6px 0 0; }
.lane::before { content: ""; position: absolute; left: 20px; right: 20px; bottom: 18px; height: 10px; border-radius: 99px; background: var(--card-lo); box-shadow: var(--sh-press); }
.lane-fill { position: absolute; left: 20px; bottom: 18px; height: 10px; border-radius: 99px; width: calc((100% - 40px) * var(--p)); background: linear-gradient(90deg, var(--red-hi), var(--red)); transition: width .8s; }
.lane-a, .lane-b { position: absolute; bottom: 2px; font-size: 26px; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
.lane-a { left: 0; } .lane-b { right: 0; }
.lane-rider { position: absolute; bottom: 14px; width: 140px; height: 110px; left: calc(20px + (100% - 40px) * var(--p) - 70px); transition: left .8s cubic-bezier(.3, .7, .3, 1); }
.track-sub { margin: 0; font-weight: 700; text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.steps li { display: grid; justify-items: center; gap: 4px; }
.steps li span { width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center; font-size: 18px; background: var(--card-lo); filter: grayscale(1); opacity: .6; box-shadow: var(--sh-press); }
.steps li.done span, .steps li.now span { filter: none; opacity: 1; background: var(--red-soft); box-shadow: 0 3px 0 var(--red-line); }
.steps li.now { color: var(--red); }
.steps li.now span { animation: bob 1s ease-in-out infinite; }
.pinbox { text-align: center; padding: 16px; display: grid; gap: 8px; }
.pin { display: flex; justify-content: center; gap: 10px; }
.pin span { width: 56px; height: 66px; border-radius: 16px; display: grid; place-items: center; font-family: var(--f-display); font-size: 36px; font-weight: 700; color: var(--red);
  background: linear-gradient(180deg, var(--card), var(--red-soft)); border: 1px solid var(--line); box-shadow: 0 5px 0 var(--red-line), 0 12px 18px -10px rgba(170, 14, 20, .5); }
.driver { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.driver .grow { display: grid; } .driver small { color: var(--muted); }
.receipt { padding: 16px; display: grid; gap: 10px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.items li { display: flex; gap: 8px; } .items li b { min-width: 26px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.c-red { background: var(--red-soft); color: var(--red-ink); } .c-warn { background: var(--warn-soft); color: var(--warn); }
.c-info { background: #E5EDFB; color: #2152AE; } .c-ok { background: var(--ok-soft); color: var(--ok); } .c-mute { background: var(--card-lo); color: var(--muted); }
@media (prefers-color-scheme: dark) { .c-info { background: #14223F; color: #86AAF2; } }
.av { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; font-weight: 800; flex: none; background: var(--red-soft); color: var(--red-ink); overflow: hidden; border: 3px solid var(--card); box-shadow: 0 4px 0 var(--line); }

/* ---------- Perfil y acceso ---------- */
.profile { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; text-align: center; }
.pf-av { position: relative; }
.pf-cam { position: absolute; right: -4px; bottom: -4px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 18px; box-shadow: 0 3px 0 var(--red-deep); }
.profile h2 { font-size: 22px; margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 12px; }
.stats span { display: grid; font-size: 12px; color: var(--muted); font-weight: 600; background: var(--card-lo); border-radius: 14px; padding: 10px 4px; box-shadow: var(--sh-press); }
.stats b { font-family: var(--f-display); font-size: 22px; color: var(--fg); }
.menu { display: grid; overflow: hidden; margin: 12px 0; padding: 0; }
.menu > * { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: inherit; text-decoration: none; font-size: 18px; }
.menu > *:last-child { border-bottom: 0; }
.menu b { display: block; font-size: 15px; } .menu small { color: var(--muted); font-size: 13px; }
.auth { max-width: 440px; margin: 0 auto; display: grid; gap: 14px; }
.auth-hero { text-align: center; display: grid; gap: 4px; }
.auth-hero span { font-size: 54px; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .25)); animation: bob 1.4s ease-in-out infinite; }
.auth-hero h2 { font-size: 26px; } .auth-hero p { margin: 0; }
.auth .form { padding: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; background: var(--card-lo); border-radius: 18px; box-shadow: var(--sh-press); }
.seg button { border: 0; background: none; padding: 11px; border-radius: 14px; font-weight: 800; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--red); box-shadow: 0 3px 0 var(--line), 0 6px 12px -6px rgba(0, 0, 0, .2); }
.selfie { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; text-align: center; overflow: hidden; font-weight: 700; color: var(--red-ink); font-size: 14px;
  background: radial-gradient(circle at 35% 30%, var(--card), var(--red-soft)); border: 4px dashed var(--red-line); }
.selfie span { font-size: 14px; line-height: 1.4; }
.selfie img { width: 100%; height: 100%; object-fit: cover; }
.rate { display: flex; gap: 4px; }
.rate button { border: 0; background: none; font-size: 38px; color: var(--line); padding: 0; transition: transform .15s; }
.rate button.on { color: #F5A70F; text-shadow: 0 3px 0 #C47E00; }
.rate button:active { transform: scale(1.25); }
.empty { text-align: center; padding: 34px 16px; display: grid; gap: 8px; justify-items: center; color: var(--muted); }
.empty b { color: var(--fg); font-size: 17px; font-family: var(--f-display); font-weight: 600; }

/* ---------- Hojas y avisos ---------- */
#modal { position: fixed; inset: 0; z-index: 80; background: rgba(30, 4, 6, .5); backdrop-filter: blur(3px); display: grid; place-items: end center; }
#modal .sheet { width: min(620px, 100%); max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px max(18px, env(safe-area-inset-left, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, .4); animation: up .28s cubic-bezier(.2, .8, .3, 1); }
#modal .sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { #modal { place-items: center; } #modal .sheet { border-radius: 28px; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-h h3 { font-size: 22px; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card-lo); font-size: 22px; color: var(--fg); box-shadow: var(--sh-press); }
.cartsheet { display: grid; gap: 12px; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(104px + env(safe-area-inset-bottom, 0px)); z-index: 95; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px;
  background: var(--fg); color: var(--bg); font-weight: 700; text-align: center; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .5); animation: up .25s; }
.splash { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #FF5459, #E3141B 50%, #A80E13); color: #fff; }
.splash .logo3d span { font-size: 54px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Registro seguro ---------- */
.reg { display: grid; gap: 10px; }
.reg-bar { display: grid; grid-auto-flow: column; gap: 6px; }
.reg-bar i { height: 8px; border-radius: 99px; background: var(--card-lo); box-shadow: var(--sh-press); }
.reg-bar i.on { background: linear-gradient(90deg, var(--red-hi), var(--red)); box-shadow: 0 2px 0 var(--red-deep); }
.reg .form { padding: 0; }
.reg-t { font-size: 22px; }
.reg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reg-list li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: linear-gradient(180deg, var(--card), var(--card-lo)); border: 1px solid var(--line); box-shadow: var(--sh-card); }
.reg-list li span { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--red-soft); }
.reg-list small { color: var(--muted); }
.err-box { background: var(--red-soft); color: var(--red-ink); border-radius: 14px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.dob { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.dob legend { font-weight: 700; font-size: 13px; padding: 0; margin-bottom: 5px; }
.g3 { display: grid; grid-template-columns: .8fr 1.3fr 1fr; gap: 8px; }
.tel-in { display: flex; align-items: center; gap: 8px; }
.tel-in span { font-weight: 800; white-space: nowrap; padding: 0 4px; }
.pw-meter { height: 6px; border-radius: 99px; background: var(--card-lo); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s, background .25s; }
.pw-meter i[data-n="3"] { background: var(--warn); } .pw-meter i[data-n="4"], .pw-meter i[data-n="5"] { background: var(--ok); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.35; }
.check input { width: 22px; height: 22px; accent-color: var(--red); flex: none; margin: 0; }
.check a { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.code-in { font-size: 30px; letter-spacing: .4em; text-align: center; font-family: var(--f-display); font-weight: 700; }
.tips { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.ine-prev { width: 100%; max-height: 260px; object-fit: contain; border-radius: 16px; background: var(--card-lo); border: 1px solid var(--line); }
.reg-done { justify-items: center; gap: 8px; }
.reg-done p { margin: 0; }
.big-emo { font-size: 64px; animation: bob 1.2s ease-in-out infinite; }
.verif { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-top: 12px; }
.verif > span:first-child { font-size: 26px; }
.verif b { display: block; } .verif small { color: var(--muted); }
.verif.ok { border-color: var(--ok); } .verif.bad { border-color: var(--red); }
.pf-cam { border: 0; }
/* Cámara en vivo */
.live-cam { position: relative; width: 100%; max-width: 360px; aspect-ratio: 3 / 4; margin: 0 auto; border-radius: 28px; overflow: hidden; background: #000; box-shadow: var(--sh-card); }
.live-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.lv-oval { position: absolute; left: 50%; top: 44%; width: 62%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border-radius: 50%; border: 4px dashed rgba(255, 255, 255, .8); box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); transition: border-color .2s; }
.lv-oval.ok { border: 4px solid #4CD08A; }
.lv-msg { position: absolute; left: 12px; right: 12px; bottom: 54px; text-align: center; color: #fff; font-weight: 800; font-size: 17px; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.lv-msg.ok { color: #7DF0B0; }
.lv-steps { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.lv-steps span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .25); }
.lv-steps span.now { background: var(--red); } .lv-steps span.done { background: #19935A; }

/* Aviso para activar notificaciones y "repartidor en la puerta" */
.push-aviso { display: flex; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--red-soft); color: var(--red-ink); font-weight: 600; font-size: 14px; line-height: 1.35; }
.push-aviso > span:first-child { font-size: 22px; }
.push-aviso .grow { flex: 1; min-width: 0; }
.push-aviso .btn3d { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.door { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, var(--red-hi), var(--red)); color: #fff; box-shadow: 0 5px 0 var(--red-deep), 0 14px 24px -10px rgba(200, 16, 22, .6); animation: pop .6s ease-out 2; }
.door span { font-size: 40px; animation: bob 1s ease-in-out infinite; } .door b { font-size: 18px; font-family: var(--f-display); } .door small { opacity: .9; }
.legal-ck { display: block; margin: 12px 2px; line-height: 1.45; }
.legal-ck a, .reg-intro a { color: var(--red); font-weight: 700; }
