:root {
  color-scheme: dark;

  --gate-bg: #0b0c0f;
  --gate-surface: #12141a;
  --gate-text: #eceef2;
  --gate-muted: #8b919d;
  --gate-line: rgb(255 255 255 / 8%);
  --gate-accent: #6a82d8;
  --gate-error: #e06c75;
  --gate-radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--gate-bg);
  color: var(--gate-text);
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

.gate {
  width: min(380px, 100%);
  padding: 32px 28px;
  background: var(--gate-surface);
  border: 1px solid var(--gate-line);
  border-radius: var(--gate-radius);
}

.gate-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
}

.gate-status {
  margin: 0 0 16px;
  min-height: 1.5em;
  color: var(--gate-muted);
}

.gate-status[data-kind='error'] {
  color: var(--gate-error);
}

.gate-form {
  display: grid;
  gap: 10px;
}

.gate-form[hidden] {
  display: none;
}

.gate-label {
  font-size: 0.9rem;
  color: var(--gate-muted);
}

.gate-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--gate-bg);
  color: var(--gate-text);
  border: 1px solid var(--gate-line);
  border-radius: var(--gate-radius);
  font: inherit;
}

.gate-input:focus {
  outline: 2px solid var(--gate-accent);
  outline-offset: 1px;
}

.gate-button {
  padding: 10px 12px;
  background: var(--gate-accent);
  color: var(--gate-text);
  border: 0;
  border-radius: var(--gate-radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.gate-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.gate-hint {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--gate-muted);
}
