:root {
  --ink: #121110;
  --ink-2: #1c1a18;
  --ink-3: #2a2320;
  --line: #3a3430;
  --text: #ffffff;
  --muted: #cfc8c0;
  --dim: #a89f96;
  --accent: #e02424;
  --accent-soft: #ff7a7a;
  --ok: #2ed3a0;
  --warn: #ffb000;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.4;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .brand { font-family: "Sora", system-ui, sans-serif; font-weight: 800; margin: 0; }
.wrap { max-width: 460px; margin: 0 auto; padding: 24px 20px 48px; }
.wrap.wide { max-width: 980px; }
.brand { letter-spacing: 0.05em; font-size: 18px; white-space: nowrap; }
.chip {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700; font-size: 11px;
  letter-spacing: 0.1em; padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.title { font-size: 28px; line-height: 1.15; margin-bottom: 8px; }
.title em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.muted { color: var(--dim); font-size: 13px; }
.hidden { display: none !important; }

label { display: block; font-weight: 700; font-size: 14px; margin: 16px 0 6px; }
input[type="text"], input[type="tel"], input[type="password"], input[type="search"] {
  width: 100%; background: var(--ink-2); color: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 15px 16px; font: inherit; font-size: 17px; outline: none;
}
input:focus { border-color: var(--accent); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

button, .btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 17px;
  background: var(--accent); color: #fff; border-radius: 14px; padding: 16px 18px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost { background: transparent; border: 1.5px solid var(--line); color: #fff; }
button.small { width: auto; padding: 10px 14px; font-size: 14px; border-radius: 10px; }
button.green { background: var(--ok); color: #0b1f18; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.error { background: #3a1414; border: 1px solid #7a2323; color: #ffc9c9; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.okmsg { background: #0f2a22; border: 1px solid #1d6b52; color: #b5f2dc; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }

/* tarjeta */
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 24px; padding: 20px 18px 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.card h2 { font-size: 22px; line-height: 1.15; margin: 6px 0 16px; }
.card h2 em { font-style: normal; color: var(--accent); }
.stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 10px; justify-items: center; }
.stamp {
  width: 100%; max-width: 68px; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px dashed #6b635c; color: var(--dim); font-family: "Sora", sans-serif; font-weight: 700; font-size: 20px;
}
.stamp svg { width: 52%; height: 52%; }
.stamp.reward { border: 2px solid var(--accent); color: var(--accent); }
.stamp.done { background: var(--accent); border: 2px solid var(--accent); color: #fff; }
.stamp.new { animation: pop 0.6s ease-out; }
@keyframes pop { 0% { transform: scale(0.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.legend { margin: 16px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.count { font-family: "Sora", sans-serif; font-weight: 700; font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.count b { color: #fff; }

.qrbox { background: #fff; border-radius: 18px; padding: 14px; width: 190px; margin: 20px auto 8px; }
.qrbox svg { display: block; width: 100%; height: auto; }
.qrcode { text-align: center; font-family: "Sora", sans-serif; font-weight: 700; letter-spacing: 0.18em; font-size: 18px; }
.qrhelp { text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; }

.banner { border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; font-weight: 700; background: var(--accent); color: #fff; }
.banner small { display: block; font-weight: 500; opacity: 0.95; margin-top: 2px; }
.foot { text-align: center; margin-top: 22px; color: var(--dim); font-size: 12px; letter-spacing: 0.04em; }
.foot a { color: var(--accent-soft); }
.tip { margin-top: 18px; font-size: 13px; color: var(--dim); background: var(--ink-2); border-radius: 12px; padding: 12px 14px; }

/* cajero */
.cust { background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 14px; }
.cust h3 { font-size: 20px; }
.cust .meta { color: var(--dim); font-size: 13px; margin: 2px 0 12px; }
.cust .stamps { grid-template-columns: repeat(8, 1fr); gap: 6px; }
.cust .stamp { font-size: 11px; border-width: 1.5px; }
.pick { display: block; width: 100%; text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; font-weight: 700; }
.pick span { display: block; color: var(--dim); font-weight: 500; font-size: 13px; }
.scanner { position: relative; margin-top: 14px; border-radius: 18px; overflow: hidden; background: #000; }
.scanner video { width: 100%; display: block; max-height: 340px; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18% 18%; border: 3px solid var(--accent); border-radius: 18px; pointer-events: none; }
.rule { background: var(--ink-3); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 20px; z-index: 10; max-width: 428px; margin: 0 auto; background: var(--ok); color: #0b1f18; font-weight: 800; border-radius: 14px; padding: 16px; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,0.5); }

/* panel */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.tile { background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tile b { display: block; font-family: "Sora", sans-serif; font-size: 30px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 13px; }
.tile.hot b { color: var(--accent-soft); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.tablewrap { overflow-x: auto; background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; padding: 4px 10px; }
textarea { width: 100%; min-height: 220px; background: var(--ink-2); color: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; font: inherit; font-size: 14px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent); color: #fff; }
.tag.off { background: var(--ink-3); color: var(--muted); }
