/* ═══════════════════════════════════════════════════════════════════════════
   CRN Community Director Registration — register.css
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg:            #090e1a;
  --bg-card:       #0f1623;
  --bg-input:      #161e2e;
  --bg-input-hover:#1a2236;
  --border:        #263044;
  --border-subtle: #182030;
  --accent:        #A6F3DA;
  --accent-hover:  #b8f7e4;
  --accent-dim:    rgba(166,243,218,0.10);
  --accent-glow:   rgba(166,243,218,0.18);
  --text:          #eef2f8;
  --text-muted:    #8896aa;
  --text-subtle:   #3d4f65;
  --danger:        #f87171;
  --danger-dim:    rgba(248,113,113,0.10);
  --success:       #4ade80;
  --ease:          cubic-bezier(0.4,0,0.2,1);
  --ease-out:      cubic-bezier(0.22,1,0.36,1);
  --radius-card:   20px;
  --radius-input:  12px;
  --radius-btn:    12px;
}

/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(166,243,218,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 100% 80%, rgba(100,160,255,0.04) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ── Page loader ───────────────────────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.45s var(--ease-out);
}
#page-loader.hiding { opacity: 0; pointer-events: none; }
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.loader-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  animation: loaderPulse 2s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.95); }
}
.loader-ring {
  width: 36px; height: 36px;
  border: 3px solid rgba(166,243,218,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.reg-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,14,26,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 0.875rem 0;
  flex-shrink: 0;
}
.reg-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.reg-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.reg-header-brand img { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.reg-header-brand-text { display: flex; flex-direction: column; gap: 0.1rem; }
.reg-header-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.reg-header-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}
.reg-header-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
  flex-shrink: 0;
}
.reg-header-back svg { width: 15px; height: 15px; }
.reg-header-back:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

/* ── Main / wrap ───────────────────────────────────────────────────────────── */
.reg-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
}
.reg-wrap {
  width: 100%;
  max-width: 560px;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.reg-hero {
  text-align: center;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.5s var(--ease-out) 0.05s both;
}
.reg-hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.reg-hero-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.65;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.reg-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 20px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden;
  animation: fadeUp 0.5s var(--ease-out) 0.12s both;
  position: relative;
}
.reg-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(166,243,218,0.3) 40%, rgba(166,243,218,0.3) 60%, transparent 100%);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

/* ── Progress ──────────────────────────────────────────────────────────────── */
.reg-progress {
  display: flex;
  align-items: flex-start;
  padding: 1.75rem 1.75rem 0;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 0;
}
.reg-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.reg-step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-subtle);
  transition: all 0.3s var(--ease);
  position: relative;
  z-index: 1;
  user-select: none;
}
.reg-step-num { transition: opacity 0.2s var(--ease); }
.reg-step-check {
  position: absolute;
  width: 12px; height: 12px;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.reg-step-item.active .reg-step-dot {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(166,243,218,0.08);
  box-shadow: 0 0 0 4px rgba(166,243,218,0.10), 0 0 12px rgba(166,243,218,0.15);
  width: 36px; height: 36px;
  font-size: 0.75rem;
}
.reg-step-item.complete .reg-step-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #090e1a;
}
.reg-step-item.complete .reg-step-num { opacity: 0; position: absolute; }
.reg-step-item.complete .reg-step-check { opacity: 1; transform: scale(1); color: #090e1a; }

.reg-step-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.03em;
  transition: color 0.3s var(--ease);
  white-space: nowrap;
  text-transform: uppercase;
}
.reg-step-item.active .reg-step-label { color: var(--accent); }
.reg-step-item.complete .reg-step-label { color: var(--text-muted); }

.reg-step-line {
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  margin-bottom: 1.5rem;
  margin-top: 1rem;
  transition: background 0.4s var(--ease);
  border-radius: 1px;
}
.reg-step-line.complete { background: var(--accent); }

/* ── Step head ─────────────────────────────────────────────────────────────── */
.reg-step-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.reg-step-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(166,243,218,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}
.reg-step-icon svg { width: 18px; height: 18px; }
.reg-step-icon--shield { background: rgba(166,243,218,0.06); }

/* ── Panels ────────────────────────────────────────────────────────────────── */
.reg-panels-wrap { overflow: hidden; }

.reg-panel {
  padding: 1.75rem;
  display: none;
  animation-duration: 0.32s;
  animation-timing-function: var(--ease-out);
  animation-fill-mode: both;
}
.reg-panel.active { display: block; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
.reg-panel.entering-next { animation-name: slideInRight; }
.reg-panel.entering-prev { animation-name: slideInLeft; }

/* ── Step titles ───────────────────────────────────────────────────────────── */
.reg-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.reg-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.reg-subtitle code {
  background: rgba(166,243,218,0.08);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
}

/* ── Fields ────────────────────────────────────────────────────────────────── */
.reg-fields {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
.reg-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.reg-field input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  outline: none;
  -webkit-appearance: none;
}
.reg-field input::placeholder { color: var(--text-subtle); }
.reg-field input:hover:not(:focus) { background: var(--bg-input-hover); border-color: #354560; }
.reg-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166,243,218,0.12);
  background: var(--bg-input-hover);
}
.reg-field input.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.1);
}
.reg-field input.has-success { border-color: rgba(74,222,128,0.45); }
.reg-field input[type=number]::-webkit-inner-spin-button,
.reg-field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.reg-field input[type=number] { -moz-appearance: textfield; }

.reg-hint {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.375rem;
  line-height: 1.55;
}
.field-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.375rem;
  min-height: 1.2em;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.reg-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  align-items: center;
}
.btn-primary {
  flex: 1;
  padding: 0.8125rem 1.25rem;
  background: var(--accent);
  color: #090e1a;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.2s var(--ease), opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  letter-spacing: -0.01em;
}
.btn-primary svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: scale(0.98) translateY(0); }
.btn-primary:disabled { opacity: 0.38; cursor: not-allowed; }

.btn-ghost {
  padding: 0.8125rem 1.125rem;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.btn-ghost svg { width: 14px; height: 14px; }
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

.btn-spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(9,14,26,0.3);
  border-top-color: #090e1a;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

/* ── Step 3: Guild Picker ──────────────────────────────────────────────────── */
.guild-picker-wrap {
  margin-bottom: 1.25rem;
}

/* State placards (no-auth / empty) */
.guild-picker-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.25rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
}
.guild-state-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(166,243,218,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.guild-state-icon--dim {
  background: rgba(255,255,255,0.04);
  color: var(--text-subtle);
}
.guild-state-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

/* Guild grid */
.guild-picker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

/* Individual guild card */
.guild-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s var(--ease);
  position: relative;
  overflow: hidden;
}
.guild-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(166,243,218,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.18s var(--ease);
  pointer-events: none;
}
.guild-card:hover:not(:disabled) {
  border-color: rgba(166,243,218,0.3);
  background: var(--bg-input-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.guild-card:hover:not(:disabled)::before { opacity: 1; }
.guild-card:active:not(:disabled) { transform: translateY(0); }

/* Selected state */
.guild-card--selected {
  border-color: var(--accent) !important;
  background: rgba(166,243,218,0.07) !important;
  box-shadow: 0 0 0 3px rgba(166,243,218,0.12), 0 4px 16px rgba(0,0,0,0.25);
}
.guild-card--selected::before { opacity: 1 !important; }

/* Ineligible (< 50 members) */
.guild-card--ineligible {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.guild-card--ineligible:hover { transform: none !important; box-shadow: none !important; }

/* Server icon */
.guild-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.06);
}
.guild-card-icon--ph {
  background: linear-gradient(135deg, rgba(166,243,218,0.2) 0%, rgba(100,160,255,0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  user-select: none;
}

/* Meta text */
.guild-card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.guild-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guild-card-count {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.guild-card-count svg { flex-shrink: 0; }
.guild-card-count--low { color: var(--danger); opacity: 0.85; }

/* Checkmark shown when selected */
.guild-card-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.guild-card--selected .guild-card-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #090e1a;
}

/* Picker footer */
.guild-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}
.guild-count-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Action buttons (reconnect / refresh) */
.btn-guild-action,
.btn-guild-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.875rem;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
  white-space: nowrap;
}
.btn-guild-action:hover,
.btn-guild-refresh:hover {
  color: var(--accent);
  border-color: rgba(166,243,218,0.35);
  background: rgba(166,243,218,0.05);
}

/* Load more button */
.btn-guild-load-more {
  width: 100%;
  padding: 0.6rem 1rem;
  margin-top: 0.25rem;
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.btn-guild-load-more:hover {
  border-color: rgba(166,243,218,0.3);
  color: var(--accent);
  background: rgba(166,243,218,0.04);
}

/* Taken card (already registered with CRN) */
.guild-card--taken {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.guild-card--taken:hover { transform: none !important; box-shadow: none !important; background: var(--bg-input) !important; }
.guild-card-count--taken { color: var(--text-subtle) !important; }
.guild-card-check--lock {
  color: var(--text-subtle) !important;
}
.guild-card--taken .guild-card-check--lock {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text-subtle);
}

/* No-eligible overlay + blurred grid */
.guild-picker-grid--blurred {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}
.guild-no-eligible-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.guild-no-eligible-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  flex-shrink: 0;
}
.guild-no-eligible-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.guild-no-eligible-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.55;
}

/* ── Step 4: ChevLink ──────────────────────────────────────────────────────── */
.chevlink-feature-card {
  background: linear-gradient(145deg, rgba(166,243,218,0.05) 0%, rgba(100,200,180,0.02) 100%);
  border: 1px solid rgba(166,243,218,0.14);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.chevlink-feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166,243,218,0.25), transparent);
}
.chevlink-card-head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.125rem;
}
.chevlink-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(166,243,218,0.08);
  border: 1px solid rgba(166,243,218,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}
.chevlink-icon img { width: 100%; height: 100%; border-radius: 6px; object-fit: contain; }
.chevlink-card-info { flex: 1; min-width: 0; }
.chevlink-name { font-size: 0.9375rem; font-weight: 700; color: var(--text); }
.chevlink-tagline { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.chevlink-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  flex-shrink: 0;
}
.chevlink-features {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.125rem;
}
.chevlink-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8375rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.chevlink-feat-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(166,243,218,0.12);
  border: 1px solid rgba(166,243,218,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
}
.chevlink-feat-check svg { width: 10px; height: 10px; }

.btn-add-bot {
  width: 100%;
  padding: 0.8125rem 1.25rem;
  background: var(--accent);
  color: #090e1a;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  letter-spacing: -0.01em;
}
.btn-add-bot svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-add-bot:hover { background: var(--accent-hover); box-shadow: 0 4px 16px var(--accent-glow); transform: translateY(-1px); }
.btn-add-bot:active { transform: scale(0.98); }
.btn-add-bot.added {
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.28);
  color: var(--success);
  cursor: default;
  box-shadow: none;
  transform: none;
}

.skip-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
  padding: 0.35rem;
}
.skip-link:hover { color: var(--text-muted); text-decoration: underline; }

/* ── Step 5: Activation code ───────────────────────────────────────────────── */
.code-display-wrap {
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.375rem 1.25rem;
  text-align: center;
  margin-bottom: 1.125rem;
}
.code-display-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}
.code-display-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.code-digits {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--accent);
  transition: opacity 0.2s var(--ease);
  user-select: all;
  padding-left: 0.25em;
}
.code-digits.refreshing { opacity: 0.2; }

.code-copy-btn {
  padding: 0.35rem 0.8rem;
  background: rgba(166,243,218,0.08);
  border: 1px solid rgba(166,243,218,0.2);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  visibility: hidden;
}
.code-copy-btn:hover { background: rgba(166,243,218,0.16); }
.code-copy-btn.copied { color: var(--success); border-color: rgba(74,222,128,0.3); }
.code-copy-btn.visible { visibility: visible; }

.code-countdown-wrap {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.code-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.code-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s linear, background 0.5s;
  width: 100%;
}
.code-progress-fill.urgent { background: var(--danger); }
.code-timer {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 2.75rem;
  text-align: right;
  transition: color 0.3s;
}
.code-timer.urgent { color: var(--danger); }

.code-command-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}
.code-verify-row { display: flex; justify-content: center; margin-top: 1rem; }
.code-entry-error {
  font-size: 0.8rem;
  color: var(--danger);
  min-height: 1.25em;
  margin-bottom: 0.5rem;
}
.code-refresh-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 1rem;
}

/* ── Step 6: Success ───────────────────────────────────────────────────────── */
.success-panel {
  text-align: center;
  padding: 2.5rem 1.75rem 2.25rem;
  position: relative;
  overflow: hidden;
}
.success-glow {
  position: absolute;
  top: -60px; left: 50%;
  width: 280px; height: 280px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(166,243,218,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.success-check-wrap {
  width: 72px; height: 72px;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
}
.check-circle {
  fill: rgba(166,243,218,0.06);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: drawCircle 0.55s var(--ease-out) 0.1s forwards;
}
.check-mark {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawMark 0.38s var(--ease-out) 0.58s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawMark   { to { stroke-dashoffset: 0; } }

.success-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  position: relative; z-index: 1;
}
.success-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.875rem;
  position: relative; z-index: 1;
}

.community-id-box {
  background: rgba(166,243,218,0.05);
  border: 1px solid rgba(166,243,218,0.18);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  min-width: 260px;
  position: relative; z-index: 1;
}
.community-id-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.community-id-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.community-id-value {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.community-id-copy-btn {
  background: rgba(166,243,218,0.08);
  border: 1px solid rgba(166,243,218,0.2);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.community-id-copy-btn svg { width: 13px; height: 13px; }
.community-id-copy-btn:hover { color: var(--accent); background: rgba(166,243,218,0.14); }

.community-id-hint {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-bottom: 1.75rem;
  line-height: 1.55;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  position: relative; z-index: 1;
}
.success-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative; z-index: 1;
}
.success-actions .btn-primary { max-width: 220px; }
.success-score-note {
  font-size: 0.78rem;
  color: var(--text-subtle);
  line-height: 1.6;
  position: relative; z-index: 1;
}

/* ── Confetti ──────────────────────────────────────────────────────────────── */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.reg-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a2235;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 10001;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
  opacity: 0;
  pointer-events: none;
}
.reg-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.reg-toast.toast-error { border-color: rgba(248,113,113,0.4); background: #1c1219; }

/* ── Password ──────────────────────────────────────────────────────────────── */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.75rem; }
.pw-toggle {
  position: absolute;
  right: 0.5rem; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  overflow: hidden;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
  flex-shrink: 0;
}
.pw-toggle:hover { color: var(--accent); background: rgba(166,243,218,0.07); border-color: rgba(166,243,218,0.2); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pw-toggle:active { transform: translateY(-50%) scale(0.94); }
.pw-toggle .icon-wrap { position: relative; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.pw-toggle .eye-open, .pw-toggle .eye-closed { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease); }
.pw-toggle .eye-open svg, .pw-toggle .eye-closed svg { width: 17px; height: 17px; }
.pw-toggle .eye-closed { opacity: 0; transform: scale(0.8); pointer-events: none; }
.pw-toggle[aria-pressed="true"] .eye-open { opacity: 0; transform: scale(0.8); pointer-events: none; }
.pw-toggle[aria-pressed="true"] .eye-closed { opacity: 1; transform: scale(1); pointer-events: auto; }
.pw-toggle.is-toggling .icon-wrap { animation: pwEyePop 0.26s var(--ease-out); }
@keyframes pwEyePop { 0% { transform: scale(0.9); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } }

.pw-strength-wrap { margin-top: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.pw-strength-bars { display: flex; gap: 3px; flex: 1; }
.pw-strength-bar { flex: 1; height: 3px; border-radius: 2px; background: var(--border-subtle); transition: background 0.3s var(--ease); }
.pw-strength-bar.active-1 { background: #f87171; }
.pw-strength-bar.active-2 { background: #fb923c; }
.pw-strength-bar.active-3 { background: #fbbf24; }
.pw-strength-bar.active-4 { background: #4ade80; }
.pw-strength-label { font-size: 0.72rem; font-weight: 600; min-width: 38px; text-align: right; transition: color 0.3s; color: var(--text-subtle); }
.pw-strength-label.s1 { color: #f87171; } .pw-strength-label.s2 { color: #fb923c; }
.pw-strength-label.s3 { color: #fbbf24; } .pw-strength-label.s4 { color: #4ade80; }

.pw-requirements { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.275rem; }
.pw-req { display: flex; align-items: center; gap: 0.375rem; font-size: 0.76rem; color: var(--text-subtle); transition: color 0.2s; }
.pw-req.met { color: #4ade80; }
.pw-req-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; transition: background 0.2s; }

/* ── Plan Selection Cards ──────────────────────────────────────────────────── */
.plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  outline: none;
  user-select: none;
}
.plan-card:hover {
  border-color: rgba(166, 243, 218, 0.35);
  background: var(--bg-input-hover);
}
.plan-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.plan-card.selected {
  border-color: var(--accent);
  background: rgba(166, 243, 218, 0.06);
  box-shadow: 0 0 0 1px rgba(166, 243, 218, 0.15), inset 0 1px 0 rgba(166, 243, 218, 0.08);
}
.plan-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.plan-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  background: rgba(166, 243, 218, 0.1);
  border: 1px solid rgba(166, 243, 218, 0.18);
}
.plan-card-icon svg { width: 16px; height: 16px; }
.plan-card-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.plan-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.plan-card-availability {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.18em 0.55em;
  border-radius: 99px;
  display: inline-block;
  width: fit-content;
  letter-spacing: 0.01em;
}
.plan-card-availability--available {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.22);
}
.plan-card-availability--requirement {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.22);
}
.plan-card-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  margin-top: 0.15rem;
  position: relative;
  transition: border-color 0.2s var(--ease);
}
.plan-card-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.plan-card.selected .plan-card-radio {
  border-color: var(--accent);
}
.plan-card.selected .plan-card-radio::after {
  opacity: 1;
  transform: scale(1);
}
.plan-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.plan-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
  border: 1.5px solid rgba(166, 243, 218, 0.3);
  background: transparent;
  color: var(--accent);
  width: 100%;
}
.plan-card-btn:hover {
  background: rgba(166, 243, 218, 0.1);
  border-color: var(--accent);
}
.plan-card-btn--selected {
  background: var(--accent);
  color: #090e1a;
  border-color: var(--accent);
}
.plan-card-btn--selected:hover {
  background: #b8f7e4;
  border-color: #b8f7e4;
}
.plan-member-verify {
  margin-bottom: 0.5rem;
  padding: 1rem 1.1rem;
  background: rgba(166, 243, 218, 0.04);
  border: 1px solid rgba(166, 243, 218, 0.15);
  border-radius: var(--radius-sm);
  animation: fadeSlideDown 0.25s var(--ease-out) both;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.plan-member-error {
  color: #f85149;
  font-size: 0.8125rem;
  margin-top: 0.4rem;
}
@media (max-width: 520px) {
  .plan-cards { grid-template-columns: 1fr; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.reg-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.25rem 1.5rem;
  flex-shrink: 0;
}
.reg-footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.reg-footer-copy { font-size: 0.78rem; color: var(--text-subtle); }
.reg-footer-links {
  display: flex;
  gap: 1.25rem;
}
.reg-footer-links a {
  font-size: 0.78rem;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.2s;
}
.reg-footer-links a:hover { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .reg-main { padding: 1.5rem 0.875rem 2rem; }

  /* Header */
  .reg-header-brand-text .reg-header-tagline { display: none; }
  .reg-header-name { font-size: 0.8125rem; }

  /* Hero */
  .reg-hero-title { font-size: 1.375rem; }
  .reg-hero-sub { font-size: 0.85rem; }

  /* Card */
  .reg-card { border-radius: 16px; }

  /* Progress */
  .reg-progress { padding: 1.25rem 1rem 1rem; }
  .reg-step-label { font-size: 0.58rem; }
  .reg-step-item.active .reg-step-dot { width: 30px; height: 30px; font-size: 0.7rem; }

  /* Panels */
  .reg-panel { padding: 1.25rem; }
  .reg-step-head { gap: 0.75rem; }
  .reg-step-icon { width: 36px; height: 36px; border-radius: 9px; }
  .reg-step-icon svg { width: 16px; height: 16px; }
  .reg-title { font-size: 1.125rem; }
  .reg-subtitle { font-size: 0.8375rem; }

  /* Buttons — stack on small screens */
  .reg-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .btn-primary, .btn-ghost { width: 100%; flex: none; }
  .btn-ghost { order: 2; }

  /* Code */
  .code-digits { font-size: 1.75rem; letter-spacing: 0.2em; }

  /* Success */
  .success-panel { padding: 2rem 1.25rem 1.75rem; }
  .community-id-box { min-width: 0; width: 100%; }

  /* Footer */
  .reg-footer-inner { flex-direction: column; gap: 0.625rem; align-items: center; text-align: center; }
}

@media (max-width: 400px) {
  .reg-progress { padding: 1rem 0.75rem 0.875rem; }
  .reg-step-label { display: none; }
  .code-digits { font-size: 1.5rem; letter-spacing: 0.18em; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body, .reg-card, .reg-hero { animation: none; }
  .btn-primary:hover:not(:disabled) { transform: none; }
  #page-loader { transition: none; }
  .loader-logo { animation: none; }
  .loader-ring { animation: none; border-top-color: var(--accent); }
  .reg-panel { animation: none; }
}

/* ── Bot silent scan row ─────────────────────────────────────────────────── */
.bot-scan-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
}
.bot-scan-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(166,243,218,0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
.bot-scan-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Bot refresh button ──────────────────────────────────────────────────── */
.bot-btn-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.bot-btn-row .btn-add-bot {
  flex: 1;
}
.btn-bot-refresh {
  flex-shrink: 0;
  width: 48px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-bot-refresh:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}
.btn-bot-refresh svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn-bot-refresh.spinning svg {
  animation: spin 0.7s linear infinite;
}

/* ── Step 5 auto-detecting indicator ───────────────────────────────────── */
.step5-auto-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted, #8892a4);
  margin-left: 10px;
  white-space: nowrap;
}
.auto-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #A6F3DA);
  display: inline-block;
  animation: autoPulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes autoPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .auto-pulse { animation: none; }
}

/* ── Discord OAuth (Step 1) ────────────────────────────────────────────────── */
.discord-oauth-section {
  margin-bottom: 1.5rem;
}
.discord-connect-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.btn-discord-connect {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  line-height: 1;
}
.btn-discord-connect:hover { background: #4752c4; }
.btn-discord-connect:active { transform: scale(0.97); }
.btn-discord-connect:disabled { opacity: 0.6; cursor: not-allowed; }
.discord-oauth-hint {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin: 0;
}
.discord-verified-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-input);
  border: 1.5px solid rgba(88,101,242,0.45);
  border-radius: var(--radius-input);
  padding: 0.7rem 1rem;
}
.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border);
}
.discord-verified-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.discord-verified-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discord-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.discord-reauth-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s, color 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.discord-reauth-btn:hover { border-color: var(--text-muted); color: var(--text); }

/* ── TOTP 2FA Setup (Step 6) ───────────────────────────────────────────────── */
.totp-setup-wrap {
  margin: 1.5rem 0 1.25rem;
}
.totp-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 0;
}
.totp-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.totp-qr-img {
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #fff;
  padding: 8px;
  display: block;
}
.totp-secret-wrap {
  width: 100%;
  max-width: 420px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 0.85rem 1rem;
}
.totp-secret-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}
.totp-secret-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.totp-secret {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  flex: 1;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.totp-secret-copy {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s;
  font-family: inherit;
}
.totp-secret-copy:hover { background: rgba(166,243,218,0.18); }

.totp-verify-wrap {
  margin-bottom: 1.25rem;
  text-align: center;
}
.totp-code-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  text-align: center;
}
.totp-code-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
}
.totp-code-input {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text);
  font-size: 1.4rem;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.25em;
  padding: 0.6rem 1rem;
  text-align: center;
  transition: border-color 0.18s;
  outline: none;
  max-width: 180px;
}
.totp-code-input:focus { border-color: var(--accent); }
.totp-required-note {
  font-size: 0.8rem;
  color: var(--text-subtle);
  text-align: center;
  margin-top: 0.5rem;
}
