/* Stamp Points: one stylesheet, no build step. Design system in DESIGN.md. */
:root {
  color-scheme: light dark;
  --accent: #CF2E21;
  --brand: #CF2E21;
  --on-accent: #FFFFFF;
  --cream: #F7F4EE;
  --ink: #1C1714;
  --ink-2: #3D3530;
  --muted: #6B635A;
  --line: #E6E0D6;
  --line-strong: #C9BFB2;
  --gold: #F1C561;
  --peach: #F8DFCF;
  --white: #FFFFFF;
  --danger-bg: #FBE3DA;
  --ok: #1E7A4F;
  --radius: 16px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display-stretch: 112%;
  --ease: cubic-bezier(.2, .9, .25, 1);
  --ease-press: cubic-bezier(.3, 1.5, .5, 1);
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Derived tokens, redefined for dark mode below. */
  --accent-text: var(--accent);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --track: #F3E7D9;
  --disabled-bg: #F5ECE2;
  --tile: #FBEFD9;
  --tile-alt: var(--peach);
  --ok-bg: #E3F2EA;
  --ok-ink: #0E3D27;
  --error-ink: #6A1F12;
}

/* Dark mode follows the phone or browser setting. The staff screens are always dark,
   and QR codes always stay dark-on-white so they scan. */
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #151210;
    --white: #211D19;
    --ink: #F6F1EA;
    --ink-2: #E4DCD2;
    --muted: #BDB3A8;
    --line: rgba(246, 241, 234, .14);
    --line-strong: rgba(246, 241, 234, .30);
    --brand: #FF7A66;
    --peach: #483027;
    --danger-bg: #4A2219;
    --accent-text: color-mix(in srgb, var(--accent) 55%, white);
    --accent-soft: color-mix(in srgb, var(--accent) 30%, #211C19);
    --track: rgba(255, 245, 235, .16);
    --disabled-bg: #382E28;
    --tile: #E9D6BE;
    --tile-alt: #E6C6B1;
    --ok-bg: #173327;
    --ok-ink: #D3F2E2;
    --error-ink: #FFD9CF;
  }
  .member-card { box-shadow: none; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; }
a { color: var(--accent-text); }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-stretch: var(--display-stretch); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--cream); }
.content { flex: 1; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.push { margin-top: auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.mono { font-family: var(--mono); letter-spacing: .06em; }
.section-title { font-size: 17px; font-weight: 700; }

/* Brand */
.logo { width: 40px; height: 40px; border-radius: 11px; background: #FFFFFF; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
/* An uploaded logo shows as itself: no tile behind it, round like most restaurant marks. */
.logo:has(img) { background: transparent; border-radius: 50%; }
.logo:has(img) img { object-fit: contain; }
.logo.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.logo.on-light { background: var(--accent); color: var(--on-accent); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }

.hero { position: relative; background: var(--accent); color: var(--on-accent); padding: 22px 24px 50px; border-radius: 0 0 55% 45% / 0 0 34px 34px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.hero h1 { font-size: 34px; line-height: 1.08; letter-spacing: -.02em; display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.hero .sprig { position: absolute; right: 18px; top: 34px; opacity: .32; }
.hero-photo { position: absolute; right: -34px; top: 46px; width: 178px; height: 178px; object-fit: contain; }
.hero-photo ~ .hero-copy { max-width: 220px; }
.hero .tagline { font-size: 16px; }
.hero .subline { font-size: 13px; opacity: .9; }

.topbar { background: var(--white); border-bottom: 1px solid var(--line); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar h1 { font-size: 20px; }
.back { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink); margin-left: -10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 0; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-outline { background: var(--white); color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn[disabled], .btn.is-disabled { background: var(--disabled-bg); color: var(--ink-2); cursor: not-allowed; }
.btn.is-dashed { background: var(--white); border: 1.5px dashed var(--line-strong); color: var(--ink-2); }
.btn-link { background: none; border: 0; padding: 8px 2px; color: var(--accent-text); font-weight: 700; text-decoration: none; cursor: pointer; font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--peach); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }

/* Panels */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel-peach { background: var(--peach); border-radius: var(--radius); padding: 14px 16px; }
.pill { display: inline-block; width: fit-content; background: var(--gold); color: #30241F; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.sm { padding: 4px 10px; font-size: 12px; }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.alert-error { background: var(--danger-bg); color: var(--error-ink); border: 1px solid #F0B9A6; }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid #B9DEC9; }
.progress { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.on-accent .progress { background: rgba(255,255,255,.28); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; }
.input { height: 52px; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 0 14px; font-size: 17px; background: var(--white); width: 100%; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(184,67,46,.25); }
.input.code { font-family: var(--mono); font-size: 28px; letter-spacing: .4em; text-align: center; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.error-text { color: #8E2A17; font-size: 14px; }

/* Rewards on the joining page */
.reward-row { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.reward-row .name { flex: 1; font-weight: 600; }
.food { width: 52px; height: 52px; border-radius: 12px; background: var(--tile); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.food img { width: 100%; height: 100%; object-fit: contain; }
.food.alt { background: var(--tile-alt); }


/* My Card (banner layout) */
.brand-bar { display: flex; align-items: center; gap: 12px; padding: 16px 20px 6px; }
.brand-bar .logo { border-radius: 14px; width: 42px; height: 42px; }
.brand-name { font-weight: 800; letter-spacing: -.02em; }
.welcome { font-size: 24px; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.balance-card { background: var(--accent); color: var(--on-accent); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.balance-card .progress { background: rgba(255,255,255,.25); height: 7px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.balance-chip { font-size: 12px; font-weight: 600; background: rgba(255,255,255,.18); border-radius: 999px; padding: 4px 10px; }
.balance-amount { font-size: 38px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.balance-label { font-size: 16px; font-weight: 500; margin-left: 8px; }
.balance-link { color: inherit; font-size: 13px; padding: 6px 0; }
.member-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 8px 30px rgba(74,46,24,.06); text-align: center; }
.qr-link { display: block; line-height: 0; }
.qr-link svg { width: 140px; height: 140px; }
.big-code { display: none; position: fixed; inset: 0; z-index: 20; background: rgba(32,21,15,.55); align-items: center; justify-content: center; padding: 16px; }
.big-code:target { display: flex; }
.big-code-box { background: #FFFFFF; color: #30241F; border-radius: 24px; padding: 24px; width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.big-code-box .muted { color: #6B5A50; }
.big-code-box svg { width: 260px; height: 260px; }

/* Reward grid (Rewards Catalogue + My Card preview) */
.reward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.reward-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.reward-card.is-ready { border: 2px solid var(--accent); }
.reward-card .pic { height: 116px; background: var(--tile); display: flex; align-items: center; justify-content: center; }
.reward-card .pic.alt { background: var(--tile-alt); }
.reward-card .pic img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.reward-card .pic.sm { height: 84px; }
.reward-card .pic.xs { height: 64px; }
.reward-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.reward-card .title { font-size: 16px; font-weight: 700; }
.reward-card .desc { font-size: 12px; color: var(--muted); }
.reward-card .btn { min-height: 44px; font-size: 14px; border-radius: 12px; margin-top: auto; padding: 0 8px; }

/* Reward code screen */
.dark { background: #30241F; color: #FFFFFF; }
.dark .muted { color: #CDBFB5; }
.claim-box { background: #FFFFFF; color: #30241F; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 0 0 4px var(--gold); }
.claim-box svg { width: 200px; height: 200px; }
.claim-code { font-family: var(--mono); font-size: 26px; letter-spacing: .08em; }
.timer { font-family: var(--mono); font-size: 20px; font-weight: 700; }
.dark-note { background: #3D2F29; border: 1px solid #4A3A33; border-radius: 14px; padding: 14px 16px; font-size: 14px; color: #F1E7DF; }
.dark .btn-outline { background: transparent; color: #FFFFFF; border-color: #6B5A50; }

/* Activity */
.event { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event .what { font-weight: 600; }
.event .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }

/* Bottom navigation */
.tabbar { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; border-top: 1px solid var(--line); background: var(--white); padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 500; }
.tabbar a[aria-current="page"] { color: var(--accent-text); font-weight: 700; background: var(--accent-soft); }

.footer { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.footer a { color: var(--ink-2); text-decoration: none; }

/* ---------- Staff workspace: dark, high contrast ---------- */
body.staff { background: #151210; color: #F6F1EA; }
.staff .page { background: #151210; }
.staff a { color: #F6F1EA; }
.staff .muted { color: #BDB3A8; }
.staff-bar { padding: 16px 20px; border-bottom: 1px solid #3A322B; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.staff-bar .who { font-size: 14px; color: #BDB3A8; }
.staff-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--gold); text-transform: uppercase; }
.staff-section { font-size: 13px; font-weight: 600; color: #BDB3A8; text-transform: uppercase; letter-spacing: .06em; }
.staff .card { background: #211D19; border-color: #3A322B; color: #F6F1EA; }
.staff .input { background: #211D19; border-color: #3A322B; color: #F6F1EA; }
.staff .input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(241,197,97,.3); }
.staff .input.big { height: 72px; font-size: 34px; font-weight: 700; text-align: center; border: 2px solid var(--gold); }
.staff .check input { accent-color: var(--gold); }
.staff .btn-gold { background: var(--gold); color: #1C1714; }
.staff .btn-outline { background: transparent; color: #F6F1EA; border-color: #3A322B; }
.staff .alert-error { background: #3A1E19; color: #FFD9CF; border-color: #6A2F25; }
.staff .alert-ok { background: #173327; color: #D3F2E2; border-color: #2A5C45; }
.member-strip { display: flex; align-items: center; gap: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: #3A322B; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.give-box { background: #F6F1EA; color: #1C1714; border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.give-box .muted { color: #5B606B; }
.done-box { background: #7FD1A8; color: #0E2A1C; border-radius: 22px; padding: 32px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.done-box h1 { font-size: 34px; }
.recent { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #3A322B; font-size: 15px; }
.scanner { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 1 / 1; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; left: 16%; right: 16%; top: 14%; bottom: 26%; border: 3px solid var(--gold); border-radius: 22px; }
.scanner-caption { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 0 16px; color: #F6F1EA; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scanner-caption strong { font-size: 18px; }
.scanner-caption span { font-size: 14px; color: #C8CCD3; }
.cancel-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; font-weight: 600; color: #C8CCD3 !important; text-decoration: none; }
.btn-xl { min-height: 64px; font-size: 19px; border-radius: 16px; font-weight: 700; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pick-grid label { display: flex; align-items: center; justify-content: center; min-height: 60px; border-radius: 14px; border: 1.5px solid #3A322B; background: #211D19; font-size: 22px; font-weight: 700; cursor: pointer; }
.pick-grid input { position: absolute; opacity: 0; pointer-events: none; }
.pick-grid label:has(input:checked) { border: 3px solid var(--gold); background: #2A2415; color: var(--gold); }
.pick-grid label:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.gold-link { color: var(--gold) !important; font-weight: 600; text-decoration: none; padding: 6px 0; width: fit-content; }
.reward-status { background: #211D19; border: 1px solid #3A322B; border-radius: 18px; overflow: hidden; }
.reward-status > div { padding: 12px 16px; border-bottom: 1px solid #3A322B; }
.reward-status > div:last-child { border-bottom: 0; }
.receipt { border-top: 1px solid #3A322B; padding-top: 12px; }
.receipt summary { cursor: pointer; color: #C8CCD3; min-height: 32px; }
body.done-screen { background: #7FD1A8; color: #0E2A1C; }
.done-page { background: #7FD1A8 !important; border: 0 !important; align-items: center; justify-content: center; gap: 14px; padding: 32px 24px; text-align: center; }
.done-page h1 { font-size: 40px; line-height: 1.1; }
.done-page .lead { font-size: 18px; font-weight: 600; }
.done-next { margin-top: 24px; background: #0E2A1C; color: #FFFFFF; }

@media (min-width: 600px) {
  .page { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .staff .page { border-color: #3A322B; }
}

/* Stamp card (stamp mode) */
.stamps { display: grid; gap: 6px; padding: 2px 0; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; }
.stamp svg { width: 60%; height: 60%; }
.stamp.is-on { border: 0; background: #FFF9F1; color: var(--accent); }
.stamp.is-goal { border-color: var(--gold); color: var(--gold); }
.staff-stamps .stamp { border-color: #5B606B; }
.staff-stamps .stamp.is-on { background: var(--gold); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 64px; height: 72px; border-radius: 16px; border: 1.5px solid #3A322B; background: #211D19; color: #F6F1EA; font-size: 30px; font-weight: 600; cursor: pointer; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ---------- Owner panel and platform admin (desktop-first, stacks on phones) ---------- */
:root { --chart-1: #CF2E21; --chart-prev: #857C72; --grid: #ECE6DC; --up-bg: #E3F2EA; --up-ink: #0E5A37; --down-bg: #FBE3DA; --down-ink: #8E2A17; }
@media (prefers-color-scheme: dark) {
  :root { --chart-1: #FF6A55; --chart-prev: #A39A90; --grid: rgba(246, 241, 234, .10); --up-bg: #173327; --up-ink: #9FE0BF; --down-bg: #4A2219; --down-ink: #FFC2B3; }
}
body.panel { background: var(--white); }
.panel-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.panel-nav { flex: 1 1 220px; max-width: 100%; background: var(--cream); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.panel-nav a.nav { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 10px; color: var(--ink); font-size: 14px; text-decoration: none; }
.panel-nav a.nav:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.panel-nav a.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.panel-nav a.nav svg { flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 6px; }
.panel-nav .who { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; }
.panel-nav .who .logo { border-radius: 50%; }
.who-name { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell { position: relative; color: var(--muted); display: inline-flex; padding: 6px; border-radius: 8px; }
.bell .dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.nav-foot { margin-top: auto; padding: 16px 10px 0; display: flex; flex-direction: column; gap: 2px; }
.nav-foot .btn-link { align-self: flex-start; padding: 4px 0; color: var(--muted); }
.nav-foot .powered { margin-top: 14px; opacity: .8; }
.nav-foot .powered:hover { opacity: 1; }
.panel-main { flex: 999 1 560px; min-width: 0; padding: 26px clamp(16px, 3.5vw, 48px) 48px; display: flex; flex-direction: column; gap: 24px; }
.panel-main h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.panel .card { border-color: var(--line); }
/* Overview */
.ov-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.ov-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pills { display: flex; gap: 4px; }
.pills a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.pills a:hover { background: var(--cream); }
.pills a[aria-current="page"] { background: var(--ink); color: var(--white); font-weight: 700; }
.switch-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.switch { width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: left .15s; }
.switch-link[aria-checked="true"] .switch { background: var(--accent); }
.switch-link[aria-checked="true"] .switch::after { left: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; padding: 6px 0 4px; }
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { display: flex; align-items: center; gap: 10px; }
.kpi-value strong { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-note { font-size: 12px; color: var(--muted); }
.kpi-note strong { color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.chip.up { background: var(--up-bg); color: var(--up-ink); }
.chip.down { background: var(--down-bg); color: var(--down-ink); }
.ov-section { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.ov-section h2 { font-size: 18px; font-weight: 800; }
.ov-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ov-section-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; }
.key-bar { width: 12px; height: 12px; border-radius: 3px; background: var(--chart-1); }
.key-dash { width: 12px; height: 12px; border-radius: 3px; border: 1.5px dashed var(--chart-1); }
.key-line { width: 14px; height: 0; border-top: 2px solid var(--chart-1); }
.key-line.dashed { border-top: 2px dashed var(--chart-prev); }
.chart { width: 100%; height: auto; font-family: var(--font); overflow: visible; }
.chart .grid line { stroke: var(--grid); }
.chart .axis, .chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--chart-1); }
.chart .bar-prev { fill: none; stroke: var(--chart-1); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; }
.chart .bar-group:hover .hit { fill: var(--grid); }
.chart .peak { fill: var(--ink); font-size: 11px; font-weight: 700; }
.chart .line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; }
.chart .line-prev { fill: none; stroke: var(--chart-prev); stroke-width: 2; stroke-dasharray: 5 4; }
.chart .dot { fill: var(--chart-1); stroke: var(--white); stroke-width: 2; }
.chart .tag { fill: var(--ink); }
.chart .tag-text { fill: var(--white); font-size: 11px; font-weight: 700; }
.insight { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--cream); font-size: 13px; color: var(--ink-2); }
.insight svg { flex-shrink: 0; margin-top: 1px; color: var(--accent-text); }
.insight strong { color: var(--ink); }
.insight a { font-weight: 700; }
.ov-split { flex-direction: row; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.ov-main { flex: 3 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ov-side { flex: 1 1 200px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.side-stat { border-left: 3px solid var(--line-strong); padding: 6px 0 6px 14px; display: flex; flex-direction: column; }
.side-stat.accent { border-color: var(--chart-1); }
.side-stat .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-stat strong { font-size: 26px; font-weight: 800; }
.side-stat span { font-size: 12px; }
.side-stat .good { color: var(--up-ink); font-weight: 700; }
.side-stat .bad { color: var(--down-ink); font-weight: 700; }
.empty-chart { margin: 0; padding: 28px 16px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 14px; }
.feed { display: flex; flex-direction: column; }
.feed-row { display: grid; grid-template-columns: 70px 1fr 120px 90px; gap: 12px; padding: 10px 0; border-top: 1px solid var(--grid); font-size: 14px; align-items: baseline; }
@media (max-width: 560px) { .feed-row { grid-template-columns: 56px 1fr; } .feed-row > :nth-child(n+3) { grid-column: 2; font-size: 13px; } }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.filters a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > * { flex: 1 1 340px; min-width: 0; }
.cols > .wide { flex: 2 1 440px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile-stat { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.tile-stat strong { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.table-box { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 12px 10px; background: var(--white); }
.table td { padding: 12px 10px; border-top: 1px solid var(--grid); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: var(--peach); color: var(--ink); }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.panel .btn { min-height: 42px; font-size: 15px; border-radius: 12px; }
.panel .input { height: 44px; font-size: 15px; }
.panel textarea.input { height: auto; padding: 10px 12px; }
.panel select.input { padding: 0 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.setting-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.setting-row:first-child { border-top: 0; }
.setting-row > div:first-child { flex: 1 1 260px; }
.danger { border: 1.5px solid #E8B9AC; }
.thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--tile); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.impersonating { background: #30241F; color: #FFF9F1; padding: 10px 16px; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; width: 100%; }
.impersonating button { background: none; border: 0; color: #F1C561; font-weight: 700; cursor: pointer; }
.phone-preview { border: 6px solid var(--ink); border-radius: 26px; overflow: hidden; background: var(--cream); max-width: 300px; }
/* Platform admin uses the same light sidebar as the owner panel. */
@media print { .panel-nav, .no-print { display: none !important; } }

/* ---------- Full cards, choosing a reward, and the unlocked moment ---------- */
.balance-chip.gold { background: var(--gold); color: #30241F; }
.choose-strip { display: flex; align-items: center; gap: 12px; background: var(--white); border: 2px solid var(--gold); border-radius: 16px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.choose-strip .gift { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #30241F; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.choose-go { font-weight: 700; font-size: 14px; color: var(--accent-text); white-space: nowrap; }
.notice-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.eyebrow-title { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.choice { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1.5px solid var(--line); border-radius: 16px; padding: 8px 12px 8px 8px; cursor: pointer; }
.choice:has(input:checked) { border: 2px solid var(--accent); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice-pic { width: 58px; height: 58px; border-radius: 12px; background: var(--tile); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.choice-pic.sm { width: 40px; height: 40px; border-radius: 10px; }
.choice-pic img { width: 100%; height: 100%; object-fit: contain; }
.choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.choice-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex-shrink: 0; }
.choice:has(input:checked) .choice-dot { border: 0; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.keep-saving summary { cursor: pointer; font-weight: 800; padding: 4px 0; }

/* Staff: card complete */
.card-complete { background: #2A2415; border: 2px solid var(--gold); border-radius: 18px; padding: 14px 16px; gap: 10px; }
.cc-title { font-size: 20px; color: var(--gold); }
.give-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--gold); color: #1C1714; font-family: inherit; font-size: 20px; text-align: left; cursor: pointer; }
.give-btn > span:first-child { flex: 1; display: flex; flex-direction: column; }
.give-btn strong { font-size: 17px; }
.card-complete .stamp { animation: cc-in .4s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes cc-in { from { transform: scale(0); } to { transform: scale(1); } }

/* Stamp lands */
.stamp.pop { animation: stamp-pop .55s cubic-bezier(.3, 1.6, .5, 1); position: relative; }
.stamp.pop::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--gold); animation: stamp-ring .6s ease-out forwards; }
@keyframes stamp-pop { 0% { transform: scale(.2) rotate(-25deg); } 60% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes stamp-ring { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.6); } }
.balance-card.glow { animation: card-glow 1.2s ease-out; }
@keyframes card-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 70%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }

/* Unlocked overlay */
.unlock { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, #1A1310 72%, transparent); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade-in .25s ease-out; }
.unlock-box { position: relative; width: min(100%, 340px); background: var(--accent); color: var(--on-accent); border-radius: 26px; padding: 34px 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; overflow: hidden; animation: box-in .55s cubic-bezier(.3, 1.5, .5, 1); }
.unlock-rays { position: absolute; top: -90px; left: 50%; width: 320px; height: 320px; margin-left: -160px; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.16) 0 10deg, transparent 10deg 30deg); border-radius: 50%; animation: spin 9s linear infinite; pointer-events: none; }
.unlock-gift { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--gold); color: #30241F; display: flex; align-items: center; justify-content: center; animation: gift-in .7s .15s cubic-bezier(.3, 1.8, .5, 1) both, wiggle 1.6s 1s ease-in-out infinite; }
.unlock-gift svg { width: 44px; height: 44px; }
.unlock-eyebrow { position: relative; margin-top: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.unlock-title { position: relative; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.unlock-text { position: relative; font-size: 15px; opacity: .95; margin-bottom: 10px; }
.unlock .btn-gold { background: var(--gold); color: #30241F; position: relative; }
.unlock-later { position: relative; background: none; border: 0; color: var(--on-accent); font: inherit; font-weight: 700; padding: 12px; cursor: pointer; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 105%; transform: translateX(40px) rotate(540deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes box-in { from { transform: scale(.6) translateY(30px); opacity: 0; } }
@keyframes gift-in { from { transform: scale(0) rotate(-30deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Staff: code read */
.scan-flash { position: fixed; inset: 0; z-index: 40; pointer-events: none; border: 6px solid #7FD1A8; animation: flash .5s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.done-tick { width: 84px; height: 84px; border-radius: 50%; background: #1E7A4F; display: flex; align-items: center; justify-content: center; margin: 0 auto; animation: box-in .5s cubic-bezier(.3, 1.6, .5, 1); }
.done-tick path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .25s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .stamp.pop, .stamp.pop::after, .balance-card.glow, .unlock, .unlock-box, .unlock-rays, .unlock-gift, .confetti i, .card-complete .stamp, .scan-flash, .done-tick { animation: none !important; }
  .done-tick path { stroke-dashoffset: 0; }
}

/* Billing */
.plan-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.plan-card { flex: 1 1 240px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.plan-card.is-current { border: 2px solid var(--accent); }
.plan-card ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); flex: 1; }
.plan-card li { padding: 3px 0; }
.plan-name { font-weight: 800; font-size: 17px; }
.plan-price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.plan-badge { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 12px; background: var(--ok-bg); color: var(--ok-ink); font-size: 14px; font-weight: 700; }
.billing-banner { background: var(--danger-bg); color: var(--error-ink); padding: 10px 16px; font-size: 14px; width: 100%; }
.billing-banner a { color: inherit; font-weight: 700; }

/* Invite link to share by hand */
.invite-share { background: var(--ok-bg); color: var(--ok-ink); border-radius: 14px; padding: 14px 16px; gap: 10px; }
.invite-share .invite-row { flex-wrap: wrap; gap: 8px; }
.invite-share .input { flex: 1 1 280px; min-width: 0; font-size: 13px; }
.invite-share .tiny { color: inherit; opacity: .8; }

/* ---------- Tablets and laptops: customer and staff screens grow instead of staying phone-sized ---------- */
@media (min-width: 720px) {
  .page { max-width: 700px; }
  .content { padding: 24px 32px 28px; gap: 16px; }
  .topbar, .brand-bar, .staff-bar { padding-left: 32px; padding-right: 32px; }
  .reward-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .welcome { font-size: 30px; }
  .hero { padding: 28px 32px 60px; }
  .hero h1 { font-size: 44px; }
  .hero-photo { width: 260px; height: 260px; right: -20px; top: 40px; }
  .hero-photo ~ .hero-copy { max-width: 380px; }
  .hero .tagline { font-size: 18px; }
  .hero .subline { font-size: 15px; }
  .member-card svg { width: 180px; height: 180px; }
  .tabbar { padding-left: 24px; padding-right: 24px; }
  .tabbar a { font-size: 13px; }
}
/* Laptops and desktops: everything a little larger so it doesn't look like a phone in the middle of the screen. */
@media (min-width: 1100px) and (min-height: 700px) {
  .page { max-width: 720px; zoom: 1.15; }
  body:not(.staff):not(.done-screen):not(.panel):not(.wallet) { background: var(--peach); }
  .staff .page { zoom: 1.1; }
}

/* Buttons press and lift (DESIGN.md: motion verb). */
.btn { transition: transform .16s var(--ease), box-shadow .16s var(--ease), background-color .16s, border-color .16s; }
@media (hover: hover) {
  .btn:not([disabled]):not(.is-disabled):hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(28, 23, 20, .55); }
  .btn-outline:not([disabled]):hover { border-color: var(--ink); }
}
.btn:not([disabled]):not(.is-disabled):active { transform: translateY(1px) scale(.98); box-shadow: none; transition-duration: .06s; }

/* The Stamp Points wordmark */
.brand-mark { display: inline-flex; line-height: 0; }
.brand-mark img { display: block; height: 22px; width: auto; }
.brand-mark.lg img { height: 30px; }
.brand-mark.xs img { height: 14px; }
.powered { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.powered:hover .brand-mark { transform: rotate(-2deg); }
.powered .brand-mark { transition: transform .2s var(--ease-press); }
.who-brand { flex-direction: column; align-items: flex-start !important; gap: 4px !important; }
.auth-staff .input, body.plain.auth-staff .input { background: #211D19; border-color: #3A322B; color: #F6F1EA; }
@media (min-width: 900px) { body.plain .auth-top .brand-mark img { height: 26px; } }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--cream); padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Sign-in, two-step and invite pages (layouts/plain). Customers: paper and stamp red. Staff: ink and gold. */
body.plain { background: var(--cream); }
body.plain .auth-form { background: var(--cream); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 28px 22px 0; }
.audience-badge { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--accent-text); white-space: nowrap; }
body.plain .content { justify-content: center; gap: 20px; }
body.plain .content h1 { font-size: clamp(32px, 3.4vw, 46px); }
.auth-head { gap: 10px; }
.auth-lede { font-size: 17px; line-height: 1.45; color: var(--muted); max-width: 36ch; }
.auth-switch { margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-switch a, .auth-head a { text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-underline-offset .15s var(--ease), color .15s; }
.auth-switch a, .auth-head a { display: inline-block; padding-block: 5px; }
.auth-switch a:hover, .auth-head a:hover { text-underline-offset: 5px; text-decoration-thickness: 2px; color: var(--ink); }
.auth-customer .audience-badge { background: #F6E3DD; color: #A3241A; }
@media (prefers-color-scheme: dark) { .auth-customer .audience-badge { background: rgba(255, 122, 102, .16); color: #FF9A8A; } }
body.plain .input { background: var(--white); }

.auth-art { display: none; }
@media (min-width: 900px) {
  .auth-split { display: grid; grid-template-columns: minmax(440px, 1fr) minmax(0, 1.1fr); min-height: 100vh; min-height: 100dvh; }
  body.plain .auth-form { max-width: none; width: 100%; border: 0; zoom: 1; min-height: 100vh; min-height: 100dvh; }
  body.plain .auth-top { padding: 36px 48px 0; }
  body.plain .content { width: 100%; max-width: 460px; margin: 0 auto; padding: 40px 32px 72px !important; }

  .auth-art { display: block; position: relative; overflow: hidden; isolation: isolate; }
  .art-giant { position: absolute; z-index: -1; width: 92%; max-width: 760px; right: -18%; bottom: -16%; opacity: .1; transform: rotate(-8deg); pointer-events: none; }
  .art-line { position: absolute; left: 9%; bottom: 8%; margin: 0; font-stretch: var(--display-stretch); font-size: clamp(36px, 3.6vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
  .art-line span { display: block; margin-top: 14px; font-stretch: 100%; font-size: 16px; font-weight: 500; letter-spacing: 0; line-height: 1.45; max-width: 34ch; opacity: .9; }
  .art-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .slot { position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px dashed currentColor; display: flex; align-items: center; justify-content: center; opacity: 1; }
  .slot svg { width: 52%; height: 52%; }
  .slot.is-on { border: 0; }

  /* Customer picture: stamp red, a paper card from Haneed Corner, mid-press. */
  .customer-art { background: #CF2E21; color: #F7F4EE; }
  .customer-art .art-pill { position: absolute; top: 9%; right: 9%; background: #F7F4EE; color: #1C1714; border-radius: 999px; padding: 11px 18px; font-weight: 700; font-size: 14px; transform: rotate(3deg); box-shadow: 0 14px 32px -12px rgba(28, 23, 20, .5); }
  .customer-art .art-card { position: absolute; top: 19%; left: 13%; width: min(340px, 62%); background: #FFFFFF; color: #1C1714; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 18px; transform: rotate(-5deg); box-shadow: 0 40px 70px -30px rgba(28, 23, 20, .7); }
  .art-card-top { display: flex; align-items: center; gap: 12px; }
  .art-card-top div { display: flex; flex-direction: column; gap: 2px; }
  .art-card-top strong { font-size: 17px; }
  .art-count { font-size: 14px; color: #6B635A; }
  .art-count b { font-weight: 700; color: #1C1714; }
  .art-logo { width: 46px; height: 46px; border-radius: 50%; object-fit: contain; }
  .customer-art .art-slots { color: #D9CFC2; }
  .customer-art .slot.is-on { background: #C4520E; color: #FFFFFF; }
  .customer-art .slot.is-goal { border-style: solid; border-color: #E2B13D; color: #B98A1B; }
  .customer-art .slot.is-goal svg { width: 48%; }
  .art-card-foot { font-size: 14px; color: #3D3530; }
  .art-card-foot span { font-weight: 700; color: #1C1714; }
  .press, .press-ring { position: absolute; inset: -2px; border-radius: 50%; }
  .press { background: #C4520E; color: #FFFFFF; display: flex; align-items: center; justify-content: center; transform: rotate(-7deg); }
  .press svg { width: 52%; height: 52%; }
  .press-ring { border: 3px solid #C4520E; opacity: 0; }
  .press-tag { position: absolute; right: -16px; top: -12px; z-index: 2; background: #1C1714; color: #F7F4EE; font-size: 13px; font-weight: 800; padding: 3px 8px; border-radius: 999px; opacity: 0; pointer-events: none; }
  .swap > * { justify-self: start; }
  .swap { display: inline-grid; }
  .swap > * { grid-area: 1 / 1; }
  .swap .was { opacity: 0; }
  .customer-art .art-chips { position: absolute; top: 60%; left: 11%; display: flex; gap: 10px; flex-wrap: wrap; max-width: 80%; transform: rotate(-2deg); }
  .art-chips span { background: #F7F4EE; color: #1C1714; border-radius: 999px; padding: 6px 16px 6px 6px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 10px 24px -14px rgba(28, 23, 20, .6); }
  .art-chips img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

  /* Staff picture: ink and gold, still. */
  body.plain.auth-staff .auth-form { background: #151210; }
  .staff-art { background: #1F1A16; color: #F6F1EA; }
  .staff-art .art-giant { opacity: .09; }
  .art-counter { position: absolute; top: 15%; left: 12%; width: 330px; background: #2A241F; border: 1px solid #3A322B; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 14px; transform: rotate(-4deg); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .8); }
  .art-counter-top { display: flex; gap: 12px; align-items: center; }
  .art-counter-top div { display: flex; flex-direction: column; font-size: 13px; color: #BDB3A8; }
  .art-counter-top strong { color: #F6F1EA; font-size: 16px; }
  .art-avatar { width: 40px; height: 40px; border-radius: 50%; background: #3A322B; display: flex; align-items: center; justify-content: center; font-weight: 700; }
  .art-counter-count { font-size: 15px; font-weight: 600; }
  .art-counter-count strong { font-size: 30px; font-stretch: var(--display-stretch); }
  .staff-slots { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; color: #6B6158; }
  .staff-slots .slot { border-width: 1.5px; }
  .staff-slots .slot.is-on { background: #F1C561; color: #1C1714; }
  .art-counter-btn { background: #F1C561; color: #1C1714; border-radius: 14px; padding: 14px; text-align: center; font-weight: 800; }
  .art-panel { position: absolute; top: 47%; right: 9%; width: 280px; background: #F7F4EE; color: #1C1714; border-radius: 20px; padding: 18px; transform: rotate(3deg); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .8); display: flex; flex-direction: column; gap: 8px; }
  .art-panel-label { font-size: 12px; color: #6B635A; }
  .art-panel-num { display: flex; align-items: center; gap: 10px; }
  .art-panel-num strong { font-size: 32px; font-weight: 800; font-stretch: var(--display-stretch); letter-spacing: -.03em; }
  .art-panel .chip.up { background: #E3F2EA; color: #0E5A37; }
  .art-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; }
  .art-bars i { flex: 1; background: #CF2E21; border-radius: 4px 4px 0 0; }
  .art-pin { position: absolute; top: 8%; right: 10%; border: 1.5px solid #F1C561; color: #F1C561; border-radius: 999px; padding: 10px 18px; font-weight: 700; transform: rotate(5deg); }
}
@media (min-width: 900px) and (max-height: 780px) { .art-chips { display: none; } .customer-art .art-card { top: 14%; } }
@media (min-width: 900px) and (max-height: 640px) { .art-line span { display: none; } }

/* The press: the next slot on the card is stamped, holds, lifts, and repeats. Off when the
   sign-in animation is switched off or the visitor prefers reduced motion (then it shows stamped). */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .is-animated .press { animation: press 6s var(--ease-press) infinite; }
  .is-animated .press-ring { animation: press-ring 6s ease-out infinite; }
  .is-animated .press-tag { animation: press-tag 6s var(--ease) infinite; }
  .is-animated .customer-art .art-card { animation: card-jolt 6s var(--ease) infinite; }
  .is-animated .swap .was { animation: show-before 6s steps(1, end) infinite; }
  .is-animated .swap .now { animation: show-after 6s steps(1, end) infinite; }
}
@keyframes press {
  0%, 6% { opacity: 0; transform: translateY(-46px) scale(1.7) rotate(-22deg); }
  14% { opacity: 1; transform: translateY(-30px) scale(1.55) rotate(-18deg); }
  20% { opacity: 1; transform: translateY(0) scale(.9) rotate(-6deg); }
  24% { transform: translateY(0) scale(1.05) rotate(-7deg); }
  28%, 84% { opacity: 1; transform: translateY(0) scale(1) rotate(-7deg); }
  92%, 100% { opacity: 0; transform: translateY(0) scale(.96) rotate(-7deg); }
}
@keyframes press-tag { 0%, 20% { opacity: 0; transform: translateY(6px); } 26% { opacity: 1; transform: translateY(-10px); } 60% { opacity: 1; transform: translateY(-14px); } 70%, 100% { opacity: 0; transform: translateY(-18px); } }
@keyframes press-ring { 0%, 19% { opacity: 0; transform: scale(.9); } 20% { opacity: .7; transform: scale(1); } 34%, 100% { opacity: 0; transform: scale(1.9); } }
@keyframes card-jolt { 0%, 19% { transform: rotate(-5deg) translateY(0); } 21% { transform: rotate(-5.3deg) translateY(4px); } 27%, 100% { transform: rotate(-5deg) translateY(0); } }
@keyframes show-before { 0%, 19.9% { opacity: 1; } 20%, 91.9% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes show-after { 0%, 19.9% { opacity: 0; } 20%, 91.9% { opacity: 1; } 92%, 100% { opacity: 0; } }

/* Phones: a stamp-red band with the wordmark, the form on a paper sheet that slides over it. */
.auth-hero { display: none; }
@media (max-width: 899px) {
  body.plain .page { max-width: none; background: #CF2E21; border: 0; zoom: 1; }
  .auth-hero { display: flex; position: relative; height: 210px; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #F7F4EE; overflow: hidden; }
  .auth-hero-field { position: absolute; inset: 0; }
  .auth-hero-field img { position: absolute; opacity: .14; }
  .auth-hero .brand-mark { position: relative; }
  .auth-hero-name { position: relative; font-weight: 600; font-size: 14px; opacity: .92; }
  body.plain .auth-top { display: none; }
  body.plain .content { flex: 1; margin-top: -26px; position: relative; background: var(--cream); border-radius: 26px 26px 0 0; padding: 30px 22px 28px !important; justify-content: flex-start; }
  body.plain .content h1 { font-size: 32px; }
  body.plain.auth-staff .page { background: #1F1A16; }
  .auth-staff .auth-hero, .auth-staff .auth-hero-name { color: #F6F1EA; }
  body.plain.auth-staff .content { background: #151210; }
}
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  .auth-customer .auth-hero .brand-mark { animation: mark-in .6s var(--ease-press) both; }
  .auth-customer .auth-hero-field img { animation: field-in .9s var(--ease) both; }
}
@keyframes mark-in { from { opacity: 0; transform: translateY(-10px) scale(1.12); } to { opacity: 1; transform: none; } }
@keyframes field-in { from { opacity: 0; } to { opacity: .14; } }

/* Staff sign-in: always dark, gold actions. Clearly not the customer page. */
.auth-staff, body.plain.auth-staff, body.plain.auth-staff .auth-form { background: #151210; color: #F6F1EA; }
.auth-staff .audience-badge { background: rgba(241, 197, 97, .16); color: var(--gold); }
.auth-staff .muted, .auth-staff .auth-lede { color: #BDB3A8; }
.auth-staff .auth-switch { border-top-color: rgba(246, 241, 234, .14); }
.auth-staff .btn-primary { background: var(--gold); color: #1C1714; }

/* My cards (stamppoints.com/cards): every restaurant a customer has joined */
.wallet-brand { display: inline-flex; padding: 6px 0; }
@media (min-width: 1100px) and (min-height: 700px) { body.wallet { background: var(--cream); } body.wallet .page { max-width: 1040px; zoom: 1; } }
.wallet-title { font-size: clamp(34px, 5vw, 52px); }
.wallet-banner:not(:has(img))::after { content: ''; position: absolute; right: -24px; top: -30px; width: 150px; height: 170px; background: url('../img/brand/stamp-p-paper.svg') center / contain no-repeat; opacity: .16; transform: rotate(-10deg); }
.wallet-foot { margin-top: 18px; text-align: center; }
.wallet-dots { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; margin-bottom: 4px; }
.wallet-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px dashed var(--line-strong); }
.wallet-dots i.is-on { border: 0; background: var(--accent); }
.wallet-card { transition: transform .25s var(--ease), box-shadow .25s var(--ease) !important; }
@media (hover: hover) { .wallet-card:hover { transform: translateY(-3px) rotate(-.4deg) !important; box-shadow: 0 22px 40px -24px rgba(28, 23, 20, .45) !important; } .wallet-card:hover .wallet-go { transform: translateX(3px); } }
.wallet-card:active { transform: translateY(1px) scale(.99) !important; }
.wallet-go { transition: transform .2s var(--ease); }
.wallet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.wallet-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.wallet-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink); position: relative; box-shadow: 0 8px 24px rgba(74, 46, 24, .06); transition: transform .15s; }
.wallet-card:hover { transform: translateY(-2px); }
.wallet-banner { position: relative; height: 110px; background: var(--accent); display: block; overflow: hidden; }
.wallet-banner img { position: absolute; right: -20px; top: -14px; width: 150px; height: 150px; object-fit: contain; }
.wallet-logo { position: relative; margin: -28px 0 0 16px; width: 56px; height: 56px; border-radius: 50%; background: var(--white); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; border: 3px solid var(--white); z-index: 1; }
.wallet-logo img { position: static; width: 100%; height: 100%; object-fit: contain; }
.wallet-body { display: flex; flex-direction: column; gap: 4px; padding: 8px 16px 16px; }
.wallet-body strong { font-size: 18px; }
.wallet-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.wallet-go { position: absolute; right: 16px; bottom: 16px; font-size: 20px; color: var(--accent-text); }
@media (min-width: 720px) { .wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wallet-head { padding: 20px 32px; } }

/* Error pages (404, 403, 419, 429, 500, 503) */
body.error-page { background: var(--cream); }
.error-wrap { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 28px; padding: 40px 22px; overflow: hidden; text-align: center; }
.error-pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--accent); opacity: .12; pointer-events: none; }
.error-stamp { position: relative; width: 200px; height: 200px; color: var(--accent); transform: rotate(-10deg); }
.error-stamp svg { width: 100%; height: 100%; }
.error-copy { position: relative; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.error-copy .brand-mark { margin-bottom: 8px; }
@media (max-width: 899px) { .error-stamp { margin-bottom: 12px; } }
.error-copy .wordmark { color: var(--accent-text); font-size: 15px; }
.error-copy h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.error-copy p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.error-actions .btn { min-width: 180px; }
@media (prefers-reduced-motion: no-preference) { .error-stamp { animation: error-thump .6s cubic-bezier(.3, 1.6, .5, 1) both; } }
@keyframes error-thump { from { transform: rotate(-30deg) scale(1.6); opacity: 0; } to { transform: rotate(-10deg) scale(1); opacity: 1; } }
@media (min-width: 900px) { .error-wrap { flex-direction: row; gap: 60px; text-align: left; } .error-copy { align-items: flex-start; } .error-actions { justify-content: flex-start; } .error-stamp { width: 260px; height: 260px; } }
@media (max-width: 899px) { .error-actions { flex-direction: column; width: 100%; max-width: 320px; } .error-actions .btn { width: 100%; } }
.meter { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; margin-top: 6px; }
.meter span { display: block; height: 100%; background: var(--chart-1); border-radius: 999px; }

/* Reseller panel (reseller.stamppoints.com). The package reads like a stamp card: one circle per slot. */
.package-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; }
.package-band > .stack { flex: 1; min-width: 0; }
.slot-dots { display: flex; flex-wrap: wrap; gap: 10px; }
.slot-dots i { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.slot-dots i.is-on { border: 0; background: var(--accent); }
.slot-dots i svg { width: 52%; height: 52%; }
.slot-dots.sm { gap: 6px; margin: 10px 0 4px; }
.slot-dots.sm i { width: 16px; height: 16px; border-width: 1.5px; }
@media (prefers-reduced-motion: no-preference) {
  .slot-dots i.is-on { animation: slot-press .45s var(--ease-press) both; }
  .slot-dots i.is-on:nth-child(2) { animation-delay: .05s; } .slot-dots i.is-on:nth-child(3) { animation-delay: .1s; }
  .slot-dots i.is-on:nth-child(4) { animation-delay: .15s; } .slot-dots i.is-on:nth-child(5) { animation-delay: .2s; }
  .slot-dots i.is-on:nth-child(n+6) { animation-delay: .25s; }
}
@keyframes slot-press { from { opacity: 0; transform: scale(1.5) rotate(-14deg); } to { opacity: 1; transform: none; } }
.back-link { display: inline-block; margin-bottom: 6px; color: var(--muted); text-decoration: none; font-weight: 600; transition: transform .15s var(--ease); }
.back-link:hover { transform: translateX(-3px); color: var(--ink); }
.row-link { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; }
.row-link span { transition: transform .15s var(--ease); }
.row-link:hover span { transform: translateX(3px); }
.form-card { max-width: 640px; }
.form-inline { align-items: end; margin-top: 12px; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 20px; }
.btn.danger { color: var(--accent-text); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
body.reseller .panel-main { gap: 22px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
