/* Base styles. Brand colours (--jungle, --mango, --coral) come from /brand.css, generated from brand.config.js. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2-variations"), url(/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format("woff2-variations"), url(/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format("woff2-variations"), url(/fonts/figtree-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format("woff2-variations"), url(/fonts/figtree-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #12201a;
  --mist: #edf2ee;
  --paper: #ffffff;
  --line: #d5dfd8;
  --muted: #56695f;
  --danger: #b5321b;
  --ok: #1b7a4a;
  --on-brand: #ffffff;
  --on-jungle: #ffffff;
  --mango-ink: #2b1d00;
  --radius: 14px;
  --display: "Bricolage Grotesque", "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eaf3ee; --mist: #0d1612; --paper: #15221c; --line: #2b4136; --muted: #a3b9ad;
    --danger: #ff8a73; --ok: #5fd39a; --on-jungle: #07130e; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eaf3ee; --mist: #0d1612; --paper: #15221c; --line: #2b4136; --muted: #a3b9ad;
  --danger: #ff8a73; --ok: #5fd39a; --on-jungle: #07130e; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 16px/1.5 var(--body); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--jungle-2); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--paper); color: var(--ink); padding: .6rem 1rem; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }

/* Buttons & fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem; border: 2px solid var(--jungle); background: var(--jungle); color: var(--on-jungle); border-radius: 999px; font: 700 1rem var(--body); cursor: pointer; text-decoration: none; transition: transform .08s ease, background .15s; }
.btn:hover { background: var(--jungle-2); border-color: var(--jungle-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--jungle); }
.btn.ghost:hover { background: color-mix(in srgb, var(--jungle) 10%, transparent); }
.btn.mango { background: var(--mango); border-color: var(--mango); color: var(--mango-ink); }
.btn.mango:hover { background: color-mix(in srgb, var(--mango) 85%, #fff); border-color: color-mix(in srgb, var(--mango) 85%, #fff); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.big { min-height: 58px; font-size: 1.15rem; padding: .8rem 1.6rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.f { display: block; margin-bottom: 1rem; font-weight: 600; font-size: .95rem; }
label.f > .hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .65rem .8rem; min-height: 44px; font: 400 1rem var(--body); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
}
textarea { min-height: 90px; resize: vertical; }
input[type=color] { width: 64px; height: 44px; padding: 2px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); margin-top: .3rem; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--jungle); margin: 0; flex: none; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; margin-bottom: .9rem; cursor: pointer; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.inline { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.err { color: var(--danger); font-weight: 600; min-height: 1.4em; margin: .25rem 0 .75rem; }

/* Panels */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }
.row > .panel + .panel { margin-top: 0; }
.pill { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: color-mix(in srgb, var(--jungle) 14%, transparent); color: var(--jungle-2); }
.pill.mango { background: color-mix(in srgb, var(--mango) 30%, transparent); color: #6b4700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.mango { color: var(--mango); } }
:root[data-theme="dark"] .pill.mango { color: var(--mango); }
.pill.off { background: var(--line); color: var(--muted); }

/* The stamp card: the memorable thing */
.loyalty {
  --cols: 5;
  background: var(--brand); color: var(--on-brand); border-radius: 22px; padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 30px -16px rgba(10, 30, 22, .55);
  position: relative; overflow: hidden;
}
.loyalty::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 105% -10%, rgba(255,255,255,.14), transparent 55%); pointer-events: none; }
.loyalty .head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .9rem; position: relative; z-index: 1; }
.loyalty .brand { font: 800 1.25rem var(--display); letter-spacing: -.01em; }
.loyalty .count { font: 700 .95rem var(--body); opacity: .9; white-space: nowrap; }
.stamps { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: .55rem; position: relative; z-index: 1; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  border: 2px dashed color-mix(in srgb, var(--on-brand) 50%, transparent); color: transparent; user-select: none;
}
.stamp.filled {
  border: 2px solid color-mix(in srgb, var(--on-brand) 85%, transparent); color: var(--on-brand);
  background: color-mix(in srgb, var(--on-brand) 16%, transparent);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--on-brand) 14%, transparent);
  transform: rotate(var(--r, 0deg));
}
.stamp.prize { border-style: solid; border-color: var(--mango); color: var(--mango); background: transparent; font-size: clamp(1.1rem, 4.5vw, 1.5rem); }
.stamp.fresh { animation: thud .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes thud { 0% { transform: scale(1.9) rotate(-16deg); opacity: 0; } 55% { transform: scale(.9) rotate(var(--r, 0deg)); opacity: 1; } 100% { transform: scale(1) rotate(var(--r, 0deg)); } }
.loyalty .reward { margin: .95rem 0 0; font-size: .95rem; position: relative; z-index: 1; opacity: .95; }
.loyalty .reward b { color: var(--mango); }
.pts { position: relative; z-index: 1; }
.pts .big { font: 800 3rem var(--display); line-height: 1; }
.pts .big small { font-size: 1.2rem; opacity: .8; font-weight: 600; }
.pbar { height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--on-brand) 22%, transparent); margin-top: .8rem; overflow: hidden; }
.pbar > i { display: block; height: 100%; background: var(--mango); border-radius: 99px; transition: width .5s ease; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--mist); padding: .8rem 1.2rem; border-radius: 12px; font-weight: 600; z-index: 50; max-width: min(92vw, 460px); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.bad { background: var(--danger); color: #fff; }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 700; padding: .5rem .6rem; border-bottom: 1.5px solid var(--line); }
table.t td { padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: color-mix(in srgb, var(--jungle) 6%, transparent); }
.tw { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Utilities (replace the old inline style= attributes; the CSP forbids them) */
.mt0 { margin-top: 0; } .mt1 { margin-top: 1rem; } .mt2 { margin-top: 1.4rem; } .mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 1rem; } .m0 { margin: 0; }
.center { text-align: center; } .between { justify-content: space-between; } .nowrap { flex-wrap: nowrap; } .grow { flex: 1; }
.gap { height: 1rem; } .w-auto { width: auto !important; display: inline-block !important; max-width: 9rem; } .maxw-320 { max-width: 320px; }
.ok-panel { border-color: var(--ok); }
.logo { font: 800 1.35rem var(--display); letter-spacing: -.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.logo { gap: .55rem; }
.logo .logo-mark { width: 44px; height: 44px; object-fit: contain; }
.banner { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-radius: 12px; margin: 0 0 1rem; font-weight: 600; background: color-mix(in srgb, var(--mango) 22%, var(--paper)); border: 1.5px solid var(--mango); }
.banner.bad { background: color-mix(in srgb, var(--danger) 12%, var(--paper)); border-color: var(--danger); }
.banner.info { background: color-mix(in srgb, var(--jungle) 10%, var(--paper)); border-color: var(--jungle); }
.draft { border: 2px dashed var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--paper)); padding: .8rem 1rem; border-radius: 12px; font-weight: 700; margin: 0 0 1.4rem; }
.theme-btn { background: transparent; border: 1.5px solid var(--line); color: var(--ink); border-radius: 999px; min-height: 36px; padding: .2rem .8rem; font: 600 .9rem var(--body); cursor: pointer; }

/* Tuan, the mascot (cross-fading layers; the fallback effects are plain CSS transforms) */
.tuan { position: relative; display: inline-block; aspect-ratio: 1 / 1; flex: none; line-height: 0; }
.tuan-layer { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 90%; }
.tuan-layer.on { opacity: 1; }
.tuan-layer.fx-flip { transform: scaleX(-1) rotate(calc(var(--tilt, 0deg) * -1)); }
.tuan-layer.fx-dim { filter: saturate(.7) brightness(.92); }
.tuan-layer img { position: absolute; max-width: none; display: block; user-select: none; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .tuan-layer { transition: none; } }
/* static pose used by server-rendered pages */
.tuan-static { display: inline-block; line-height: 0; }
.tuan-static img { width: 100%; height: auto; display: block; }
/* Tuan moments: loading screen, celebration and the thumbs-up toast */
.tuan-loading, .tuan-cheer { position: fixed; z-index: 70; left: 50%; bottom: 1.2rem; transform: translateX(-50%); display: flex; align-items: center; gap: .6rem; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: .5rem 1rem .5rem .6rem; box-shadow: 0 8px 28px rgba(0,0,0,.18); max-width: calc(100vw - 2rem); }
.tuan-loading, .tuan-cheer { pointer-events: none; }
.tuan-loading { top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.tuan-cheer { top: 1rem; bottom: auto; width: max-content; max-width: min(92vw, 28rem); }
.tuan-loading { width: max-content; max-width: min(92vw, 22rem); }
.toast.with-tuan { display: flex; align-items: center; gap: .5rem; padding-left: .4rem; bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .toast.with-tuan { bottom: 22px; } }
.tuan-hello { display: flex; align-items: center; gap: .7rem; margin: 1.2rem 0 0; }
.tuan-hello .bubble { background: var(--paper); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: .5rem .8rem; font-weight: 600; max-width: 24ch; }

/* Tours with Tuan: overlay, spotlight, bubble (positions are set from JS through the CSSOM) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tour-overlay { position: fixed; inset: 0; z-index: 1000; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(8, 18, 13, .68); outline: 3px solid var(--mango); outline-offset: 0; pointer-events: none; transition: left .25s, top .25s, width .25s, height .25s; }
.tour-spot[hidden] { display: block; visibility: hidden; }
.tour-overlay:has(.tour-spot[hidden]) { background: rgba(8, 18, 13, .68); }
.tour-dialog { position: fixed; display: flex; align-items: flex-end; gap: .4rem; max-width: min(560px, calc(100vw - 24px)); filter: drop-shadow(0 12px 28px rgba(0,0,0,.35)); }
.tour-dialog.flip { flex-direction: row-reverse; }
.tour-card { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; min-width: 260px; max-width: 380px; }
.tour-title { font-size: 1.15rem; margin: 0 0 .3rem; }
.tour-text { margin: 0 0 .8rem; line-height: 1.45; }
.tour-progress { margin: 0 0 .2rem; font-weight: 700; }
.tour-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.tour-actions .btn { min-height: 40px; padding: .4rem .9rem; }
.tour-off { margin-top: .6rem; font-size: .82rem; color: var(--muted); }
@media (max-width: 640px) {
  .tour-dialog.sheet { left: 0; right: 0; bottom: 0; top: auto; max-width: none; padding: 0 10px calc(10px + env(safe-area-inset-bottom)); align-items: flex-end; }
  .tour-dialog.sheet .tour-card { flex: 1; max-width: none; min-width: 0; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }

/* Help with Tuan: floating button and panel (bottom sheet on phones) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.help-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 900; display: inline-flex; align-items: flex-end; gap: .35rem; padding: .3rem .9rem .3rem .5rem; min-height: 52px; background: var(--paper); color: var(--ink); border: 2px solid var(--jungle); border-radius: 999px; font: 700 1rem var(--body); cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.2); }
.help-fab:hover { border-color: var(--mango); }
.help-fab[hidden] { display: none; }
.help-fab .tuan { margin-bottom: -2px; }
.help-fab-text { align-self: center; }
.help-panel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 950; width: min(400px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 48px rgba(0,0,0,.35); overflow: hidden; }
.help-panel[hidden] { display: none; }
.help-head { display: flex; align-items: flex-end; gap: .6rem; padding: .8rem .9rem .4rem; background: color-mix(in srgb, var(--mango) 18%, var(--paper)); position: relative; }
.help-head-text { flex: 1; min-width: 0; }
.help-head h2 { font-size: 1rem; margin: 0 0 .3rem; }
.help-head .bubble { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: .45rem .7rem; font-size: .9rem; font-weight: 600; }
.help-close { position: absolute; right: 8px; top: 6px; min-height: 36px; min-width: 36px; padding: 0; }
.help-body { padding: .8rem .9rem 1rem; overflow-y: auto; display: grid; gap: .7rem; align-content: start; }
.help-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.help-more { font-size: .85rem; margin-left: auto; }
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.help-item { width: 100%; text-align: left; display: grid; gap: .1rem; padding: .55rem .7rem; background: var(--mist); border: 1px solid var(--line); border-radius: 12px; color: inherit; font: inherit; cursor: pointer; }
.help-item:hover { border-color: var(--jungle-2); }
.help-article h3 { margin: .2rem 0 .4rem; } .help-article h4 { margin: .8rem 0 .2rem; font-size: .95rem; } .help-article p, .help-article li { font-size: .92rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--jungle-2); text-decoration: underline; font: inherit; cursor: pointer; }
.btn.small { min-height: 34px; padding: .2rem .7rem; font-size: .9rem; justify-self: start; }
@media (max-width: 640px) { .help-panel { right: 0; left: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: 20px 20px 0 0; } }
@media print { .help-fab, .help-panel, .tour-overlay { display: none !important; } }
/* Legal: cookie banner (only when optional analytics is on), renewal notice, report line */
.cookie-banner { position: fixed; z-index: 1000; left: 1rem; right: 1rem; bottom: 1rem; max-width: 34rem; margin-inline: auto; display: grid; gap: .6rem; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.cookie-banner .row { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookie-banner .row .btn { flex: 1 1 8rem; }
.renewal-note { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; background: color-mix(in srgb, var(--accent, #f5a623) 8%, var(--paper)); font-size: .92rem; }
.report-line { text-align: center; font-size: .8rem; margin: 1rem 0 2rem; }
fieldset.consents { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin: 0 0 1rem; }
.ok-note { background: color-mix(in srgb, var(--ok, #1f7a4d) 10%, var(--paper)); border-radius: 10px; padding: .6rem .8rem; }
.ok-note:empty { display: none; }

/* ───────── Card designs (colour, gradient, style, logo). Only loaded where the loyalty card is drawn: the digital menu does not use app.css ─────────
 * The JS sets --lc-bg / --on-brand / --lc-deco… from strict-hex design data. Ornaments are drawn with CSS masks (tiny inline SVG shapes) in the
 * automatic tone --lc-deco, with transparency, BEHIND the text and the stamps (they are z-index 0; the content is z-index 1). */
.loyalty { background: var(--lc-bg, var(--brand)); }
.loyalty .reward b { color: var(--lc-accent, var(--mango)); }
.stamp.prize { border-color: var(--lc-accent, var(--mango)); color: var(--lc-accent, var(--mango)); }
.lc-logo { width: 36px; height: 36px; flex: none; align-self: center; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.94); padding: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.lc-logo ~ .brand { margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.loyalty .head { min-height: 2.2rem; }
.stamp-logo { width: 78%; height: 78%; object-fit: contain; border-radius: 50%; display: block; }
.loyalty.lc-low .head, .loyalty.lc-low .reward { background: var(--lc-scrim); border-radius: 10px; padding-inline: .5rem; }
/* every decorated style replaces the original soft highlight */
.loyalty[data-style]:not([data-style="original"])::after { display: none; }
.loyalty[data-style]:not([data-style="original"]) { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 30px -16px rgba(10, 30, 22, .55); }
.loyalty[data-style]:not([data-style="original"])::before { content: ""; position: absolute; pointer-events: none; z-index: 0; }

/* clásica: white line inside the edge */
.loyalty[data-style="clasica"]::before { inset: 8px; border: 1.5px solid var(--lc-deco-strong); border-radius: 16px; }
.loyalty[data-style="clasica"] { padding: 1.3rem 1.3rem 1.4rem; }

/* corazones / estrellas / lunares / rayas: a soft pattern in the auto tone */
.loyalty[data-style="corazones"]::before, .loyalty[data-style="estrellas"]::before { inset: 0; background: var(--lc-deco); -webkit-mask-repeat: repeat; mask-repeat: repeat; opacity: .8; }
.loyalty[data-style="corazones"]::before { -webkit-mask-size: 46px 46px; mask-size: 46px 46px; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cpath transform='translate(2 0) scale(0.9)' d='M12 21s-8-5.2-8-11C4 6.800 6.400 5 9 5c1.500 0 2.600.8 3 1.900C12.400 5.800 13.500 5 15 5c2.600 0 5 1.800 5 5 0 5.800-8 11-8 11z' fill='%23000'/%3E%3Cpath transform='translate(26 24) scale(0.7)' d='M12 21s-8-5.2-8-11C4 6.800 6.400 5 9 5c1.500 0 2.600.8 3 1.900C12.400 5.800 13.500 5 15 5c2.600 0 5 1.800 5 5 0 5.800-8 11-8 11z' fill='%23000'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cpath transform='translate(2 0) scale(0.9)' d='M12 21s-8-5.2-8-11C4 6.800 6.400 5 9 5c1.500 0 2.600.8 3 1.900C12.400 5.800 13.500 5 15 5c2.600 0 5 1.800 5 5 0 5.800-8 11-8 11z' fill='%23000'/%3E%3Cpath transform='translate(26 24) scale(0.7)' d='M12 21s-8-5.2-8-11C4 6.800 6.400 5 9 5c1.500 0 2.600.8 3 1.900C12.400 5.800 13.500 5 15 5c2.600 0 5 1.800 5 5 0 5.800-8 11-8 11z' fill='%23000'/%3E%3C/svg%3E"); }
.loyalty[data-style="estrellas"]::before { -webkit-mask-size: 40px 40px; mask-size: 40px 40px; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M11.0 4.0 L12.9 8.5 L17.7 8.8 L14.0 12.0 L15.1 16.7 L11.0 14.2 L6.9 16.7 L8.0 12.0 L4.3 8.8 L9.1 8.5z' fill='%23000'/%3E%3Cpath d='M30.0 23.0 L31.3 26.2 L34.8 26.5 L32.1 28.7 L32.9 32.0 L30.0 30.2 L27.1 32.0 L27.9 28.7 L25.2 26.5 L28.7 26.2z' fill='%23000'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M11.0 4.0 L12.9 8.5 L17.7 8.8 L14.0 12.0 L15.1 16.7 L11.0 14.2 L6.9 16.7 L8.0 12.0 L4.3 8.8 L9.1 8.5z' fill='%23000'/%3E%3Cpath d='M30.0 23.0 L31.3 26.2 L34.8 26.5 L32.1 28.7 L32.9 32.0 L30.0 30.2 L27.1 32.0 L27.9 28.7 L25.2 26.5 L28.7 26.2z' fill='%23000'/%3E%3C/svg%3E"); }
.loyalty[data-style="lunares"]::before { inset: 0; background-image: radial-gradient(circle, var(--lc-deco) 0 2.5px, transparent 3px); background-size: 24px 24px; opacity: .65; }
.loyalty[data-style="rayas"]::before { inset: 0; background: repeating-linear-gradient(135deg, var(--lc-deco) 0 7px, transparent 7px 20px); opacity: .6; }

/* olas: waves along the bottom edge (extra room is reserved so they never sit under the reward text) */
.loyalty[data-style="olas"] { padding-bottom: 2.6rem; }
.loyalty[data-style="olas"]::before, .loyalty[data-style="olas"]::after { display: block; content: ""; position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; background: var(--lc-deco); -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-size: 120px 26px; mask-size: 120px 26px; -webkit-mask-position: bottom; mask-position: bottom; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' viewBox='0 0 120 26'%3E%3Cpath d='M0 13 Q15 1 30 13 T60 13 T90 13 T120 13 V26 H0z' fill='%23000'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' viewBox='0 0 120 26'%3E%3Cpath d='M0 13 Q15 1 30 13 T60 13 T90 13 T120 13 V26 H0z' fill='%23000'/%3E%3C/svg%3E"); height: 26px; top: auto; inset: auto 0 0 0; }
.loyalty[data-style="olas"]::after { height: 18px; opacity: .6; -webkit-mask-position: 40px bottom; mask-position: 40px bottom; }

/* brillo: gradient with a diagonal sparkle */
.loyalty[data-style="brillo"]::before { inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 34%, rgba(255,255,255,0) 60%, rgba(255,255,255,.18) 78%, rgba(255,255,255,0) 100%), radial-gradient(circle at 12% 0%, rgba(255,255,255,.35), transparent 42%); }

/* cupón: ticket with side notches and a dashed tear line under the header */
.loyalty[data-style="cupon"] { border-radius: 14px; box-shadow: none; -webkit-mask: radial-gradient(circle 10px at 0 3.55rem, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% 3.55rem, transparent 97%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle 10px at 0 3.55rem, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% 3.55rem, transparent 97%, #000) right / 51% 100% no-repeat; }
.loyalty[data-style="cupon"]::before { left: 16px; right: 16px; top: 3.55rem; border-top: 2px dashed var(--lc-deco-strong); }

/* neón: dark card with a glowing border in the chosen colour */
.loyalty[data-style="neon"] { box-shadow: 0 0 0 2px var(--lc-glow), 0 0 22px color-mix(in srgb, var(--lc-glow) 65%, transparent), inset 0 0 22px color-mix(in srgb, var(--lc-glow) 22%, transparent); }
.loyalty[data-style="neon"] .stamp.filled { border-color: var(--lc-glow); background: color-mix(in srgb, var(--lc-glow) 22%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--lc-glow) 70%, transparent); }
.loyalty[data-style="neon"] .stamp { border-color: color-mix(in srgb, var(--lc-glow) 55%, transparent); }
.loyalty[data-style="neon"]::before { inset: 0; background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--lc-glow) 28%, transparent), transparent 55%); }

/* cristal: translucent glass with a frosted edge */
.loyalty[data-style="cristal"] { background: var(--lc-bg-glass, var(--lc-bg)); border: 1px solid rgba(255,255,255,.5); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 28px -14px rgba(10,30,22,.45); }
.loyalty[data-style="cristal"]::before { inset: 0; background: radial-gradient(circle at 15% 0%, rgba(255,255,255,.38), transparent 45%), radial-gradient(circle at 100% 100%, rgba(255,255,255,.22), transparent 50%); }

/* minimalista: flat, thin accent line */
.loyalty[data-style="minimal"] { border-radius: 14px; box-shadow: 0 6px 18px -12px rgba(10,30,22,.5); }
.loyalty[data-style="minimal"]::before { left: 0; right: 0; top: 0; height: 3px; background: var(--lc-accent, var(--mango)); }
.loyalty[data-style="minimal"] .head { padding-bottom: .7rem; border-bottom: 1px solid var(--lc-deco-strong); }

/* sello grande: a huge faint stamp (with a soft halo)
 */
.loyalty[data-style="sello"]::before { inset: 0; background: radial-gradient(circle at 50% 52%, var(--lc-deco), transparent 62%); }
/* the stamp itself: (emoji or logo) in the middle, behind everything */
.loyalty .lc-mark { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-10deg); font-size: clamp(7rem, 38vw, 11rem); line-height: 1; opacity: .14; pointer-events: none; z-index: 0; user-select: none; filter: grayscale(.2); }
.loyalty .lc-mark img { width: 1.1em; height: 1.1em; object-fit: contain; display: block; }
@media (prefers-reduced-motion: reduce) { .loyalty .stamp.fresh { animation: none; } }
