:root {
  color-scheme: dark;
  --background: #070907;
  --surface: #111411;
  --surface-raised: #171b17;
  --text: #f7f8f7;
  --muted: #a9aea9;
  --green: #2cff16;
  --green-pressed: #20d810;
  --line: #293029;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(44, 255, 22, 0.12), transparent 35%),
    var(--background);
  color: var(--text);
}

button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  text-align: center;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -1.8px;
}

.brand-accent { color: var(--green); }

.card {
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(23, 27, 23, 0.98), rgba(12, 14, 12, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.mark {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 22px;
  background: #050605;
  box-shadow: inset 0 0 0 1px #222722;
}

.mark-left, .mark-right {
  position: absolute;
  display: block;
}

.mark-left {
  width: 31px;
  height: 42px;
  left: 18px;
  top: 16px;
  border: 9px solid #fff;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.mark-right {
  width: 14px;
  height: 27px;
  right: 15px;
  top: 13px;
  background: var(--green);
  transform: skewY(-34deg);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.04;
  letter-spacing: -1.5px;
}

.lede {
  max-width: 390px;
  margin: 18px auto 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.status {
  min-height: 88px;
  display: grid;
  place-content: center;
  color: var(--muted);
}

.status h2 { margin: 0 0 8px; color: var(--text); font-size: 22px; }
.status p { margin: 0; line-height: 1.45; }

.code-label {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}

.code {
  width: 100%;
  min-height: 68px;
  padding: 12px 16px;
  border: 1px solid #3f493f;
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font: inherit;
}

#referral-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(22px, 7vw, 30px);
  font-weight: 800;
  letter-spacing: 1.5px;
}

.copy-icon {
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.helper, .steps {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.primary-action, .secondary-action {
  min-height: 54px;
  padding: 0 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

.primary-action {
  width: 100%;
  background: var(--green);
  color: #020302;
}

.primary-action:active { background: var(--green-pressed); }

.secondary-action {
  margin-top: 20px;
  border: 1px solid #465046;
  color: var(--text);
}

footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: #737a73;
  font-size: 13px;
}

footer a { color: inherit; text-decoration: none; }

.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;
}

@media (max-width: 390px) {
  .shell { padding-inline: 14px; }
  .card { padding: 28px 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  .card { animation: enter 420ms ease-out both; }
  @keyframes enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
