/* ── Auth overlay (game page — guest join flow) ── */
#room-auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg, #06060f);
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Inter', sans-serif;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#room-auth-overlay.active { display: flex; }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 44px 36px 36px;
  text-align: center;
}
.auth-logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 4px;
}
.auth-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 28px;
}
.auth-host-row {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}
.auth-host-handle {
  color: #ff4d6a;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 15px;
}
.auth-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  line-height: 1.7;
  margin-bottom: 24px;
}
.auth-code-input {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 10px;
  padding: 16px 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  outline: none;
  transition: border-color .2s;
  caret-color: #c9a84c;
}
.auth-code-input:focus  { border-color: rgba(201,168,76,0.5); }
.auth-code-input.invalid {
  border-color: rgba(255,77,106,0.8);
  animation: auth-shake .3s;
}
.auth-handle-input {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  padding: 13px 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  margin-bottom: 6px;
  text-transform: lowercase;
  outline: none;
  transition: border-color .2s;
  caret-color: #c9a84c;
}
.auth-handle-input:focus  { border-color: rgba(201,168,76,0.5); }
.auth-handle-input.invalid { border-color: rgba(255,77,106,0.8); animation: auth-shake .3s; }

.auth-live-warning {
  font-size: 11px;
  color: rgba(255,77,106,0.7);
  margin-bottom: 18px;
  line-height: 1.5;
}
@keyframes auth-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-10px); }
  75%     { transform: translateX(10px); }
}
.auth-btn {
  width: 100%;
  padding: 14px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.4);
  color: #c9a84c;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  border-radius: 5px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  margin-bottom: 14px;
}
.auth-btn:hover:not(:disabled) {
  background: rgba(201,168,76,0.2);
  border-color: rgba(201,168,76,0.7);
}
.auth-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.auth-msg            { font-size: 12px; min-height: 18px; color: rgba(255,255,255,0.3); }
.auth-msg.error      { color: #ff4d6a; }
.auth-msg.success    { color: #4cff64; }
.auth-success-view   { padding: 8px 0; }
.auth-success-icon   { font-size: 54px; display: block; margin-bottom: 16px; }
.auth-success-title  {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px; letter-spacing: 4px;
  text-transform: uppercase;
  color: #4cff64; margin-bottom: 12px;
}
.auth-success-sub    { font-size: 12px; color: rgba(255,255,255,0.35); line-height: 1.7; }

/* ── Kicked overlay ── */
#kicked-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  font-family: sans-serif;
  color: #fff;
  text-align: center;
  padding: 24px;
}

/* ── Touch targets ── */
.auth-btn,
.auth-code-input,
.auth-handle-input {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.auth-btn {
  min-height: 48px;
}
.auth-code-input,
.auth-handle-input {
  min-height: 44px;
}
