/* ==========================================================================
   HANKO Fidelidad — estilos base
   Línea visual: editorial, azul marino + papel + rojo sello (como hanko.pe)
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --navy: #1C1D4A;
  --paper: #F6F1E7;
  --paper-2: #EDE6D5;
  --ink: #15163F;
  --muted: #6A6A85;
  --red: #E8452C;
  --ok: #1F8A5B;
  --line: rgba(21, 22, 63, .12);
  --brand: var(--navy);
  --accent: var(--red);
  --on-brand: #FFFFFF;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(21, 22, 63, .45);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body {
  margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--accent); }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; opacity: .7; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- Botones y formularios ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  background: var(--ink); color: #fff; transition: transform .2s var(--ease), box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(21, 22, 63, .6); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-danger { background: #B3261E; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-lg { padding: 18px 26px; font-size: 17px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: #fff; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.alert-err { background: #FDE7E4; color: #8A1C14; }
.alert-ok { background: #E1F4EA; color: #14583A; }
.honey { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ==========================================================================
   Cliente final: landing + tarjeta
   ========================================================================== */
body.area-public { background: var(--page, var(--brand)); color: var(--on-page, var(--on-brand)); }
/* Logo con fondo propio: se funde con la página (sin recuadro) */
body.has-logobg img.logo { background: transparent; padding: 0; border-radius: 12px; }
/* Páginas de fondo claro */
body.page-light .ticker { border-block-color: rgba(21, 22, 63, .18); }
body.page-light .step { background: rgba(21, 22, 63, .05); border-color: rgba(21, 22, 63, .12); }
body.page-light .pushbox p, body.page-light .pushbox .progress-note { color: rgba(21, 22, 63, .78); }
body.page-light .pushbox b { color: var(--ink); }
body.page-light .pushbox .btn-ghost { border-color: rgba(21, 22, 63, .3); }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

.lp-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brandmark { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 600; font-size: 20px; text-decoration: none; }
.logo { width: 42px; height: 42px; border-radius: 12px; background: var(--paper); object-fit: contain; display: grid; place-items: center; color: var(--brand); font-family: var(--serif); font-weight: 700; font-size: 22px; flex: none; }
img.logo { padding: 4px; }
.lp-head .eyebrow { display: none; }

.lp-hero { display: grid; gap: 34px; padding: 18px 0 56px; align-items: center; }
.lp-title { font-size: clamp(40px, 9vw, 84px); letter-spacing: -.025em; }
.lp-title em { display: inline-block; }
.lp-sub { margin-top: 18px; font-size: 18px; opacity: .85; max-width: 46ch; }

.join {
  background: var(--paper); color: var(--ink); border-radius: 26px; padding: 26px 22px 22px;
  box-shadow: var(--shadow); position: relative;
}
.join h2 { font-size: 26px; margin-bottom: 4px; }
.join .sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

.demo { display: none; }
.demo-card {
  background: var(--paper); color: var(--ink); border-radius: 24px; padding: 22px; width: min(340px, 100%);
  box-shadow: var(--shadow); transform: rotate(-3deg); animation: floaty 7s ease-in-out infinite;
}
.demo-card .row { justify-content: space-between; margin-bottom: 14px; }
.demo-card .mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.ticker { overflow: hidden; border-block: 1.5px solid rgba(255, 255, 255, .18); padding: 14px 0; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 38px; animation: marquee 26s linear infinite; padding-left: 38px; }
.ticker span { font-family: var(--serif); font-style: italic; font-size: 26px; opacity: .9; }
.ticker span::after { content: "✦"; margin-left: 38px; color: var(--accent); font-style: normal; font-size: 16px; vertical-align: middle; }

.steps { display: grid; gap: 14px; padding: 56px 0; }
.step { background: rgba(255, 255, 255, .07); border: 1.5px solid rgba(255, 255, 255, .14); border-radius: 22px; padding: 22px; }
.step b { font-family: var(--serif); font-size: 40px; color: var(--accent); display: block; line-height: 1; margin-bottom: 8px; }
.step h3 { font-size: 22px; margin-bottom: 4px; }
.step p { opacity: .8; font-size: 15px; }

.lp-foot { padding: 26px 0 44px; font-size: 13px; opacity: .75; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
.lp-foot a { opacity: .9; }

/* Sello (hanko) y casillas de sellos */
.seal {
  width: 100%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative;
  border: 3px solid var(--accent); color: var(--accent); font-family: var(--serif); font-weight: 700; font-style: italic;
  font-size: clamp(18px, 6vw, 30px); transform: rotate(var(--r, -6deg));
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .25), transparent 55%);
  mix-blend-mode: multiply;
}
.seal::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; }
.slot {
  aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(21, 22, 63, .25); position: relative; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: rgba(21, 22, 63, .35);
}
.slot.filled { border-color: transparent; }
.slot.filled .seal { animation: none; }
.slot.new .seal { animation: stampDrop 1s var(--ease) var(--d, 0s) both, inkBleed 1s ease-out var(--d, 0s) both; }
.slot.new { animation: thump 1s var(--ease) var(--d, 0s) both; }
.slot.new::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent);
  animation: ring .8s calc(var(--d, 0s) + .6s) ease-out both; pointer-events: none;
}
.slot.new::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent) 0 45%, transparent 70%);
  animation: splash .7s calc(var(--d, 0s) + .55s) ease-out both;
}
.slot .seal { z-index: 1; }
.loyalty.thump { animation: cardThump .5s calc(var(--d, 0s) + .6s) var(--ease) both; }
.slot.gift { border-style: solid; border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* Página de la tarjeta */
.cp { width: min(480px, 100%); margin-inline: auto; padding: 14px 18px calc(36px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.cp-head { display: flex; align-items: center; justify-content: space-between; padding-top: env(safe-area-inset-top); }
.cp-head .brandmark { font-size: 18px; }
.cp-head .logo { width: 36px; height: 36px; font-size: 18px; }

.loyalty { background: var(--paper); color: var(--ink); border-radius: 28px; padding: 22px 20px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.loyalty::before, .loyalty::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--page, var(--brand)); top: 92px;
}
.loyalty::before { left: -11px; } .loyalty::after { right: -11px; }
.loyalty .name { font-size: 30px; margin: 2px 0 20px; }
.loyalty .divider { border-top: 2px dashed rgba(21, 22, 63, .15); margin: 0 -20px 20px; }
.stamps { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 12px; }
.bigpts { display: flex; align-items: baseline; gap: 10px; }
.bigpts .n { font-family: var(--serif); font-size: 74px; line-height: .9; letter-spacing: -.03em; font-weight: 600; }
.bigpts .u { font-size: 16px; color: var(--muted); font-weight: 600; }
.bar { height: 12px; border-radius: 99px; background: rgba(21, 22, 63, .1); overflow: hidden; margin: 16px 0 8px; }
.bar > i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: 99px; transition: width 1s var(--ease); }
.progress-note { font-size: 14px; color: var(--muted); }
.progress-note b { color: var(--ink); }
.extra { margin-top: 14px; font-size: 13px; color: var(--muted); }

.banner {
  margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 600;
  display: flex; gap: 12px; align-items: center; animation: pop .6s var(--ease) both;
}
.banner small { display: block; font-weight: 500; opacity: .9; }

.qrbox { background: #fff; color: var(--ink); border-radius: 24px; padding: 20px; display: grid; justify-items: center; gap: 12px; box-shadow: var(--shadow); }
.qrbox .qr { width: min(240px, 100%); aspect-ratio: 1; }
.qrbox .qr svg { width: 100%; height: 100%; }
.qrbox p { font-size: 13.5px; color: var(--muted); text-align: center; }

.panel-card { background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .15); border-radius: 22px; padding: 18px; }
.panel-card h2 { font-size: 20px; margin-bottom: 12px; }
.rw { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.rw:first-of-type { border-top: 0; }
.rw .cost { font-size: 13px; opacity: .7; }
.rw.ok .cost { color: #8BE3B5; opacity: 1; font-weight: 700; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.hist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.hist li:first-child { border-top: 0; }
.hist small { opacity: .65; display: block; }
.hist .plus { color: #8BE3B5; font-weight: 700; } .hist .minus { color: #FFB4A6; font-weight: 700; }

.install { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, .1); border-radius: 18px; padding: 14px 16px; font-size: 14px; }
.sheet-back { position: fixed; inset: 0; background: rgba(10, 10, 30, .6); display: grid; align-items: end; z-index: 50; animation: fade .25s both; }
.sheet-in { background: var(--paper); color: var(--ink); border-radius: 26px 26px 0 0; padding: 24px 22px calc(28px + env(safe-area-inset-bottom)); max-width: 520px; width: 100%; margin-inline: auto; animation: rise .35s var(--ease) both; }
.sheet-in h3 { font-size: 24px; margin-bottom: 10px; }
.sheet-in ol { padding-left: 20px; margin: 10px 0 18px; display: grid; gap: 8px; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* Páginas de texto / error */
.doc { width: min(720px, 100% - 40px); margin: 0 auto; padding: 30px 0 60px; background: transparent; }
.doc h1 { font-size: 40px; margin-bottom: 12px; }
.doc h2 { font-size: 22px; margin: 26px 0 8px; }
.doc p, .doc li { opacity: .9; }
.doc ul { padding-left: 20px; }
.bare { display: grid; place-items: center; min-height: 100dvh; padding: 24px; text-align: center; background: var(--navy); color: #fff; }
.bare .box { max-width: 440px; }
.bare h1 { font-size: 44px; margin: 14px 0 10px; }
.bare p { opacity: .8; margin-bottom: 22px; }
.bare .code { font-family: var(--serif); font-style: italic; font-size: 90px; color: var(--red); line-height: 1; }

/* ==========================================================================
   Paneles (personal / dueño / HANKO)
   ========================================================================== */
body.area-panel { background: var(--paper); }
.appbar { position: sticky; top: 0; z-index: 20; background: var(--brand); color: var(--on-brand); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 12px; }
.appbar .brandmark { font-size: 17px; }
.appbar .logo { width: 34px; height: 34px; font-size: 17px; }
.appbar .sp { flex: 1; }
.appbar a, .appbar button.link { color: inherit; font-size: 13px; opacity: .85; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.appbar a:hover, .appbar button.link:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
.topfix { position: sticky; top: 0; z-index: 30; background: var(--brand); transform: translateZ(0); -webkit-transform: translateZ(0); }
.topfix .appbar { position: relative; top: auto; }
.pnav { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.pnav::-webkit-scrollbar { display: none; }
.pnav a { padding: 9px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pnav a.on { background: var(--brand); color: var(--on-brand); }
.page { width: min(1080px, 100% - 28px); margin: 0 auto; padding: 22px 0 64px; display: grid; gap: 18px; }
.page h1 { font-size: 34px; }
.page h2 { font-size: 22px; margin-bottom: 12px; }
.box { background: #fff; border-radius: 20px; padding: 20px; border: 1px solid var(--line); }
.grid2 { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { background: #fff; border-radius: 18px; padding: 16px; border: 1px solid var(--line); }
.kpi b { font-family: var(--serif); font-size: 38px; line-height: 1; display: block; letter-spacing: -.02em; }
.kpi span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.kpi.hl { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.kpi.hl span { color: inherit; opacity: .75; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.chart > div { flex: 1; display: grid; gap: 6px; align-items: end; height: 100%; text-align: center; font-size: 10px; color: var(--muted); }
.chart i { display: block; background: var(--accent); border-radius: 6px 6px 0 0; height: var(--h, 2%); min-height: 3px; transform-origin: bottom; animation: grow .8s var(--ease) both; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(21, 22, 63, .025); }
.tscroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--paper-2); }
.badge.ok { background: #E1F4EA; color: #14583A; } .badge.off { background: #F3E2E0; color: #8A1C14; } .badge.acc { background: color-mix(in srgb, var(--accent) 16%, #fff); color: var(--accent); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.list-plain li:first-child { border-top: 0; }
.pager { display: flex; gap: 10px; justify-content: center; align-items: center; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form .input { width: auto; flex: 1; min-width: 120px; padding: 10px 12px; }
.colorrow { display: flex; gap: 12px; align-items: center; }
.colorrow input[type=color] { width: 54px; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; background: #fff; }
.qrgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.qritem { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.qritem .qr { width: 160px; height: 160px; }
.qritem .qr svg { width: 100%; height: 100%; }
.qritem small { word-break: break-all; color: var(--muted); font-size: 11px; }
.flash { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; max-width: min(92vw, 520px); padding: 14px 18px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 14.5px; animation: rise .4s var(--ease) both; }
.flash.err { background: #B3261E; }
.flash.out { animation: fadeout .4s both; }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--brand); color: var(--on-brand); }
.login .box { background: var(--paper); color: var(--ink); width: min(400px, 100%); border-radius: 28px; padding: 28px 24px; box-shadow: var(--shadow); border: 0; }
.login h1 { font-size: 30px; margin: 14px 0 4px; }

/* App del personal */
.staff { display: grid; min-height: calc(100dvh - 54px); grid-template-rows: auto 1fr; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 14px 6px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }
.tabpane { padding: 16px; width: min(520px, 100%); margin-inline: auto; }
.scanner { position: relative; border-radius: 26px; overflow: hidden; background: #0c0c24; aspect-ratio: 3/4; max-height: 62vh; width: 100%; display: grid; place-items: center; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 14%; border-radius: 22px; pointer-events: none; }
.scanner .frame::before, .scanner .frame::after, .scanner .frame i::before, .scanner .frame i::after {
  content: ""; position: absolute; width: 38px; height: 38px; border: 4px solid var(--accent);
}
.scanner .frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 20px; }
.scanner .frame::after { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 20px; }
.scanner .frame i::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 20px; }
.scanner .frame i::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 20px; }
.scanner .line { position: absolute; left: 14%; right: 14%; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: scan 2.2s ease-in-out infinite; box-shadow: 0 0 18px var(--accent); }
.scanner .msg { position: relative; z-index: 2; text-align: center; padding: 24px; display: grid; gap: 14px; justify-items: center; }
.scan-hint { text-align: center; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.tlist { display: grid; gap: 10px; }
.titem { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: 14px; }
.titem.void { opacity: .45; text-decoration: line-through; }
.titem small { color: var(--muted); display: block; }
.sheet2-back { position: fixed; inset: 0; background: rgba(10, 10, 30, .55); z-index: 40; display: grid; align-items: end; animation: fade .2s both; }
.sheet2 { background: var(--paper); border-radius: 28px 28px 0 0; padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); width: min(560px, 100%); margin-inline: auto; max-height: 92dvh; overflow: auto; animation: rise .3s var(--ease) both; }
.cust-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cust-top .av { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-family: var(--serif); font-size: 24px; flex: none; }
.cust-top h3 { font-size: 24px; }
.mini-state { background: #fff; border-radius: 18px; padding: 14px; border: 1px solid var(--line); margin-bottom: 14px; }
.mini-state .stamps { gap: 8px; }
.mini-state .seal { font-size: 15px; border-width: 2.5px; }
.actions { display: grid; gap: 10px; margin: 14px 0; }
.svc { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.svc input { width: 20px; height: 20px; accent-color: var(--accent); }
.svc.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, #fff); }
.bigmoney { font-size: 28px; font-weight: 700; text-align: center; padding: 16px; }
.success-pop { text-align: center; padding: 8px 0 4px; animation: pop .5s var(--ease) both; }
.success-pop { position: relative; }
.success-pop .seal { width: 86px; margin: 0 auto 10px; font-size: 34px; animation: stampDrop .9s var(--ease) both, inkBleed .9s ease-out both; }
.success-pop::after { content: ""; position: absolute; left: 50%; top: 4px; width: 86px; height: 86px; margin-left: -43px; border-radius: 50%; border: 3px solid var(--accent); pointer-events: none; animation: ring .8s .55s ease-out both; }

/* HANKO admin */
body.area-hanko { background: var(--navy); color: #fff; }
body.area-hanko .box { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .15); color: #fff; }
body.area-hanko .input { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
body.area-hanko .input option { color: #15163F; }
body.area-hanko .field > label { color: rgba(255, 255, 255, .7); }
body.area-hanko .table td, body.area-hanko .table th { border-color: rgba(255, 255, 255, .14); }
body.area-hanko .table th { color: rgba(255, 255, 255, .65); }
body.area-hanko .table tr:hover td { background: rgba(255, 255, 255, .04); }
body.area-hanko .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
body.area-hanko .muted, body.area-hanko .hint { color: rgba(255, 255, 255, .6); }
body.area-hanko .badge { background: rgba(255, 255, 255, .14); }
body.area-hanko .badge.ok { background: rgba(80, 220, 150, .2); color: #8BE3B5; }
body.area-hanko .badge.off { background: rgba(255, 120, 100, .2); color: #FFB4A6; }
body.area-hanko .list-plain li { border-color: rgba(255, 255, 255, .14); }
body.area-hanko .appbar { background: rgba(0, 0, 0, .25); }

/* ---------- Animaciones ---------- */
@keyframes stampIn {
  0% { transform: scale(2.6) rotate(-28deg); opacity: 0; }
  55% { transform: scale(.86) rotate(var(--r, -6deg)); opacity: 1; }
  75% { transform: scale(1.06) rotate(var(--r, -6deg)); }
  100% { transform: scale(1) rotate(var(--r, -6deg)); opacity: 1; }
}
/* Sello que cae, se aplasta al imprimir, y deja tinta que se expande */
@keyframes stampDrop {
  0%   { transform: translateY(-110px) scale(2) rotate(-24deg); opacity: 0; }
  40%  { transform: translateY(-16px) scale(1.3) rotate(calc(var(--r, -6deg) - 10deg)); opacity: 1; }
  58%  { transform: translateY(0) scale(.8) rotate(var(--r, -6deg)); }
  70%  { transform: scale(1.08) rotate(var(--r, -6deg)); }
  84%  { transform: scale(.98) rotate(var(--r, -6deg)); }
  100% { transform: scale(1) rotate(var(--r, -6deg)); opacity: 1; }
}
@keyframes inkBleed {
  0%, 56% { box-shadow: 0 0 0 0 transparent; filter: saturate(.6); }
  58% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); filter: saturate(1.4); }
  100% { box-shadow: 0 0 0 16px transparent; filter: saturate(1); }
}
@keyframes splash { 0% { transform: scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes thump { 0%, 56% { transform: none; } 62% { transform: scale(.93); } 78% { transform: scale(1.03); } 100% { transform: none; } }
@keyframes cardThump { 0%, 100% { transform: none; } 25% { transform: translateY(3px) scale(.994); } 60% { transform: translateY(-1px); } }
@keyframes ring { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes floaty { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-12px); } }
@keyframes pop { 0% { transform: scale(.8); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes scan { 0%, 100% { top: 16%; } 50% { top: 82%; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes seq { 0%, 18% { opacity: 0; transform: scale(2.4) rotate(-24deg); } 26% { opacity: 1; transform: scale(.9) rotate(var(--r)); } 32%, 88% { opacity: 1; transform: scale(1) rotate(var(--r)); } 96%, 100% { opacity: 0; } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.rise { animation: rise .7s var(--ease) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; }

.demo-card .mini .slot { border-color: rgba(21, 22, 63, .22); }
.demo-card .mini .seal { opacity: 0; animation: seq 6s infinite; }
.demo-card .mini .slot:nth-child(2) .seal { animation-delay: .9s; }
.demo-card .mini .slot:nth-child(3) .seal { animation-delay: 1.8s; }
.demo-card .mini .slot:nth-child(4) .seal { animation-delay: 2.7s; }

@media (min-width: 760px) {
  .lp-hero { grid-template-columns: 1.1fr .9fr; gap: 60px; padding: 36px 0 84px; }
  .demo { display: grid; justify-items: center; margin-bottom: 26px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .kpis { grid-template-columns: repeat(5, 1fr); }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .page h1 { font-size: 42px; }
}
@media (min-width: 1000px) {
  .lp-head .eyebrow { display: block; }
}
@media print {
  .appbar, .pnav, .no-print, .flash { display: none !important; }
  body { background: #fff !important; }
  .qritem { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  .slot.new::before, .slot.new::after, .success-pop::after { display: none; }
}

/* Avisos push */
.pushbox .btn-ghost { color: inherit; border-color: rgba(255, 255, 255, .35); }
.pcount { font-variant-numeric: tabular-nums; }
.pushprev { display: flex; gap: 12px; align-items: flex-start; background: var(--paper-2); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.pushprev .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; flex: none; }
.pushprev b { display: block; font-size: 14px; }
.pushprev span { font-size: 13.5px; color: var(--muted); word-break: break-word; }
.pushbox p, .pushbox .progress-note { color: rgba(255, 255, 255, .82); }
.pushbox b { color: #fff; }
