:root {
  --bg: #000000;
  --bg-2: #050508;
  --surface: #0a0a0f;
  --surface-solid: #0c0c12;
  --surface-2: #111118;
  --elevated: #0e0e14;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(59, 130, 246, 0.45);
  --border-active: rgba(96, 165, 250, 0.55);
  --text: #f0f4ff;
  --muted: #8b95a8;
  --dim: #555d6e;
  --blue: #3b82f6;
  --blue-soft: #60a5fa;
  --blue-deep: #1d4ed8;
  --blue-glow: rgba(59, 130, 246, 0.35);
  --success: #22c55e;
  --warn: #eab308;
  --danger: #ef4444;
  --grad: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --font: "Inter", system-ui, sans-serif;
  --display: "Inter", var(--font);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
body.page-ready { opacity: 1; }

a { color: inherit; text-decoration: none; }

/* Icons */
.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.1em; height: 1.1em; flex-shrink: 0;
}
.icon svg { width: 100%; height: 100%; display: block; }
.icon-lg { width: 18px; height: 18px; }
.icon-box {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--blue-soft);
  transition: border-color 0.3s, background 0.3s;
}
.icon-box svg { width: 22px; height: 22px; }

/* Background */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-aurora {
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 35% 25% at 100% 0%, rgba(29, 78, 216, 0.1), transparent 55%),
    linear-gradient(180deg, #000000 0%, #050508 100%);
}
.bg-mesh {
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black 10%, transparent 75%);
}
.bg-noise {
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 200px;
}
.bg-beam { display: none; }

.cursor-glow {
  position: fixed; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06), transparent 70%);
  pointer-events: none; z-index: 0;
}

.shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.container { width: min(1160px, 92vw); margin: 0 auto; padding: 0 1.25rem 4rem; flex: 1; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, height 0.3s;
}
.nav.nav-scrolled {
  height: 64px;
  background: rgba(0, 0, 0, 0.92);
  border-bottom-color: var(--border);
}

.brand {
  display: flex; align-items: center; gap: 0.75rem;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
}
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 0 12px var(--blue-glow)); }
.brand-name {
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.02em; line-height: 1.2;
}
.brand-sub { display: block; font-size: 0.6rem; color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  flex: 1; justify-content: center;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.85rem; border-radius: var(--radius);
  font-size: 0.8125rem; font-weight: 600; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-link .icon { width: 15px; height: 15px; opacity: 0.65; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--blue-soft); background: rgba(59,130,246,0.1); }
.nav-link.active .icon { opacity: 1; color: var(--blue-soft); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

@media (max-width: 820px) {
  .nav-links .nav-link.hide-sm { display: none; }
  .brand-sub { display: none; }
  .nav-links { justify-content: flex-start; }
}

/* Buttons — clean, slightly rounded */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.2rem; border-radius: var(--radius);
  font-family: var(--font); font-size: 0.875rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  color: #fff;
  background: var(--blue);
  border-color: rgba(96, 165, 250, 0.3);
}
.btn-primary:hover {
  background: var(--blue-deep);
  box-shadow: 0 4px 20px var(--blue-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--border-hover);
  background: rgba(59,130,246,0.06);
}

.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
.btn-block { width: 100%; }

.btn-ms {
  background: var(--surface); border: 1px solid var(--border); color: #fff;
}
.btn-ms:hover { border-color: rgba(255,255,255,0.18); background: var(--surface-2); }

.btn-ripple-wave {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(2.5); opacity: 0; } }

/* Typography */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1rem; font-weight: 600; }

.text-grad { color: var(--blue-soft); }
.lead { color: var(--muted); font-size: 1.02rem; max-width: 36rem; line-height: 1.75; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim);
  margin-bottom: 1rem;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
}

.label {
  display: block; font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-bottom: 0.45rem;
}
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--muted); }
.mono { font-family: var(--mono); word-break: break-all; }
.accent { color: var(--blue-soft); }

.cmd-chip {
  display: inline-block; font-family: var(--mono); font-size: 0.78rem;
  padding: 0.15rem 0.5rem; border-radius: 4px;
  background: rgba(59, 130, 246, 0.1); color: var(--blue-soft);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

/* Badges */
.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.65rem; border-radius: 4px;
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
}
.badge-live { border-color: rgba(34,197,94,0.3); color: var(--success); }
.badge-live .badge-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--success);
}
.badge-blue { border-color: rgba(59,130,246,0.3); color: var(--blue-soft); background: rgba(59,130,246,0.08); }

/* Cards */
.card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.card-hover:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}
.card-glow { border-color: rgba(59,130,246,0.2); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem; align-items: center;
  padding: 3rem 0 3.5rem;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 2rem; }
  .hero-panel { order: -1; }
}

.hero-content { min-width: 0; }

.hero-title {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 32rem;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem;
}

.hero-panel {
  display: flex; justify-content: center;
  min-width: 0;
}

.hero-panel-card {
  width: 100%;
  max-width: 340px;
  padding: 1.75rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.hero-panel-logo {
  display: block;
  width: 72px; height: 72px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 20px var(--blue-glow));
}

.hero-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.hero-module-cell {
  padding: 0.85rem 0.75rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Sections */
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head .lead { margin: 0.65rem auto 0; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 3rem; }
@media (max-width: 768px) { .pillars { grid-template-columns: 1fr; } }

.pillar { text-align: left; padding: 1.35rem; }
.pillar .icon-box { margin: 0 0 1rem; }
.pillar h3 { margin-bottom: 0.5rem; }
.pillar.cat-combat .icon-box { color: #f87171; border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.06); }
.pillar.cat-mining .icon-box { color: #fbbf24; border-color: rgba(251,191,36,0.25); background: rgba(251,191,36,0.06); }
.pillar.cat-move .icon-box { color: var(--blue-soft); }

.steps-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 3rem; background: var(--elevated);
}
@media (max-width: 768px) { .steps-strip { grid-template-columns: 1fr; } }
.step-strip-item {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--border);
}
.step-strip-item:last-child { border-right: none; }
@media (max-width: 768px) {
  .step-strip-item { border-right: none; border-bottom: 1px solid var(--border); }
  .step-strip-item:last-child { border-bottom: none; }
}
.step-strip-num {
  font-family: var(--display); font-size: 2rem; font-weight: 800;
  color: rgba(59,130,246,0.25); line-height: 1; margin-bottom: 0.65rem;
}
.step-strip-item h3 { margin-bottom: 0.45rem; font-size: 1rem; }

.cta-banner {
  text-align: center; padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--elevated);
  border: 1px solid rgba(59,130,246,0.2);
}
.cta-banner h2 { margin-bottom: 0.65rem; }
.cta-banner p { color: var(--muted); max-width: 26rem; margin: 0 auto 1.5rem; font-size: 0.95rem; }

/* Forms */
.field { margin-bottom: 1rem; }
.input {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.input::placeholder { color: var(--dim); }
.form-error { color: var(--danger); font-size: 0.8125rem; margin-top: 0.4rem; min-height: 1.2rem; }
.link-accent { color: var(--blue-soft); font-weight: 600; }
.link-accent:hover { color: var(--blue); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

.feature-card { border-left: 2px solid var(--cat, var(--blue)); }
.feature-card.cat-mining { --cat: #fbbf24; }
.feature-card.cat-combat { --cat: #f87171; }
.feature-card.cat-movement { --cat: var(--blue-soft); }
.feature-card.cat-utility { --cat: #818cf8; }
.feature-card.cat-hud { --cat: #34d399; }
.feature-card.cat-access { --cat: var(--blue); }
.feature-card .icon-box { margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.85rem; }
.feature-tag {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 600;
  padding: 0.2rem 0.5rem; border-radius: 4px;
  background: var(--surface); border: 1px solid var(--border); color: var(--dim);
}

/* Server cards */
#server-grid { display: grid; gap: 1rem; }
.server-card {
  cursor: pointer; text-align: left; color: inherit; font: inherit; width: 100%;
  padding: 1.5rem;
}
.server-card.locked { opacity: 0.4; cursor: not-allowed; }
.server-card.locked:hover { border-color: var(--border); box-shadow: none; }
.server-card.selected {
  border-color: var(--border-active);
  box-shadow: 0 0 0 1px var(--border-active);
}
.server-card.featured { grid-column: 1 / -1; }
@media (min-width: 769px) {
  .server-card.featured { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
}
.server-icon-wrap {
  width: 64px; height: 64px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue-soft);
}
.server-icon-wrap svg { width: 28px; height: 28px; }
.server-card:not(.featured) .server-icon-wrap { margin-bottom: 1rem; }
.server-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 4px;
}
.server-badge.badge-live { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }
.badge-soon { background: var(--surface); color: var(--dim); border: 1px solid var(--border); }
.server-features { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.85rem; }

/* Dashboard */
.stepper {
  display: flex; justify-content: space-between;
  margin-bottom: 2rem; padding: 0; position: relative;
}
.stepper::before {
  content: ''; position: absolute; top: 18px; left: 10%; right: 10%; height: 1px;
  background: var(--border);
}
.step-item { flex: 1; text-align: center; position: relative; z-index: 1; min-width: 0; }
.step-dot {
  width: 36px; height: 36px; border-radius: var(--radius);
  margin: 0 auto 0.5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--dim); transition: all 0.3s;
}
.step-item.active .step-dot {
  background: rgba(59,130,246,0.12); border-color: var(--blue);
  color: var(--blue-soft);
}
.step-item.done .step-dot {
  background: rgba(34,197,94,0.1); border-color: var(--success); color: var(--success);
}
.step-label {
  font-size: 0.625rem; font-weight: 700; color: var(--dim);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0 0.25rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.step-item.active .step-label { color: var(--blue-soft); }
.step-item.done .step-label { color: var(--success); }

@media (max-width: 500px) {
  .stepper::before { display: none; }
  .stepper { gap: 0.5rem; }
  .step-dot { width: 32px; height: 32px; font-size: 0.7rem; }
}

.panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem;
}
.panel-accent {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--blue); border-radius: 2px 0 0 2px;
}
.panel-card { padding-left: 1.75rem; }

.instruction-list { list-style: none; margin: 1rem 0; display: flex; flex-direction: column; gap: 0.6rem; }
.instruction-list li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.875rem; color: var(--muted);
  padding: 0.75rem 1rem;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.instruction-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 4px;
  background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: var(--blue-soft);
}

.code-box {
  font-family: var(--mono); font-size: 1.75rem; font-weight: 600; letter-spacing: 0.18em;
  text-align: center; padding: 1.25rem; margin: 0.85rem 0;
  background: var(--bg-2); border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius); color: var(--blue-soft);
  user-select: all; overflow-x: auto;
}
.cmd-box {
  font-family: var(--mono); font-size: 0.85rem; text-align: center;
  color: var(--muted); padding: 0.65rem 1rem;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); word-break: break-all;
}

.divider { height: 1px; background: var(--border); margin: 1.25rem 0; }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-radius: 4px;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.status-pill.ok { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.status-pill.pending { background: rgba(234,179,8,0.08); color: var(--warn); border: 1px solid rgba(234,179,8,0.2); }
.status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border); border-top-color: var(--blue);
  border-radius: 50%; animation: spin 0.65s linear infinite; margin: 1rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Terminal */
.terminal-card { border-color: rgba(59,130,246,0.15); }
.terminal-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding-bottom: 0.85rem; margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem; color: var(--dim); font-weight: 600;
}
.tdot { width: 10px; height: 10px; border-radius: 50%; }
.tdot-r { background: #ef4444; }
.tdot-y { background: #eab308; }
.tdot-g { background: #22c55e; }

/* Auth */
.auth-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; min-height: calc(100vh - var(--nav-h) - 3rem);
  padding: 2rem 0;
}
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; min-height: auto; }
  .auth-side { display: none; }
}
.auth-side h2 { margin-bottom: 0.85rem; }
.auth-perks { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.auth-perk {
  display: flex; gap: 0.75rem; align-items: center;
  font-size: 0.875rem; color: var(--muted);
  padding: 0.75rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.auth-perk .icon-box { width: 36px; height: 36px; flex-shrink: 0; border-radius: 6px; }
.auth-perk .icon-box svg { width: 16px; height: 16px; }
.auth-card { padding: 2rem; }

/* Footer */
.footer {
  padding: 2rem 0; margin-top: auto;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8125rem; color: var(--dim);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--blue-soft); }
.footer-links { display: flex; gap: 1.25rem; }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  padding: 0.85rem 1.25rem;
  background: var(--surface-solid); border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Reveal */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal-stagger > *.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.34s; }
.reveal-delay-1 { transition-delay: 0.08s !important; }
.reveal-delay-2 { transition-delay: 0.16s !important; }
.reveal-delay-3 { transition-delay: 0.24s !important; }
.reveal-delay-4 { transition-delay: 0.32s !important; }

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.gap-1 { display: flex; gap: 0.65rem; flex-wrap: wrap; }

.page-head { padding: 2.5rem 0 1.75rem; }
.page-head-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 1rem;
}
.page-head-row > div:first-child { min-width: 0; flex: 1; }

.complete-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem;
  max-width: 480px; margin: 0 auto 1.5rem; text-align: left;
}
@media (max-width: 480px) { .complete-grid { grid-template-columns: 1fr; } }

.polling-hint {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-size: 0.8125rem; color: var(--dim); margin-top: 1rem;
  padding: 0.55rem 1rem;
  background: rgba(59,130,246,0.06); border-radius: var(--radius);
  border: 1px solid rgba(59,130,246,0.12);
}
.polling-hint .spinner { width: 14px; height: 14px; margin: 0; border-width: 1.5px; }

.done-icon { width: 64px; height: 64px; margin: 0 auto 1rem; filter: drop-shadow(0 0 20px var(--blue-glow)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body { opacity: 1; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}