:root {
  --bg: #0f1117;
  --surface: #171a22;
  --surface2: #1e2230;
  --border: #2a3042;
  --text: #e8eaf0;
  --muted: #9aa3b8;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --ok: #3ba55d;
  --warn: #faa81a;
  --danger: #ed4245;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  font-family: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(88,101,242,.25), transparent),
    var(--bg);
}

.landing__card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.landing__logo { border-radius: 16px; margin-bottom: 16px; }
.landing h1 { margin: 0 0 8px; font-size: 1.5rem; }
.landing__sub { color: var(--muted); margin: 0 0 20px; line-height: 1.5; }
.landing__hint { color: var(--danger); font-size: .9rem; min-height: 1.2em; }
.landing__features {
  text-align: left;
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
}

.invite-meta {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: .9rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn--ghost:hover { color: var(--text); border-color: var(--muted); }
.btn--ok { background: var(--ok); color: #fff; }
.btn--lg { padding: 14px 22px; font-size: 1rem; }
.btn--sm { padding: 6px 12px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.wizard {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.wizard__nav {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard__brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
}
.wizard__brand img { border-radius: 10px; }
.wizard__brand strong { display: block; font-size: .95rem; }
.wizard__user { font-size: .8rem; color: var(--muted); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.steps li {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .9rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 4px;
}
.steps li.active { background: var(--surface2); color: var(--text); font-weight: 600; }
.steps li.done { color: var(--ok); }
.steps li.done::before { content: '✓ '; }

.wizard__main {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
}

.wizard__head {
  padding: 24px 28px 12px;
  border-bottom: 1px solid var(--border);
}
.wizard__head h2 { margin: 0 0 6px; font-size: 1.35rem; }
.wizard__head p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.wizard__body {
  flex: 1;
  overflow: auto;
  padding: 20px 28px 28px;
}

.wizard__foot {
  display: flex;
  justify-content: space-between;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.step-apply {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  max-width: 640px;
}

.step-apply__hint {
  margin: 0;
}

.field-grid {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.field select, .field textarea, .field input[type="text"] {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
}
.field textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.chip-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  font-size: .88rem;
}
.chip-btn.selected { border-color: var(--accent); background: rgba(88,101,242,.15); }

.summary-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: .88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--muted);
  max-width: 720px;
}

.rank-grid, .picker-grid {
  display: grid;
  gap: 12px;
  max-width: 640px;
}

.toast-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .9rem;
  box-shadow: var(--shadow);
  max-width: 360px;
}
.toast--ok { border-color: var(--ok); }
.toast--err { border-color: var(--danger); }

@media (max-width: 860px) {
  .wizard { grid-template-columns: 1fr; }
  .wizard__nav { border-right: none; border-bottom: 1px solid var(--border); }
  .steps { display: flex; flex-wrap: wrap; gap: 4px; }
  .steps li { flex: 1 1 auto; text-align: center; font-size: .78rem; padding: 8px; }
}
