/* Standalone site (different box from the main app, see PLAN.md) — palette
   copied from frontend/src/index.css's :root rather than shared, since
   there's no build step here to import it from. Keep these in sync by hand
   if the main site's palette ever changes. */
:root {
  --bg-canvas: #0a0a0d;
  --bg-surface: #17171b;
  --bg-surface-2: #1f1f25;
  --bg-surface-3: #29292f;
  --border: #2c2c34;
  --border-soft: #1e1e24;

  --text-primary: #f4f4f6;
  --text-secondary: #a8a8b3;
  --text-muted: #6e6e79;

  --accent: #9147ff;
  --accent-strong: #a970ff;
  --accent-soft: rgba(145, 71, 255, 0.16);

  --live: #f43f5e;
  --live-soft: rgba(244, 63, 94, 0.16);

  --success: #2ecc71;
  --success-soft: rgba(46, 204, 113, 0.16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-focus: 0 0 0 3px var(--accent-soft);

  --sans: "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

.shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-accent {
  color: var(--accent-strong);
}

.tagline {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
  flex: 1;
}

h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-canvas);
  color: var(--text-primary);
  font: inherit;
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

.username-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.username-row input {
  flex: 1;
  min-width: 0;
}

.availability {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
}

.availability.is-checking {
  color: var(--text-muted);
}

.availability.is-available::after {
  content: "✓";
  color: var(--success);
}

.availability.is-taken::after {
  content: "✕";
  color: var(--live);
}

.extra-usernames {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.extra-username-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.extra-username-row .username-row {
  display: flex;
}

.remove-username-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.remove-username-btn:hover {
  background: var(--live-soft);
  color: var(--live);
  border-color: rgba(244, 63, 94, 0.3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.button:hover {
  filter: brightness(1.1);
}

.button:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}

.button-secondary {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  width: 100%;
  margin-bottom: 20px;
}

.button-secondary:hover {
  filter: none;
  background: var(--bg-surface-3);
}

.button-block {
  width: 100%;
}

.form-error {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--live);
  font-size: 13px;
  font-weight: 600;
  background: var(--live-soft);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.success-view {
  text-align: center;
}

.success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.success-usernames {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.success-username-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.success-username-pill.is-main {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-strong);
}

.footer {
  text-align: center;
  margin-top: 24px;
}

.footer a {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .shell {
    padding: 32px 16px;
  }
  .card {
    padding: 24px;
  }
}
