:root {
  --bg: #0d0b16;
  --bg-elev: #13101f;
  --surface: #1a1629;
  --surface-2: #221d35;
  --surface-3: #2c2644;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f6f4ff;
  --text-2: #c4bfd9;
  --text-3: #9d97b8;
  --focus: #d59cff;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;

  --grad-brand: linear-gradient(135deg, #4a64f9 0%, #ca0ff3 50%, #fa6573 100%);
  --grad-btn: linear-gradient(135deg, #4058f0 0%, #b10fe0 52%, #e0475a 100%);
  --grad-text: linear-gradient(100deg, #8a9bff 0%, #e27bff 45%, #ff8f9a 100%);
  --grad-ig: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  --grad-tt: linear-gradient(135deg, #25f4ee 0%, #fe2c55 100%);

  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 16px;
  --container: 1080px;
  --header-h: 60px;
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 68px; }
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

html.has-modal { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(74, 100, 249, 0.2), transparent 65%),
    radial-gradient(760px 480px at 100% 4%, rgba(202, 15, 243, 0.16), transparent 65%),
    radial-gradient(900px 600px at 50% 110%, rgba(250, 101, 115, 0.08), transparent 60%);
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #120f1d;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: calc(720px + 2 * var(--gutter)); }

.icon { width: 20px; height: 20px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Buttons */

.btn {
  --btn-h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s var(--ease), filter 0.15s, background-color 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(202, 15, 243, 0.9);
}
.btn-primary:hover { filter: brightness(1.08) saturate(1.05); }
.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-3); }
.btn-block { width: 100%; }
.btn-sm { --btn-h: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px; gap: 6px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn[disabled] { cursor: progress; opacity: 0.8; }
.btn.is-copied { border-color: rgba(52, 211, 153, 0.5); color: #6ee7b7; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.link-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #dcaaff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { background: rgba(255, 255, 255, 0.06); }

/* Header */

.lang-bar {
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(90deg, rgba(74, 100, 249, 0.22), rgba(202, 15, 243, 0.22), rgba(250, 101, 115, 0.2));
  border-bottom: 1px solid var(--border);
}
.lang-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
}
.lang-bar-inner .icon { width: 16px; height: 16px; color: #e9b6ff; }
.lang-bar a { color: var(--text); text-underline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: rgba(13, 11, 22, 0.74);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  text-decoration: none;
}
.brand-logo { width: 34px; height: 34px; }
.brand-text { display: grid; line-height: 1.1; min-width: 0; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand-tag { font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.brand-sm .brand-logo { width: 28px; height: 28px; }
.brand-sm .brand-name { font-size: 18px; }

.header-nav { display: flex; align-items: center; gap: 8px; }
.header-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.header-link:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.header-link .icon { width: 18px; height: 18px; }
.header-link.has-dot::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e070ff;
  box-shadow: 0 0 0 2px var(--surface);
}

@media (max-width: 380px) {
  .brand-tag { display: none; }
  .header-link-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* Hero */

.hero { padding: 28px 0 12px; text-align: center; }
@media (min-width: 768px) { .hero { padding: 72px 0 24px; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px 6px 9px;
  border: 1px solid rgba(202, 15, 243, 0.3);
  border-radius: 999px;
  background: rgba(202, 15, 243, 0.12);
  color: #f1cdff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.eyebrow .icon { width: 16px; height: 16px; color: #f2a6ff; }

.hero-title {
  max-width: 15ch;
  margin: 0 auto;
  font-size: clamp(2.15rem, 8.6vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text {
  max-width: 36ch;
  margin: 16px auto 0;
  color: var(--text-2);
  font-size: clamp(1.02rem, 3.8vw, 1.22rem);
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.hero-actions .btn { flex: 1 1 0; max-width: 220px; padding: 0 16px; }
@media (max-width: 380px) {
  .hero-actions .btn { padding-inline: 10px; font-size: 14px; }
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { width: 17px; height: 17px; color: var(--ok); }

/* Recent activity */
.recent-activity { max-width: 930px; margin: 36px auto 0; text-align: left; }
.recent-heading { display: flex; align-items: center; gap: 10px; }
.recent-heading { justify-content: space-between; margin-bottom: 12px; }
.recent-heading h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); font-size: 13px; font-weight: 500; }
.recent-dot { width: 6px; height: 6px; border-radius: 50%; background: #ab8dff; box-shadow: 0 0 0 4px rgba(171, 141, 255, .1); }
.recent-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.recent-card { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 94px; padding: 15px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(120deg, rgba(255,255,255,.025), transparent), var(--surface); }
.recent-avatar { position: relative; display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid rgba(205, 145, 255, .2); border-radius: 50%; background: linear-gradient(140deg, #503666, #262039); color: #e9cfff; font-size: 17px; font-weight: 600; }
.avatar-tiktok { background: linear-gradient(140deg, #22525a, #262039); color: #a4f4ee; border-color: rgba(37,244,238,.2); }
.recent-avatar img { position: absolute; bottom: -3px; right: -4px; border: 2px solid var(--surface); border-radius: 50%; }
.recent-copy { min-width: 0; line-height: 1.4; }
.recent-user { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; font-weight: 600; }
.recent-copy p { margin: 3px 0 2px; color: var(--text-3); font-size: 12px; }
.recent-copy strong { color: var(--text-2); font-weight: 500; }
.recent-meta { color: var(--text-3); font-size: 11px; }
.recent-arriving { animation: recent-in .4s var(--ease) both; }
.recent-arriving:nth-child(2) { animation-delay: .045s; }
.recent-arriving:nth-child(3) { animation-delay: .09s; }
@keyframes recent-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 767px) {
  .recent-activity { max-width: 460px; margin-top: 28px; }
  .recent-cards { grid-template-columns: 1fr; }
  .recent-card { min-height: 84px; padding: 12px 16px; }
  .recent-card:nth-child(n+2) { display: none; }
  .recent-copy p { font-size: 13px; }
}

/* Sections */

.section { padding: 32px 0; }
@media (min-width: 768px) { .section { padding: 72px 0; } }
.store { padding-top: 32px; }

.section-head { margin-bottom: 22px; text-align: center; }
.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 5.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.028em;
}
.section-text { max-width: 44ch; margin: 8px auto 0; color: var(--text-2); }

/* Package picker */
.store-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), var(--surface);
  box-shadow: var(--shadow);
}
@media (min-width: 768px) { .store-card { padding: 20px; } }

.picker { display: grid; gap: 10px; margin-bottom: 12px; }
@media (min-width: 768px) { .picker { grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; } }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
}
.seg label { position: relative; display: block; cursor: pointer; }
.seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.seg-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.2s var(--ease), color 0.2s, box-shadow 0.2s;
}
.seg label:hover .seg-opt { color: var(--text); }
.seg input:checked + .seg-opt {
  background: #fff;
  color: #120f1d;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.8);
}
.seg input:focus-visible + .seg-opt { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg-opt img { width: 22px; height: 22px; border-radius: 50%; }
.seg-opt .icon { width: 18px; height: 18px; }

.pkg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pkg-grid[hidden] { display: none; }
@media (max-width: 639px) {
  .pkg-grid > .pkg:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 640px) {
  .pkg-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
}

.pkg {
  --pkg-grad: var(--grad-ig);
  --pkg-glow: rgba(214, 36, 159, 0.55);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 18px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background-color 0.2s;
}
.pkg-tt { --pkg-grad: var(--grad-tt); --pkg-glow: rgba(37, 244, 238, 0.32); }
.pkg::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--pkg-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.pkg:hover::before, .pkg:focus-visible::before { opacity: 1; }
.pkg:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -18px var(--pkg-glow); }
.pkg:active { transform: scale(0.98); }
.pkg:focus-visible { outline-offset: 3px; }

.pkg-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-bottom: 10px;
}
.pkg-bubble {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--grad-ig);
  color: #fff;
  box-shadow: 0 0 0 3px var(--surface-2);
}
.pkg-bubble:first-child { margin-left: 0; }
.pkg-bubble .icon { width: 46%; height: 46%; fill: currentColor; stroke-width: 1.5; }
.pkg-tt .pkg-bubble { background: #07070b; }
.pkg-tt .pkg-bubble .icon {
  filter: drop-shadow(-1.3px -1px 0 #25f4ee) drop-shadow(1.3px 1px 0 #fe2c55);
}
.b-xs { width: 24px; height: 24px; }
.b-s { width: 32px; height: 32px; }
.b-m { width: 40px; height: 40px; }
.b-l { width: 48px; height: 48px; }
.z1 { z-index: 1; }
.z2 { z-index: 2; }
.z3 { z-index: 3; }

.pkg-amount {
  max-width: 100%;
  background: var(--pkg-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(1.75rem, 7.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pkg-unit { margin: 2px 0 14px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.pkg-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 40px;
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.2s, border-color 0.2s;
}
.pkg-cta .icon { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.pkg:hover .pkg-cta, .pkg:focus-visible .pkg-cta { background: var(--grad-btn); border-color: transparent; color: #fff; }
.pkg:hover .pkg-cta .icon { transform: translateX(2px); }

.notice {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 15px;
}
.notice .icon { width: 20px; height: 20px; margin-top: 1px; }
.notice-text { margin: 0; }
.notice-text + .notice-text { margin-top: 6px; }
.notice-ok { border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.08); }
.notice-ok .icon { color: var(--ok); }
.notice-info { border-color: rgba(147, 197, 253, 0.28); background: rgba(147, 197, 253, 0.07); }
.notice-info .icon { color: #93c5fd; }
.notice-warn { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.08); }
.notice-warn .icon { color: var(--warn); }
.notice-err { border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.08); }
.notice-err .icon { color: var(--err); }
.store-card .notice { margin-top: 12px; }

/* How it works */
.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
@media (min-width: 768px) { .step { grid-template-columns: 1fr; gap: 16px; padding: 24px; } }
.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--grad-btn);
  box-shadow: 0 10px 22px -10px rgba(202, 15, 243, 0.9);
  color: #fff;
  font-weight: 800;
}
.step h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }

/* FAQ */
.faq-list { display: grid; gap: 8px; }
.faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: background-color 0.2s, border-color 0.2s;
}
.faq-item[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 18px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--text-3); transition: transform 0.2s var(--ease); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-a { padding: 0 18px 18px; color: var(--text-2); }
.faq-a p { margin: 0; }
.faq-contact { margin: 18px 0 0; color: var(--text-2); text-align: center; }
.faq-contact a { color: #dcaaff; }

/* Footer */
.site-footer {
  margin-top: 16px;
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(10, 8, 18, 0.6);
}
.footer-inner { display: grid; justify-items: center; gap: 14px; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 0;
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
.footer-note { max-width: 62ch; margin: 0; color: var(--text-3); font-size: 13px; }
.footer-copy { margin: 0; color: var(--text-3); font-size: 13px; }

/* Dialog */

.sheet {
  width: calc(100% - 32px);
  max-width: 460px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.sheet::backdrop {
  background: rgba(5, 3, 12, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sheet[open]::backdrop { animation: fade-in 0.2s ease; }
.sheet[open] .sheet-inner { animation: sheet-pop 0.28s var(--ease); }
.sheet-inner {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 20px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}
.sheet-grabber { display: none; }
.sheet-close { position: absolute; top: 14px; right: 14px; }
.sheet-title { margin: 0 52px 16px 0; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.sheet-title:focus { outline: none; }
.sheet-title-center { margin: 0; text-align: center; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes sheet-up { from { transform: translateY(100%); } }

@media (max-width: 639px) {
  .sheet {
    width: 100%;
    max-width: none;
    max-height: 94vh;
    max-height: 94dvh;
    margin: auto 0 0;
  }
  .sheet-inner {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
  }
  .sheet[open] .sheet-inner { animation: sheet-up 0.34s var(--ease); }
  .sheet-grabber {
    display: block;
    width: 42px;
    height: 5px;
    margin: -8px auto 14px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
  }
}

/* Fallback for browsers without native dialog support. */
.sheet.is-fallback[open] {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: none;
  max-height: none;
  background: rgba(5, 3, 12, 0.7);
}
.sheet.is-fallback[open] .sheet-inner { width: 100%; max-height: 94vh; }

.summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
}
.summary-logo { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.summary-text { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.summary-amount { font-size: 18px; font-weight: 800; }
.summary-platform { color: var(--text-3); font-size: 13px; }

.field { display: grid; gap: 7px; }
.field-label { font-size: 15px; font-weight: 600; }
.input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-elev);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap:focus-within { border-color: #c35cff; box-shadow: 0 0 0 4px rgba(202, 15, 243, 0.2); }
.input-prefix { display: flex; align-items: center; color: var(--text-3); font-size: 17px; font-weight: 600; }
.input-prefix[hidden] { display: none; }
.input-prefix .icon { width: 18px; height: 18px; margin-right: 4px; }
.input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px; /* Prevent automatic zoom on iPhone. */
}
.input::placeholder { color: #6f698a; }
.field.has-error .input-wrap { border-color: var(--err); box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.15); }
.field-help { margin: 0; color: var(--text-3); font-size: 13px; }
.field-error, .form-error { margin: 0; color: #fda4af; font-size: 14px; font-weight: 500; }
.field-error[hidden], .form-error[hidden] { display: none; }
.form-error { margin-bottom: 12px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}
.check input {
  width: 22px;
  height: 22px;
  flex: none;
  margin: 0;
  accent-color: #b80ee0;
  cursor: pointer;
}
.check.has-error { color: #fda4af; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 13px;
}
.form-note .icon { width: 15px; height: 15px; }

.done-head { margin-bottom: 16px; text-align: center; }
.done-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 2px auto 12px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.14);
  color: var(--ok);
}
.done-icon .icon { width: 28px; height: 28px; }

.code-box {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: var(--bg-elev);
  text-align: center;
}
.code-label { color: var(--text-3); font-size: 13px; font-weight: 600; }
.code-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.code { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: 0.08em; }
.code-hint { margin: 8px 0 0; color: var(--text-3); font-size: 13px; }

.offers-box {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(202, 15, 243, 0.25);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(74, 100, 249, 0.12), rgba(202, 15, 243, 0.1) 50%, rgba(250, 101, 115, 0.1));
}
.offers-title { margin: 0 0 10px; font-size: 17px; }
.offers-points { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14px; }
.offers-points li { display: flex; align-items: flex-start; gap: 10px; }
.offers-points .icon { width: 18px; height: 18px; margin-top: 1px; color: #e9b6ff; }
.offers-points .is-warn .icon { color: var(--warn); }
.stack { display: grid; gap: 10px; }


/* Selection flow */
.sheet:not([open]), [data-step][hidden], .recent-activity[hidden] { display: none; }
.sheet { max-width: 480px; }
.flow-steps { display: flex; gap: 16px; margin: 4px 38px 26px 0; padding: 0; list-style: none; }
.flow-steps li { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 11px; white-space: nowrap; }
.flow-steps li > span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--border-strong); border-radius: 50%; font-size: 10px; font-weight: 700; }
.flow-steps [aria-current] { color: #e6bdff; }
.flow-steps [aria-current] > span { border-color: transparent; background: var(--grad-btn); color: #fff; box-shadow: 0 0 0 3px rgba(202,15,243,.1); }
.flow-steps .is-complete { color: var(--ok); }
.flow-steps .is-complete > span { border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.07); }
.selection-form .field { margin-bottom: 22px; }
.processing-step, .ready-step { text-align: center; }
.flow-kicker { margin: 0 0 8px; color: #c4a0f3; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.flow-subtitle { margin: 10px 0 0; color: var(--text-3); font-size: 14px; }
.progress-orbit { position: relative; width: 180px; height: 180px; margin: 20px auto; }
.progress-orbit > svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.orbit-track, .orbit-value { fill: none; stroke-width: 7; }
.orbit-track { stroke: var(--surface-3); }
.orbit-value { stroke: url(#progress-gradient); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(202,15,243,.2)); }
.orbit-center { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.orbit-center strong { font-size: 43px; font-weight: 700; letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.orbit-center > span { margin-top: 4px; color: var(--text-3); font-size: 12px; }
.processing-status { min-height: 44px; margin: 0; color: var(--text-2); font-size: 14px; }
.process-checklist { display: grid; gap: 12px; max-width: 280px; margin: 12px auto 20px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); list-style: none; text-align: left; }
.process-checklist li { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.phase-marker { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--border-strong); border-radius: 50%; flex: none; }
.phase-marker .icon { width: 12px; height: 12px; opacity: 0; }
.process-checklist .is-active { color: var(--text); }
.is-active .phase-marker { border-color: #c590ed; box-shadow: 0 0 0 3px rgba(197,144,237,.1); }
.process-checklist .is-done { color: #88dfbd; }
.is-done .phase-marker { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.is-done .phase-marker .icon { opacity: 1; }
.search-note { max-width: 290px; margin: 0 auto; color: var(--text-3); font-size: 12px; }
.flow-back { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 10px; padding: 8px 12px; font-size: 13px; }
.ready-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 18px; border: 1px solid rgba(52,211,153,.25); border-radius: 22px; background: linear-gradient(135deg, rgba(52,211,153,.17), rgba(52,211,153,.04)); color: #7ce8bd; box-shadow: 0 0 40px -10px rgba(52,211,153,.16); }
.ready-icon .icon { width: 30px; height: 30px; }
.ready-summary { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; padding: 16px; border: 1px solid var(--border-strong); border-radius: 16px 16px 0 0; background: var(--bg-elev); text-align: left; }
.ready-summary > div { min-width: 0; display: grid; }
.ready-summary strong { font-size: 18px; }
.ready-summary span { color: var(--text-3); font-size: 13px; }
.ready-summary img { flex: none; }
.target-preview { margin-bottom: 22px; padding: 12px 16px; border: 1px solid var(--border-strong); border-top: 0; border-radius: 0 0 16px 16px; background: rgba(255,255,255,.02); text-align: left; }
.target-preview > span { display: block; margin-bottom: 4px; color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.target-preview strong { display: block; overflow-wrap: anywhere; color: var(--text-2); font-size: 13px; font-weight: 500; }
@media (max-width: 639px) {
  .sheet { max-width: none; }
  .flow-steps { gap: 10px; margin-bottom: 22px; }
}
@media (max-width: 359px) {
  .flow-steps { gap: 7px; margin-right: 26px; }
  .flow-steps li { gap: 4px; font-size: 10px; }
  .flow-steps li > span { width: 18px; height: 18px; }
  .sheet-inner { padding-inline: 16px; }
}
@media (max-height: 700px) {
  .progress-orbit { width: 132px; height: 132px; margin: 12px auto; }
  .orbit-center strong { font-size: 34px; }
  .process-checklist { gap: 8px; margin-block: 6px 12px; padding-block: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.found-counter { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 320px; margin: 10px auto 16px; padding: 12px 14px; border: 1px solid rgba(168, 128, 239, .2); border-radius: 12px; background: rgba(168, 128, 239, .06); text-align: left; }
.found-counter > span { color: var(--text-3); font-size: 12px; }
.found-counter strong { flex: none; color: #dabaff; font-size: 18px; font-variant-numeric: tabular-nums; }
.found-total { color: var(--text-3); font-size: 12px; font-weight: 400; }
@media (max-width: 359px) { .found-counter { padding-inline: 10px; gap: 6px; } .found-counter strong { font-size: 16px; } }
@media (max-height: 700px) { .found-counter { margin-block: 4px 10px; padding-block: 8px; } }

/* Search animation */
.progress-orbit { width: 200px; height: 200px; margin: 20px auto 22px; isolation: isolate; }
.scan-grid, .scan-sweep { position: absolute; inset: 12px; border-radius: 50%; pointer-events: none; }
.scan-grid { border: 1px solid rgba(184, 132, 255, .1); background: repeating-radial-gradient(circle, transparent 0 23px, rgba(184,132,255,.09) 24px 25px); }
.scan-sweep { background: conic-gradient(from 0deg, transparent 0deg 235deg, rgba(133,111,255,.04) 265deg, rgba(199,116,255,.3) 350deg, transparent 360deg); animation: scan-turn 3.8s linear infinite; }
.orbit-progress { position: relative; z-index: 1; pointer-events: none; }
.orbit-track, .orbit-value { stroke-width: 4; }
.orbit-track { stroke: rgba(170,128,255,.15); }
.orbit-center { z-index: 2; inset: 26%; align-items: center; border-radius: 50%; background: radial-gradient(circle, var(--surface) 55%, rgba(26,22,41,.85) 75%, transparent 76%); }
.orbit-center strong { font-size: 34px; line-height: 1.05; }
.orbit-center > span { font-size: 10px; white-space: nowrap; }
.scan-platform { width: 24px; height: 24px; margin-bottom: 6px; border-radius: 8px; }
.scan-node { position: absolute; z-index: 3; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(180,128,255,.45); border-radius: 50%; background: #2a1e40; color: #ddbdff; box-shadow: 0 0 16px rgba(169,85,255,.2); opacity: 0; animation: profile-hit 3.8s ease-out infinite; pointer-events: none; }
.scan-node .icon { width: 13px; height: 13px; }
.node-1 { top: 6%; left: 23%; animation-delay: -.4s; }
.node-2 { top: 25%; right: 0; animation-delay: -2.8s; }
.node-3 { bottom: 8%; right: 15%; animation-delay: -2s; }
.node-4 { bottom: 12%; left: 10%; animation-delay: -1.2s; }
.node-5 { top: 40%; left: -2%; animation-delay: -.1s; }
@keyframes scan-turn { to { transform: rotate(360deg); } }
@keyframes profile-hit { 0%, 7% { opacity: 0; transform: scale(.65); } 18%, 45% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(.85); } }
.progress-orbit.is-complete .orbit-value { stroke: var(--ok); filter: drop-shadow(0 0 9px rgba(52,211,153,.3)); transition: stroke .3s; }
.progress-orbit.is-complete .scan-sweep, .progress-orbit.is-complete .scan-node { animation: none; opacity: 0; }
.progress-orbit.is-complete .orbit-center strong { color: #8ce7c5; transition: color .3s; }
.process-checklist li { transition: color .3s; }
.phase-marker { position: relative; transition: background-color .3s, border-color .3s; }
.is-active .phase-marker::after { position: absolute; inset: -1px; content: ''; border: 2px solid transparent; border-top-color: #d9b0ff; border-radius: 50%; animation: scan-turn 1.2s linear infinite; }
.is-done .phase-marker .icon { animation: check-pop .3s var(--ease); }
[data-step]:not([hidden]) { animation: flow-enter .32s var(--ease); }
.ready-step:not([hidden]) .ready-icon { animation: ready-pop .6s var(--ease); }
.ready-step:not([hidden]) .ready-icon .icon path { stroke-dasharray: 32; stroke-dashoffset: 32; animation: draw-check .4s .18s ease-out forwards; }
@keyframes flow-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes check-pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ready-pop { 0% { opacity: 0; transform: scale(.8); } 65% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
@media (max-height: 700px) {
  .progress-orbit { width: 150px; height: 150px; margin-block: 12px 16px; }
  .orbit-center strong { font-size: 27px; }
  .orbit-center > span { font-size: 9px; }
  .scan-platform { width: 20px; height: 20px; margin-bottom: 4px; }
  .scan-node { width: 21px; height: 21px; }
  .scan-node .icon { width: 11px; height: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scan-sweep { display: none; }
  .scan-node { opacity: .7; transform: none; }
  .ready-step:not([hidden]) .ready-icon .icon path { stroke-dashoffset: 0; }
}

/* Keep gradient paint flush with the rounded button edge, including fractional pixels. */
.btn-primary { border: 0; background-color: #4058f0; background-image: var(--grad-btn); background-origin: border-box; background-clip: border-box; background-repeat: no-repeat; }
/* Activity avatars */
.recent-avatar { width: 40px; height: 40px; border: 0; background: #2a2638; }
.avatar-crop { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; isolation: isolate; }
.avatar-photo { display: block; width: 100%; height: 100%; background-image: url('../img/feed-avatars.webp'); background-size: 400% 400%; background-repeat: no-repeat; filter: blur(2.7px); transform: scale(1.14); }
.avatar-tile--1 { display: grid; place-items: center; background-image: none; background-color: #393646; color: #aaa5b8; filter: blur(.65px); transform: none; }
.avatar-tile--1 .icon { width: 25px; height: 25px; stroke-width: 1.8; }
.recent-avatar > img { z-index: 1; }
.avatar-tile-0 { background-position: 0.000000% 0.000000%; }
.avatar-tile-1 { background-position: 33.333333% 0.000000%; }
.avatar-tile-2 { background-position: 66.666667% 0.000000%; }
.avatar-tile-3 { background-position: 100.000000% 0.000000%; }
.avatar-tile-4 { background-position: 0.000000% 33.333333%; }
.avatar-tile-5 { background-position: 33.333333% 33.333333%; }
.avatar-tile-6 { background-position: 66.666667% 33.333333%; }
.avatar-tile-7 { background-position: 100.000000% 33.333333%; }
.avatar-tile-8 { background-position: 0.000000% 66.666667%; }
.avatar-tile-9 { background-position: 33.333333% 66.666667%; }
.avatar-tile-10 { background-position: 66.666667% 66.666667%; }
.avatar-tile-11 { background-position: 100.000000% 66.666667%; }
.avatar-tile-12 { background-position: 0.000000% 100.000000%; }
.avatar-tile-13 { background-position: 33.333333% 100.000000%; }
.avatar-tile-14 { background-position: 66.666667% 100.000000%; }
.avatar-tile-15 { background-position: 100.000000% 100.000000%; }
