/* Repeat by ZERO. Night sky over purple mountains, glass surfaces, fluid motion. */
:root {
  --bg: #07040f;
  --bg-2: #0e0822;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --surface-solid: #120b26;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f6f3ff;
  --muted: #b9afd8;
  --subtle: #877ca9;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --violet: #8b5cf6;
  --magenta: #c026d3;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --brand: linear-gradient(135deg, #2563eb 0%, #5b3fe0 55%, #8b5cf6 100%);
  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sora', 'Inter', sans-serif;

  /* Mountain layers, far to near. */
  --m1-top: #6d4ee8; --m1-bottom: #2b1a74;
  --m2-top: #4c2fb8; --m2-bottom: #1d1152;
  --m3-top: #2e1a7c; --m3-bottom: #120a34;
  --m4-top: #170d42; --m4-bottom: #07040f;
  --haze: #8b5cf6;
  --sky-1: #1a0f45; --sky-2: #0b0620;
  --glow-1: rgba(37, 99, 235, .55); --glow-2: rgba(139, 92, 246, .55); --glow-3: rgba(192, 38, 211, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, .45); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { flex-shrink: 0; }

/* ---- Scene: sky, aurora, stars, moon and mountains ----------------------------------- */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.scene-sky { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, var(--sky-1), var(--sky-2) 60%, var(--bg)); }
.scene-aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 26s var(--ease) infinite alternate; }
.scene-aurora span:nth-child(1) { width: 60vw; height: 40vh; left: -10vw; top: 6vh; background: var(--glow-1); }
.scene-aurora span:nth-child(2) { width: 55vw; height: 45vh; right: -12vw; top: 0; background: var(--glow-2); animation-duration: 32s; animation-delay: -8s; }
.scene-aurora span:nth-child(3) { width: 40vw; height: 30vh; left: 30vw; top: 22vh; background: var(--glow-3); animation-duration: 38s; animation-delay: -14s; opacity: .35; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vh) scale(1.15); } 100% { transform: translate(-4vw, -2vh) scale(.95); } }
.scene-stars { position: absolute; inset: 0 0 35% 0; opacity: .8;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 42%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 63% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 8%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 88% 36%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 52%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 54% 56%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 28%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 70% 50%, #fff 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .35; } }
.scene-moon { position: absolute; top: 12vh; right: 14vw; width: clamp(70px, 8vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #e9ddff 45%, #b9a3ff);
  box-shadow: 0 0 60px 12px rgba(185, 163, 255, .35), 0 0 180px 60px rgba(139, 92, 246, .25); opacity: .9; }
.scene-mountains { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62vh; min-height: 320px; }
.scene-mountains .layer { animation: sway 40s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.scene-mountains .layer-m1 { animation-duration: 60s; }
.scene-mountains .layer-m2 { animation-duration: 48s; animation-delay: -10s; }
.scene-mountains .layer-m3 { animation-duration: 36s; animation-delay: -20s; }
.scene-mountains .layer-m4 { animation: none; }
@keyframes sway { to { transform: translateX(-28px); } }
.scene-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 18vh; background: linear-gradient(transparent, var(--bg)); }
.scene-dim-wrap .scene-mountains { height: 44vh; opacity: .7; }
.scene-dim-wrap .scene-aurora span { opacity: .35; }
/* The moon sits behind glass panels in the app and on phones; keep it to the open pages. */
.scene-dim-wrap .scene-moon { display: none; }
@media (max-width: 640px) { .scene-moon { display: none; } }

/* ---- Brand ------------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; }
.brand img { width: 32px; height: 32px; filter: drop-shadow(0 4px 14px rgba(91, 63, 224, .55)); }
.brand small { font: 600 10.5px var(--font); letter-spacing: .14em; color: var(--subtle); text-transform: uppercase; margin-left: 2px; }
.gradient-text { background: linear-gradient(100deg, #93b4ff, #c4b5fd 45%, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Buttons and inputs ----------------------------------------------------------------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 30px -10px rgba(91, 63, 224, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(139, 92, 246, .9), inset 0 1px 0 rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn-glass { background: var(--surface-2); border-color: var(--line-2); color: var(--text); backdrop-filter: blur(12px); }
.btn-glass:hover { background: rgba(255, 255, 255, .12); }
.btn-ghost { background: none; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-danger { background: rgba(248, 113, 113, .12); color: #fecaca; border-color: rgba(248, 113, 113, .3); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.hint { font-size: 13px; color: var(--subtle); }
.input { width: 100%; height: 48px; padding: 0 15px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(10, 6, 24, .55); color: var(--text);
  transition: border-color .2s, box-shadow .2s, background-color .2s; }
.input::placeholder { color: var(--subtle); }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .22); background: rgba(10, 6, 24, .8); }
textarea.input { height: auto; min-height: 84px; padding: 12px 15px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
select.input option { background: var(--surface-solid); }
input[type=file].input { padding: 8px 10px; height: auto; color: var(--muted); }
input[type=file].input::file-selector-button { margin-right: 12px; height: 32px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; }
.form { display: grid; gap: 18px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.glass { background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 20px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; border: 1px solid; }
.alert .icon { margin-top: 2px; }
.alert-error { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); color: #fecaca; }
.alert-success { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .3); color: #bbf7d0; }
.alert-info { background: rgba(139, 92, 246, .1); border-color: rgba(139, 92, 246, .3); color: #ddd6fe; }
.flashes { display: grid; gap: 8px; margin-bottom: 18px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-gift { background: rgba(251, 191, 36, .12); color: #fde68a; border-color: rgba(251, 191, 36, .3); }
.badge-new { background: rgba(52, 211, 153, .12); color: #a7f3d0; border-color: rgba(52, 211, 153, .3); }

/* ---- Loyalty card (the product) ------------------------------------------------------------ */
.lcard { --bg: #1e1b4b; --fg: #fff; --accent: #8b5cf6; position: relative; width: 100%; max-width: 380px; aspect-ratio: 1.58; padding: 20px 22px; border-radius: 22px; overflow: hidden; color: var(--fg);
  background: var(--bg); isolation: isolate;
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 1px 0 rgba(255, 255, 255, .18) inset;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px; }
.lcard::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 55%), radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%); }
.lcard::after { content: ''; position: absolute; inset: -40%; z-index: -1; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .14) 50%, transparent 60%); transform: translateX(-60%); animation: sheen 7s var(--ease) infinite; }
@keyframes sheen { 0%, 60% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.lcard-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lcard-logo { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-family: var(--display); font-weight: 700; }
.lcard-logo img { width: 100%; height: 100%; object-fit: contain; }
.lcard-name { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-kicker { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.lcard-stamps { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 7px; align-content: center; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--fg) 40%, transparent); display: grid; place-items: center; }
.stamp.on { border: 0; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent), 0 6px 16px -6px var(--accent); }
.stamp.on svg { width: 58%; height: 58%; color: #fff; }
.stamp.pop { animation: pop .7s var(--ease); }
@keyframes pop { 0% { transform: scale(.2) rotate(-90deg); opacity: 0; } 60% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.lcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.lcard-foot b { display: block; font-size: 14px; }
.lcard-foot .muted { opacity: .7; }
.lcard-mark { width: 26px; opacity: .85; }

/* ---- Site (landing) ------------------------------------------------------------------------ */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.topbar { position: sticky; top: 0; z-index: 20; padding: 16px 0; transition: background-color .3s, backdrop-filter .3s; }
.topbar.scrolled { background: rgba(7, 4, 15, .55); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar nav { display: flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .topbar .hide-sm { display: none; } }

.hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; min-height: calc(100vh - 80px); padding: 40px 0 120px; }
@media (max-width: 920px) { .hero { grid-template-columns: 1fr; text-align: center; padding-top: 24px; min-height: 0; } .hero .cta-row { justify-content: center; } .hero-card { margin: 0 auto; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); backdrop-filter: blur(10px); }
.pill span { padding: 3px 9px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: 11.5px; }
.hero h1 { margin-top: 22px; font-size: clamp(42px, 6.4vw, 78px); font-weight: 700; letter-spacing: -0.045em; }
.hero .lead { margin-top: 20px; max-width: 540px; font-size: clamp(16.5px, 1.6vw, 19px); color: var(--muted); }
@media (max-width: 920px) { .hero .lead { margin-left: auto; margin-right: auto; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--subtle); }

.hero-card { position: relative; width: min(420px, 100%); perspective: 1200px; }
.hero-card .lcard { max-width: none; animation: float 7s ease-in-out infinite; transform-style: preserve-3d; }
.hero-card .behind { position: absolute; inset: 0; transform: translate(26px, 30px) rotate(6deg) scale(.94); opacity: .55; filter: blur(.5px); animation: float 7s ease-in-out -3s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotateX(6deg) rotateY(-10deg); } 50% { transform: translateY(-14px) rotateX(2deg) rotateY(-4deg); } }
.hero-card .behind { transform: none; }
.hero-card .behind .lcard { animation: none; transform: translate(28px, 34px) rotate(7deg) scale(.93); }
.toast-demo { position: absolute; left: -36px; bottom: -78px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; animation: float2 6s ease-in-out infinite; }
.toast-demo .dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); }
@keyframes float2 { 50% { transform: translateY(-8px); } }
@media (max-width: 560px) { .toast-demo { left: 0; bottom: -70px; } }

.section { padding: 110px 0 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #c4b5fd; }
.section-head h2 { margin-top: 12px; font-size: clamp(30px, 4vw, 46px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 52px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 26px; }
.step .num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); font-family: var(--display); font-weight: 700; box-shadow: 0 10px 30px -10px rgba(91, 63, 224, .9); }
.step h3 { margin-top: 18px; font-size: 19px; }
.step p { margin-top: 8px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 52px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 24px; transition: transform .35s var(--ease), border-color .35s; }
.feature:hover { transform: translateY(-4px); border-color: var(--line-2); }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(139, 92, 246, .15); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, .3); }
.feature h3 { margin-top: 16px; font-size: 17px; }
.feature p { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.cta-band { margin: 110px auto 0; padding: 56px 32px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(28px, 3.6vw, 42px); }
.cta-band p { margin: 12px auto 0; max-width: 520px; color: var(--muted); }
.cta-band .cta-row { justify-content: center; }
.site-foot { padding: 60px 0 40px; color: var(--subtle); font-size: 13.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Focused pages (join, card, onboarding, errors) ----------------------------------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px 48px; }
.panel-card { width: 100%; max-width: 460px; padding: 30px 28px; }
.panel-card h1 { font-size: 27px; }
.panel-card .intro { margin-top: 8px; color: var(--muted); }
.stack { display: grid; gap: 22px; justify-items: center; width: 100%; }
.join-head { text-align: center; }
.join-head h1 { margin-top: 14px; font-size: clamp(26px, 6vw, 34px); }
.join-head p { margin-top: 8px; color: var(--muted); }
.powered { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--subtle); }
.powered img { width: 18px; }

.card-page .lcard { max-width: 420px; }
.card-qr { display: grid; justify-items: center; gap: 10px; padding: 22px; width: 100%; max-width: 420px; }
.qr-box { width: 220px; height: 220px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 20px 50px -20px rgba(139, 92, 246, .8); }
.qr-box svg { width: 100%; height: 100%; }
.card-qr p { font-size: 14px; color: var(--muted); text-align: center; }
.wallet-buttons { display: grid; gap: 10px; width: 100%; max-width: 420px; }
.wallet-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 14px; background: #000; color: #fff; font-weight: 600; border: 1px solid rgba(255, 255, 255, .22); transition: transform .2s var(--ease); }
.wallet-btn:hover { transform: translateY(-1px); }
.reward-ready { display: flex; gap: 12px; align-items: center; padding: 16px 18px; width: 100%; max-width: 420px; border-radius: 16px; background: linear-gradient(120deg, rgba(251, 191, 36, .18), rgba(192, 38, 211, .18)); border: 1px solid rgba(251, 191, 36, .35); animation: glow 2.4s ease-in-out infinite; }
.reward-ready .icon { color: #fde68a; }
@keyframes glow { 50% { box-shadow: 0 0 40px -6px rgba(251, 191, 36, .55); } }
.progress-line { width: 100%; max-width: 420px; display: grid; gap: 8px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--brand); transition: width 1s var(--ease); }
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---- Panel ---------------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; border-right: 1px solid var(--line); background: rgba(7, 4, 15, .45); backdrop-filter: blur(18px); }
.side .brand { padding: 4px 8px; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 11px; color: var(--muted); font-weight: 500; transition: background-color .2s, color .2s; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(91, 63, 224, .35), rgba(91, 63, 224, .08)); color: #fff; box-shadow: inset 2px 0 0 #a78bfa; }
.nav a.cta { margin-top: 6px; background: var(--brand); color: #fff; box-shadow: 0 10px 30px -12px rgba(91, 63, 224, .9); }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.side-foot .who { font-size: 13px; color: var(--subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot b { display: block; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; padding: 30px clamp(18px, 3vw, 40px) 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(26px, 3vw, 34px); }
.page-head p { margin-top: 6px; color: var(--muted); }
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding-bottom: 110px; }
  .mobile-top { display: flex !important; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; padding: 6px; border-radius: 18px; background: rgba(14, 8, 34, .82); border: 1px solid var(--line-2); backdrop-filter: blur(18px); }
  .mobile-nav a { display: grid; justify-items: center; gap: 3px; padding: 7px 0; border-radius: 12px; font-size: 11px; color: var(--muted); }
  .mobile-nav a.active { color: #fff; background: var(--surface-2); }
  .mobile-nav a.cta { color: #fff; background: var(--brand); }
}
.mobile-top { display: none; align-items: center; justify-content: space-between; margin-bottom: 18px; }

.grid { display: grid; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 18px 18px 16px; }
.stat .k { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.stat .k .icon { color: #a78bfa; }
.stat .v { margin-top: 10px; font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .s { margin-top: 2px; font-size: 12.5px; color: var(--subtle); }
.cols-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 1100px) { .cols-2 { grid-template-columns: 1fr; } }
.box { padding: 20px; min-width: 0; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.box-head h2 { font-size: 16.5px; font-family: var(--font); font-weight: 600; letter-spacing: -0.01em; }
.box-head p { font-size: 13px; color: var(--subtle); margin-top: 2px; }

.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .col { fill: #8b5cf6; transition: fill .2s; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .col, .chart .col.hover { fill: #a78bfa; }
.chart text { fill: var(--subtle); font-size: 11px; font-family: var(--font); }
@media (max-width: 640px) { .chart text { font-size: 19px; } }
.chart .val { fill: var(--text); font-weight: 600; }
.tip { position: absolute; z-index: 5; padding: 8px 10px; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--line-2); font-size: 12.5px; white-space: nowrap; pointer-events: none; transform: translate(-50%, -100%); box-shadow: 0 10px 30px -10px #000; }
.tip b { display: block; font-size: 14px; }

.list { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line); min-width: 0; }
.list-row:first-child { border-top: 0; }
.avatar { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, rgba(37, 99, 235, .35), rgba(139, 92, 246, .35)); border: 1px solid var(--line-2); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .t a:hover { color: #c4b5fd; }
.list-row .m { font-size: 12.5px; color: var(--subtle); }
.empty { padding: 30px 10px; text-align: center; color: var(--subtle); }
.empty .icon { margin: 0 auto 10px; color: #a78bfa; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 220px; position: relative; }
.toolbar .search .icon { position: absolute; left: 14px; top: 14px; color: var(--subtle); }
.toolbar .search .input { padding-left: 42px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tabs a { padding: 7px 12px; border-radius: 9px; font-size: 13.5px; color: var(--muted); }
.tabs a.active { background: var(--surface-2); color: #fff; }
.mini-stamps { display: flex; gap: 3px; }
.mini-stamps i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); }
.mini-stamps i.on { background: #8b5cf6; border-color: #8b5cf6; }

/* Scanner */
.scan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .scan-layout { grid-template-columns: 1fr; } }
.camera { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: #05030b; border: 1px solid var(--line); display: grid; place-items: center; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera .frame { position: absolute; inset: 18% 26%; border-radius: 22px; box-shadow: 0 0 0 9999px rgba(5, 3, 11, .45); }
.camera .frame::before, .camera .frame::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(167, 139, 250, .9); clip-path: polygon(0 0, 22% 0, 22% 4%, 4% 4%, 4% 22%, 0 22%, 0 78%, 4% 78%, 4% 96%, 22% 96%, 22% 100%, 78% 100%, 78% 96%, 96% 96%, 96% 78%, 100% 78%, 100% 22%, 96% 22%, 96% 4%, 78% 4%, 78% 0, 100% 0, 100% 100%, 0 100%); }
.camera .laser { position: absolute; left: 28%; right: 28%; top: 20%; height: 2px; background: linear-gradient(90deg, transparent, #c4b5fd, transparent); box-shadow: 0 0 18px 4px rgba(167, 139, 250, .7); animation: laser 2.2s ease-in-out infinite alternate; }
@keyframes laser { to { top: 80%; } }
.camera .placeholder { position: relative; z-index: 1; text-align: center; display: grid; gap: 12px; justify-items: center; padding: 20px; color: var(--muted); }
.result { padding: 20px; display: grid; gap: 16px; }
.result .who { display: flex; align-items: center; gap: 12px; }
.result .who b { font-size: 18px; font-family: var(--display); font-weight: 600; }
.result .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result .actions .wide { grid-column: 1 / -1; }
.stamp-big { height: 64px; font-size: 18px; border-radius: 16px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px #000; animation: toast-in .4s var(--ease); max-width: calc(100vw - 24px); }
@media (max-width: 900px) { .toast { bottom: 96px; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.toast.ok .icon { color: var(--green); }
.toast.err .icon { color: var(--red); }

/* Card editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .editor .preview { order: -1; } }
.editor .preview { position: sticky; top: 24px; display: grid; gap: 14px; justify-items: center; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13.5px; }
.swatch input { width: 32px; height: 32px; border: 0; padding: 0; border-radius: 8px; background: none; cursor: pointer; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background: linear-gradient(135deg, var(--a), var(--b)); }
.preset:hover, .preset:focus-visible { border-color: #fff; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper output { min-width: 40px; text-align: center; font-family: var(--display); font-size: 22px; font-weight: 600; }
.stepper button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.section-title { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c4b5fd; margin-top: 8px; }
.save-bar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Share */
.share-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .share-grid { grid-template-columns: 1fr; } }
.link-box { display: flex; gap: 8px; }
.link-box .input { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }
.checklist { display: grid; gap: 12px; margin-top: 4px; }
.checklist li { display: flex; gap: 10px; color: var(--muted); }
.checklist li .icon { color: #a78bfa; margin-top: 2px; }
.wallet-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.dot-status { width: 9px; height: 9px; border-radius: 50%; background: var(--subtle); flex-shrink: 0; }
.dot-status.on { background: var(--green); box-shadow: 0 0 10px var(--green); }

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