/* App shell: tab bar, Inicio, Pedidos, Cuenta, Ajustes and the welcome screen.
   Same brand as the menu: dark background, the five logo colors, Bebas Neue + Nunito. */

.app { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
.view[hidden] { display: none !important; }

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 45;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(11,11,12,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 5px; border-radius: 14px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .01em; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.tabbar button::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--c); opacity: 0; transition: opacity .2s; }
.tabbar button.on { color: var(--c); }
.tabbar button.on::before { opacity: 1; }
.tabbar button.on svg { transform: translateY(-1px) scale(1.06); }
.tabbar button:active svg { transform: scale(.9); }
.tabbar .t-red { --c: var(--red); }
.tabbar .t-yellow { --c: var(--yellow); }
.tabbar .t-green { --c: var(--green); }
.tabbar .t-orange { --c: var(--orange); }
.tabbar .t-blue { --c: var(--blue); }
.tabbar .dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--bg); animation: lo-pulse 1.6s infinite; }
/* The cart floats right above the tab bar. */
.cartbar { bottom: calc(78px + env(safe-area-inset-bottom)); }
.toast { z-index: 95; }
html.gate-on .tabbar, html.gate-on .cartbar { visibility: hidden; }

/* ── Shared pieces ──────────────────────────────────────────────────────── */
.vhead { padding: calc(18px + env(safe-area-inset-top)) 18px 6px; }
.vhead h1, .mtop h1 { font-family: var(--display); font-weight: 400; font-size: 40px; letter-spacing: .03em; line-height: 1; }
.card-dark { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.promo-bar, .gate-bar { display: flex; width: 72px; height: 4px; border-radius: 4px; overflow: hidden; }
.promo-bar i, .gate-bar i { flex: 1; }
.promo-bar i:nth-child(1), .gate-bar i:nth-child(1) { background: var(--red); }
.promo-bar i:nth-child(2), .gate-bar i:nth-child(2) { background: var(--yellow); }
.promo-bar i:nth-child(3), .gate-bar i:nth-child(3) { background: var(--green); }
.promo-bar i:nth-child(4), .gate-bar i:nth-child(4) { background: var(--orange); }
.promo-bar i:nth-child(5), .gate-bar i:nth-child(5) { background: var(--blue); }
.msg { min-height: 20px; margin: 12px 0 8px; color: #ff8a9b; font-size: 14px; font-weight: 700; line-height: 1.4; }
.msg:empty { min-height: 0; margin: 6px 0; }
.sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.fine { color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: center; margin-top: 12px; }
.fine a, .gate-legal a { color: var(--yellow); }
.chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Menú (top) ─────────────────────────────────────────────────────────── */
.mtop { display: flex; align-items: center; gap: 14px; padding: calc(16px + env(safe-area-inset-top)) 16px 4px; }
.mtop .mlogo { width: 64px; height: 64px; border-radius: 16px; background: #000; border: 1px solid var(--line); object-fit: cover; }
.mtop .mtxt { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.mtop .status { margin-top: 6px; padding: 5px 11px; font-size: 12.5px; }
#v-menu .nav { margin-top: 12px; }

/* ── Inicio ─────────────────────────────────────────────────────────────── */
.order-now { width: 100%; margin-top: 16px; font-size: 17px; letter-spacing: .02em; box-shadow: 0 10px 26px rgba(252,202,65,.22); }
.hblock { margin-top: 26px; }
.hhead { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 10px; }
.ht { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: .03em; line-height: 1; }
.hlink { font-weight: 800; font-size: 14px; color: var(--yellow); }
.hcats { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hcats::-webkit-scrollbar { display: none; }
.hcat { flex: none; width: 128px; scroll-snap-align: start; display: flex; flex-direction: column; text-align: left; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.hcat .hci { display: flex; align-items: center; justify-content: center; height: 96px; overflow: hidden; background: var(--tint); }
.hcat .hci img { width: 100%; height: 100%; object-fit: cover; }
.hcat .hci img.cmark { width: 50%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 12px; }
.hcat b { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .04em; line-height: 1; padding: 10px 12px 2px; }
.hcat small { font-weight: 900; font-size: 12.5px; color: var(--accent); padding: 0 12px 11px; }
.hcat.t-red { --accent: var(--red); --tint: rgba(255,52,81,.2); }
.hcat.t-yellow { --accent: var(--yellow); --tint: rgba(252,202,65,.2); }
.hcat.t-green { --accent: var(--green); --tint: rgba(79,195,60,.2); }
.hcat.t-orange { --accent: var(--orange); --tint: rgba(255,133,0,.2); }
.hcat.t-blue { --accent: var(--blue); --tint: rgba(1,154,247,.2); }
.visit { margin: 0 16px; padding: 14px 16px 16px; display: grid; gap: 12px; }
.vrow { display: flex; gap: 12px; align-items: flex-start; }
.vrow svg { width: 22px; height: 22px; flex: none; stroke: var(--yellow); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.vrow b { display: block; font-size: 15px; }
.vrow small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 1px; }
.visit .actions { margin-top: 2px; }
.about { margin: 0 16px; padding: 14px 16px; }
.about p { color: #e7e2d9; font-size: 15px; line-height: 1.6; margin: 6px 0; }
.aph { display: grid; gap: 8px; margin-bottom: 10px; }
.aph.n2 { grid-template-columns: 1fr 1fr; }
.aph.n3 { grid-template-columns: 1fr 1fr; }
.aph.n3 span:first-child { grid-column: 1 / -1; }
.aph span { display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.aph.n1 span, .aph.n3 span:first-child { aspect-ratio: 16 / 9; }
.aph img { width: 100%; height: 100%; object-fit: cover; }
#homeOrder:empty { display: none; }
.homeorder { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 16px 16px 0; text-align: left; background: var(--surface); border: 1.5px solid var(--yellow); border-radius: 16px; padding: 12px 12px 12px 14px; font-size: 14px; line-height: 1.35; }
.homeorder .lo-txt { flex: 1; min-width: 0; }
.homeorder b { display: block; color: var(--yellow); }
.homeorder small { color: var(--muted); font-size: 12.5px; }
.homeorder .lo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); flex: none; animation: lo-pulse 1.6s infinite; }
.homeorder.st-ok { border-color: var(--green); background: var(--ok-bg); }
.homeorder.st-ok b { color: var(--green); }
.homeorder.st-ok .lo-dot { background: var(--green); animation: none; }
.homeorder.st-done { border-color: var(--line); }
.homeorder.st-done b { color: var(--ink); }
.homeorder.st-done .lo-dot { background: var(--green); animation: none; }
.homeorder.st-bad { border-color: #5c1d28; background: var(--danger-bg); }
.homeorder.st-bad b { color: #ff8a9b; }
.homeorder.st-bad .lo-dot { background: var(--red); animation: none; }

/* ── Pedidos ────────────────────────────────────────────────────────────── */
.olist { display: grid; gap: 10px; padding: 10px 16px 0; }
.ocard { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 13px 15px; }
.ocard:active { transform: scale(.99); }
.otop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.odate { font-weight: 800; font-size: 13px; color: var(--muted); }
.odate::first-letter { text-transform: uppercase; }
.oitems { font-weight: 800; font-size: 15px; line-height: 1.35; margin-top: 7px; }
.obot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.obot b { color: var(--yellow); font-size: 16px; font-weight: 900; }
.chip { flex: none; font-size: 11.5px; font-weight: 900; letter-spacing: .04em; padding: 4px 10px; border-radius: 99px; }
.chip.c-wait { background: #3a2a0b; color: #ffe2a3; }
.chip.c-ok { background: var(--ok-bg); color: #bff2b3; }
.chip.c-done { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.chip.c-bad { background: var(--danger-bg); color: #ffd3da; }
.nothing { text-align: center; padding: 34px 26px 6px; }
.nothing img { width: 92px; height: 92px; border-radius: 22px; background: #000; border: 1px solid var(--line); opacity: .9; }
.nothing b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: .03em; margin-top: 14px; }
.nothing p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 6px 0 16px; }
.dlist { display: grid; gap: 6px; font-weight: 800; font-size: 15px; }

/* Promo card (create account / coming soon). */
.promo { margin: 18px 16px 0; background: linear-gradient(160deg, #1d1a12, var(--surface) 55%); border: 1px solid #3c3214; border-radius: 20px; padding: 16px; }
.promo b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .03em; color: var(--yellow); margin-top: 10px; line-height: 1.05; }
.promo p { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.promo-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.promo.soon { background: linear-gradient(160deg, #10241a, var(--surface) 60%); border-color: #224b30; }
.promo.soon b { color: var(--green); }

/* ── Cuenta ─────────────────────────────────────────────────────────────── */
.welcome { margin: 16px; padding: 26px 20px 22px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.welcome img { width: 110px; height: 110px; border-radius: 24px; background: #000; }
.welcome h2 { font-family: var(--display); font-weight: 400; font-size: 38px; letter-spacing: .03em; line-height: 1; margin-top: 6px; }
.welcome p { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 300px; margin-bottom: 6px; }
.welcome .btn { width: 100%; }
.me { display: flex; align-items: center; gap: 14px; margin: 14px 16px 0; padding: 16px; }
.me b { display: block; font-size: 18px; font-weight: 900; }
.me small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; word-break: break-all; }
.avatar { flex: none; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 26px; letter-spacing: .04em; color: #111; background: var(--yellow); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--orange); }

/* Grouped rows (Cuenta, Ajustes). */
#v-settings .lbl, #v-account .lbl { margin: 22px 20px 8px; }
.group { margin: 12px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.grow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 16px; font-weight: 800; font-size: 15.5px; text-decoration: none; border-bottom: 1px solid var(--line); }
.group > .grow:last-child { border-bottom: 0; }
.grow > span { flex: 1; min-width: 0; }
.grow small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.grow.danger { color: #ff8a9b; }
.grow:active { background: var(--surface-2); }
.by-rionext { text-align: center; color: var(--muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; margin-top: 28px; }

/* ── Account forms (sheet) ──────────────────────────────────────────────── */
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 20px 0; }
.auth-head img { width: 76px; height: 76px; border-radius: 18px; background: #000; border: 1px solid var(--line); }
.auth { padding: 6px 20px 0; }
.auth h3 { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: .02em; line-height: 1.05; text-align: center; margin-top: 8px; }
.auth > .sub { text-align: center; margin: 4px auto 0; max-width: 320px; }
.auth .lbl { margin-top: 16px; }
.auth .inp:disabled { opacity: .6; }
.pw { position: relative; }
.pw .inp { padding-right: 82px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 36px; padding: 0 12px; border-radius: 10px; font-weight: 800; font-size: 13px; color: var(--yellow); }
.switch { display: block; width: 100%; text-align: center; margin-top: 14px; color: var(--muted); font-size: 14.5px; font-weight: 700; }
.switch b { color: var(--yellow); }
.auth .steps div { font-size: 14px; }

/* ── Welcome screen (after the splash, first time only) ─────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; overflow: auto;
  background: radial-gradient(120% 70% at 50% 0%, #241c0a 0%, #0b0b0c 55%), #0b0b0c;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  opacity: 0; transition: opacity .35s ease;
}
.gate.on { opacity: 1; }
.gate-in { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; text-align: center; transform: translateY(18px); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.gate.on .gate-in { transform: none; }
.gate-logo { width: min(48vw, 190px); aspect-ratio: 1; border-radius: 30px; background: #000; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.gate-bar { width: 110px; margin-top: 22px; }
.gate h1 { font-family: var(--display); font-weight: 400; font-size: 52px; letter-spacing: .03em; line-height: 1; margin-top: 22px; }
.gate-in > p { color: #d9d3c8; font-size: 16px; line-height: 1.5; margin-top: 8px; max-width: 320px; }
.gate-btns { width: 100%; display: grid; gap: 10px; margin-top: 26px; }
.gate-guest { height: 48px; font-weight: 800; font-size: 15.5px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.gate-legal { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 14px; max-width: 320px; }
@media (prefers-reduced-motion: reduce) { .gate, .gate-in { transition: none; } }

/* Legal text inside the sheet. */
.sheet .legal { padding-left: 20px; padding-right: 20px; }
.sheet .legal h1 { margin-top: 6px; padding-right: 44px; }

/* Hidden cart and toast must not peek out behind the bars. */
.cartbar { visibility: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s .3s; }
.cartbar:not(.on) { transform: translate(-50%, 260%); }
.cartbar.on { visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.mtop .status { white-space: nowrap; }

/* Notifications */
.grow.static { cursor: default; }
.grow .ok-txt { color: var(--green); }
.pill-on { flex: none; background: var(--yellow); color: #111; font-weight: 900; font-size: 13px; padding: 7px 13px; border-radius: 99px; }
/* ── Notifications offer, full screen after sending an order (app.js, openPushGate) ── */
.pushgate {
  position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column; overflow: hidden auto;
  background: radial-gradient(110% 60% at 50% 0%, #241c0a 0%, var(--bg) 60%), var(--bg);
  padding-bottom: env(safe-area-inset-bottom); padding-top: env(safe-area-inset-top);
  opacity: 0; transition: opacity .3s ease;
}
.pushgate.on { opacity: 1; }
html.pg-open, html.pg-open body { overflow: hidden; }
.pushgate .stripe { flex: none; }
.pg-in { flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 26px 24px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pg-in h2 { font-family: var(--display); font-weight: 400; font-size: 40px; letter-spacing: .03em; line-height: 1.02; margin-top: 6px; }
.pg-in > p { color: #d9d3c8; font-size: 16px; line-height: 1.5; margin-top: 10px; max-width: 330px; }
.pg-in > p.pg-hint { color: var(--muted); font-size: 14px; margin-top: 8px; }
.pg-btns { width: 100%; display: grid; gap: 10px; margin-top: auto; padding-top: 24px; }

/* The phone drawing: outline with a notch, fading out at the bottom. */
.pg-art { position: relative; width: min(230px, 62vw); height: min(300px, 38vh); min-height: 230px; margin: 6px auto 8px; flex: none; }
.pg-phone {
  position: absolute; inset: 0 0 -40px; border: 3px solid #3a3a40; border-bottom: 0; border-radius: 40px 40px 0 0;
  background: linear-gradient(#18181b, #111113);
  -webkit-mask-image: linear-gradient(#000 45%, transparent 92%); mask-image: linear-gradient(#000 45%, transparent 92%);
}
.pg-notch { position: absolute; top: 10px; left: 50%; width: 76px; height: 20px; margin-left: -38px; border-radius: 99px; background: #000; }

/* Two notifications, one from each side, in a ~6 s loop. Only transform and opacity animate. */
.pg-n {
  position: absolute; left: -30px; right: -30px; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  text-align: left; padding: 11px 12px; border-radius: 18px; background: rgba(246, 242, 234, .96); color: #111;
  box-shadow: 0 14px 34px rgba(0,0,0,.55); font-size: 13px; line-height: 1.3; opacity: 0;
  animation: 6s cubic-bezier(.3,.7,.3,1) infinite both;
}
.pg-n img { width: 34px; height: 34px; border-radius: 9px; background: #000; }
.pg-n b { display: block; font-size: 13.5px; font-weight: 900; }
.pg-n small { align-self: start; color: #6b665f; font-size: 11px; font-weight: 700; }
.pg-n1 { top: 62px; animation-name: pg-left; }
.pg-n2 { top: 148px; animation-name: pg-right; }
@keyframes pg-left {
  0%   { opacity: 0; transform: translateX(-115%) rotate(-7deg); }
  9%   { opacity: 1; transform: translateX(5%) rotate(2deg); }
  14%  { opacity: 1; transform: translateX(0) rotate(0); }
  78%  { opacity: 1; transform: translateX(0) rotate(0); }
  88%, 100% { opacity: 0; transform: translateY(-10px) scale(.96); }
}
@keyframes pg-right {
  0%, 20% { opacity: 0; transform: translateX(115%) rotate(7deg); }
  29%  { opacity: 1; transform: translateX(-5%) rotate(-2deg); }
  34%  { opacity: 1; transform: translateX(0) rotate(0); }
  78%  { opacity: 1; transform: translateX(0) rotate(0); }
  88%, 100% { opacity: 0; transform: translateY(-10px) scale(.96); }
}
@media (prefers-reduced-motion: reduce) {
  .pushgate { transition: none; }
  .pg-n { animation: none; opacity: 1; transform: none; }
}
.btn.mail { background: var(--blue); color: #fff; }
.grow > span.pill-on { flex: none; }
