/* ── Auth overlay ── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 8, 0.85);
}
.auth-overlay.hidden { display: none; }

.auth-dialog {
  width: 360px;
  background: var(--bg-panel);
  border: 2px outset var(--border-raised-light);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.auth-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  padding: 0 6px;
  background: linear-gradient(90deg, #1a2a4e 0%, #2a3a6e 50%, #1a2a4e 100%);
}
.auth-titlebar span {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* BBS/ANSI-style game disclaimer notice */
.auth-disclaimer {
  margin: 12px 12px 0;
  padding: 8px 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border-inner);
  color: var(--text-dim);
}
.auth-disclaimer-head,
.auth-disclaimer-foot {
  font-size: 10px;
  color: var(--text-cyan);
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.5px;
}
.auth-disclaimer-foot {
  color: var(--text-green);
  margin-top: 6px;
}
.auth-disclaimer p {
  font-size: 11px;
  line-height: 1.5;
  margin: 6px 2px;
}
.auth-disclaimer strong {
  color: var(--text-yellow);
  font-weight: 700;
}

.auth-body {
  padding: 20px 24px;
}

.auth-step.hidden { display: none; }

.auth-step h3 {
  font-size: 12px;
  color: var(--text-cyan);
  margin-bottom: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-step p {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.auth-field label {
  font-size: 11px;
  color: var(--text-dim);
}
.auth-field input {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg-input);
  border: 2px inset var(--border-inner);
  color: var(--text-bright);
  outline: none;
}
.auth-field input:focus {
  border-color: var(--accent-dim);
}
.auth-field input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

/* 6-digit code inputs */
.code-inputs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
}
.code-digit {
  width: 36px;
  height: 42px;
  font-size: 20px;
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
  background: var(--bg-input);
  border: 2px inset var(--border-inner);
  color: var(--text-bright);
  outline: none;
  caret-color: var(--text-green);
}
.code-digit:focus {
  border-color: var(--accent);
  background: var(--bg-dark);
}

.auth-btn {
  width: 100%;
  height: 28px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  color: var(--text-bright);
  background: var(--bg-toolbar);
  border: 2px outset var(--border-raised-light);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-btn:hover {
  background: var(--accent-dim);
}
.auth-btn:active {
  border-style: inset;
}
.auth-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.auth-error {
  font-size: 11px;
  color: var(--text-red);
  margin-bottom: 12px;
  min-height: 16px;
}
.auth-error.hidden { display: none; }

.auth-back {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  padding: 0;
  text-decoration: underline;
}
.auth-back:hover {
  color: var(--text-primary);
}

.auth-handle-rules {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  opacity: 0.7;
}
