/* Cornerbox Club · app de clientes. Móvil primero: barra arriba, contenido, navegación abajo. */
:root {
  --bg: #F4F2EC; --surface: #FFFFFF; --surface2: #ECE9E1; --fg: #0E1512; --muted: #4B5550; --line: #D6D2C6;
  --ink: #0E1512; --paper: #F4F2EC; --lime: #C8F25A; --lime-text: #2F5A10;
  --ok: #2F7A3B; --ok-bg: #DFF0DA; --bad: #A8321F; --bad-bg: #F8DDD6; --warn: #8A5A00; --warn-bg: #FBEBC5;
  --display: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px; --nav-h: 68px; --hero: #0E1512;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #16181C; --surface2: #202327; --fg: #F5F5F5; --muted: #8B9095; --line: #2F3336; --lime-text: #C8F25A;
  --ok: #8FD99A; --ok-bg: #12261A; --bad: #FF9B86; --bad-bg: #3A1714; --warn: #F2C66B; --warn-bg: #2E2610; --hero: #16181C; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #000000; --surface: #16181C; --surface2: #202327; --fg: #F5F5F5; --muted: #8B9095; --line: #2F3336; --lime-text: #C8F25A;
  --ok: #8FD99A; --ok-bg: #12261A; --bad: #FF9B86; --bad-bg: #3A1714; --warn: #F2C66B; --warn-bg: #2E2610; --hero: #16181C; color-scheme: dark }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--ink); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font: 500 15px/1.45 var(--body); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; margin: 0; text-wrap: balance; line-height: 1.05; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
button { font: inherit; color: inherit; }

/* barra superior */
.bar { position: sticky; top: 0; z-index: 10; background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line); padding: calc(10px + max(env(safe-area-inset-top, 0px), var(--sat, 0px))) 16px 10px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; min-height: 58px; }
/* logo al centro; a la izquierda la etiqueta Demo, a la derecha los puntos */
.bar .logo { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; }
.bar .demo-tag { grid-column: 1; grid-row: 1; justify-self: start; }
.bar .pill { grid-column: 3; grid-row: 1; justify-self: end; white-space: nowrap; }
.bar .logo b { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: var(--fg); }
/* logo negro en modo claro (como las otras apps) y claro en modo oscuro */
.bar .logo .lg-box { fill: var(--logo-box); } .bar .logo .lg-handle { fill: var(--logo-handle); }
.bar .logo span { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--line); color: var(--fg); border-radius: 99px; padding: 6px 12px; font-weight: 800; font-size: 13px; cursor: pointer; }
.pill i { width: 9px; height: 9px; border-radius: 3px; background: var(--lime); display: inline-block; }
.demo-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; background: var(--lime); color: var(--ink); border-radius: 6px; padding: 3px 6px; }

main { max-width: 560px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + 28px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); display: grid; gap: 16px; }
main.nonav { padding-bottom: calc(28px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); }

/* navegación inferior */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; }
.bnav button { background: none; border: 0; display: grid; justify-items: center; gap: 3px; padding: 6px 2px; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.bnav button svg { width: 24px; height: 24px; }
.bnav button[aria-current="page"] { color: var(--fg); }
.bnav button[aria-current="page"] svg { color: var(--lime-text); }
.bnav .scan { position: relative; top: -14px; }
.bnav .scan span.c { width: 58px; height: 58px; border-radius: 18px; background: var(--lime); color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(14,21,18,.25); }
.bnav .scan span.c svg { color: var(--ink) !important; width: 28px; height: 28px; }

/* superficies */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; min-width: 0; }
.card.flat { background: var(--surface2); border-color: transparent; }
.hero { background: var(--hero); color: var(--paper); border-radius: 22px; padding: 20px; position: relative; overflow: hidden; display: grid; gap: 6px; }
.hero::after { content: ""; position: absolute; top: 0; right: 0; width: 72px; height: 58px; background: var(--lime); border-radius: 0 22px 0 0; }
.hero .lab { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.hero .big { font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero .sub { color: #DCE3DE; font-size: 14px; }
.hero .bar-prog { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-top: 6px; }
.hero .bar-prog i { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 10px; }
.sect { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sect a, .linkbtn { color: var(--lime-text); font-weight: 800; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }

/* botones */
.btn { font: 800 15px var(--body); border-radius: 14px; padding: 13px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.block { width: 100%; }
.btn.primary { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.xl { padding: 17px 18px; font-size: 17px; border-radius: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.dark { background: var(--paper); color: var(--ink); border-color: var(--paper); } }

/* formularios */
label.f { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); }
input, select, textarea { font: 600 16px var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; width: 100%; min-width: 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--lime-text); outline-offset: 2px; }
label.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--fg); font-weight: 600; }
label.check input { width: 22px; height: 22px; margin: 0; accent-color: #2F5A10; }
.err { color: var(--bad); font-weight: 700; font-size: 14px; }
.ok-t { color: var(--ok); font-weight: 700; font-size: 14px; }

/* productos */
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cats button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; font-weight: 800; font-size: 13px; cursor: pointer; }
.cats button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.prods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.prod { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 6px; align-content: start; position: relative; min-width: 0; }
.prod .ph { aspect-ratio: 4 / 3; border-radius: 12px; background: var(--surface2); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--muted); letter-spacing: -0.03em; }
.prod .ph.of { background: var(--lime); color: var(--ink); }
.prod b { font-size: 14px; line-height: 1.25; }
.price { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.price strong { font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.price s { color: var(--muted); font-size: 13px; }
.badge { position: absolute; top: 18px; left: 18px; background: var(--ink); color: var(--lime); font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 7px; }

/* ofertas */
.offer { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.offer .ph { width: 64px; height: 64px; border-radius: 12px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px; }
.offer .t { display: grid; gap: 2px; min-width: 0; }
.offer .t b { font-size: 15px; }
.offer .pct { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--lime-text); }
.timer { font-size: 12px; font-weight: 800; color: var(--warn); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.hscroll > * { scroll-snap-align: start; }

/* listas */
.list { display: grid; }
.li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; cursor: default; }
button.li { cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li .r { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.plus { color: var(--ok); } .minus { color: var(--bad); }

/* puerta abierta */
.door { background: var(--hero); color: var(--paper); border-radius: 26px; padding: 26px 20px; display: grid; gap: 12px; justify-items: center; text-align: center; position: relative; overflow: hidden; }
.door::after { content: ""; position: absolute; top: 0; right: 0; width: 86px; height: 70px; background: var(--lime); border-radius: 0 26px 0 0; }
.door .ring { width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--lime); display: grid; place-items: center; }
.door .ring svg { width: 46px; height: 46px; color: var(--lime); }
@media (prefers-reduced-motion: no-preference) { .door .ring { animation: pulse 1.8s ease-out infinite; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,242,90,.5); } 100% { box-shadow: 0 0 0 26px rgba(200,242,90,0); } }
.door p { color: #DCE3DE; }
.sim { border: 2px dashed var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface2); border-radius: 99px; padding: 3px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface); font-weight: 800; font-size: 18px; cursor: pointer; }
.stepper span { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

/* boleta */
.receipt { background: var(--surface); border-radius: 22px; padding: 20px; display: grid; gap: 12px; border: 1px solid var(--line); }
.receipt .check { width: 56px; height: 56px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; }
.receipt .check svg { width: 28px; height: 28px; }
.rl { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.rl.total { font-family: var(--display); font-weight: 800; font-size: 22px; border-top: 2px solid var(--fg); padding-top: 10px; }
.rl.disc { color: var(--lime-text); font-weight: 700; }
.earn { background: var(--hero); color: var(--paper); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.earn b { color: var(--lime); font-family: var(--display); font-size: 20px; }

/* escáner */
.scanbox { position: relative; border-radius: 22px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanbox .frame { position: absolute; inset: 18%; border: 3px solid var(--lime); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanbox .msg { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 800; font-size: 14px; }

/* bienvenida: fondo claro como el resto de la app, sin bloque de color */
.welcome { display: grid; gap: 14px; padding: 18px 0 6px; }
.welcome h1 { font-size: 40px; line-height: 1.08; max-width: 12ch; }
.welcome p { color: var(--muted); font-size: 16px; max-width: 34ch; }
.perks { display: grid; gap: 10px; }
.perk { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.perk .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface2); display: grid; place-items: center; }
.perk .ic svg { width: 22px; height: 22px; color: var(--lime-text); }

/* hoja inferior */
.sheet-bg { position: fixed; inset: 0; background: rgba(14,21,18,.55); z-index: 30; display: grid; align-items: end; }
.sheet { background: var(--bg); border-radius: 24px 24px 0 0; padding: 20px 16px calc(20px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); display: grid; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto; max-height: 90vh; overflow: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line); justify-self: center; margin-top: -8px; }
.paybox { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); padding: 16px; display: grid; gap: 8px; text-align: center; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--surface2); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.lime { background: var(--lime); color: var(--ink); }
.banner { border-radius: 16px; padding: 14px; background: var(--warn-bg); color: var(--warn); font-weight: 700; display: grid; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 22px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 99px; font-weight: 800; font-size: 14px; z-index: 40; max-width: calc(100vw - 32px); text-align: center; }
.sticky-cta { position: sticky; bottom: calc(var(--nav-h) + 12px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); z-index: 5; display: grid; gap: 8px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 10px; margin: 0 -10px; border-radius: 20px; }
main.nonav .sticky-cta { bottom: calc(12px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.toggle input { width: 22px; height: 22px; accent-color: #2F5A10; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--lime-text); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.center { display: grid; place-items: center; min-height: 40vh; }

.hscroll .offer { grid-template-columns: 52px 1fr auto; }
.hscroll .offer .ph { width: 52px; height: 52px; }

/* Que se sienta como app: sin zoom por doble toque */
html { touch-action: manipulation; }
button, .bnav, .cats, .prod, .offer { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Como app nativa: barra de arriba fija, solo se desplaza el contenido */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; }
.bar { position: relative; flex: none; }
body > main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; align-content: start; grid-auto-rows: max-content;
  max-width: none; width: 100%; margin: 0; padding-left: max(16px, calc((100% - 528px) / 2)); padding-right: max(16px, calc((100% - 528px) / 2)); }

/* Fondo blanco (modo claro) */
:root:not([data-theme="dark"]) { --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #F2F2EF; --line: #E5E3DD; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #16181C; --surface2: #202327; --line: #2F3336; } }
html { background: var(--bg); }
:root { --logo-box: #0E1512; --logo-handle: #C8F25A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo-box: #F4F2EC; --logo-handle: #0E1512; } }
:root[data-theme="dark"] { --logo-box: #F4F2EC; --logo-handle: #0E1512; }

/* iPhone (app web): la pantalla ocupa todo el alto, sin franja vacía abajo.
   La navegación de abajo es parte de la columna, no flota. */
body { position: fixed; top: 0; left: 0; right: 0; bottom: auto; height: var(--app-h, 100dvh); }
.bnav { position: relative; left: auto; right: auto; bottom: auto; flex: none; }
body > main { padding-bottom: 24px; }
body > main.nonav { padding-bottom: calc(24px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); }
.sticky-cta { bottom: 12px; }
main.nonav .sticky-cta { bottom: calc(12px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); }
.sheet-bg { bottom: auto; height: var(--app-h, 100dvh); }

/* Alto completo en iPhone: nada recorta la pantalla (sin overflow hidden en la raíz) */
html, body { overflow: visible; }
@media (display-mode: standalone) { body { height: var(--app-h, 100vh); } }

/* iOS 26: las capas "fixed" se recortan a un alto más corto que la pantalla.
   El cuerpo va en flujo normal (no fixed) con el alto real de la pantalla. */
html { height: auto; overflow: visible; overscroll-behavior: none; }
body { position: relative; top: auto; left: auto; right: auto; bottom: auto; width: 100%; overflow: visible; height: var(--app-h, 100dvh); }
@media (display-mode: standalone) { body { height: var(--app-h, 100vh); } }
.sheet-bg { position: absolute; top: 0; left: 0; right: 0; bottom: auto; height: 100%; }
.ph.img { padding: 0; overflow: hidden; background: #fff; } .ph.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* v25: elegir cuántos puntos usar */
.ptsbox { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ptsbox .toggle { border: 0; background: transparent; }
.ptsbox.on { border-color: #B9DE6A; box-shadow: 0 0 0 3px rgba(200, 242, 90, .25); }
.ptssel { display: grid; gap: 10px; padding: 0 14px 12px; }
.ptsrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ptsrow b { font-size: 20px; color: #2F5A10; }
.ptsnum { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ptsnum input { width: 96px; font: inherit; font-weight: 800; font-size: 18px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: inherit; text-align: right; }
.ptssel input[type=range] { width: 100%; accent-color: #2F5A10; height: 28px; margin: 0; }
.ptschips { display: flex; gap: 8px; }
.ptschips .chip { flex: 1; justify-content: center; cursor: pointer; border: 1px solid var(--line); background: var(--bg); font: inherit; font-weight: 700; padding: 8px 10px; }
.ptschips .chip[aria-pressed="true"] { background: #C8F25A; border-color: #B9DE6A; color: #12160F; }
/* v27: invitación al aviso de llegada (app iPhone) */
.llinv { display: grid; gap: 10px; border-color: #D9EFA5; background: #F4FBE3; }
.llinv p { margin: 4px 0 0; }
/* v28: borrar cuenta */
.danger-link { color: var(--bad) !important; justify-self: start; text-align: left; }
.sheet .btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
/* v28: escáner nativo (app iPhone) */
.scanbox.nat { display: grid; place-items: center; background: #000; }
.scanbox.nat .frame { box-shadow: none; opacity: .5; }
.scanbox.nat .btn { position: relative; z-index: 2; }
/* v32: el botón de abrir queda pegado a la barra de abajo (sin hueco por donde se ven productos) */
body > main:not(.nonav) .sticky-cta { bottom: -24px; margin: 0 -16px -24px; padding: 12px 16px 10px; border-radius: 20px 20px 0 0; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 -10px 24px rgba(14, 21, 18, .07); }
body > main.nonav .sticky-cta { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.sticky-cta .tiny { margin: 0; }
/* v32: número de puntos más chico y centrado */
.ptsnum input { width: 82px; font-size: 16px; padding: 6px 8px; text-align: center; -moz-appearance: textfield; }
.ptsnum input::-webkit-outer-spin-button, .ptsnum input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ptsrow b { font-size: 18px; }
/* v32: línea de escaneo animada en el botón central (sube y baja) */
.bnav .scan .sq { opacity: .28; }
.bnav .scan .sl { animation: cbScan 2.4s ease-in-out infinite; }
@keyframes cbScan { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .bnav .scan .sl { animation: none; } }
/* v33: inicio */
/* inicio */
.hola { display: grid; gap: 6px; padding-top: 2px; }
.hola .eyebrow { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); justify-self: start; }
.hola h1 { font-size: 32px; }
/* frase de marca: centrada bajo el logo, solo en el inicio */
.bar-frase { grid-column: 1 / -1; grid-row: 2; justify-self: center; text-align: center; margin: 2px 0 0; font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1.35; letter-spacing: -0.01em; color: var(--fg); text-wrap: balance; max-width: 34ch; }
/* destacado de marca: lima como trazo de plumón, texto negro encima */
.bar-frase b, .mk { color: var(--ink); font-weight: 800; padding: .16em .22em .06em; margin: 0 -.06em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3Cpath d='M5 12.5 C 48 7.5, 104 9.8, 162 7.2 S 262 5.4, 296 8.6 C 298.6 12.2, 297.2 18.4, 293.8 22.6 C 238 24.8, 170 27.6, 104 25.4 S 30 27.8, 7.4 28.2 C 2.6 24.4, 2.2 16.8, 5 12.5 Z' fill='%23C8F25A'/%3E%3C/svg%3E") no-repeat center / 100% 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* catálogo del edificio en el inicio */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface2); border-radius: 14px; padding: 4px; }
.seg button { border: 0; background: none; border-radius: 10px; padding: 9px 8px; font-weight: 800; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(14,21,18,.12); }
.maqinfo { margin-top: -2px; }
.stk { font-size: 12px; font-weight: 700; color: var(--muted); }
.stk.low { color: var(--warn); }
.stk.out { color: var(--bad); }
.prod.ago { opacity: .55; }
.offer.pasada { opacity: .6; }
.offer.pasada .ph { background: var(--surface2); color: var(--muted); }
.offer.pasada .pct { color: var(--muted); }
/* puntos */
.ptscard { background: var(--surface2); border-radius: 22px; padding: 20px; display: grid; gap: 8px; }
.ptscard .n { display: flex; align-items: baseline; gap: 8px; }
.ptscard .big { font-family: var(--display); font-weight: 800; font-size: 52px; letter-spacing: -0.04em; line-height: 1; }
.ptscard .u { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--muted); }
.ptscard p { font-size: 15px; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.how > div { border: 1px solid var(--line); border-radius: 16px; padding: 12px 10px; display: grid; gap: 3px; align-content: start; }
.how .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--lime); color: var(--ink); display: grid; place-items: center; margin-bottom: 4px; }
.how .ic svg { width: 17px; height: 17px; }
.how b { font-size: 14px; }
.how span:not(.ic) { font-size: 12px; color: var(--muted); line-height: 1.3; }
.li.mov { grid-template-columns: 30px 1fr auto; }
.mi { width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; background: var(--surface2); }
.mi.in { background: var(--lime); color: var(--ink); }
.saldo { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface2); border: 0; border-radius: 18px; padding: 12px 14px 12px 12px; cursor: pointer; }
.saldo .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--lime); color: var(--ink); display: grid; place-items: center; }
.saldo .ic svg { width: 22px; height: 22px; }
.saldo .t { display: grid; gap: 1px; min-width: 0; }
.saldo .t b { font-size: 15px; }
.saldo .chev { font-size: 22px; color: var(--muted); line-height: 1; }
.saldo:active { transform: scale(.99); }
.blk { display: grid; gap: 10px; margin-top: 10px; min-width: 0; }
.blk h2 { font-size: 20px; }
.favs { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; padding: 0 0 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.favs::-webkit-scrollbar { display: none; }
.fav { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; gap: 6px; align-content: start; text-align: left; font: inherit; color: inherit; cursor: pointer; scroll-snap-align: start; min-width: 0; }
.fav .ph { aspect-ratio: 1; border-radius: 12px; background: var(--surface2); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--muted); overflow: hidden; }
.fav b { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fav .price strong { font-size: 16px; }
.fav:active { transform: scale(.98); }
.repuesta { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.repuesta .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; display: inline-block; }
.sugcard, .invcard { display: grid; gap: 10px; }
.sugcard h3, .invcard h3 { margin: 0; }
.sugcard p, .invcard p { margin: 0; }
.sugform { display: flex; gap: 8px; }
.sugform input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: inherit; }
.suglist { display: grid; }
.sug { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-weight: 600; }
.sug.ok span:first-child { color: var(--muted); }
.voto { display: inline-flex; align-items: center; gap: 4px; min-width: 58px; justify-content: center; border: 1px solid var(--line); background: var(--bg); color: inherit; border-radius: 99px; padding: 6px 10px; font: inherit; font-weight: 800; cursor: pointer; }
.voto[aria-pressed="true"] { background: var(--lime); border-color: #B9DE6A; color: #12160F; }
.invcard { background: var(--surface2); border-color: transparent; margin-top: 10px; }
.invcard .small b { color: var(--fg); }
.invcode { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .12em; background: var(--lime); color: var(--ink); border-radius: 10px; padding: 6px 10px; white-space: nowrap; }
.invcard .sugform input { background: var(--surface); }
.invusar { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.invusar p { margin: 0; color: var(--muted); }
.banner.deuda .btn { justify-self: start; }
/* v48: escáner de la app iPhone más bajo, para que se vea el campo del código sin bajar */
.scanbox.nat { aspect-ratio: auto; height: min(42vh, 320px); }
.scanbox.nat .frame { inset: 12% 24%; }
#fCodigo { scroll-margin-bottom: 16px; }
/* v48: sin barra de abajo (puerta abierta, visitas), el botón queda pegado al borde de la pantalla */
body > main.nonav .sticky-cta { bottom: calc(-24px - max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); margin: 0 -16px calc(-24px - max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); padding: 12px 16px calc(12px + max(env(safe-area-inset-bottom, 0px), var(--sab, 0px))); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 24px rgba(14, 21, 18, .07); }
/* v49: con el teclado abierto se esconde la barra de abajo (la app se achica al alto visible) */
.teclado #bnav { display: none !important; }
.teclado body > main:not(.nonav) { padding-bottom: 24px; }
.kb #bnav { display: none !important; }

/* Buscador de edificio (registro y cuenta) */
.f > span { font-size: 13px; font-weight: 700; color: var(--muted); }
div.f { display: grid; gap: 5px; }
.edfijo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); font-size: 15px; }
.edfijo .linkbtn { padding: 0; font-size: 14px; }
.edres { display: grid; gap: 6px; margin-top: -4px; }
.edres:empty { display: none; }
.edopt { text-align: left; font: inherit; font-size: 15px; font-weight: 700; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); cursor: pointer; }
.edopt:active { background: var(--surface2); }
/* ¿Todo bien con tu compra? */
.fbcard { display: grid; gap: 8px; }
.fbcard h3 { margin: 0; }
.fbcard .row { gap: 8px; }
.fbcard .row .btn { flex: 1; }
/* RUT validado mientras se escribe */
input[data-rut].ok { border-color: var(--ok); }
input[data-rut].bad { border-color: var(--bad); }
.rutst:empty { display: none; }
.rutst.ok-t, .rutst.err { margin: 0; font-weight: 700; font-size: 12.5px; }
.rutst.ok-t { color: var(--ok); } .rutst.err { color: var(--bad); }
/* Continuar con Apple (estilo de Apple: negro, logo y texto blancos) */
.btn.apple { background: #000; color: #fff; border-color: #000; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; }
.btn.apple svg { margin-top: -3px; }
/* barra de abajo: la pestaña elegida va en un recuadro lima */
.bnav button .nico { width: 54px; height: 36px; border-radius: 12px; display: grid; place-items: center; transition: background .15s; }
.bnav button[aria-current="page"] .nico { background: var(--lime); }
.bnav button[aria-current="page"] .nico svg { color: var(--ink); stroke-width: 2.3; }
.bnav button[aria-current="page"] > span:last-child { font-weight: 800; }

/* App iPhone con la barra de pestañas nativa de iOS (BarraPlugin): la barra web no se muestra y el contenido
   pasa por detrás de la barra del sistema, que es transparente y difumina lo que queda abajo. */
html.barra-nat #bnav { display: none !important; }
html.barra-nat body > main:not(.nonav) { padding-bottom: calc(var(--ntab, 83px) + 20px); }
html.barra-nat body > main:not(.nonav) .sticky-cta { bottom: min(calc(var(--ntab, 83px) + 8px), calc(max(env(safe-area-inset-bottom, 0px), var(--sab, 0px)) + 54px)); margin: 0; border-radius: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
html.barra-nat.kb body > main:not(.nonav) { padding-bottom: 24px; }
html.barra-nat.kb body > main:not(.nonav) .sticky-cta { bottom: 12px; }

/* =====================================================================
   Estilo iOS (oct 2026), igual que Rendi: letra del sistema, fondo gris (negro en modo oscuro),
   bloques rellenos sin borde, líneas finas, botones y chips en cápsula, títulos grandes.
   La marca sigue en el logo (Bricolage), el lima y la apertura.
   ===================================================================== */
:root {
  --display: -apple-system, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --body: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --ink: #000000; --hero: #000000;
}
:root:not([data-theme="dark"]) { --bg: #F2F2F7; --surface: #FFFFFF; --surface2: #EEEEF3; --fg: #000000; --muted: #6C6C70; --line: #E2E2E7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #1C1C1E; --surface2: #2C2C2E; --fg: #FFFFFF; --muted: #8E8E93; --line: #38383A; --hero: #1C1C1E; } }
:root[data-theme="dark"] { --bg: #000000; --surface: #1C1C1E; --surface2: #2C2C2E; --fg: #FFFFFF; --muted: #8E8E93; --line: #38383A; --hero: #1C1C1E; }
body { font: 400 16px/1.4 var(--body); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: 34px; } h2 { font-size: 22px; } h3 { font-size: 17px; letter-spacing: -0.01em; }
.welcome h1 { font-size: 38px; }
.bar .logo b { font-family: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif; }
/* barra de arriba translúcida, con línea fina */
.bar { background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); border-bottom: .5px solid var(--line); }
.pill { border: 0; font-weight: 600; background: var(--surface); }
.eyebrow { font-weight: 500; }
/* bloques rellenos, sin borde */
.card, .prod, .offer, .receipt, .paybox, .toggle { border: 0; border-radius: 16px; }
.card.flat { background: var(--surface); }
.sim { border: 0; background: var(--surface); border-radius: 16px; }
.li { border-bottom: .5px solid var(--line); }
.li .r, .price strong, .rl.total, .offer .pct, .hero .big, .earn b { font-weight: 700; }
.sect h2 { font-size: 20px; }
.sect a, .linkbtn { font-weight: 500; font-size: 15px; }
/* botones */
.btn { font: 600 16px var(--body); border: 0; border-radius: 14px; background: var(--surface); }
.btn.ghost { background: var(--surface2); }
.btn.primary { border: 0; } .btn.dark { border: 0; }
.btn.sm { font-size: 14px; border-radius: 99px; padding: 7px 14px; }
.btn.xl { font-size: 17px; }
/* formularios */
label.f { font-weight: 500; font-size: 13px; }
input, select, textarea { font: 400 17px var(--body); border: 0; background: var(--surface2); }
.card input, .card select, .card textarea, .sheet input { background: var(--surface2); }
/* chips y categorías en cápsula */
.chip { font-weight: 600; }
.cats button { border: 0; background: var(--surface); font-weight: 600; font-size: 14px; }
.cats button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.seg { background: var(--surface2); border-radius: 10px; padding: 2px; gap: 2px; border: 0; }
.seg button { border: 0; border-radius: 8px; font-weight: 600; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.12); color: var(--fg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-selected="true"], :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #636366; color: #fff; } }
:root[data-theme="dark"] .seg button[aria-selected="true"], :root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #636366; color: #fff; }
.stepper { background: var(--surface2); } .stepper button { font-weight: 600; }
.badge, .demo-tag { font-weight: 700; }
.perk .ic { background: var(--surface); }
.sheet { background: var(--bg); }
.sheet .grab { background: var(--muted); opacity: .35; }
.sheet-bg { background: rgba(0, 0, 0, .4); }
.rl.total { border-top: .5px solid var(--line); }
.timer { font-weight: 600; }
.card .btn:not(.primary):not(.dark), .sheet .btn:not(.primary):not(.dark), .receipt .btn:not(.primary):not(.dark) { background: var(--surface2); }
.edfijo, .edopt { border: 0 !important; background: var(--surface2); }
