/* Again & Again — app and marketing styles, built on the Again & Again design system (Stamp Blue, Elms Sans). */
:root {
  /* Again & Again design system tokens (see the design system artifact) */
  --ink: #171a2b;
  --ink-2: #3a3d52;
  --muted: #595c6e;
  --line: #e2ddd0;
  --line-2: #efebe3;
  --line-strong: #8c877b;
  --paper: #faf8f3;
  --paper-2: #f1eee6;
  --white: #ffffff;
  --stamp: #2b45d6;
  --stamp-dark: #1a2c99;
  --stamp-soft: #e6eaff;
  --butter: #ffc530;
  --butter-dark: #c99200;
  --butter-soft: #fff3cc;
  --mint: #067646;
  --mint-soft: #dcf5e9;
  --pop: #ff4f8b;
  --sky: #2b45d6;
  --danger: #c42b3a;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(23, 26, 43, .06), 0 8px 24px rgba(23, 26, 43, .08);
  --shadow-lg: 0 2px 4px rgba(23, 26, 43, .06), 0 16px 40px rgba(23, 26, 43, .14);
  --ledge: 0 4px 0 #d6d0c2;
  --emoji: 'Noto Color Emoji';
  --display: 'Elms Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif, var(--emoji);
  --text: 'Elms Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif, var(--emoji);
  --mono: 'Space Mono', ui-monospace, Menlo, monospace, var(--emoji);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--text); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 16px; font-weight: 400; word-spacing: -0.08em; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { word-spacing: inherit; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; word-spacing: -0.12em; margin: 0 0 .5em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.03em; font-weight: 600; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); letter-spacing: .08em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- buttons & forms ---------- */
.btn { --bg: var(--ink); --fg: #fff; --edge: #000; display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.3em; border-radius: var(--radius-sm); border: 2px solid var(--bg); background: var(--bg); color: var(--fg); font: 600 1rem/1.1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: 0 4px 0 var(--edge); transform: translateY(0); transition: transform 80ms ease-out, box-shadow 80ms ease-out, filter .15s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.btn:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(1); }
.btn-stamp { --bg: var(--stamp); --edge: var(--stamp-dark); }
.btn-ghost { --bg: var(--white); --fg: var(--ink); --edge: #d6d0c2; border-color: var(--line-strong); }
.btn-ghost:hover { filter: none; background: var(--paper); }
.btn-mint { --bg: var(--mint); --edge: #04512f; }
.btn-butter { --bg: var(--butter); --fg: var(--ink); --edge: var(--butter-dark); }
.btn-danger { --bg: var(--white); --fg: var(--danger); --edge: #f1c7c9; border-color: #e9a6ac; }
.btn-lg { padding: 1em 1.6em; font-size: 1.08rem; border-radius: 16px; }
.btn-xl { padding: 1.15em 1.6em; font-size: 1.25rem; border-radius: 18px; width: 100%; }
.btn-sm { padding: .5em .9em; font-size: .875rem; border-radius: 10px; box-shadow: 0 3px 0 var(--edge); }
.btn-sm:active { transform: translateY(3px); }
.btn-block { width: 100%; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35em; }
.field { margin-bottom: 1.1rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .3em; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: .8em .95em; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: 400 1rem var(--text); color: var(--ink); transition: border-color .15s, box-shadow .15s; border-width: 2px; border-color: var(--line-strong);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 4px rgba(43, 69, 214, .16); }
textarea { min-height: 100px; resize: vertical; }
input[type=color] { width: 52px; height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; background: #fff; cursor: pointer; }
.check { display: flex; gap: .6em; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--ink-2); }
.check input { margin-top: .25em; width: 18px; height: 18px; accent-color: var(--stamp); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.alert { padding: .85em 1.1em; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .95rem; }
.alert-error { background: #fde4de; color: #8a2414; }
.alert-ok { background: var(--mint-soft); color: #0c5c3e; }
.alert-info { background: var(--butter-soft); color: #6b4e00; }

.pill { display: inline-flex; align-items: center; gap: .4em; padding: .3em .75em; border-radius: 999px; background: var(--stamp-soft); color: var(--stamp-dark); font-weight: 600; font-size: .82rem; }
.pill-mint { background: var(--mint-soft); color: var(--mint); }
.pill-ink { background: var(--ink); color: #fff; }

/* ---------- marketing nav / footer ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 249, 242, .88); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand img { display: block; height: 32px; width: auto; }
.brand:focus-visible { outline: 3px solid var(--stamp); outline-offset: 4px; border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--ink-2); font-size: .95rem; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { color: #fff; }
@media (max-width: 820px) { .nav-links .hide-m { display: none; } .nav-links { gap: 14px; } }
@media (max-width: 560px) { .nav .brand img { height: 26px; } .nav-inner { gap: 12px; height: 60px; } .hero-ctas .btn { flex: 1 1 100%; } }

.footer { border-top: 1px solid var(--line); padding: clamp(56px, 7vw, 88px) 0 48px; margin-top: 0; font-size: .92rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-family: var(--text); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5em; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- marketing sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.eyebrow { display: inline-block; font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--stamp); margin-bottom: 1em; }
.lead { font-size: clamp(1.08rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 36em; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }
.section-head.center .lead { margin-inline: auto; }
.bg-ink { background: var(--ink); color: #f5f0ea; }
.bg-ink .lead, .bg-ink .muted { color: #b9b0a6; }
.bg-ink h2 { color: #fff; }
.bg-cream { background: var(--paper-2); }

.hero { padding: 48px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--stamp); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ''; position: absolute; left: -2%; right: -2%; bottom: .05em; height: .18em; background: var(--butter); z-index: -1; border-radius: 4px; transform: rotate(-1deg); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero-proof { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: .92rem; }
.hero-proof span::before { content: '✓'; color: var(--mint); font-weight: 800; margin-right: .4em; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 24px; } }

/* phone mockup */
.phone { width: 300px; max-width: 100%; margin: 0 auto; aspect-ratio: 9 / 19; background: #0f0e0d; border-radius: 46px; padding: 12px; box-shadow: var(--shadow-lg), inset 0 0 0 2px #3a3633; position: relative; transform: rotate(2deg); }
.phone-screen { height: 100%; border-radius: 36px; overflow: hidden; background: linear-gradient(180deg, #f4efe9, #ece5dc); padding: 44px 14px 14px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.phone-screen::before { content: ''; position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 90px; height: 26px; border-radius: 20px; background: #0f0e0d; }
.phone-time { position: absolute; top: 12px; left: 26px; font-weight: 600; font-size: .8rem; }
.wallet-title { font-family: var(--display); font-weight: 600; font-size: 1.5rem; padding: 0 4px; margin-top: 30px; }
.phone .lcard-foot { font-size: .7rem; margin-top: 10px; }
.phone .lcard-biz { font-size: .9rem; white-space: nowrap; }
.phone .lcard-prog { font-size: .72rem; }
.phone .lcard-top { gap: 9px; }
.phone .lcard-logo { width: 36px; height: 36px; font-size: 18px; }
.notif { position: absolute; top: 46px; left: 12px; right: 12px; z-index: 3; background: rgba(255, 255, 255, .94); border-radius: 18px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; font-size: .78rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); opacity: 0; transform: translateY(-8px); transition: all .4s ease; }
.notif.show { opacity: 1; transform: none; }
.notif b { display: block; font-size: .8rem; }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; flex: none; font-size: 1rem; }

/* landing hero: centred, with one 3D showcase card that keeps changing its design */
.hero-center { text-align: center; padding: clamp(48px, 9vw, 128px) 0 clamp(72px, 10vw, 136px); }
.hero-center h1 { max-width: 13em; margin: 0 auto; text-wrap: balance; }
.hero-kicker { margin: 0 0 14px; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--stamp); }
.hero-center .lead { max-width: 36em; margin: clamp(20px, 2.4vw, 28px) auto 0; }
.hero-center .hero-ctas { justify-content: center; margin: clamp(28px, 3.4vw, 40px) 0 0; }
.showcase { --lift: 0px; width: min(420px, 100%); margin: clamp(56px, 8vw, 104px) auto 0; perspective: 1100px; }
.showcase-tilt { display: grid; align-items: center; transform: translateY(calc(var(--lift) * -1)) rotateX(var(--rx, 6deg)) rotateY(var(--ry, -10deg)); transform-style: preserve-3d; will-change: transform; }
.showcase-glare { position: absolute; inset: calc(-1 * var(--notch, 0px)) 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at var(--gx, 40%) var(--gy, 30%), rgba(255, 255, 255, .4), rgba(255, 255, 255, .08) 30%, transparent 58%),
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .22) 47%, rgba(255, 255, 255, .04) 53%, transparent 62%) var(--gx, 40%) 0 / 260% 100% no-repeat; }
.showcase-shadow { width: 76%; height: 36px; margin: 22px auto 0; background: radial-gradient(closest-side, rgba(23, 26, 43, .34), transparent); filter: blur(5px); transform: scale(calc(1 - var(--lift) / 50)); }
.showcase-caption { margin: 10px 0 0; color: var(--ink-2); font-size: .95rem; }
/* ---------- THE loyalty card component ---------- */
/* The ticket notches down the left edge stay clear of the rounded corners: a transparent top and
   bottom border (--notch; padding is reduced to match) is kept solid, and the notches are spaced
   to fit exactly between the two (mask-repeat: round). Each notch starts 8px into its 30px slot, so
   --notch + 8px must be at least the corner radius. */
.lcard { --c: #1c1917; --a: #2b45d6; --fg: #fff; --notch: 16px; background: var(--c); color: var(--fg); text-align: left; border-radius: 24px; border-block: var(--notch) solid transparent; padding: calc(18px - var(--notch)) 18px calc(16px - var(--notch)) 24px;
  -webkit-mask-image: radial-gradient(circle 7px at 0 50%, #0000 96%, #000 100%), linear-gradient(#000 0 0), linear-gradient(#000 0 0); mask-image: radial-gradient(circle 7px at 0 50%, #0000 96%, #000 100%), linear-gradient(#000 0 0), linear-gradient(#000 0 0);
  -webkit-mask-position: 0 0, top, bottom; mask-position: 0 0, top, bottom;
  -webkit-mask-size: 100% 30px, 100% calc(var(--notch) + 2px), 100% calc(var(--notch) + 2px); mask-size: 100% 30px, 100% calc(var(--notch) + 2px), 100% calc(var(--notch) + 2px); /* the strips overlap the body a little, so no seam */
  -webkit-mask-repeat: no-repeat round, no-repeat, no-repeat; mask-repeat: no-repeat round, no-repeat, no-repeat;
  -webkit-mask-origin: padding-box, border-box, border-box; mask-origin: padding-box, border-box, border-box;
  /* the notches are clipped to the card's outer edge: a padding-box clip would follow the padding box's own small
     inner corner radius and leave a bite at each end of the strips. Repeats outside the padding box fall under the strips. */
  -webkit-mask-clip: border-box, border-box, border-box; mask-clip: border-box, border-box, border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 14px 34px rgba(0, 0, 0, .18); position: relative; isolation: isolate; }
.lcard::before { content: ''; position: absolute; inset: calc(-1 * var(--notch)) 0; border-radius: inherit; background: radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%); z-index: -1; }
.lcard-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.lcard-logo { width: 42px; height: 42px; border-radius: 50%; background: var(--a); display: grid; place-items: center; font-size: 22px; flex: none; overflow: hidden; }
.lcard-logo.none { display: none; }
/* no logo and no logo icon: the shop's initial, in the card's font */
.lcard-initial { font-family: var(--ff, var(--display)); font-weight: 700; font-size: 1.05em; line-height: 1; color: var(--afg, #fff); }
.lcard-logo img { width: 100%; height: 100%; object-fit: cover; }
.lcard-biz { font-weight: 600; font-size: 1.02rem; line-height: 1.15; }
.lcard-prog { font-size: .78rem; opacity: .75; }
/* the shop and card names take the whole width beside the logo */
.lcard-names { flex: 1; min-width: 0; }
.lcard-stamps { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 9px; container-type: inline-size; }
.st { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(12px, calc(46cqi / var(--cols, 5)), 34px); border: 2px dashed color-mix(in srgb, var(--fg) 38%, transparent); background: color-mix(in srgb, var(--fg) 7%, transparent); position: relative; }
.st.on { background: var(--a); border: 0; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--c) 35%, var(--a)), inset 0 0 0 6px var(--a), inset 0 0 0 7.5px rgba(255, 255, 255, .45); }
.st.on span { transform: rotate(-12deg); }
.st.reward { border-color: var(--butter); border-style: solid; }
.st.reward.on { background: var(--butter); border: 0; box-shadow: inset 0 0 0 3px var(--butter-dark); }
.st .gift { opacity: .9; }
.st.pop { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { 0% { transform: scale(.2) rotate(-40deg); opacity: 0; } 60% { transform: scale(1.18) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
/* Reward slots close each row and are never stamped. Three states, each changing outline, fill and icon:
   not yet earned  dashed gold outline, no fill, icon grey and faded (like an empty stamp, but gold)
   ready to claim  solid gold disc, full-colour icon a little larger, soft pulsing glow
   claimed         thin solid outline, faint fill, faded icon, green tick badge */
.st.rw { border: 2px dashed color-mix(in srgb, var(--butter) 60%, transparent); background: transparent; }
.st.rw span { opacity: .4; filter: grayscale(1); transition: opacity .3s, filter .3s, transform .3s; }
.st.rw.ready { border: 0; background: var(--butter); box-shadow: 0 0 0 3px color-mix(in srgb, var(--butter) 40%, transparent), 0 0 18px color-mix(in srgb, var(--butter) 70%, transparent); animation: rw-glow 1.8s ease-in-out infinite; }
.st.rw.ready span { opacity: 1; filter: none; transform: scale(1.08); }
.st.rw.ready.pop { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1), rw-glow 1.8s ease-in-out .6s infinite; }
.st.rw.claimed { border: 1.5px solid color-mix(in srgb, var(--fg) 30%, transparent); background: color-mix(in srgb, var(--fg) 10%, transparent); }
.st.rw.claimed span { opacity: .55; filter: grayscale(.7); }
.st.rw.claimed::after { content: '✓'; position: absolute; right: -3px; bottom: -3px; width: 40%; height: 40%; border-radius: 50%; background: var(--mint); color: #fff; box-shadow: 0 0 0 2px var(--c); display: grid; place-items: center; font-size: max(9px, calc(18cqi / var(--cols, 5))); font-weight: 700; }
@keyframes rw-glow { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--butter) 30%, transparent), 0 0 26px color-mix(in srgb, var(--butter) 85%, transparent); } }
@media (prefers-reduced-motion: reduce) { .st.rw.ready, .st.rw.ready.pop { animation: none; } }
.lcard-biz { font-family: var(--ff, var(--display)), var(--emoji); }
/* the reward legend: every reward side by side with some space, wrapping when the card is narrow */
.lcard-foot .reward-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; }
.lcard-extra { display: contents; }
.lcard-extra > span { font-size: .88em; opacity: .8; }
.lcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .8rem; gap: 10px; }
.lcard-foot .reward-text { opacity: .9; }
.lcard.mini { --notch: 10px; padding: calc(12px - var(--notch)) 12px; border-radius: 16px; }
.lcard.mini .lcard-top { margin-bottom: 10px; }
.lcard.mini .lcard-logo { width: 30px; height: 30px; font-size: 15px; }
.lcard.mini .st { font-size: clamp(12px, calc(40cqi / var(--cols, 5)), 26px); }

/* ---------- feature / step cards ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 24px; width: 34px; height: 34px; border-radius: 50%; background: var(--stamp); color: #fff; font: 700 1rem/34px var(--display); text-align: center; transform: rotate(-10deg); }
.step-visual { height: 120px; border-radius: 12px; background: var(--paper-2); margin-bottom: 18px; display: grid; place-items: center; font-size: 3rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--stamp-soft); margin-bottom: 14px; }
.feature h3 { font-size: 1.12rem; margin-bottom: .35em; }
.feature p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.bg-ink .feature { background: #282320; border-color: #3a3431; }
.bg-ink .feature p { color: #c9c0b6; }
.bg-ink .feature .ico { background: #3a2a24; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.problem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.problem > div { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px dashed #d8cbbb; }
.problem .big { font-family: var(--display); font-size: 2.2rem; font-weight: 600; color: var(--stamp); line-height: 1; margin-bottom: .3em; }
@media (max-width: 860px) { .problem { grid-template-columns: 1fr; } }

/* split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.ticks { list-style: none; padding: 0; margin: 0 0 1.5em; }
.ticks li { padding-left: 1.9em; position: relative; margin-bottom: .7em; }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 1.35em; height: 1.35em; border-radius: 50%; background: var(--mint-soft); color: var(--mint); font-weight: 800; font-size: .85em; display: grid; place-items: center; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 600; font-size: 1.08rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--stamp); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

.cta-band { background: var(--stamp); color: #fff; border-radius: 28px; padding: 56px 40px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band .btn { --bg: #fff; --fg: var(--ink); }
.cta-band::before, .cta-band::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .35); }
.cta-band::before { top: -60px; left: -40px; }
.cta-band::after { bottom: -70px; right: -30px; }

.vertical-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.vertical-chips a { text-decoration: none; background: #fff; border: 1px solid var(--line); padding: .55em 1em; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.vertical-chips a:hover { border-color: var(--ink); }

.table-scroll { overflow-x: auto; }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { color: #fff; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-box { width: min(420px, 100%); }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-tag { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.1; max-width: 13em; text-wrap: balance; }
.auth-brand { display: none; margin-bottom: 28px; }
@media (max-width: 860px) { .auth-brand { display: block; } }

/* ---------- app shell ----------
   One top bar for every screen size. Desktop: logo, the pages inline, then Stamp a card and the account menu.
   Phones: logo and the menu (which then holds the pages), and Stamp a card as a bar at the thumb. */
:root { --wrap: 1120px; }
.app { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 243, .86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line-2); }
.topbar-in { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 28px; }
.topbar .brand img { height: 26px; display: block; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.topnav a:hover { background: var(--paper-2); color: var(--ink); }
.topnav a[aria-current] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-stamp { box-shadow: 0 3px 0 var(--edge); }
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 3px; padding-right: 12px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: #fff; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { border-color: var(--line-strong); }
.menu summary:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }
.menu-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--stamp-soft); color: var(--stamp-dark); font-weight: 700; font-size: .8rem; }
.menu-bars { width: 14px; height: 10px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; color: var(--ink-2); }
.menu-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--paper); }
.menu-list a[aria-current] { font-weight: 600; }
.menu-nav { display: grid; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.menu-who { padding: 10px 12px 12px; display: grid; gap: 2px; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.menu-who b { color: var(--ink); font-size: 1rem; }
.main { max-width: var(--wrap); margin: 0 auto; padding: 32px 20px 72px; min-width: 0; }
.main-narrow { max-width: 600px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.stamp-bar { display: none; }
/* desktop: the pages are in the bar, so the menu only holds the account */
@media (min-width: 761px) { .menu-nav .in-bar { display: none; } }
@media (max-width: 760px) {
  .topbar-in { height: 58px; padding: 0 16px; }
  .topnav, .top-stamp { display: none; }
  .main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .stamp-bar { display: block; position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; text-align: center; padding: 16px; border-radius: 18px; background: var(--stamp); color: #fff; font-weight: 600; font-size: 1.1rem; text-decoration: none; box-shadow: 0 4px 0 var(--stamp-dark), 0 12px 30px rgba(43, 69, 214, .35); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
}

/* ---------- overview: hello, what's left to set up, then the card and the counter sign side by side ---------- */
.ov-top { margin-bottom: 24px; }
.ov-top h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0; letter-spacing: -0.02em; }
.ov-top p { margin: 4px 0 0; color: var(--muted); }
.setup { margin-bottom: 24px; padding: 20px 22px; }
.setup-head { display: flex; align-items: baseline; justify-content: space-between; }
.setup-head h2 { margin: 0; font-size: 1.05rem; }
.setup-count { font-size: .85rem; color: var(--muted); font-weight: 600; }
.setup-bar { height: 6px; border-radius: 6px; background: var(--line-2); margin: 12px 0 6px; overflow: hidden; }
.setup-bar i { display: block; height: 100%; background: var(--mint); border-radius: 6px; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.setup-list li:first-child { border-top: 0; }
.setup-list form { margin: 0; }
.setup-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.setup-list .btn { white-space: nowrap; }
.setup-dot.done { background: var(--mint); border-color: var(--mint); color: #fff; display: grid; place-items: center; font-size: .65rem; font-weight: 800; }
.setup-done { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 10px; }
.setup-done summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--muted); }
.setup-done .setup-list li { color: var(--muted); padding: 8px 0; }

/* staff access */
.lead-sm { margin: -12px 0 22px; color: var(--ink-2); max-width: 40em; }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--stamp-soft); color: var(--stamp-dark); font-size: .85rem; margin-right: 10px; vertical-align: 2px; }
.panel.is-off { opacity: .6; }
.copy-row input { font-family: ui-monospace, Menlo, monospace; font-size: .88rem; }
.share-btn { margin-top: 10px; }
.ov-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .ov-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } }
.ov-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.ov-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.ov-panel-head h2 { margin: 0; font-size: 1.1rem; }
.ov-panel-head p { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.ov-stage { flex: 1; display: grid; place-items: center; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px); }
.ov-stage-card { background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--bc) 22%, #fff), color-mix(in srgb, var(--bc) 6%, var(--paper)) 80%); }
.ov-stage-card .lcard { width: min(420px, 100%); }
.ov-stage-sign { background: var(--paper-2); padding-bottom: 8px; }
.ov-stage-sign .poster-fit { width: min(300px, 100%); }
.edit-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); background: #fff; }
.edit-btn:hover { color: var(--ink); border-color: var(--ink-2); background: var(--paper); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: .8em; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
/* panels side by side on wider screens, stacked on phones */
.cols, .cols-even { display: grid; gap: 20px; align-items: start; }
.cols > .panel + .panel, .cols-even > .panel + .panel { margin-top: 0; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .cols-even { grid-template-columns: 1fr 1fr; } }


.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--paper-2); }
.feed .when { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }


table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px; border-bottom: 1px solid var(--line-2); }
table.list tr:hover td { background: var(--paper); }
table.list a { text-decoration: none; font-weight: 600; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--stamp); }

.banner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--butter-soft); border: 1px solid #f5dc8f; margin-bottom: 18px; font-size: .95rem; flex-wrap: wrap; }
.banner .grow { min-width: 200px; }

/* stamp screen */
.paused { text-align: center; padding: 40px 24px; display: grid; justify-items: center; gap: 4px; }
.paused-icon { font-size: 2.4rem; margin-bottom: 8px; }
.paused h2 { margin: 0; }
.paused p { color: var(--ink-2); max-width: 26em; margin: 6px 0 14px; }
.stamp-wrap { max-width: 560px; margin: 0 auto; }
.scanner { position: relative; border-radius: 24px; overflow: hidden; background: #0f0e0d; aspect-ratio: 1; display: grid; place-items: center; color: #fff; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border-radius: 24px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); outline: 3px solid rgba(255, 255, 255, .9); }
.scanner .scan-msg { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: .9rem; opacity: .9; }
.scanner .start { position: absolute; inset: 0; display: grid; place-items: center; gap: 12px; text-align: center; padding: 24px; }
.code-entry { display: flex; gap: 10px; margin-top: 14px; }
.code-entry input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--text); font-size: .95rem; }
.code-entry input { font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .12em; font-size: 1.2rem; text-align: center; }
.result { margin-top: 18px; }
.stamp-confirm { margin-top: 16px; display: grid; gap: 10px; }
.stamp-confirm[hidden] { display: none; }
.stamp-last { padding: 8px 12px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); font-weight: 600; }
.stamp-last.recent { background: #FFE9A8; color: #6B4A00; box-shadow: 0 0 0 2px #F2B544; }
.result .who { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.result .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--stamp-soft); color: var(--stamp-dark); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.reward-due { margin-top: 16px; display: grid; gap: 8px; padding: 12px; border-radius: 18px; background: var(--butter-soft); border: 1.5px solid color-mix(in srgb, var(--butter-dark) 35%, transparent); }
.reward-due-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px; color: #6b4e00; font-size: .9rem; }
.reward-due-head b { font-size: 1rem; color: var(--ink); }
.reward-due-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(23, 26, 43, .06); }
.reward-due-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--butter); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.reward-due-name { flex: 1; min-width: 0; font-weight: 600; line-height: 1.25; }
.reward-due-row .btn { flex: none; }
/* Toasts: near the bottom, as wide as they need (up to 420px) so short messages stay on one line. */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; width: fit-content; max-width: 420px; translate: 0 20px; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 16px; font-weight: 600; line-height: 1.35; opacity: 0; transition: opacity .25s, translate .25s; z-index: 100; pointer-events: none; box-shadow: var(--shadow-lg); text-align: center; }
.toast.show { opacity: 1; translate: 0 0; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.row-reward input[name^="row_reward"] { margin-bottom: 8px; }
/* ---------- customer card page ---------- */
.cust { min-height: 100vh; background: var(--bgc, var(--paper)); padding: 20px 16px 40px; }
.cust-inner { max-width: 440px; margin: 0 auto; }
.cust-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cust-head .shop { font-weight: 600; }
.qr-box { background: #fff; border-radius: 22px; padding: 22px; margin-top: 16px; text-align: center; box-shadow: var(--shadow); }
/* The till code: compact, straight under the card; tap for full screen. */
.qr-quick { width: 100%; margin-top: 14px; display: flex; gap: 16px; align-items: center; background: #fff; border: 0; border-radius: 20px; padding: 12px 16px 12px 12px; box-shadow: var(--shadow); text-align: left; cursor: pointer; font: inherit; word-spacing: inherit; color: inherit; }
.qr-quick:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }
.qr-quick-code { flex: none; line-height: 0; }
.qr-quick-code canvas { width: 116px; height: 116px; image-rendering: pixelated; border-radius: 8px; }
.qr-quick-text { display: grid; gap: 2px; min-width: 0; }
.qr-quick-text b { font-size: 1.05rem; }
.qr-quick-text .small { color: var(--ink-2); }
.qr-quick .qr-code-text { font-size: 1.1rem; margin-top: 6px; letter-spacing: .08em; }
.qr-hint { color: var(--stamp); font-weight: 600; font-size: .85rem; }
.qr-full { position: fixed; inset: 0; z-index: 300; background: #fff; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top, 0px)) 20px max(24px, env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.qr-full[hidden] { display: none; }
.qr-full-inner { display: grid; justify-items: center; gap: 10px; text-align: center; width: 100%; max-width: 420px; }
.qr-full-shop { margin: 0; font-weight: 600; font-size: 1.1rem; }
.qr-full-code { line-height: 0; }
.qr-full-code canvas { width: min(80vw, 380px); height: auto; image-rendering: pixelated; }
.qr-full .qr-code-text { font-size: 1.6rem; margin: 4px 0 0; letter-spacing: .14em; }
.qr-full .btn { margin-top: 10px; min-width: 160px; }
body.qr-open { overflow: hidden; }
/* Small phones (iPhone SE and the like): keep the code on the first screen. */
@media (max-width: 360px), (max-height: 600px) {
  .qr-quick { gap: 12px; padding: 10px 12px 10px 10px; margin-top: 12px; }
  .qr-quick-code canvas { width: 92px; height: 92px; }
  .qr-quick-text b { font-size: .95rem; }
  .qr-quick-text .small { display: none; }
  .qr-quick .qr-code-text { font-size: 1rem; margin-top: 2px; }
}
.qr-box canvas, .qr-box img, .qr-box svg { margin: 0 auto; width: 210px; height: 210px; image-rendering: pixelated; }
.qr-code-text { font-size: 1.35rem; font-weight: 600; margin-top: 8px; }
.wallet-btns { display: grid; gap: 10px; margin-top: 16px; }
.wbtn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 14px; background: #000; color: #fff; text-decoration: none; font-weight: 600; font-size: 1rem; border: 0; cursor: pointer; }
.wbtn svg { width: 22px; height: 22px; }
/* Official badges: never dimmed, resized or restyled; 0.1× height clear space (Apple guidelines). */
.wallet-badge { display: flex; justify-content: center; padding: 5px 0; }
.wallet-badge img { height: 48px; width: auto; }
.ready-banner { background: var(--butter); border-radius: 18px; padding: 16px 18px; margin-top: 16px; display: flex; gap: 12px; align-items: center; font-weight: 600; animation: wiggle 2.4s ease-in-out infinite; }
.ready-banner .e { font-size: 1.8rem; }
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-1.5deg); } 96% { transform: rotate(1.5deg); } }
.cust .info { background: rgba(255, 255, 255, .75); border-radius: 18px; padding: 16px 18px; margin-top: 16px; font-size: .92rem; }
.cust .info summary { font-weight: 600; cursor: pointer; }
.powered { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 22px; }
.powered a { font-weight: 600; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- customer sign-in (Google / Apple) ---------- */
/* Buttons follow each provider's branding rules: Google white with the four-colour G, Apple black. */
.signin-btns { display: grid; gap: 10px; }
.sbtn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 1rem; text-decoration: none; word-spacing: normal; }
.sbtn svg { width: 20px; height: 20px; flex: none; }
.sbtn-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.sbtn-google:hover { background: #f8f9fa; }
.sbtn-apple { background: #000; color: #fff; border: 1px solid #000; }
.sbtn-apple:hover { background: #1c1c1e; }
.sbtn:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }
.signin-note { margin: 8px 0 0; text-align: center; }
/* join page: one tap, no typing */
.join-panel { margin-top: 16px; }
.join-panel h1 { font-size: 1.6rem; margin: 0 0 .3em; }
.join-panel > p { margin: 0 0 18px; }
.join-label { margin: 0 0 10px; font-weight: 600; font-size: .92rem; }
.join-form button.sbtn, .join-form button.wbtn { width: 100%; font: 600 1rem/1.2 var(--text); word-spacing: normal; cursor: pointer; }
.join-form .wbtn { min-height: 52px; border-radius: 12px; }
.join-form .wbtn svg { width: 22px; height: 22px; }
.join-fine { margin: 12px 0 0; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: .85rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.save { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: grid; gap: 10px; }
.save-h { margin: 0; font-weight: 600; font-size: 1.05rem; }
.save-sub { margin: -6px 0 2px; color: var(--ink-2); }
.save .wallet-btns { margin-top: 0; }
.save .or-line { margin: 4px 0; }
.save-done { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .92rem; color: var(--mint); font-weight: 600; }
.save-done a { font-weight: 600; }
.linklike { background: none; border: 0; padding: 6px; font: 600 .92rem var(--text); color: var(--stamp-dark); text-decoration: underline; cursor: pointer; }
.acct { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.acct b { display: block; font-size: 1.05rem; }
.acct p { margin: 4px 0 12px; color: var(--ink-2); }
.acct-saved { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; font-size: .92rem; color: var(--mint); font-weight: 600; }
.acct-saved a { font-weight: 600; }
.me-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 8px 0 18px; }
.me-head h1 { margin: 0; font-size: 1.8rem; }
.me-head p { margin: 4px 0 0; }
.me-cards { display: grid; gap: 14px; }
.me-card { display: block; text-decoration: none; color: inherit; border-radius: 24px; transition: transform .15s; }
.me-card:hover { transform: translateY(-2px); }
.me-card:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }
.me-signin h1 { margin: 0 0 6px; font-size: 1.8rem; }
.me-signin p { margin: 0 0 16px; }

/* ---------- sign-up card builder ---------- */
/* The stage on the left takes a soft tint of the card's own colour (--bc, set as they design). */
.builder-body { background: var(--paper); }
.builder { --bc: #171A2B; min-height: 100vh; display: flex; flex-direction: column; }
.builder-top { display: flex; align-items: center; gap: 20px; padding: 14px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line-2); background: var(--paper); position: relative; z-index: 5; }
.builder-top .brand img { height: 28px; width: auto; }
.builder-login { margin-left: auto; font-weight: 600; white-space: nowrap; }
.builder-steps { list-style: none; display: flex; gap: 6px; margin: 0 auto; padding: 0; }
.builder-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.builder-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; background: var(--paper-2); color: var(--ink-2); flex: none; }
.builder-steps li.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.builder-steps li.on span { background: var(--stamp); color: #fff; }
.builder-steps li.done span { background: var(--mint, #067646); color: #fff; font-size: 0; }
.builder-steps li.done span { position: relative; }
.builder-steps li.done span::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; }
.b-kicker { margin: 0 0 8px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--stamp); }
.builder.no-js [data-go] { display: none; }
.builder .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .45em; }
.b-error { color: var(--danger, #c42b3a); font-weight: 600; font-size: .9rem; margin: -6px 0 14px; }
.b-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.b-nav .btn-lg { flex: 1; max-width: 320px; }
.swatches button.sel { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.swatch-custom { position: relative; width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(#f25c3b, #ffc530, #4ae39a, #3fb6f2, #2b45d6, #f28cb1, #f25c3b); cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.swatch-custom:focus-within { outline: 3px solid var(--stamp); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper button { font: inherit; width: 46px; border: 0; background: var(--paper-2); font-size: 1.3rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--line-2); }
.stepper input { width: 64px; border: 0; border-radius: 0; text-align: center; font-weight: 600; font-size: 1.1rem; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.builder .check { margin-top: 4px; }
@media (max-width: 900px) {
  .builder-top .builder-steps li { font-size: 0; gap: 0; padding: 3px; }
  .builder-top .builder-steps li span { font-size: .78rem; }
  .builder-top .builder-steps li.done span { font-size: 0; }
}
@media (max-width: 560px) { .builder-top .brand img { height: 24px; } .builder-top { gap: 10px; } }

/* ---------- sign-up studio: the card is the canvas ---------- */
/* The stage takes a soft tint of the card's own colour (--bc). Tapping a part of the card opens its
   sheet: a panel beside the card on wide screens, a bottom sheet on phones (public/js/builder.js). */
.studio { --ease: cubic-bezier(.2, .8, .2, 1); --side: min(420px, 38vw); --top: 61px; }
.studio.in-app { --top: 65px; } /* under the dashboard's own bar */
@media (max-width: 760px) { .studio.in-app { --top: 59px; } }
.studio-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.studio:not(.no-js)[data-part] .studio-main, .studio:not(.no-js)[data-step="account"] .studio-main { grid-template-columns: minmax(0, 1fr) var(--side); }
.studio-stage { position: sticky; top: 0; height: calc(100vh - var(--top)); min-height: 560px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 28px clamp(16px, 4vw, 48px); overflow: hidden;
  background: radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--bc) 24%, #fff), color-mix(in srgb, var(--bc) 6%, var(--paper)) 75%); transition: background .6s; }
.studio-alert { width: min(520px, 100%); margin: 0; }
.studio-hint { margin: 0; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .85); box-shadow: 0 1px 2px rgba(23, 26, 43, .06), 0 6px 20px rgba(23, 26, 43, .08); font-size: .95rem; color: var(--ink-2); text-align: center; min-height: 1.5em; }
.studio-hint b { color: var(--ink); }
/* the card's canvas: while a part is open it fills the room between the hint and the chips, and the card zooms inside it */
.studio-canvas { width: 100%; display: flex; justify-content: center; }
.studio[data-part] .studio-canvas { flex: 1; min-height: 0; align-items: center; overflow: hidden; }
.studio .builder-show { margin: 0; width: min(480px, 100%); }
.studio[data-step="account"] .builder-show { width: min(440px, 100%); }
.studio .builder-show .showcase-shadow { margin-top: 18px; }
/* while editing the card settles flat, so the part you're changing stays put */
.studio[data-part] .showcase-tilt, .studio[data-step="account"] .showcase-tilt { transform: none !important; will-change: auto; transition: translate .5s var(--ease), scale .5s var(--ease); }
/* editing a part: the card moves in on it (--zs, --zx, --zy are set by builder.js) */
.studio[data-part] .showcase-tilt { translate: var(--zx, 0px) var(--zy, 0px); scale: var(--zs, 1); }
.showcase-tilt { position: relative; }

/* the card's parts: outlined on hover, highlighted while editing, the next one to try pulses */
.studio[data-step="design"] .lcard { cursor: pointer; }
.studio .lcard :is(.lcard-logo, .lcard-names, .lcard-stamps, .lcard-foot) { border-radius: 10px; outline: 2px dashed transparent; outline-offset: 5px; transition: outline-color .2s, opacity .3s; }
@media (hover: hover) and (pointer: fine) {
  .studio[data-step="design"] .lcard :is(.lcard-logo, .lcard-names, .lcard-stamps, .lcard-foot):hover { outline-color: color-mix(in srgb, var(--fg) 70%, transparent); }
}
.studio .lcard :is(.hl, .hint) { outline-style: solid; }
.studio .lcard .hl { outline-color: var(--fg); }
.studio .lcard .hint { animation: part-hint 1.8s ease-in-out infinite; }
@keyframes part-hint { 50% { outline-color: color-mix(in srgb, var(--fg) 85%, transparent); } }
.studio .lcard.editing :is(.lcard-logo, .lcard-names, .lcard-stamps, .lcard-foot):not(.hl) { opacity: .35; }
.studio .lcard .lcard-logo { border-radius: 50%; outline-offset: 4px; }
.showcase-tilt.hl-card::after, .showcase-tilt.hint-card::after { content: ''; position: absolute; inset: -10px; border-radius: 34px; border: 2.5px solid var(--stamp); pointer-events: none; }
.showcase-tilt.hint-card::after { border-style: dashed; animation: card-hint 1.8s ease-in-out infinite; }
@keyframes card-hint { 50% { opacity: .2; } }

/* the parts, as chips under the card (ticked once visited), and the actions */
.studio-parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.studio-parts button { font: inherit; word-spacing: inherit; position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px 9px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .92rem; cursor: pointer; transition: background .2s, border-color .2s; }
.studio-parts button:hover { border-color: var(--ink-2); }
.studio-parts .i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: .8rem; }
.studio-parts button.done::after { content: '✓'; position: absolute; top: -6px; right: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--mint, #067646); color: #fff; font-size: .65rem; font-weight: 800; }
.studio-parts button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.studio-parts button[aria-pressed="true"] .i { background: rgba(255, 255, 255, .16); }
.studio-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.studio[data-step="account"] :is(.studio-hint, .studio-parts, .studio-actions) { display: none; }

/* the sheet: one part's controls */
.studio-panel { background: #fff; border-left: 1px solid var(--line-2); }
.studio:not(.no-js) .studio-panel { position: sticky; top: 0; height: calc(100vh - var(--top)); min-height: 560px; display: none; }
.studio:not(.no-js)[data-part] .studio-panel { display: block; animation: sheet-in .45s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateX(24px); } }
.studio:not(.no-js) .studio-sheet:not(.on) { display: none; }
.studio-sheet { height: 100%; display: flex; flex-direction: column; }
.studio-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 6px; }
.studio-sheet-head h2 { margin: 0; font-size: 1.35rem; }
.studio-close { font: inherit; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper-2); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink-2); flex: none; }
.studio-close:hover { background: var(--line-2); color: var(--ink); }
.studio-sheet-body { flex: 1; overflow-y: auto; padding: 14px 24px 18px; overscroll-behavior: contain; }
.studio-sheet-foot { display: flex; gap: 10px; justify-content: space-between; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: #fff; }
.studio-sheet-foot .btn-stamp { flex: 1; }
.studio.no-js .studio-panel { padding: 8px 0 40px; }
.studio.no-js :is(.studio-close, .studio-sheet-foot, .studio-parts, .studio-actions, .studio-hint) { display: none; }

/* saving it: the card stays on the left, the account form takes the panel's place */
.studio-account { padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px) 48px; background: #fff; border-left: 1px solid var(--line-2); }
.studio-account h1 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin: 0 0 14px; }
.studio-account .b-nav { justify-content: center; margin: 18px 0 12px; }
.studio:not(.no-js):not([data-step="account"]) .studio-account { display: none; }

/* phones: the card on top, the sheet slides up from the bottom */
@media (max-width: 820px) {
  .studio:not(.no-js)[data-part] .studio-main, .studio:not(.no-js)[data-step="account"] .studio-main { grid-template-columns: minmax(0, 1fr); }
  .studio-stage { position: relative; height: auto; min-height: calc(100svh - var(--top)); justify-content: flex-start; gap: 18px; padding: 22px 16px 28px; }
  .studio .builder-show { width: min(360px, 90vw); }
  .studio-hint { font-size: .88rem; }
  .studio-parts { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: calc(100% + 32px); margin: 0 -16px; padding: 8px 16px; scrollbar-width: none; }
  .studio-parts::-webkit-scrollbar { display: none; }
  .studio-parts button { flex: none; }
  .studio-actions { width: 100%; }
  .studio-actions .btn { flex: 1; }
  /* editing: the stage is the space above the sheet; the card keeps its size and zooms in on the part (builder.js) */
  .studio[data-part] .studio-stage { min-height: 0; height: calc(100svh - var(--top) - 50svh); padding: 0; gap: 0; justify-content: center; overflow: hidden; }
  .studio[data-part] :is(.studio-hint, .studio-parts, .studio-actions), .studio[data-part] .showcase-shadow { display: none; }
  .studio:not(.no-js) .studio-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; height: 50svh; min-height: 0; border: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(23, 26, 43, .18); }
  .studio:not(.no-js)[data-part] .studio-panel { animation: sheet-up .4s var(--ease); }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  .studio-sheet-head { padding: 18px 18px 4px; }
  .studio-sheet-head::before { content: ''; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
  .studio-sheet-body { padding: 12px 18px 16px; }
  .studio-sheet-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  /* saving it: a small card above the form */
  .studio[data-step="account"] .studio-stage { min-height: 0; padding-bottom: 8px; }
  .studio[data-step="account"] .builder-show { width: min(280px, 72vw); }
  .studio-account { border-left: 0; padding-top: 12px; }
}

/* ---------- logo editor: a switch, then letter / image / emoji ---------- */
.logo-editor { display: grid; gap: 16px; }
.logo-editor [hidden] { display: none !important; } /* the grid rules below would otherwise beat the attribute */
.logo-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.logo-switch b { display: block; font-size: 1rem; }
.logo-switch .hint { margin: 2px 0 0; }
.switch { flex: none; width: 48px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong, #8c877b); position: relative; cursor: pointer; 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 cubic-bezier(.2, .8, .2, 1); }
.switch[aria-checked="true"] { background: var(--stamp); }
.switch[aria-checked="true"] span { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; }
.logo-body { display: grid; gap: 14px; }
.logo-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.logo-modes button { font: inherit; word-spacing: inherit; display: grid; justify-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.logo-modes button:hover { border-color: var(--ink-2); }
.logo-modes button[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.logo-modes b { font-size: .92rem; font-weight: 600; }
.lm-chip { width: 52px; height: 52px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; font-size: 1.6rem; line-height: 1; }
.lm-chip img { width: 100%; height: 100%; object-fit: cover; }
.lm-letter { font-family: var(--display); font-weight: 700; font-size: 1.5rem; }
.lm-glyph { opacity: .55; font-size: 1.4rem; }
.logo-pane { display: grid; gap: 10px; }
.logo-pane p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.logo-pane p.hint { margin: 0; }
.logo-image-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-off-note { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--paper-2); color: var(--ink-2); font-size: .92rem; }
@media (max-width: 820px) {
  .logo-editor, .logo-body { gap: 10px; }
  .logo-switch { padding: 10px 14px; }
  .logo-switch .hint { display: none; }
  .logo-modes button { padding: 10px 6px 8px; gap: 6px; }
  .lm-chip { width: 42px; height: 42px; font-size: 1.3rem; }
  .lm-letter { font-size: 1.2rem; }
}

.poster-fit { min-width: 0; overflow: hidden; padding: 0 16px 40px; } /* room for the sheet's shadow, which overflow would otherwise cut */

/* ---------- card design controls ---------- */
.form-h { font-size: 1.1rem; margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.form-h:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.font-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.font-pick button { font: inherit; word-spacing: inherit; display: grid; gap: 2px; justify-items: center; padding: 10px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-2); font-size: .8rem; cursor: pointer; }
.font-pick button b { font-size: 1.5rem; line-height: 1.2; color: var(--ink); font-weight: 600; }
.font-pick button[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); color: var(--ink); }
.seg { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.seg button { font: inherit; min-width: 52px; padding: 10px 14px; border: 0; background: transparent; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }
.font-pick button:focus-visible, .seg button:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }

/* ---------- icons: one tile, then a picker ---------- */
.icon-field { display: flex; }
.icon-btn { font: inherit; font-family: var(--emoji), var(--text); position: relative; flex: none; width: 48px; height: 48px; padding: 0; border-radius: 12px; border: 1.5px solid var(--line-strong, #8c877b); background: #fff; font-size: 1.55rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: border-color .15s; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }
.icon-btn::after { content: '✎'; position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 .62rem/20px var(--text); text-align: center; }
.icon-btn.wide { width: auto; padding: 0 16px 0 10px; grid-auto-flow: column; gap: 10px; }
.icon-btn.wide::after { display: none; }
.icon-cta { font: 600 .92rem var(--text); color: var(--ink); }
/* two steppers side by side, even on a phone */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pair .stepper { display: flex; width: 100%; }
.pair .stepper input { flex: 1; min-width: 0; width: auto; }
.pair .stepper button { width: 42px; flex: none; }
.rewards-list { display: grid; gap: 16px; }
.reward-entry .label { margin-bottom: .45em; }
.reward-row { display: flex; align-items: center; gap: 12px; }
.reward-row input { flex: 1; min-width: 0; }
.reward-entry .hint { margin-top: 6px; }
.link-btn { font: inherit; padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; }

.ipop-backdrop { position: fixed; inset: 0; z-index: 69; background: rgba(23, 26, 43, .4); }
.ipop { position: fixed; z-index: 70; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(23, 26, 43, .24); overflow: hidden; }
.ipop[hidden], .ipop-backdrop[hidden], .ipop [hidden] { display: none; } /* the flex rules below would otherwise beat the attribute */
.ipop-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px; }
.ipop-search { flex: 1; min-width: 0; padding: .6em .85em; }
.ipop-x { font: inherit; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink-2); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.ipop-tabs { display: flex; gap: 6px; padding: 4px 10px 8px; overflow-x: auto; scrollbar-width: none; flex: none; }
.ipop-tabs::-webkit-scrollbar { display: none; }
.ipop-tabs button { font: inherit; word-spacing: inherit; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: .85rem; font-weight: 600; cursor: pointer; }
.ipop-tabs button span { font-family: var(--emoji); }
.ipop-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ipop-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 10px 14px; }
.ipop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 4px; }
.ipop-grid button { font: inherit; font-family: var(--emoji); aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0; }
.ipop-grid button:hover { background: var(--paper-2); }
.ipop-grid button.sel { background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--ink); }
.ipop-empty { margin: 18px 4px; color: var(--ink-2); font-size: .92rem; }
@media (max-width: 820px) {
  .ipop.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 62svh; border: 0; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .ipop-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
}

/* ---------- card designer: logo upload ---------- */
.upload { position: relative; display: flex; gap: 12px; align-items: center; cursor: pointer; font-weight: 400; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within .btn { outline: 3px solid var(--stamp); outline-offset: 2px; }
.upload-name { color: var(--muted); font-size: .88rem; }

/* ---------- poster (print) ---------- */
.poster { width: 148mm; min-height: 210mm; margin: 0 auto; background: #fff; padding: 14mm 12mm; text-align: center; border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6mm; color: var(--ink); }
.poster h1 { font-size: 30pt; margin: 0; }
.poster .qr { width: 70mm; height: 70mm; }
.poster .qr canvas { width: 100% !important; height: 100% !important; image-rendering: pixelated; }
.poster-fit .poster { transform-origin: 0 0; }
/* the counter poster template, coloured from the card */
.aa-poster { padding: 0; gap: 0; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ap-band { width: 100%; background: var(--c); color: var(--fg); padding: 11mm 12mm 9mm; display: flex; flex-direction: column; align-items: center; gap: 2mm; }
.ap-logo { width: 20mm; height: 20mm; border-radius: 50%; background: var(--a); display: grid; place-items: center; font-size: 26pt; overflow: hidden; box-shadow: 0 0 0 1.2mm color-mix(in srgb, var(--fg) 25%, transparent); }
.ap-logo img { width: 100%; height: 100%; object-fit: cover; }
.ap-biz { font-family: var(--ff, var(--display)); font-weight: 700; font-size: 20pt; line-height: 1.1; margin-top: 2mm; }
.ap-prog { font-size: 10pt; opacity: .85; }
.ap-body { flex: 1; width: 100%; padding: 8mm 12mm 9mm; display: flex; flex-direction: column; align-items: center; gap: 4.5mm; }
.ap-headline { font-size: 28pt; line-height: 1.05; margin: 0; text-wrap: balance; }
.ap-offer { margin: 0; font-size: 14pt; font-weight: 600; padding: 1.5mm 4mm; border-radius: 3mm; background: color-mix(in srgb, var(--a) 22%, #fff); }
.ap-qr { padding: 3mm; border: 1.6mm solid var(--a); border-radius: 6mm; background: #fff; }
.aa-poster .qr { width: 58mm; height: 58mm; }
.ap-note { margin: 0; font-weight: 600; font-size: 12pt; }
.ap-scan { margin: -1.5mm 0 0; font-weight: 600; font-size: 12pt; }
/* ---------- the counter sign editor: the sign is the canvas (the card studio's layout) ---------- */
.sign-studio .studio-canvas { flex: 1; min-height: 0; align-items: center; overflow: hidden; }
.sign-studio .poster-fit { flex: none; }
.sign-studio .poster [data-out] { cursor: pointer; border-radius: 2mm; outline: 2px dashed transparent; outline-offset: 2mm; transition: outline-color .2s; }
.sign-studio .poster [data-out].hl { outline: 2px solid var(--stamp); }
@media (hover: hover) and (pointer: fine) { .sign-studio .poster [data-out]:hover { outline-color: var(--line-strong); } }
.sign-studio .studio-parts button { padding: 9px 16px; }
@media (max-width: 820px) {
  .sign-studio .studio-stage { height: calc(100svh - var(--top)); min-height: 0; }
  .sign-studio[data-part] .studio-canvas { padding-top: 12px; }
}

@media print {
  @page { size: A5; margin: 0; }
  body { background: #fff; }
  .no-print, .page-head, .topbar, .banner, .alert { display: none !important; }
  .main, .studio-stage { padding: 0; }
  .studio-stage { position: static; height: auto; min-height: 0; display: block; background: none; overflow: visible; }
  .studio-main, .studio-canvas { display: block; }
  .poster { box-shadow: none; border-radius: 0; width: 148mm; height: 210mm; transform: none !important; margin: 0 !important; }
  .poster-fit { height: auto !important; width: auto !important; padding: 0; }
  .poster [data-out] { outline: 0 !important; }
}

/* misc */
.kbd { font-family: ui-monospace, Menlo, monospace; background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: .1em .45em; font-size: .9em; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-size: .9rem; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .e { font-size: 2.4rem; margin-bottom: 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.badge-new { background: var(--mint); color: #fff; font-size: .7rem; padding: .15em .5em; border-radius: 6px; font-weight: 600; vertical-align: middle; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }


/* ---------- landing: where customers keep their card ---------- */
.works-with { margin: 22px auto 0; font-size: .92rem; color: var(--ink-2); text-wrap: balance; }
.works-with b { white-space: nowrap; font-weight: 600; color: var(--ink); }
.works-with svg { display: inline-block; width: 1.1em; height: 1.1em; margin-right: .3em; vertical-align: -.17em; fill: var(--ink); }

/* ---------- landing: how it works ---------- */
/* Two tours (data-tour), each with timed steps (data-step) that public/js/how.js plays; the phone
   shows the step's screen. Between them, the real demo card to collect. */
.how { --ease: cubic-bezier(.2, .8, .2, 1); background: var(--stamp); color: #fff; padding: clamp(80px, 11vw, 152px) 0; overflow: hidden; }
.how .eyebrow { color: var(--butter); }
.how-head h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.05; margin: 0; max-width: 14em; }
/* Title and steps on one side, the phone on the other; on phones: title, phone, then steps. */
.how-part { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "title visual" "copy visual"; grid-template-rows: auto 1fr; column-gap: clamp(28px, 7vw, 112px); align-items: start; margin-top: clamp(64px, 9vw, 128px); }
.how-part-flip { grid-template-areas: "visual title" "visual copy"; }
.how-part > h3 { grid-area: title; align-self: end; }
.how-copy { grid-area: copy; }
.how-visual { grid-area: visual; align-self: center; }
.how-part > h3 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 28px; display: flex; align-items: center; gap: 12px; }
.how-num { width: 38px; height: 38px; border-radius: 12px; background: var(--butter); color: var(--ink); display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.how-steps button { font: inherit; word-spacing: inherit; width: 100%; text-align: left; display: grid; gap: 4px; padding: 16px 18px 18px; border: 0; border-radius: 16px; background: transparent; color: rgba(255, 255, 255, .7); cursor: pointer; transition: background .3s, color .3s; }
.how-steps button:hover { color: #fff; }
.how-steps li.on button { background: rgba(10, 18, 80, .3); color: #fff; }
.how-steps button:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; }
.how-steps b { font-size: 1.1rem; }
.how-text { font-size: .95rem; line-height: 1.45; display: none; }
.how-steps li.on .how-text { display: block; }
.how-bar { order: -1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; margin-bottom: 6px; }
.how-bar i { display: block; height: 100%; width: 0; background: var(--butter); border-radius: 4px; }
.how-steps li.done .how-bar i { background: rgba(255, 255, 255, .6); }

.how-visual { position: relative; }
.how .phone { --pw: 280px; width: var(--pw); aspect-ratio: 9 / 18.6; transform: none; box-shadow: 0 24px 50px rgba(8, 14, 60, .45), inset 0 0 0 2px #3a3633; }
.how .phone-screen { color: var(--ink); }
.how .lcard-biz, .how .lcard-prog { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the customer's phone: camera → save → wallet */
.cv { display: none; flex: 1; flex-direction: column; min-height: 0; }
[data-tour="join"][data-step="0"] .cv-cam, [data-tour="join"][data-step="1"] .cv-add, [data-tour="join"][data-step="2"] .cv-wallet { display: flex; }
[data-tour="join"][data-step="0"] .cust-screen { background: #0d0f1a; }
[data-tour="join"][data-step="0"] .phone-time { color: #fff; }
.cv-cam { align-items: center; justify-content: center; gap: 18px; }
.cam-frame { width: 82%; aspect-ratio: 3 / 4; border-radius: 20px; background: radial-gradient(circle at 70% 20%, #5a4a3c, #1c1712 70%); display: grid; place-items: center; }
.mini-poster { background: #fff; border-radius: 10px; padding: 10px 12px; text-align: center; transform: rotate(-4deg); width: 62%; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.mini-poster b { display: block; font-size: .68rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-poster canvas { width: 100%; height: auto; image-rendering: pixelated; display: block; }
.cam-link { font-weight: 600; font-size: .85rem; background: var(--butter); color: var(--ink); border-radius: 999px; padding: 9px 16px; animation: nudge 1.6s ease-in-out infinite; }
.cam-note { margin: 0; color: rgba(255, 255, 255, .5); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
@keyframes nudge { 50% { transform: translateY(-3px); } }
.cv-add { padding-top: 26px; gap: 12px; }
.add-title { margin: 0; text-align: center; font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.cv-add .wbtn { font: 600 .9rem/1.1 var(--text); word-spacing: inherit; }
.wbtn-tap { animation: tap 1.2s .6s var(--ease) both; }
@keyframes tap { 40% { transform: scale(.95); filter: brightness(1.4); } }
.wbtn-light { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.how .cv-wallet { padding-top: 92px; }
.how .cv-wallet .wallet-title { display: none; }
.cv-wallet .lcard { animation: drop-in .6s var(--ease) both; }
@keyframes drop-in { from { transform: translateY(-40px) scale(.9); opacity: 0; } }
.cust-screen .notif b, .cust-screen .notif span { color: var(--ink); }
[data-tour="join"][data-step="2"] .notif { animation: notif-in .5s .5s var(--ease) both; }
@keyframes notif-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* the shop's phone: scan → till */
.how .shop-screen { background: #14172a; color: #fff; gap: 12px; }
.shop-screen b { color: #fff; }
.shop-screen .phone-time { color: #fff; }
.shop-bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .9rem; }
.shop-bar b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--stamp); display: grid; place-items: center; font-weight: 700; flex: none; }
.shop-mode { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(74, 227, 154, .16); color: #4ae39a; }
.shop-scan, .shop-till { display: none; flex: 1; flex-direction: column; }
[data-tour="stamp"][data-step="0"] .shop-scan, [data-tour="stamp"]:not([data-step="0"]) .shop-till { display: flex; }
.shop-scan { align-items: center; justify-content: center; gap: 18px; text-align: center; font-size: .9rem; color: rgba(255, 255, 255, .8); }
.shop-frame { position: relative; width: 76%; aspect-ratio: 1; border-radius: 22px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #3b3f5c, #14172a 70%); box-shadow: inset 0 0 0 2px rgba(74, 227, 154, .5); overflow: hidden; }
.shop-frame canvas { width: 58%; height: auto; border-radius: 8px; image-rendering: pixelated; transform: rotate(-6deg) scale(.9); animation: scan-in 1.4s var(--ease) both; }
.scan-line { position: absolute; left: 8%; right: 8%; height: 3px; border-radius: 3px; background: #4ae39a; box-shadow: 0 0 14px #4ae39a; animation: scan-line 1.4s ease-in-out infinite alternate; }
@keyframes scan-in { from { transform: translate(30%, 40%) rotate(-18deg) scale(.7); opacity: 0; } }
@keyframes scan-line { from { top: 12%; } to { top: 86%; } }
.shop-till { gap: 14px; padding-top: 6px; }
.till-who { display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 10px; }
.till-who .tiny { color: rgba(255, 255, 255, .7); }
.till-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--butter); color: var(--ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.till-count { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.till-count b { font-family: var(--display); font-size: 3.4rem; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.till-count span { color: rgba(255, 255, 255, .75); }
.till-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.till-dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .35); transition: background .25s, border-color .25s; }
.till-dots i.on { background: #4ae39a; border: 2px solid #4ae39a; }
.till-dots i.gift { display: grid; place-items: center; font-size: .7rem; font-style: normal; border-color: rgba(255, 197, 48, .6); filter: grayscale(1); opacity: .7; }
.till-dots i.gift.ready { background: var(--butter); border: 2px solid var(--butter); filter: none; opacity: 1; box-shadow: 0 0 12px rgba(255, 197, 48, .7); }
.till-ready { display: none; background: rgba(255, 197, 48, .12); color: var(--butter); border: 1.5px solid rgba(255, 197, 48, .45); border-radius: 12px; padding: 8px 12px; font-size: .85rem; font-weight: 600; }
.till-actions { margin-top: auto; display: grid; gap: 10px; }
.till-actions .btn { white-space: normal; text-align: center; font-size: 1.1rem; padding: 1em 1.1em; }
.js-give { display: none; }
[data-tour="stamp"][data-step="1"] .js-plus { animation: tap 1.2s .4s var(--ease) both; }
[data-tour="stamp"][data-step="3"] .till-ready, [data-tour="stamp"][data-step="3"] .js-give { display: block; }
[data-tour="stamp"][data-step="3"] .js-plus { display: none; }
/* Sam's card, beside the shop's phone: it changes when the stamp lands (step 3 on) */
/* Wide screens: the phone on the left of its column, Sam's card beside it on the right. */
.how-part-flip .phone { margin-left: 0; }
/* Sam's card shows up once the stamp reaches their phone. */
.how-card { position: absolute; right: 0; bottom: 40px; width: min(250px, calc(100% - var(--pw) - 16px)); opacity: 0; transform: translateY(24px); transition: transform .5s var(--ease), opacity .4s; }
.how-card .lcard { box-shadow: 0 20px 40px rgba(8, 14, 60, .45); }
.how-ping { background: rgba(255, 255, 255, .96); color: var(--ink); border-radius: 16px; padding: 9px 12px; font-size: .8rem; box-shadow: 0 8px 20px rgba(8, 14, 60, .3); margin-bottom: 10px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease); }
.how-ping b { display: block; color: var(--ink); }
[data-tour="stamp"][data-step="2"] .how-ping, [data-tour="stamp"][data-step="3"] .how-ping { opacity: 1; transform: none; }
[data-tour="stamp"][data-step="2"] .how-card, [data-tour="stamp"][data-step="3"] .how-card { opacity: 1; transform: none; }

/* the real demo card */
.how-try { margin-top: clamp(64px, 9vw, 128px); display: grid; grid-template-columns: 260px minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 48px); align-items: center; background: #fff; color: var(--ink); border-radius: 28px; padding: clamp(24px, 3.6vw, 44px); box-shadow: 0 24px 50px rgba(8, 14, 60, .3); }
.how-try h3 { margin: 0 0 .3em; font-size: 1.6rem; }
.how-try p { margin: 0 0 18px; color: var(--ink-2); }
.how-try-qr { text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.how-try-qr canvas { display: block; width: 150px; height: 150px; image-rendering: pixelated; margin-bottom: 6px; }

.how-cta { margin-top: clamp(72px, 10vw, 136px); display: flex; gap: 14px 24px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.how-cta p { margin: 0; font-size: 1.3rem; font-weight: 600; }

@media (max-width: 860px) {
  .how-part, .how-part-flip { grid-template-columns: 1fr; grid-template-areas: "title" "visual" "copy"; grid-template-rows: auto; }
  .how-copy { margin-top: 20px; }
  .how .phone { --pw: min(230px, 60vw); }
  .how .cv-wallet { padding-top: 116px; }
  .how-part-flip .phone { margin-left: auto; }
  .how-card { width: min(210px, 52vw); right: 0; bottom: 24px; }
  .how-try { grid-template-columns: 1fr; text-align: center; padding: 22px; }
  .how-try-card { max-width: 280px; margin: 0 auto; }
  .how-try-qr { display: none; }
}
