:root {
  color-scheme: dark;
  --bg: #020407;
  --panel: rgba(10, 16, 24, 0.78);
  --panel-strong: rgba(14, 23, 34, 0.92);
  --line: rgba(145, 219, 255, 0.14);
  --line-bright: rgba(78, 205, 255, 0.4);
  --text: #f4f9fc;
  --muted: #8597a8;
  --cyan: #35d7ff;
  --blue: #2684ff;
  --success: #62f5c8;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(24, 136, 255, 0.2), transparent 42%),
    linear-gradient(180deg, #05090e 0%, var(--bg) 56%);
  color: var(--text);
}

button, a { font: inherit; }

.ambient {
  position: fixed;
  z-index: 0;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.13;
  pointer-events: none;
}

.ambient-one { top: -15rem; left: -10rem; background: #148dff; }
.ambient-two { right: -13rem; bottom: -16rem; background: #16e0ff; }

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.key-card {
  width: min(100%, 31rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: linear-gradient(145deg, rgba(14, 23, 34, 0.93), rgba(5, 9, 14, 0.9));
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.55), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px) saturate(130%);
}

.brand-row { display: flex; align-items: center; gap: 0.9rem; }

.mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border: 1px solid rgba(74, 206, 255, 0.35);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(42, 171, 255, 0.2), rgba(25, 70, 109, 0.08));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 0 2rem rgba(53, 215, 255, 0.1);
}

.mark svg { width: 1.75rem; fill: var(--cyan); }

.eyebrow, .section-label, .step-number {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 { margin: 0.05rem 0 0; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.03em; }
h1 span { color: var(--cyan); }

.status-dot {
  width: 0.62rem;
  height: 0.62rem;
  margin-left: auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0.32rem rgba(98, 245, 200, 0.08), 0 0 1rem rgba(98, 245, 200, 0.45);
}

.intro { margin: 1.75rem 0 1.3rem; }
.intro p { margin: 0; font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 700; letter-spacing: -0.045em; }
.intro .muted { margin-top: 0.45rem; color: var(--muted); font-size: 1rem; font-weight: 400; letter-spacing: 0; }

.progress-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 1rem;
  margin-bottom: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255,255,255,.018);
}

.progress-copy { margin: 0.25rem 0 0; color: #b7c5d0; font-size: 0.88rem; }
.progress-count { align-self: center; color: var(--cyan); font-size: 1.15rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.progress-track { grid-column: 1 / -1; height: 0.28rem; overflow: hidden; border-radius: 1rem; background: rgba(125, 181, 210, 0.1); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 0.8rem var(--cyan); transition: width .45s cubic-bezier(.2,.8,.2,1); }

.steps { display: grid; gap: 0.7rem; }

.step-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.step-card:hover { transform: translateY(-1px); border-color: rgba(118, 211, 255, 0.24); }
.step-card.complete { border-color: rgba(98, 245, 200, 0.25); background: rgba(45, 187, 151, 0.045); }

.step-icon {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.9rem;
  background: rgba(32, 155, 255, 0.09);
}
.step-icon svg { width: 1.35rem; fill: #8edfff; }
.step-content h2 { margin: .15rem 0 .18rem; font-size: 1rem; letter-spacing: -0.02em; }
.step-content > p:last-child { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.check { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border: 1px solid var(--line); border-radius: 50%; color: transparent; font-size: .75rem; }
.complete .check { border-color: rgba(98,245,200,.4); background: rgba(98,245,200,.12); color: var(--success); }

.action {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid var(--line-bright);
  border-radius: 0.85rem;
  color: #ccefff;
  background: rgba(36, 161, 232, 0.07);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.action:hover { border-color: rgba(81, 218, 255, 0.72); background: rgba(42, 178, 255, 0.13); }
.action:active { transform: scale(.99); }
.complete .action { border-color: rgba(98,245,200,.18); color: var(--success); background: rgba(98,245,200,.055); }

.claim-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  min-height: 3.4rem;
  margin-top: 1rem;
  border: 0;
  border-radius: 1.05rem;
  color: #031017;
  background: linear-gradient(110deg, var(--blue), var(--cyan));
  box-shadow: 0 0.8rem 2.4rem rgba(25, 151, 255, 0.2), inset 0 1px rgba(255,255,255,.35);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 850;
  letter-spacing: .075em;
  transition: filter .2s ease, transform .2s ease, opacity .2s ease;
}
.claim-button svg { width: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; }
.claim-button:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.claim-button:disabled { color: #627180; background: #121b23; box-shadow: inset 0 0 0 1px var(--line); cursor: not-allowed; opacity: .72; }

.key-result { margin-top: 1rem; padding: 1rem; border: 1px solid rgba(59, 216, 255, 0.26); border-radius: 1.1rem; background: rgba(25, 150, 255, 0.055); }
.key-box { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.key-box code { min-width: 0; flex: 1; overflow-wrap: anywhere; color: #bdf2ff; font-size: clamp(.9rem, 4vw, 1.05rem); font-weight: 700; letter-spacing: .04em; }
.key-box button { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; flex: 0 0 auto; border: 1px solid var(--line-bright); border-radius: .8rem; color: var(--cyan); background: rgba(53,215,255,.08); cursor: pointer; }
.key-box svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.exhausted { margin: 1rem 0 0; padding: 1rem; border: 1px solid rgba(255, 102, 120, .25); border-radius: 1rem; color: #ff9baa; background: rgba(255, 67, 91, .06); font-weight: 800; text-align: center; letter-spacing: .08em; }
.feedback { min-height: 1.25rem; margin: .65rem 0 0; color: var(--muted); font-size: .82rem; text-align: center; }

footer { display: flex; align-items: center; justify-content: center; gap: .35rem; margin-top: .35rem; color: #647687; font-size: .75rem; }
footer svg { width: 1rem; fill: #5b8299; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }

@media (min-width: 560px) {
  .key-card { padding: 2rem; }
  .step-card { grid-template-columns: auto 1fr auto auto; }
  .action { grid-column: auto; width: auto; min-width: 8.8rem; padding-inline: .9rem; }
  .check { grid-column: 3; }
}

@media (max-height: 740px) and (min-width: 560px) {
  .shell { align-items: start; }
}

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