:root {
  --bg: #0F0F1A;
  --card: #181829;
  --text: #F4F4FB;
  --muted: #A5A5C0;
  --accent: #6C5CE7;
  --radius: 28px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  background: radial-gradient(circle at 20% 10%, #25234a 0%, var(--bg) 55%);
  color: var(--text);
  overflow: hidden;
}
.stage {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}
.card {
  width: 100%; max-width: 400px;
  height: min(780px, calc(100dvh - 24px));
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.02) inset;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.card::before {
  content: ''; position: absolute; inset: -40% -20% auto -20%; height: 60%;
  background: radial-gradient(closest-side, var(--accent), transparent 70%);
  opacity: .22; pointer-events: none; transition: background .5s ease;
}
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 6px;
}
.brand { font-weight: 600; letter-spacing: .3px; color: var(--muted); }
.brand b { color: var(--text); }
.skip {
  background: rgba(255,255,255,.08); color: var(--text);
  border: 0; border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.skip:hover { background: rgba(255,255,255,.16); }

.viewport { position: relative; z-index: 1; flex: 1; overflow: hidden; }
.track {
  display: flex; height: 100%;
  transition: transform .45s cubic-bezier(.65,.05,.25,1);
  will-change: transform;
}
.slide {
  min-width: 100%; height: 100%;
  padding: 8px 22px 6px;
  overflow-y: auto;
  scrollbar-width: none;
}
.slide::-webkit-scrollbar { display: none; }

.icon {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; font-size: 28px;
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  margin-bottom: 12px;
}
.step { font-size: 12px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; }
.slide h1 { font-size: 26px; line-height: 1.15; margin: 4px 0 4px; }
.slide .sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.features { list-style: none; display: grid; gap: 10px; padding-bottom: 8px; }
.features li {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 11px 12px;
  opacity: 0; transform: translateY(10px);
}
.slide.active .features li { animation: rise .5s ease forwards; }
.slide.active .features li:nth-child(1) { animation-delay: .10s; }
.slide.active .features li:nth-child(2) { animation-delay: .17s; }
.slide.active .features li:nth-child(3) { animation-delay: .24s; }
.slide.active .features li:nth-child(4) { animation-delay: .31s; }
.slide.active .features li:nth-child(5) { animation-delay: .38s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.num {
  flex: none; width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--accent); color: #fff;
}
.features h3 { font-size: 14.5px; margin-bottom: 2px; }
.features p { font-size: 12.8px; line-height: 1.4; color: var(--muted); }

.dots { position: relative; z-index: 2; display: flex; justify-content: center; gap: 7px; padding: 10px 0 4px; }
.dot { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.2); transition: all .3s; }
.dot.on { width: 22px; background: var(--accent); }

.actions {
  position: relative; z-index: 2;
  display: flex; gap: 10px; padding: 10px 20px calc(18px + env(safe-area-inset-bottom) * 0);
}
.btn {
  flex: 1; border: 0; border-radius: 16px; padding: 15px;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .1s, opacity .2s, background .3s;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: rgba(255,255,255,.08); color: var(--text); flex: .45; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -8px var(--accent); }
.btn.ghost[hidden] { visibility: hidden; display: block; }

.done {
  position: absolute; inset: 0; z-index: 10; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--card); text-align: center; padding: 30px;
}
.done.show { display: flex; animation: rise .4s ease forwards; }
.done h2 { font-size: 26px; }
.done p { color: var(--muted); }

@media (min-width: 500px) { .card { height: 760px; } }
@media (prefers-reduced-motion: reduce) {
  .track, .features li { transition: none; animation: none !important; opacity: 1; transform: none; }
}
