:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e2da;
  --ok: #15803d;
  --bad: #b91c1c;
  --warn: #b45309;
  --gold: #a16207;
  --brand: #c2410c;
}
/* Se recalcula en cada elemento que cambia --brand (tarjeta, cartel, lista…). */
body, .card, .poster, .mini { --brand-soft: color-mix(in srgb, var(--brand) 13%, white); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .3em 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .7em; }
h3 { margin: .2em 0; font-size: 1rem; }
code { background: #f1ede6; padding: 2px 6px; border-radius: 6px; font-size: .85em; word-break: break-all; }

.wrap { max-width: 520px; margin: 0 auto; padding: 20px 16px 56px; }
.wrap.wide { max-width: 960px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.lead { font-size: 1.1rem; margin: .3em 0; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 18px 0; }
.stack { display: grid; gap: 10px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand); color: #fff; border: 0; border-radius: 12px;
  padding: 12px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.07); }
.btn.block { width: 100%; }
.btn.small { padding: 7px 12px; font-size: .875rem; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.okbtn { background: var(--ok); }
.btn.gold { background: var(--gold); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- cajas y mensajes ---------- */
.box { background: var(--surface); border-radius: 16px; padding: 18px; box-shadow: 0 1px 0 var(--line); margin: 16px 0; }
.flash { border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-weight: 500; }
.flash.ok { background: #dcfce7; color: #14532d; }
.flash.bad { background: #fee2e2; color: #7f1d1d; }
.flash.warn { background: #fef3c7; color: #78350f; }
.flash.info { background: #e0f2fe; color: #0c4a6e; }

/* ---------- formularios ---------- */
.form label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 14px; }
.form input:not([type=checkbox]):not([type=color]):not([type=radio]), .form select, .search input {
  display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit; font-weight: 400;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.form input:focus, .form select:focus, .search input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.form input[type=color] { display: block; margin-top: 6px; width: 100%; height: 46px; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px; background: #fff; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); }
.form h2 { margin-top: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { margin: 0; }

/* ---------- tarjeta de sellos ---------- */
.card {
  background: var(--surface); border-radius: 22px; padding: 20px;
  border-top: 7px solid var(--brand);
  box-shadow: 0 1px 0 var(--line), 0 14px 34px -16px rgba(0,0,0,.25);
  margin: 16px 0;
}
.card-head { display: flex; gap: 12px; align-items: center; }
.card-emoji { font-size: 34px; width: 54px; height: 54px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 16px; }
.card-name { font-weight: 700; font-size: 1.15rem; }
.card-reward { color: var(--muted); font-size: .9rem; }
.dots { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 10px; margin: 18px 0 12px; }
.dot {
  aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line);
  display: grid; place-items: center; color: #b5ada3; font-weight: 700;
  font-size: clamp(15px, 5.5vw, 24px);
}
.dot.gift { border-color: color-mix(in srgb, var(--brand) 55%, white); }
.dot.on { border: 2px solid var(--brand); background: var(--brand-soft); color: var(--ink); }
.dot.pop { animation: pop .7s cubic-bezier(.2, 1.7, .4, 1) both; }
.card-foot { display: flex; justify-content: space-between; font-weight: 600; font-size: .9rem; }

@keyframes pop { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes bounce { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- resultado del sello ---------- */
.result { text-align: center; margin: 8px 0 4px; }
.result .big { font-size: 64px; line-height: 1.1; }
.bounce { animation: bounce .6s ease-out both; }
.spinner { width: 52px; height: 52px; margin: 8px auto; border-radius: 50%; border: 5px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .9s linear infinite; }
.whoami { text-align: center; margin-top: 22px; }

/* ---------- logos dentro de tarjeta, sellos, cartel y lista ---------- */
.card-emoji { overflow: hidden; }
.card-emoji img, .poster-emoji img, .mini-emoji img, .brand-big img { display: block; object-fit: contain; }
.card-emoji img { width: 100%; height: 100%; padding: 4px; }
.dot img { width: 72%; height: 72%; object-fit: contain; }
.poster-emoji img { width: 96px; height: 96px; margin: 0 auto 4px; border-radius: 18px; }
.mini-emoji img { width: 36px; height: 36px; border-radius: 10px; }
.brandmark img { width: 26px; height: 26px; border-radius: 7px; object-fit: contain; display: block; }
.brand-big img { width: 84px; height: 84px; margin: 0 auto; border-radius: 22px; }

/* ---------- temas de tarjeta ---------- */
/* Moderno: cabecera de color, sellos sólidos */
.card.theme-moderno { border-top: 0; padding: 0; overflow: hidden; border-radius: 26px; }
.card.theme-moderno .card-head { background: var(--brand); color: #fff; padding: 18px 20px; }
.card.theme-moderno .card-reward { color: rgba(255,255,255,.85); }
.card.theme-moderno .card-emoji { background: rgba(255,255,255,.95); }
.card.theme-moderno .dots { margin: 18px 20px 12px; }
.card.theme-moderno .card-foot { padding: 0 20px 18px; }
.card.theme-moderno .dot { border: 0; background: #f1ede8; }
.card.theme-moderno .dot.gift:not(.on) { background: var(--brand-soft); }
.card.theme-moderno .dot.on { background: var(--brand); color: #fff; }

/* Oscuro elegante: negro con detalles dorados */
.card.theme-oscuro {
  background: linear-gradient(160deg, #1f1c1a, #0c0a09); color: #f5f5f4;
  border-top: 3px solid var(--brand);
  box-shadow: inset 0 0 0 1px #3f3a35, 0 14px 34px -16px rgba(0,0,0,.6);
}
.card.theme-oscuro .card-name { font-family: Georgia, "Times New Roman", serif; letter-spacing: .02em; }
.card.theme-oscuro .card-reward, .card.theme-oscuro .card-foot .muted { color: #a8a29e; }
.card.theme-oscuro .card-emoji { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px #d4af37; }
.card.theme-oscuro .dot { border: 1px solid #4a443e; color: #6b645d; }
.card.theme-oscuro .dot.gift { border-color: #d4af37; }
.card.theme-oscuro .dot.on { background: rgba(212,175,55,.12); border: 1px solid #d4af37; color: #fff; }

/* Papel kraft: cartón, letra de imprenta, sellos de tinta torcidos */
.card.theme-kraft {
  background: #d8c09a repeating-linear-gradient(45deg, rgba(0,0,0,.03) 0 2px, transparent 2px 6px);
  color: #3b2a1a; border-top: 0; border-radius: 10px;
  box-shadow: 0 1px 0 #b89f78, 0 14px 30px -14px rgba(60,40,20,.5);
  font-family: Georgia, "Times New Roman", serif;
}
.card.theme-kraft .card-reward, .card.theme-kraft .card-foot .muted { color: #6b5238; }
.card.theme-kraft .card-emoji { background: rgba(255,255,255,.4); border-radius: 50%; }
.card.theme-kraft .dot { border: 2px dashed rgba(59,42,26,.35); color: rgba(59,42,26,.45); }
.card.theme-kraft .dot.on { border: 4px double var(--brand); background: rgba(255,255,255,.18); transform: rotate(-12deg); animation: none; }
.card.theme-kraft .dot.on:nth-child(even) { transform: rotate(9deg); }

/* Neón: fondo noche, el color de la marca brilla */
.card.theme-neon {
  background: #0b0b18; color: #fff; border-top: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 60%, transparent), 0 0 32px -6px var(--brand);
}
.card.theme-neon .card-name { text-shadow: 0 0 10px var(--brand); }
.card.theme-neon .card-reward, .card.theme-neon .card-foot .muted { color: #9ca3af; }
.card.theme-neon .card-emoji { background: transparent; box-shadow: 0 0 0 2px var(--brand), 0 0 14px var(--brand); }
.card.theme-neon .dot { border: 2px solid #2a2a40; color: #4b4b66; }
.card.theme-neon .dot.gift { border-color: color-mix(in srgb, var(--brand) 50%, #2a2a40); }
.card.theme-neon .dot.on { border-color: var(--brand); background: transparent; color: #fff; box-shadow: 0 0 12px var(--brand), inset 0 0 8px var(--brand); }

/* El cartel imprimible sigue el tema */
.poster.theme-moderno { border: 0; padding-top: 0; overflow: hidden; }
.poster.theme-moderno .poster-emoji { background: var(--brand); margin: 0 -22px 14px; padding: 22px 0 14px; }
.poster.theme-oscuro { background: #141210; color: #f5f5f4; border-color: #d4af37; }
.poster.theme-oscuro .poster-name { font-family: Georgia, serif; }
.poster.theme-kraft { background: #d8c09a; color: #3b2a1a; font-family: Georgia, serif; border-style: double; }
.poster.theme-neon { background: #0b0b18; color: #fff; box-shadow: 0 0 24px var(--brand); }
.poster.theme-oscuro small, .poster.theme-neon small, .poster.theme-oscuro .poster-foot, .poster.theme-neon .poster .poster-offer.sin, .poster.sin-premio .poster-offer.con { display: none; }
.nfc-icon { width: 46px; height: 46px; margin: 0 auto; color: var(--brand); display: block; }
.nfc-tag { display: block; font: 800 .8rem/1 system-ui, sans-serif; letter-spacing: .12em; color: var(--brand); margin: 2px 0 1px; }
.poster.solo-qr .nfc-spot, .poster.solo-qr .or { display: none; }
.poster.solo-qr .qr svg { width: 200px; height: 200px; }
.poster.solo-qr .qr small { font-size: .9rem; }
.seg { display: inline-flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.seg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; font-weight: 600; font-size: .9rem; }
.seg label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.seg input { accent-color: var(--brand); }
fieldset.cartel-modo { border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.poster.sin-premio .poster-offer.sin { display: block; }
.cartel-opt { cursor: pointer; margin-top: 0; }
.cartel-opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.poster-foot { color: #a8a29e; }
.qr svg { background: #fff; padding: 6px; border-radius: 8px; box-sizing: content-box; }

/* ---------- ajustes: selector de tema e imágenes ---------- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin: 0 0 16px; }
.form .theme-opt { display: grid; gap: 6px; justify-items: center; margin: 0; font-size: .78rem; text-align: center; cursor: pointer; position: relative; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { width: 100%; height: 46px; border-radius: 10px; display: flex; gap: 6px; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.swatch i { width: 13px; height: 13px; border-radius: 50%; }
.theme-opt input:checked + .swatch { outline: 3px solid var(--brand); outline-offset: 2px; }
.theme-opt input:focus-visible + .swatch { outline: 3px dashed var(--brand); outline-offset: 2px; }
.swatch.theme-clasico { background: #fff; border-top: 5px solid var(--brand); }
.swatch.theme-clasico i { border: 2px solid var(--brand); background: var(--brand-soft); }
.swatch.theme-moderno { background: linear-gradient(var(--brand) 0 38%, #fff 38%); }
.swatch.theme-moderno i { background: var(--brand); margin-top: 16px; }
.swatch.theme-oscuro { background: #141210; }
.swatch.theme-oscuro i { border: 1px solid #d4af37; }
.swatch.theme-kraft { background: #d8c09a; }
.swatch.theme-kraft i { border: 3px double var(--brand); transform: rotate(-12deg); }
.swatch.theme-neon { background: #0b0b18; }
.swatch.theme-neon i { border: 2px solid var(--brand); box-shadow: 0 0 8px var(--brand); }

.row-gap.left { justify-content: flex-start; margin: 10px 0 0; }
.row-gap form { margin: 0; }
.upload label { margin: 0; }
.upload.busy label { opacity: .6; pointer-events: none; }
.upload.busy label::after { content: " · subiendo…"; }
.logo-prev { width: 96px; height: 96px; object-fit: contain; border-radius: 16px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; box-shadow: 0 0 0 1px var(--line); }
.cover-prev { width: 100%; aspect-ratio: 1032 / 336; object-fit: cover; border-radius: 12px; }

/* ---------- ofertas en la tarjeta del cliente ---------- */
.offer {
  display: grid; gap: 2px; margin: 12px 0; padding: 12px 14px; border-radius: 14px;
  background: var(--brand-soft); border-left: 5px solid var(--brand);
}
.offer span { font-size: .92rem; }
.offer.bday { background: #fef3c7; border-left-color: #f59e0b; }

/* interruptor "Recibir ofertas" */
.optin { display: flex; gap: 12px; align-items: center; margin: 16px 0; padding: 12px 14px; background: var(--surface); border-radius: 14px; box-shadow: 0 1px 0 var(--line); }
.optin div { display: grid; gap: 2px; }
.switch { flex: none; width: 46px; height: 28px; border-radius: 99px; border: 0; background: #d6d3d1; position: relative; cursor: pointer; padding: 0; transition: background .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch.on { background: var(--brand); }
.switch.on span { transform: translateX(18px); }

/* ---------- avisos (panel) ---------- */
.notif {
  display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; padding: 12px 14px;
  background: #1f2937; color: #f9fafb; border-radius: 16px; font-size: .9rem;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.5);
}
.notif-icon { width: 36px; height: 36px; flex: none; border-radius: 10px; background: #fff; display: grid; place-items: center; font-size: 20px; overflow: hidden; }
.notif-icon img { width: 100%; height: 100%; object-fit: contain; }
.notif-app { font-size: .75rem; color: #9ca3af; }
.notif b { display: block; }
.form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit; font-weight: 400; border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; }
.form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.form .indent { margin-left: 28px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.form legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.form fieldset select { margin-top: 0; }
.row-line { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.row-line:first-of-type { border-top: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- textos legales y zona peligrosa ---------- */
.legal h2 { margin-top: 1.4em; }
.legal li { margin: 4px 0; }
.danger-zone summary { cursor: pointer; color: var(--muted); }
.btn.danger { background: var(--bad); }

/* ---------- modo caja ---------- */
.caja-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.caja-head > div { flex: 1; }
.caja-head .mini-emoji { font-size: 30px; }
.big-btn { padding: 16px 20px; font-size: 1.05rem; }
#cam { width: 100%; border-radius: 14px; margin: 10px 0; background: #000; }
#caja .search { margin-top: 12px; }
.caja-card { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface); border-radius: 14px; padding: 14px; margin: 10px 0; box-shadow: 0 1px 0 var(--line); }
.caja-dots { color: var(--brand); letter-spacing: 2px; margin: 2px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.toast.ok { background: #14532d; color: #fff; }
.toast.bad { background: #7f1d1d; color: #fff; }
.pin-input { text-align: center; font-size: 2rem !important; letter-spacing: .5em; }
.my-qr { text-align: center; margin: 14px 0; }
.my-qr summary { list-style: none; display: inline-flex; }
.my-qr summary::-webkit-details-marker { display: none; }
.my-qr img { display: block; margin: 12px auto 4px; background: #fff; border-radius: 12px; padding: 8px; }

/* ---------- estadísticas ---------- */
.stats.six { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 900px) { .stats.six { grid-template-columns: repeat(6, 1fr); } }
.chart { margin: 0 0 16px; }
.chart figcaption { margin-bottom: 10px; }
.bars { display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: 100%; gap: 2px; align-items: stretch; height: 170px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.cbar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; cursor: default; }
.cbar i { display: block; flex: none; width: min(70%, 34px); min-height: 2px; background: var(--brand); border-radius: 4px 4px 0 0; }
.cbar em { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.cbar span { position: absolute; bottom: -20px; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.bars { margin-bottom: 24px; }
.cbar:hover i, .cbar:focus i { filter: brightness(1.15); }
.cbar:hover::after, .cbar:focus::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 2;
  background: #1f2937; color: #fff; font-size: .78rem; padding: 6px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none;
}
.chart details { margin-top: 4px; }
.chart summary { cursor: pointer; color: var(--muted); }
table.data { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 6px; }
table.data td { padding: 4px 6px; border-top: 1px solid var(--line); }
table.data td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- pagos ---------- */
.fee { font-size: 1.05rem; margin: 0 0 12px; }
.total-due { font-size: 1.15rem; margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: #f1ede6; }
.total-due s { color: var(--muted); font-size: .9rem; }
.total-due .save { display: block; font-size: .85rem; font-weight: 600; color: var(--ok); }
.total-due .save[hidden], .total-due s[hidden] { display: none; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-info { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: .92rem; }
.pay-info b { display: block; margin-bottom: 4px; }
.proof-prev[hidden] { display: none; }
.proof-prev { display: block; max-width: 100%; max-height: 260px; margin: 0 0 14px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.proof-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.proof-row:first-of-type { border-top: 0; }
.reject-form { display: flex; gap: 6px; }
.reject-form input { padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; }
.proof-thumb { max-width: 160px; max-height: 200px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); display: block; }

/* ---------- plan Pro, admin y soporte ---------- */
.pro-lock { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #fef9c3; color: #713f12; font-size: .9rem; }
.via-admin { background: #1f2937; color: #fff; text-align: center; padding: 8px 16px; font-size: .9rem; }
.via-admin a { color: #fde68a; }
.topbar.admin-bar { background: #111827; border-color: #111827; }
.topbar.admin-bar .brandmark, .topbar.admin-bar .tabs a, .topbar.admin-bar .linkbtn { color: #e5e7eb; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .stats.four { grid-template-columns: repeat(2, 1fr); } }
.admin-row { text-decoration: none; color: inherit; }
.admin-row:hover { background: #faf8f5; }
.biz-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.biz-head h1 { margin: 0; }
.biz-head .mini-emoji { font-size: 40px; }
.temp-pw { font: 700 1.8rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; background: #f1ede6; border-radius: 12px; padding: 14px; user-select: all; }

/* ---------- botón Google Wallet ---------- */
.gwallet { display: inline-block; margin: 8px; line-height: 0; }
.gwallet img { height: 55px; width: auto; }

/* ---------- landing ---------- */
.logo { font-weight: 800; letter-spacing: -.02em; font-size: 1.1rem; color: var(--brand); }
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-size: 2rem; }
.steps { display: grid; gap: 12px; margin: 22px 0; }
.steps > div { background: var(--surface); border-radius: 16px; padding: 16px 16px 14px 60px; position: relative; box-shadow: 0 1px 0 var(--line); }
.steps b { position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- mis tarjetas ---------- */
.mini { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 14px; text-decoration: none; color: inherit; border-left: 6px solid var(--brand); box-shadow: 0 1px 0 var(--line); }
.mini-emoji { font-size: 28px; }
.mini-body { flex: 1; display: grid; min-width: 0; }
.mini-count { font-weight: 700; font-size: 1.05rem; }
.bar { display: block; height: 7px; background: #efebe5; border-radius: 99px; overflow: hidden; margin: 6px 0 2px; max-width: 280px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------- panel ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-in { max-width: 960px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; }
.brandmark { font-weight: 700; text-decoration: none; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.tabs { display: flex; gap: 4px; align-items: center; overflow-x: auto; margin-left: auto; }
.tabs a { padding: 7px 11px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a.active { background: var(--brand-soft); color: var(--ink); }
.tabs form { margin: 0 0 0 6px; }
.tabs .linkbtn { color: var(--muted); font-size: .9rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stats div { background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: 0 1px 0 var(--line); }
.stats b { display: block; font-size: 1.8rem; line-height: 1.1; }
.stats span { color: var(--muted); font-size: .85rem; }
.panel-sec { margin: 22px 0; }
.panel-sec.attention { background: #fff7ed; border: 1.5px solid #fed7aa; border-radius: 16px; padding: 14px; }
.pill { background: var(--brand); color: #fff; border-radius: 99px; padding: 1px 9px; font-size: .8rem; vertical-align: middle; }
.list { background: var(--surface); border-radius: 16px; box-shadow: 0 1px 0 var(--line); overflow: hidden; }
.row { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row:first-child { border-top: 0; }
.grow { flex: 1; min-width: 200px; }
.actions { display: flex; gap: 6px; }
.actions form { margin: 0; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #efebe5; }
.tag.ok { background: #dcfce7; color: #14532d; }
.tag.bad { background: #fee2e2; color: #7f1d1d; }
.tag.gold { background: #fef9c3; color: #713f12; }
.onboarding ol { margin: 0; padding-left: 20px; }
.onboarding li { margin: 4px 0; }

.split { display: grid; gap: 20px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.copy { display: flex; gap: 8px; align-items: center; margin: 6px 0 12px; }
.copy code { flex: 1; }

/* ---------- cartel ---------- */
.poster {
  background: #fff; border-radius: 22px; padding: 28px 22px; text-align: center;
  border: 10px solid var(--brand); max-width: 420px; margin: 0 auto;
}
.poster-emoji { font-size: 52px; }
.poster-name { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
.poster-offer { font-size: 1.1rem; margin: 4px 0 20px; }
.poster-ways { display: flex; align-items: center; justify-content: center; gap: 14px; }
.nfc-spot { width: 130px; height: 130px; border-radius: 50%; border: 3px dashed var(--brand); display: grid; place-content: center; gap: 2px; }
.nfc-spot span { font-size: 38px; }
.nfc-spot small { max-width: 92px; margin: 0 auto; line-height: 1.25; }
.poster small { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
.or { font-weight: 700; color: var(--muted); }
.qr svg { width: 130px; height: 130px; display: block; margin-bottom: 4px; }
.poster-foot { margin-top: 20px; font-size: .8rem; color: var(--muted); }

@media print {
  .topbar, .noprint, .flash { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; }
  .split { display: block; }
  .poster { margin-top: 20mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Clientes: filtro de cumpleaños */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.chip { padding: 6px 12px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.chip.on { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.bday-line { margin: 2px 0; color: var(--muted); }
.bday-line.soon { color: var(--ink); }

/* Tarjeta del cliente: guardarla en la pantalla de inicio (iPhone, Huawei sin Google) */
.home-tip { margin: 14px auto 0; max-width: 420px; background: var(--surface); border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 10px 14px; font-size: .92rem; }
.home-tip summary { cursor: pointer; font-weight: 600; }
.home-tip ol { margin: 10px 0 2px; padding-left: 20px; display: grid; gap: 4px; }

/* Guía para el dueño (/guia) */
.guide { max-width: 760px; margin: 0 auto; }
.guide-head h1 { margin-bottom: 4px; }
.guide .box { margin-bottom: 16px; scroll-margin-top: 80px; }
.guide h2 { margin-top: 0; }
.guide h3 { margin: 16px 0 4px; font-size: 1rem; }
.guide li { margin: 4px 0; line-height: 1.5; }
.guide ol.gsteps > li { margin: 10px 0; }
.guide ul ul, .guide ol ol { margin-top: 4px; }
.guide-toc ol { columns: 2; column-gap: 24px; margin: 8px 0 0; padding-left: 20px; }
.guide .tip { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; font-size: .93rem; line-height: 1.5; }
.guide .faq { border-top: 1px solid var(--line); padding: 10px 0; }
.guide .faq summary { cursor: pointer; font-weight: 600; }
.guide .faq div { margin-top: 6px; line-height: 1.5; }
@media (max-width: 560px) { .guide-toc ol { columns: 1; } }
@media print {
  .topbar, .via-admin, .no-print, .guide-help .btn { display: none !important; }
  body { background: #fff; }
  .guide .box { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .guide .faq { break-inside: avoid; }
}

/* Tarjeta del cliente: llamar, WhatsApp, reservar, cómo llegar */
.contact-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px auto; max-width: 440px; }
.contact-bar .btn { flex: 1 1 auto; min-width: 120px; }

/* Encuesta después de la visita */
.survey { max-width: 440px; margin: 0 auto 16px; text-align: center; display: grid; gap: 8px; }
.survey .stars { display: inline-flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.survey .stars input { position: absolute; opacity: 0; pointer-events: none; }
.survey .stars label { font-size: 2.2rem; line-height: 1; color: #d6d3d1; cursor: pointer; transition: transform .1s; }
.survey .stars label:hover, .survey .stars label:hover ~ label,
.survey .stars input:checked ~ label { color: #f59e0b; }
.survey .stars input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 6px; }
.survey textarea { width: 100%; padding: 10px; font: inherit; border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; }
.survey .btn { justify-self: center; }
/* Opiniones en Estadísticas */
.fb-top { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.fb-avg { display: grid; justify-items: center; }
.fb-avg b { font-size: 2.4rem; line-height: 1; }
.fb-stars { color: #f59e0b; letter-spacing: 1px; }
.fb-dist { flex: 1; min-width: 200px; display: grid; gap: 4px; font-size: .85rem; }
.fb-dist div { display: grid; grid-template-columns: 34px 1fr 28px; gap: 8px; align-items: center; }
.fb-dist i { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.fb-dist i b { display: block; height: 100%; background: #f59e0b; }
.fb-item { border-top: 1px solid var(--line); padding: 8px 0; }
.fb-item p { margin: 4px 0 0; }
.fb-item.low { background: #fef2f2; margin: 0 -10px; padding: 8px 10px; border-radius: 8px; }

/* Cupones */
.coupons { max-width: 440px; margin: 0 auto 14px; display: grid; gap: 8px; }
.coupon { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: #fffbeb; border: 2px dashed #f59e0b; border-radius: 14px; }
.coupon > div { display: grid; gap: 2px; }
.coupon-ico { font-size: 1.6rem; line-height: 1; }
.coupon-use { display: inline-block; margin: 6px 6px 0 0; }
.coupon-row .actions { display: flex; gap: 8px; align-items: center; }
.caja-coupon { margin-top: 6px; display: block; }

/* Tarjeta de puntos */
.pts-balance { text-align: center; margin: 14px 0 10px; }
.pts-balance b { display: block; font-size: 3rem; line-height: 1; color: var(--brand); }
.pts-balance span { font-size: .9rem; opacity: .7; }
.pts-balance.pop b { animation: bounce .6s ease; }
.pts-rewards { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pts-rewards li { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.04); }
.pts-rewards li > div { display: grid; position: relative; z-index: 1; }
.pts-rewards li span { font-size: .82rem; opacity: .75; }
.pts-rewards li i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--brand); }
.pts-rewards li.ok { background: #fef3c7; }
.pts-rewards li.ok span { opacity: 1; font-weight: 600; color: #92400e; }
.pts-cost { position: relative; z-index: 1; font-weight: 700; white-space: nowrap; }
.pts-cost::after { content: ' pts'; font-weight: 400; font-size: .8rem; }
.pts-buy { display: inline-flex; gap: 6px; }
.pts-buy input { width: 110px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.caja-buy { display: grid; gap: 6px; min-width: 150px; }
.caja-buy input { padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 1.1rem; text-align: center; }

/* Admin: códigos para imprimir */
.code-big { font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; letter-spacing: 1px; }
.code-link { display: flex; gap: 6px; flex-wrap: wrap; }
.code-link select, .code-link input { padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.code-link input { width: 140px; }
/* Hoja de habladores (4 por hoja carta) */
.hab-sheet { background: #fff; margin: 0; }
.hab-bar { padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid #ddd; font-family: system-ui, sans-serif; }
.hab-grid { display: grid; grid-template-columns: repeat(2, 10.2cm); justify-content: center; }
.hablador { box-sizing: border-box; width: 10.2cm; height: 13.3cm; padding: .7cm .6cm; border: 1px dashed #bbb; display: flex; flex-direction: column; align-items: center; text-align: center; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: #111; break-inside: avoid; }
.hab-top { font-size: 34px; line-height: 1; }
.hab-title { font-size: 21px; font-weight: 800; margin: 6px 0 2px; line-height: 1.15; }
.hab-sub { font-size: 12px; color: #555; }
.hab-qr { width: 5.2cm; height: 5.2cm; margin: .45cm 0 .3cm; }
.hab-qr svg { width: 100%; height: 100%; display: block; }
.hab-ways { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.hab-nfc { border: 2px dashed #999; border-radius: 99px; padding: 8px 14px; }
.hab-code { margin-top: auto; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #444; letter-spacing: .5px; }
@page { size: letter; margin: .5cm; }
@media print { .hab-bar { display: none; } .hablador:nth-child(4n) { break-after: page; } }

/* Ajustes: paletas y vista previa de Google Wallet */
.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin: 0 0 14px; }
.pal { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.pal i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pal i + i { margin-left: -10px; }
.pal.on { box-shadow: inset 0 0 0 2px var(--ink); }
.wallet-preview { display: block; width: 100%; height: auto; border-radius: 14px; margin: 0 0 12px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* ---------- Página del cliente con la identidad del negocio (bizLayout) ---------- */
.biz { --accent: var(--brand); --brand-deep: #000; }
.biz .wrap { position: relative; z-index: 1; padding-top: 0; }
/* Logo de marca de agua en el fondo */
.biz.has-mark::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--mark) center 58% / min(78vw, 440px) no-repeat; opacity: .055; filter: grayscale(.3);
}
.biz-hero {
  position: relative; height: 150px; margin: 0 -16px; border-radius: 0 0 30px 30px;
  background:
    radial-gradient(circle at 88% 0, color-mix(in srgb, var(--accent) 65%, transparent), transparent 58%),
    linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 62%, var(--accent)) 62%, var(--brand-deep));
}
.biz-hero::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .55;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 45%, transparent) 1.4px, transparent 1.6px);
  background-size: 20px 20px;
}
.biz-hero.has-cover { background: linear-gradient(100deg, color-mix(in srgb, var(--brand-deep) 70%, transparent), color-mix(in srgb, var(--brand) 35%, transparent)), var(--cover) center / cover; }
.biz-hero.has-cover::before { display: none; }
.biz-logo {
  position: absolute; left: 50%; bottom: -44px; transform: translateX(-50%);
  width: 92px; height: 92px; border-radius: 50%; background: #fff; overflow: hidden;
  display: grid; place-items: center; font-size: 46px;
  box-shadow: 0 0 0 4px var(--accent), 0 10px 24px rgba(0,0,0,.25);
}
.biz-logo img { width: 100%; height: 100%; object-fit: cover; }
.biz-id { text-align: center; margin: 52px 0 6px; }
.biz-name { font-weight: 800; font-size: 1.45rem; letter-spacing: -.01em; }
.biz-tag { margin: 2px 0 0; color: var(--muted); }
.biz .contact-bar .btn, .biz .my-qr .btn { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, var(--line)); }
.biz .offer { border-left-color: var(--accent); }
.biz .result h1 { font-size: 1.45rem; }
@media (min-width: 560px) { .biz-hero { margin: 16px 0 0; border-radius: 30px; } }

/* Temas de la página (los mismos de la tarjeta) */
.page-clasico { --bg: color-mix(in srgb, var(--brand) 7%, #f6f3ee); }
.page-moderno { --bg: #ffffff; --line: #ececec; }
.page-moderno .biz-hero { height: 175px; }
.page-moderno .biz-name { font-size: 1.6rem; }
.page-oscuro { --bg: #0f0e0d; --surface: #1b1917; --ink: #f5f5f4; --muted: #a8a29e; --line: #2f2a26; }
.page-oscuro .biz-name { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; letter-spacing: .02em; }
.page-oscuro .biz-logo { background: #141210; }
.page-kraft { --bg: #e8d9bd; --surface: #f3e7d1; --ink: #3b2a1a; --muted: #6b5238; --line: #d6bf96; }
.page-kraft body, body.page-kraft { background-image: radial-gradient(rgba(59,42,26,.05) 1px, transparent 1.2px); background-size: 6px 6px; }
.page-kraft .biz-name, .page-kraft h1 { font-family: Georgia, 'Times New Roman', serif; }
.page-neon { --bg: #07070f; --surface: #12121f; --ink: #f8fafc; --muted: #9ca3af; --line: #26263d; }
.page-neon .biz-logo { background: #07070f; box-shadow: 0 0 0 3px var(--brand), 0 0 26px var(--brand); }
.page-neon .biz-name { text-shadow: 0 0 14px var(--brand); }
.page-oscuro.has-mark::before, .page-neon.has-mark::before { opacity: .09; filter: none; }
/* En temas oscuros, lo que tiene fondo claro fijo mantiene letra oscura */
.page-oscuro .coupon, .page-neon .coupon, .page-oscuro .offer.bday, .page-neon .offer.bday { color: #1c1917; }
.page-oscuro .survey textarea, .page-neon .survey textarea { background: var(--surface); color: var(--ink); }
.page-oscuro code, .page-neon code { background: #26231f; }
.page-oscuro .offer:not(.bday), .page-neon .offer:not(.bday) { background: color-mix(in srgb, var(--brand) 24%, var(--surface)); }

/* ---------- Asistente "Diseña tu tarjeta" ---------- */
.wz { display: grid; gap: 22px; align-items: start; }
@media (min-width: 860px) { .wz { grid-template-columns: 360px 1fr; } .wz-preview { position: sticky; top: 76px; } }
.wz-phone { position: relative; overflow: hidden; background: var(--bg); color: var(--ink); border-radius: 34px; padding: 0 14px 18px; box-shadow: 0 0 0 10px #111, 0 20px 40px rgba(0,0,0,.25); margin: 10px 10px 20px; min-height: 520px; }
.wz-phone.has-mark::before { position: absolute; background-size: 70%; }
.wz-phone > * { position: relative; z-index: 1; }
.wz-phone .biz-hero { margin: 0 -14px; height: 120px; border-radius: 0 0 26px 26px; }
.wz-phone .biz-logo { width: 76px; height: 76px; bottom: -36px; font-size: 38px; }
.wz-phone .biz-id { margin-top: 42px; }
.wz-phone .biz-name { font-size: 1.2rem; }
.wz-phone .card { margin: 10px 0 0; }
.wz-form { margin: 0; }
.wz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 18px; }
.wz-step { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: .78rem; font-weight: 600; text-align: center; color: var(--muted); }
.wz-step b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: .85rem; }
.wz-step.on { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); }
.wz-step.on b { background: var(--ink); color: #fff; }
.wz-step.done b { background: var(--ok); color: #fff; }
.wz-kicker { margin: 0; color: var(--ok); font-weight: 700; font-size: .8rem; letter-spacing: .06em; }
.wz-form h2 { font-size: 1.5rem; margin: 2px 0 2px; }
.wz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.wz-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.wz-themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 0 14px; }
.wz-opt { position: relative; cursor: pointer; }
.wz-opt input { position: absolute; opacity: 0; pointer-events: none; }
.form .wz-themes .wz-opt { display: grid; justify-items: center; gap: 4px; font-size: .75rem; margin: 0; text-align: center; }
.wz-themes input:checked + .swatch { outline: 3px solid var(--ink); outline-offset: 2px; }
.wz-emojis { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.form .wz-emoji { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; margin: 0; border-radius: 12px; font-size: 24px; box-shadow: inset 0 0 0 1.5px var(--line); }
.form .wz-emoji:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); background: var(--brand-soft); }
.form .wz-logo-opt { font-size: .85rem; font-weight: 600; }
.wz input[type=range] { width: 100%; accent-color: var(--ink); margin-top: 8px; }
.wz-qr { width: 200px; margin: 10px auto 0; background: #fff; padding: 8px; border-radius: 12px; }
.wz-qr svg { display: block; width: 100%; height: auto; }
.wz-final { display: grid; gap: 8px; margin-top: 16px; }
.wz-skip { margin-top: 10px; }
.right-link { text-align: right; margin: 0 0 10px; }
.form input[type=file][hidden] { display: none !important; }
.form .wz-upload label.btn { display: inline-flex; margin: 0; }
@media (max-width: 859px) {
  .wz-phone { max-width: 290px; margin: 6px auto 14px; min-height: 0; font-size: .9rem; }
  .wz-phone .card { padding: 14px; }
  .wz-preview .wallet-preview { max-width: 320px; margin: 0 auto 4px; }
  .wz-preview > .muted { text-align: center; }
}

/* ---------- Estilo McDonald's: catálogo por niveles y cupones con foto ---------- */
.pts-next { margin: 0 0 12px; display: grid; gap: 6px; text-align: center; }
.pts-bar { height: 10px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; }
.pts-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent, var(--brand))); }
.catalog { margin: 18px 0; }
.catalog h2, .coupons h2 { display: flex; align-items: center; gap: 8px; }
.cat-level { margin: 0 0 14px; padding: 12px; border-radius: 18px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.cat-level:not(.ok) .cat-item { opacity: .62; }
.cat-level.ok { box-shadow: 0 0 0 2px var(--accent, var(--brand)), 0 6px 18px rgba(0,0,0,.08); }
.cat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 2px 10px; }
.cat-level.ok .cat-head .small { color: var(--ok); font-weight: 700; }
.cat-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 46%); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.cat-row.one { grid-auto-columns: 100%; }
.cat-item { scroll-snap-align: start; display: grid; gap: 6px; font-size: .92rem; }
.cat-photo { aspect-ratio: 4 / 3; border-radius: 14px; background: var(--brand-soft) center / cover; display: grid; place-items: center; font-size: 40px; }
.cat-tag { justify-self: start; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--ok); color: #fff; }
.cat-thumb { width: 52px; height: 40px; flex: none; border-radius: 8px; background: var(--brand-soft) center / cover; display: grid; place-items: center; font-size: 20px; }
.coupons { max-width: none; margin: 0 0 16px; display: block; }
.cp-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 82%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.cp-row:has(.cp-card:only-child) { grid-auto-columns: 100%; }
.cp-card { scroll-snap-align: start; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 2px var(--accent, #f59e0b), 0 8px 20px rgba(0,0,0,.1); }
.cp-card summary { list-style: none; cursor: pointer; }
.cp-card summary::-webkit-details-marker { display: none; }
.cp-photo { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand), var(--accent, #f59e0b)) center / cover; display: grid; place-items: center; font-size: 46px; }
.cp-body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.cp-body b { font-size: 1.05rem; }
.cp-exp { color: var(--warn); font-weight: 600; }
.cp-use { justify-self: start; margin-top: 4px; }
.cp-card[open] .cp-use { display: none; }
.cp-code { text-align: center; padding: 4px 14px 16px; border-top: 2px dashed var(--line); }
.cp-code img { display: block; margin: 6px auto; background: #fff; border-radius: 12px; padding: 8px; }
.cp-num { font-family: ui-monospace, Consolas, monospace; font-size: 1.3rem; font-weight: 700; margin: 0; }
.photo-pick { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.form .photo-pick label.btn { display: inline-flex; margin: 0; }
.photo-prev { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; }
/* En temas oscuros el color principal puede ser casi negro: botones y cifras van con el acento */
.page-oscuro .btn:not(.ghost), .page-neon .btn:not(.ghost) { background: var(--accent); color: #1c1917; }
.page-oscuro .pts-balance b, .page-neon .pts-balance b, .card.theme-oscuro .pts-balance b, .card.theme-neon .pts-balance b { color: var(--accent, #f5c451); }
.page-oscuro .pts-bar, .page-neon .pts-bar { background: rgba(255,255,255,.12); }

/* ---------- Apariencia del panel del dueño (panelLook) ---------- */
.panel .wrap { position: relative; z-index: 1; }
/* Logo de marca de agua en el centro de la pantalla */
.panel.has-mark::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--mark) center 55% / min(60vw, 420px) no-repeat; opacity: .09;
}
.panel.has-mark .list, .panel.has-mark .stats div, .panel.has-mark .box, .panel.has-mark .topbar { background-color: color-mix(in srgb, var(--surface) 78%, transparent); }
.panel.has-mark .list, .panel.has-mark .box, .panel.has-mark .stats div { backdrop-filter: blur(1px); }
/* Con los colores de mi marca */
.ps-marca { --bg: color-mix(in srgb, var(--brand) 7%, #f6f3ee); }
.ps-marca .topbar { background: linear-gradient(100deg, var(--brand), color-mix(in srgb, var(--brand) 62%, var(--accent)) 70%, var(--brand-deep)); border-color: transparent; }
.ps-marca .topbar .brandmark, .ps-marca .topbar .tabs a, .ps-marca .topbar .linkbtn { color: #fff; }
.ps-marca .topbar .tabs a { opacity: .85; }
.ps-marca .topbar .tabs a.active { background: rgba(255,255,255,.22); opacity: 1; color: #fff; }
.ps-marca .stats b { color: var(--brand); }
/* Oscuro con mis colores (usa las variables de .page-oscuro) */
.ps-oscuro .topbar { background: #141210; border-color: #2f2a26; }
.ps-oscuro .topbar .tabs a.active { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.ps-oscuro .stats b { color: var(--accent); }
.ps-oscuro .cbar i { background: var(--accent); }
.ps-oscuro .tag:not(.ok):not(.bad):not(.gold) { background: #2f2a26; color: var(--ink); }
.ps-oscuro .panel-sec.attention { background: #2a1d0f; border-color: #7c4a12; }
.ps-oscuro .cbar:hover::after { background: #f5f5f4; color: #1c1917; }
.ps-oscuro .wallet-preview, .ps-oscuro .pal { color: var(--ink); }
.ps-oscuro .pal { background: var(--surface); }
.ps-oscuro .chip.on, .ps-oscuro .pal.on { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.ps-oscuro .chip { color: var(--ink); }
.ps-oscuro .bar i { background: var(--accent); }
.ps-oscuro .seg label:has(input:checked), .ps-oscuro .form .wz-emoji:has(input:checked) { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- Ajustes: fondo de marca más notorio y marca de agua difuminada ---------- */
/* Marca de agua: un recuadro centrado con el logo que se desvanece hacia los bordes (sin cuadro marcado) */
.panel.has-mark::before, .biz.has-mark::before {
  inset: auto; left: 50%; top: 56%; transform: translate(-50%, -50%);
  width: min(70vw, 460px); height: min(70vw, 460px);
  background: var(--mark) center / contain no-repeat;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  filter: grayscale(.4);
}
.panel.has-mark::before { opacity: .1; }
.wz-phone.has-mark::before { top: 60%; width: 80%; height: 60%; }
/* Con los colores de mi marca: el fondo mezcla los dos colores con brillos */
body.ps-marca {
  --bg: color-mix(in srgb, var(--accent) 10%, color-mix(in srgb, var(--brand) 9%, #f7f5f1));
  background:
    radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.ps-marca .list, .ps-marca .stats div, .ps-marca .box, .ps-marca .optin { box-shadow: 0 1px 0 var(--line), 0 6px 18px color-mix(in srgb, var(--brand) 10%, transparent); }
.ps-marca h1, .ps-marca .panel-sec h2 { color: color-mix(in srgb, var(--brand) 70%, var(--ink)); }
body.ps-oscuro {
  background:
    radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* ---------- Niveles de tarjeta (VIP, Diamante…) ---------- */
.tier-badge { display: inline-block; vertical-align: middle; font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 2px 9px; border-radius: 99px; background: rgba(0,0,0,.07); color: var(--ink); white-space: nowrap; }
.tier-badge.tier-2 { background: linear-gradient(135deg, #f5d27a, #c9962b); color: #2b1d05; }
.tier-badge.tier-3 { background: linear-gradient(135deg, #e0f2fe, #7dd3fc 45%, #a5b4fc); color: #0c2340; }
.card .tier-badge { margin-left: 4px; }
.tier-edit { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px 4px; margin: 0 0 14px; }
.tier-edit legend { padding: 0 6px; }
.tier-edit legend .check { margin: 0; font-weight: 700; }
.tier-edit:has(legend input:not(:checked)) > :not(legend) { opacity: .45; }
.tier-pick select { padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; background: var(--surface); color: var(--ink); }

/* ---------- Prueba gratis (/prueba) y elegir plan ---------- */
.trial .result h1 { font-size: 1.8rem; }
.trial .hl { background: linear-gradient(transparent 58%, #fde68a 58%); padding: 0 4px; white-space: nowrap; }
.trial-perks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.trial-perks li { background: var(--surface); border-radius: 12px; padding: 10px 14px; box-shadow: 0 1px 0 var(--line); }
.trial .otp { text-align: center; font-size: 1.6rem; letter-spacing: .35em; font-weight: 700; }
.plan-choose { margin: 12px 0 0; padding: 12px; border-radius: 14px; background: var(--brand-soft); }
.form .plan-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 8px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 400; cursor: pointer; }
.form .plan-opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand); }
.plan-opt input { margin-top: 4px; accent-color: var(--brand); }
.trial-note a { font-weight: 700; }
.form input[type=radio] { display: inline-block; width: auto; margin: 4px 0 0; padding: 0; flex: none; }

/* Aviso de sellos por confirmar (public/panel.js) */
.pending-pop { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(380px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px #f59e0b, 0 14px 40px rgba(0,0,0,.25); animation: pp-in .3s ease; }
.pp-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-row > span:last-child { display: flex; gap: 6px; }
@keyframes pp-in { from { transform: translateY(20px); opacity: 0; } }

/* ---------- portada: vista de la tarjeta y planes ---------- */
.preview { margin: 26px 0 8px; }
.preview h2, .plans-home h2 { text-align: center; font-size: 1.15rem; margin: 0 0 12px; }
.plans-home { margin: 26px 0 8px; }
.plans { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 560px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border-radius: 16px; padding: 18px; box-shadow: 0 1px 0 var(--line); }
.plan.hl { outline: 2px solid var(--brand); }
.plan h3 { margin: 0 0 2px; }
.plan .price { font-size: 2rem; font-weight: 800; margin: 0 0 8px; }
.plan .price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.plan li { margin: 3px 0; }

/* ---------- invitación a la reseña de Google ---------- */
.gthanks { max-width: 440px; margin: 0 auto 16px; display: grid; gap: 10px; }
.gthanks p { margin: 0; }
