/* ============================================================
   THE PALM CLUB — Luxury Rewards Web App
   Design system: quiet-luxury / Apple-grade
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Champagne / gold accent */
  --gold-900: #8a6a34;
  --gold-700: #b8925a;
  --gold-500: #cda46a;
  --gold-300: #e7ce9a;
  --gold-100: #f5e9cf;

  /* Palm / sage secondary */
  --sage-700: #3f5a4a;
  --sage-500: #5e7c67;
  --sage-300: #9db8a2;

  /* Neutrals — warm ivory light theme */
  --ink: #10233b;
  --ink-soft: #33475e;
  --muted: #6a7889;
  --paper: #fbf8f1;
  --paper-2: #f2ebdd;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --hairline: rgba(16, 35, 59, 0.09);
  --hairline-strong: rgba(16, 35, 59, 0.16);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(16, 35, 59, 0.06), 0 2px 8px rgba(16, 35, 59, 0.05);
  --shadow-md: 0 6px 20px rgba(16, 35, 59, 0.10), 0 2px 6px rgba(16, 35, 59, 0.06);
  --shadow-lg: 0 24px 60px rgba(16, 35, 59, 0.20), 0 8px 24px rgba(16, 35, 59, 0.12);
  --shadow-gold: 0 10px 30px rgba(184, 146, 90, 0.35);

  /* Geometry */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Scenery — fallback background when no photo is supplied */
  --app-bg: radial-gradient(120% 90% at 50% -10%, #ffffff 0%, var(--paper) 42%, var(--paper-2) 100%);
  --page-bg: #0c1a2b;
  --frost-blur: saturate(160%) blur(20px);

  /* Softening veil over a supplied background image.
     Light theme keeps a bright, airy wash so a light/white print stays crisp;
     frosted cards blur it behind them for legibility. */
  --veil: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(246, 249, 252, 0.52));

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  /* Subtle palm-frond watermark */
  --palm-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='230' viewBox='0 0 230 230'%3E%3Cg fill='none' stroke='%235e7c67' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M40 8C40 60 40 120 40 175'/%3E%3Cpath d='M40 30C24 22 14 26 8 34'/%3E%3Cpath d='M40 30C56 22 66 26 72 34'/%3E%3Cpath d='M40 58C22 50 10 56 3 66'/%3E%3Cpath d='M40 58C58 50 70 56 77 66'/%3E%3Cpath d='M40 90C20 82 8 90 1 102'/%3E%3Cpath d='M40 90C60 82 72 90 79 102'/%3E%3Cpath d='M40 124C22 118 12 126 6 138'/%3E%3Cpath d='M40 124C58 118 68 126 74 138'/%3E%3Cg transform='translate(158 128) rotate(24)'%3E%3Cpath d='M0 0C0 40 0 80 0 118'/%3E%3Cpath d='M0 16C-13 10 -21 14 -26 20'/%3E%3Cpath d='M0 16C13 10 21 14 26 20'/%3E%3Cpath d='M0 42C-15 36 -24 42 -29 50'/%3E%3Cpath d='M0 42C15 36 24 42 29 50'/%3E%3Cpath d='M0 70C-14 64 -23 71 -28 80'/%3E%3Cpath d='M0 70C14 64 23 71 28 80'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f0e6; --ink-soft: #d7d1c2; --muted: #9fb0c1;
    --paper: #0f2033; --paper-2: #0a1727;
    --surface: rgba(255, 255, 255, 0.055); --surface-solid: #14263a;
    --hairline: rgba(255, 255, 255, 0.10); --hairline-strong: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 12px 34px rgba(205, 164, 106, 0.30);
    --app-bg: radial-gradient(130% 100% at 50% -10%, #163150 0%, #0f2033 45%, #0a1626 100%);
    --page-bg: #05101c;
    --veil: linear-gradient(180deg, rgba(4, 9, 16, 0.6), rgba(4, 9, 16, 0.68) 45%, rgba(3, 7, 13, 0.78));
  }
}

:root[data-theme="dark"] {
  --ink: #f4f0e6; --ink-soft: #d7d1c2; --muted: #9fb0c1;
  --paper: #0f2033; --paper-2: #0a1727;
  --surface: rgba(255, 255, 255, 0.055); --surface-solid: #14263a;
  --hairline: rgba(255, 255, 255, 0.10); --hairline-strong: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.6), 0 10px 30px rgba(0,0,0,.4);
  --shadow-gold: 0 12px 34px rgba(205,164,106,.30);
  --app-bg: radial-gradient(130% 100% at 50% -10%, #163150 0%, #0f2033 45%, #0a1626 100%);
  --page-bg: #05101c;
  --veil: linear-gradient(180deg, rgba(4,9,16,.6), rgba(4,9,16,.68) 45%, rgba(3,7,13,.78));
}
:root[data-theme="light"] {
  --ink: #10233b; --ink-soft: #33475e; --muted: #6a7889;
  --paper: #fbf8f1; --paper-2: #f2ebdd;
  --surface: rgba(255,255,255,.72); --surface-solid: #ffffff;
  --hairline: rgba(16,35,59,.09); --hairline-strong: rgba(16,35,59,.16);
  --shadow-sm: 0 1px 2px rgba(16,35,59,.06), 0 2px 8px rgba(16,35,59,.05);
  --shadow-md: 0 6px 20px rgba(16,35,59,.10), 0 2px 6px rgba(16,35,59,.06);
  --shadow-lg: 0 24px 60px rgba(16,35,59,.20), 0 8px 24px rgba(16,35,59,.12);
  --shadow-gold: 0 10px 30px rgba(184,146,90,.35);
  --app-bg: radial-gradient(120% 90% at 50% -10%, #fff 0%, var(--paper) 42%, var(--paper-2) 100%);
  --page-bg: #0c1a2b;
  --veil: linear-gradient(180deg, rgba(255,255,255,.34), rgba(246,249,252,.52));
}

/* ---------- 2. Base + full-page background ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--app-bg) fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* When a photo is supplied (body.has-bg), paint it on a fixed layer with a
   legibility veil composited on top. Using a fixed element (not
   background-attachment: fixed) renders reliably everywhere. */
.bg-overlay { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
/* body.has-bg .bg-overlay background is emitted inline in head.php so the
   image url() resolves relative to the document rather than this file. */
/* Faint palm watermark on the fallback scenery only */
body:not(.has-bg) .bg-overlay {
  background-image: var(--palm-texture);
  background-size: 460px;
  opacity: 0.05;
}
@media (prefers-color-scheme: dark) { body:not(.has-bg) .bg-overlay { opacity: 0.09; } }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold-300); color: var(--ink); }

/* ---------- 3. Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 241, 0.72);
  -webkit-backdrop-filter: var(--frost-blur);
  backdrop-filter: var(--frost-blur);
  border-bottom: 1px solid var(--hairline);
}
@media (prefers-color-scheme: dark) { .topbar { background: rgba(12, 24, 39, 0.66); } }
:root[data-theme="dark"] .topbar { background: rgba(12, 24, 39, 0.66); }
:root[data-theme="light"] .topbar { background: rgba(251, 248, 241, 0.72); }

.topbar-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px clamp(16px, 4vw, 32px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; margin-left: 2px; }
.topbar-logo { height: 32px; width: auto; border-radius: 8px; }
.brandmark-name {
  font-size: 15px; font-weight: 650; letter-spacing: 0.4px; color: var(--ink);
}
/* The brand logo is navy on transparent — in dark mode it needs a light
   backing to stay visible. (In light mode it sits on white surfaces already.) */
@media (prefers-color-scheme: dark) {
  .topbar-logo { background: #fff; padding: 3px; border-radius: 9px; }
  .side-logo   { background: #fff; padding: 5px; border-radius: 11px; }
  .hero-logo-img { background: #fff; padding: 14px; border-radius: 50%; box-shadow: var(--shadow-md); }
}
:root[data-theme="dark"] .topbar-logo { background: #fff; padding: 3px; border-radius: 9px; }
:root[data-theme="dark"] .side-logo   { background: #fff; padding: 5px; border-radius: 11px; }
:root[data-theme="dark"] .hero-logo-img { background: #fff; padding: 14px; border-radius: 50%; box-shadow: var(--shadow-md); }
:root[data-theme="light"] .topbar-logo,
:root[data-theme="light"] .side-logo,
:root[data-theme="light"] .hero-logo-img { background: none; padding: 0; box-shadow: none; }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; color: var(--ink);
  transition: transform .35s var(--spring), background .3s var(--ease);
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(0.9); }

.theme-toggle .theme-ic { display: none; align-items: center; }
.theme-ic--moon { display: inline-flex; } .theme-ic--sun { display: none; }
@media (prefers-color-scheme: dark) { .theme-ic--moon { display: none; } .theme-ic--sun { display: inline-flex; } }
:root[data-theme="dark"] .theme-ic--moon { display: none; }
:root[data-theme="dark"] .theme-ic--sun { display: inline-flex; }
:root[data-theme="light"] .theme-ic--moon { display: inline-flex; }
:root[data-theme="light"] .theme-ic--sun { display: none; }
.theme-toggle { color: var(--gold-700); }

.bell-wrap { position: relative; }
.bell-dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-700); box-shadow: 0 0 0 2px var(--paper);
}

/* ---------- 4. Side drawer ---------- */
.menu-scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(6, 12, 20, 0.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
body.menu-open .menu-scrim { opacity: 1; pointer-events: auto; }

.side-menu {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: min(86vw, 322px); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 18px 16px 20px;
  background: var(--surface-solid);
  border-right: 1px solid var(--hairline);
  box-shadow: 24px 0 60px rgba(6, 12, 20, 0.28);
  transform: translateX(-102%);
  transition: transform .46s var(--ease);
  overflow-y: auto;
}
body.menu-open .side-menu { transform: none; }

.side-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 6px 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.side-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.side-logo { height: 42px; width: auto; border-radius: 10px; }
.side-brand .crest { width: 42px; height: 42px; }
.side-brand-text { display: flex; flex-direction: column; }
.side-brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; color: var(--ink); }
.side-brand-tag {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-top: 2px;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; padding-top: 8px; }
.side-nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px; border-radius: 14px;
  color: var(--ink-soft); font-size: 14.5px; font-weight: 550;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.side-nav-item:hover { background: var(--surface); color: var(--ink); transform: translateX(2px); }
.side-nav-ic { width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); }
.side-nav-item:hover .side-nav-ic { color: var(--gold-700); }
.side-nav-item.is-active {
  color: var(--ink); font-weight: 650;
  background: linear-gradient(100deg, rgba(205,164,106,0.16), rgba(205,164,106,0.05));
  box-shadow: inset 0 0 0 1px rgba(205,164,106,0.28);
}
.side-nav-item.is-active .side-nav-ic { color: var(--gold-700); }
.side-menu-foot { padding-top: 10px; border-top: 1px solid var(--hairline); margin-top: 8px; }
.side-nav-signout { color: var(--muted); }
.side-nav-signout:hover { color: #c0532f; background: rgba(192, 83, 47, 0.08); }

/* ---------- 5. Content shell ---------- */
.shell {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
  padding: clamp(18px, 4vw, 34px) clamp(16px, 4vw, 28px) 72px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(30px, 5vw, 46px) 26px clamp(26px, 4vw, 36px);
  text-align: center;
  background:
    radial-gradient(120% 130% at 50% -20%, rgba(255,255,255,0.9), rgba(255,255,255,0.32)),
    var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: var(--frost-blur);
  backdrop-filter: var(--frost-blur);
}
@media (prefers-color-scheme: dark) {
  .hero { background: radial-gradient(120% 130% at 50% -20%, rgba(255,255,255,0.08), rgba(255,255,255,0.02)), var(--surface); }
}
:root[data-theme="dark"] .hero { background: radial-gradient(120% 130% at 50% -20%, rgba(255,255,255,0.08), rgba(255,255,255,0.02)), var(--surface); }
.hero::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(160deg, rgba(231,206,154,0.4), transparent 30%);
  mix-blend-mode: overlay; pointer-events: none;
}
.hero-logo { margin-bottom: 14px; }
.hero-logo .crest { width: 128px; height: 128px; margin: 0 auto; filter: drop-shadow(0 8px 18px rgba(184,146,90,0.28)); }
.hero-logo-img {
  max-height: 128px; width: auto; margin: 0 auto;
  filter: drop-shadow(0 10px 22px rgba(16,35,59,0.22));
}
.hero h1 {
  margin: 0; font-size: clamp(28px, 5vw, 38px); line-height: 1.03;
  letter-spacing: -0.5px; font-weight: 700; color: var(--ink);
}
.hero .rule { width: 48px; height: 2px; margin: 14px auto; background: linear-gradient(90deg, transparent, var(--gold-500), transparent); }
.hero .tagline {
  font-size: 13px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.hero-cta { margin: 22px auto 0; max-width: 300px; }

/* ---------- 7. Buttons ---------- */
.cta {
  width: 100%; padding: 16px 22px; border-radius: 18px;
  font-size: 15.5px; font-weight: 650; letter-spacing: 0.3px;
  color: #23180a;
  background: linear-gradient(150deg, var(--gold-300), var(--gold-500) 55%, var(--gold-700));
  box-shadow: var(--shadow-gold);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .3s var(--spring), box-shadow .3s var(--ease);
  overflow: hidden; position: relative;
}
.cta::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg); animation: sheen 4.5s var(--ease) infinite;
}
@keyframes sheen { 0%,55% { left: -60%; } 80%,100% { left: 130%; } }
.cta:active { transform: scale(0.975); box-shadow: var(--shadow-sm); }

/* ---------- 8. Store status card ---------- */
.store {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: var(--frost-blur); backdrop-filter: var(--frost-blur);
}
.store .store-info { flex: 1; min-width: 0; }
.store .store-name { font-size: 17px; font-weight: 650; letter-spacing: -0.2px; color: var(--ink); }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 6px; padding: 5px 11px 5px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--sage-700); background: rgba(94, 124, 103, 0.12);
  border: 1px solid rgba(94, 124, 103, 0.22);
}
@media (prefers-color-scheme: dark) { .status-pill { color: var(--sage-300); } }
:root[data-theme="dark"] .status-pill { color: var(--sage-300); }
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sage-500);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94,124,103,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(94,124,103,0); }
  100% { box-shadow: 0 0 0 0 rgba(94,124,103,0); }
}
.status-pill .sep { opacity: .5; }
.call-btn {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--gold-500), var(--gold-700));
  box-shadow: var(--shadow-gold); transition: transform .35s var(--spring);
}
.call-btn:active { transform: scale(0.9); }

/* ---------- 9. Segmented tabs ---------- */
.segment {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 5px; border-radius: 16px; max-width: 420px; width: 100%;
  margin: 6px auto 2px;
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 2px rgba(16,35,59,0.05);
  -webkit-backdrop-filter: var(--frost-blur); backdrop-filter: var(--frost-blur);
}
.segment .thumb {
  position: absolute; top: 5px; left: 5px; bottom: 5px;
  width: calc(50% - 5px); border-radius: 12px;
  background: var(--surface-solid); box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease); z-index: 0;
}
.segment[data-active="rewards"] .thumb { transform: translateX(100%); }
.seg-btn {
  position: relative; z-index: 1; padding: 10px 0; text-align: center;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.3px; color: var(--muted);
  transition: color .35s var(--ease);
}
.segment[data-active="campaigns"] .seg-btn[data-tab="campaigns"],
.segment[data-active="rewards"] .seg-btn[data-tab="rewards"] { color: var(--ink); }

/* ---------- 10. Panels + grid ---------- */
.panel { display: none; }
.panel.is-active { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 4px; }
@media (min-width: 680px) { .panel.is-active { grid-template-columns: 1fr 1fr; } }
.section-label, .points { grid-column: 1 / -1; }
.section-label {
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin: 8px 4px 2px;
}

/* Reward cards */
.card {
  position: relative; display: flex; gap: 15px; align-items: center;
  width: 100%; text-align: left; padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: var(--frost-blur); backdrop-filter: var(--frost-blur);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hairline-strong); }
.card:active { transform: scale(0.985); }
.card .thumb-img {
  width: 74px; height: 74px; border-radius: 18px; flex-shrink: 0; object-fit: cover;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255,255,255,0.4);
}
.card .card-body { flex: 1; min-width: 0; }
.card .card-title {
  font-size: 16px; font-weight: 650; letter-spacing: -0.2px; color: var(--ink);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.card .card-sub {
  margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .qr-cue {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--ink-soft);
  background: var(--surface-solid); border: 1px solid var(--hairline);
}

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
}
.chip--ready { color: var(--gold-900); background: var(--gold-100); border: 1px solid var(--gold-300); }
@media (prefers-color-scheme: dark) {
  .chip--ready { color: var(--gold-300); background: rgba(205,164,106,0.14); border-color: rgba(205,164,106,0.3); }
}
:root[data-theme="dark"] .chip--ready { color: var(--gold-300); background: rgba(205,164,106,0.14); border-color: rgba(205,164,106,0.3); }
.chip--soon { color: var(--muted); background: var(--hairline); border: 1px solid var(--hairline-strong); }

/* Palm Points card */
.points {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  border-radius: var(--r-lg); color: #fff;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(255,255,255,0.22), transparent 55%),
    linear-gradient(150deg, #16304c, #0c1d31);
  border: 1px solid rgba(255,255,255,0.12); box-shadow: var(--shadow-md); overflow: hidden;
}
.points .ring { flex-shrink: 0; }
.points .points-copy { flex: 1; }
.points .points-num { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1; }
.points .points-num small { font-size: 13px; font-weight: 500; opacity: .72; letter-spacing: 0.4px; }
.points .points-label {
  margin-top: 7px; font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold-300); font-weight: 600;
}

/* ---------- 11. Campaign counter cards ---------- */
.camp-card {
  display: flex; flex-direction: column;
  padding: 20px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: var(--frost-blur); backdrop-filter: var(--frost-blur);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.camp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hairline-strong); }
.camp-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }
.camp-icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; color: var(--gold-700);
  background: var(--gold-100); border: 1px solid var(--gold-300);
}
@media (prefers-color-scheme: dark) {
  .camp-icon { color: var(--gold-300); background: rgba(205,164,106,0.14); border-color: rgba(205,164,106,0.3); }
}
:root[data-theme="dark"] .camp-icon { color: var(--gold-300); background: rgba(205,164,106,0.14); border-color: rgba(205,164,106,0.3); }
.camp-head-text { flex: 1; min-width: 0; }
.camp-title {
  font-size: 16.5px; font-weight: 650; letter-spacing: -0.2px; color: var(--ink);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.camp-sub { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Stamp counter */
.stamps { display: flex; flex-wrap: wrap; gap: 9px; }
.stamp {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  transition: transform .3s var(--spring);
}
.stamp svg { width: 19px; height: 19px; }
.stamp.is-filled {
  color: #fff;
  background: linear-gradient(150deg, var(--gold-500), var(--gold-700));
  box-shadow: 0 4px 12px rgba(184,146,90,0.35), inset 0 0 0 1px rgba(255,255,255,0.25);
}
.stamp.is-empty {
  color: var(--muted);
  background: var(--surface-solid);
  border: 1.5px dashed var(--hairline-strong);
  opacity: 0.7;
}

/* Progress counter */
.progress { width: 100%; }
.progress-track {
  height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--hairline);
  box-shadow: inset 0 1px 2px rgba(16,35,59,0.12);
}
.progress-bar {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-700));
  box-shadow: 0 0 14px rgba(205,164,106,0.5);
  transform-origin: left; animation: growBar 1s var(--ease) both;
}
@keyframes growBar { from { transform: scaleX(0.03); } to { transform: scaleX(1); } }
.progress-scale {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}

.camp-note {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  font-size: 12.5px; font-weight: 600; color: var(--gold-700);
}
@media (prefers-color-scheme: dark) { .camp-note { color: var(--gold-300); } }
:root[data-theme="dark"] .camp-note { color: var(--gold-300); }
.camp-note svg { width: 14px; height: 14px; }

/* ---------- 12. QR bottom sheet ---------- */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(8, 16, 27, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 71;
  width: min(440px, 100%); transform: translate(-50%, 100%);
  transition: transform .5s var(--ease);
  padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  border-radius: 32px 32px 0 0;
  background: var(--surface-solid);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -24px 60px rgba(8,16,27,0.35);
  text-align: center;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet .grabber { width: 42px; height: 5px; border-radius: 3px; margin: 0 auto 18px; background: var(--hairline-strong); }
.sheet .sheet-eyebrow { font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-700); font-weight: 700; }
.sheet .sheet-title { margin: 5px 0 2px; font-size: 21px; font-weight: 700; letter-spacing: -0.3px; color: var(--ink); }
.sheet .sheet-desc { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.qr-frame {
  position: relative; width: 208px; height: 208px; margin: 0 auto 16px;
  border-radius: 26px; padding: 18px; background: #fff;
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--hairline);
}
.qr-frame svg { width: 100%; height: 100%; }
.qr-frame .corner { position: absolute; width: 22px; height: 22px; border: 2.5px solid var(--gold-500); }
.qr-frame .c-tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.qr-frame .c-tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.qr-frame .c-bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.qr-frame .c-br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.qr-frame .qr-scan {
  position: absolute; left: 18px; right: 18px; top: 18px; height: 30px; border-radius: 8px;
  background: linear-gradient(to bottom, rgba(205,164,106,0.55), transparent); opacity: 0;
}
.sheet.open .qr-frame .qr-ink { animation: qrReveal .7s var(--ease) both; }
.sheet.open .qr-frame .qr-scan { animation: scan 1.8s var(--ease) .3s 2; }
@keyframes qrReveal { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes scan { 0% { opacity: 0; top: 18px; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; top: 160px; } }
.sheet .redeem-note { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.sheet .sheet-cta {
  width: 100%; padding: 16px; border-radius: 18px; font-size: 15px; font-weight: 650; color: #fff;
  background: linear-gradient(150deg, #16304c, #0c1d31); border: 1px solid rgba(255,255,255,0.08);
  transition: transform .3s var(--spring);
}
.sheet .sheet-cta:active { transform: scale(0.975); }

/* ---------- 13. Scroll-reveal + motion prefs ---------- */
/* Only hide when JS is active (so a JS failure never leaves a blank page). */
.js .reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .progress-bar { animation: none; }
}
