:root {
  color-scheme: dark;
  --bg: #050609;
  --surface: rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.07);
  --surface-3: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --text: #f6f6f8;
  --muted: #9a9aa4;
  --faint: #7e7e88;
  --discord: #5865f2;
  --discord-hover: #6975f5;
  --success: #4ade80;
  --success-soft: rgba(74,222,128,.10);
  --success-border: rgba(74,222,128,.28);
  --danger: #f87171;
  --danger-soft: rgba(248,113,113,.10);
  --danger-border: rgba(248,113,113,.28);
  --warning: #fbbf24;
  --warning-soft: rgba(251,191,36,.10);
  --warning-border: rgba(251,191,36,.26);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 50% at 50% 0%, rgba(120,124,134,.45) 0%, rgba(58,60,68,.30) 40%, rgba(5,6,9,.07) 72%, transparent 100%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 76% 54% at 50% 0%, transparent 0%, rgba(0,0,0,.13) 50%, rgba(0,0,0,.62) 100%),
    linear-gradient(180deg, transparent 0%, rgba(5,6,9,.16) 48%, rgba(5,6,9,.82) 86%, rgba(5,6,9,.98) 100%);
}

a { color: inherit; }
strong { color: rgba(255,255,255,.9); }
svg { display: block; }

.site-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(30px, 7vh, 78px) 18px;
}
.page-frame { width: min(100%, 420px); }
.page-frame-wide { width: min(100%, 640px); }
.page-enter { animation: pageIn .48s var(--ease-out) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page-enter { animation-duration: .001ms; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

.auth-screen,
.outcome-screen {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.auth-logo,
.outcome-logo {
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  margin: 0 0 8px;
  filter: drop-shadow(0 14px 28px rgba(200,200,210,.14));
}
.auth-logo svg,
.outcome-logo svg,
.auth-logo img,
.outcome-logo img { width: 132px; height: 132px; object-fit: contain; }
.brand-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.auth-copy,
.outcome-copy {
  max-width: 330px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.auth-action,
.outcome-action { width: 100%; margin: 38px 0 0; }

.button {
  min-height: 54px;
  width: 100%;
  border: 0;
  border-radius: var(--r-lg);
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.99); }
.button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.button-discord {
  background: linear-gradient(180deg, #4a4c54 0%, #2e3036 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 0 0 1px rgba(255,255,255,.08), 0 14px 32px rgba(0,0,0,.35);
}
.button-discord:hover {
  background: linear-gradient(180deg, #575a63 0%, #383a41 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px rgba(255,255,255,.12), 0 17px 38px rgba(0,0,0,.42);
}
.button-secondary { background: var(--surface-2); color: var(--text); }
.button-secondary:hover { background: var(--surface-3); }
.button svg { width: 20px; height: 17px; flex: 0 0 20px; }

.supporting-panel {
  width: 100%;
  margin-top: 28px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: left;
}
.security-note { padding: 0 0 17px; border-bottom: 1px solid var(--border); }
.security-note-title {
  margin: 0 0 5px;
  color: rgba(255,255,255,.86);
  font-size: 12.5px;
  font-weight: 700;
}
.security-note-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.panel-label {
  margin: 17px 0 10px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.permission-item {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.permission-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  font-size: 10px;
  line-height: 1;
}
.permission-item.allowed .permission-mark { background: var(--success-soft); color: var(--success); }
.permission-item.denied .permission-mark { background: rgba(255,255,255,.06); color: var(--faint); }

.site-footer {
  width: 100%;
  margin-top: 20px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}
.site-footer p { margin: 0 0 7px; }
.site-footer-links { display: flex; justify-content: center; gap: 16px; }
.site-footer a { text-decoration: none; transition: color .18s ease; }
.site-footer a:hover { color: var(--muted); }

.outcome-icon {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 18px auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
}
.outcome-icon.success { color: var(--success); background: var(--success-soft); }
.outcome-icon.error { color: var(--danger); background: var(--danger-soft); }
.outcome-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 13px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.outcome-kicker.success { color: #bdf5cf; background: var(--success-soft); }
.outcome-kicker.error { color: #ffc9c9; background: var(--danger-soft); }
.outcome-title { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.025em; }
.outcome-meta { margin: 20px 0 0; color: var(--faint); font-size: 11.5px; line-height: 1.5; }

@media (max-width: 430px) {
  .site-shell { padding: 26px 16px 34px; }
  .auth-logo, .outcome-logo { width: 124px; height: 124px; }
  .auth-logo svg, .outcome-logo svg, .auth-logo img, .outcome-logo img { width: 116px; height: 116px; }
  .auth-action, .outcome-action { margin-top: 30px; }
  .supporting-panel { margin-top: 22px; padding: 16px; }
  .permission-grid { grid-template-columns: 1fr; }
}

/* Legal pages */
.legal { width: 100%; text-align: left; }
.legal .back { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: 12.5px; text-decoration: none; }
.legal .back:hover { color: var(--text); }
.legal h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.legal .updated { margin: 0 0 22px; color: var(--faint); font-size: 12px; }
.legal h2 { margin: 22px 0 6px; font-size: 14px; color: rgba(255,255,255,.88); }
.legal p, .legal li { color: var(--muted); font-size: 13px; line-height: 1.6; }
.legal ul { padding-left: 18px; margin: 0; }
