.auth-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #eee; }
/* 確認メールのリンクなどで開いた直後: 画面が決まるまでタブ・フォーム・Google を出さず、1行だけ出す（login.html の先頭の script）。 */
.auth-pending { display: none; margin: 24px 0; color: #666; text-align: center; }
html[data-login-pending] .auth-pending { display: block; }
html[data-login-pending] .auth-google, html[data-login-pending] .auth-tabs, html[data-login-pending] .auth-form { display: none !important; }
.auth-tab { flex: 1; padding: 15px; text-align: center; cursor: pointer; border: none; background: none; font-size: 16px; font-weight: 700; color: #666; transition: all 0.3s ease; }
.auth-tab.active { color: #f00; border-bottom: 2px solid #f00; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form-title { margin-bottom: 20px; color: #333; text-align: center; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 700; color: #333; }
.form-group input { box-sizing: border-box; width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 5px; font-size: 16px; transition: border-color 0.3s ease; }
.form-group input:focus { outline: none; border-color: #f00; }
.form-help { color: #666; font-size: 12px; }
.auth-btn { width: 100%; padding: 15px; background: #f00; color: white; border: none; border-radius: 5px; font-size: 16px; font-weight: 700; cursor: pointer; transition: background-color 0.3s ease; }
.auth-btn:hover { background: #c00; }
.auth-btn:disabled { background: #ccc; cursor: not-allowed; }
.auth-recovery-button { width: 100%; margin-top: 12px; padding: 12px; border: 1px solid #c00; border-radius: 5px; background: white; color: #c00; font: inherit; font-weight: 700; cursor: pointer; }
.auth-recovery-button:hover { background: #fff2f2; }
.error-message, .success-message { margin-top: 10px; font-size: 14px; text-align: center; }
.error-message { color: #f00; }
.success-message { color: #28a745; }
.forgot-password, .back-to-home { margin-top: 15px; text-align: center; }
.back-to-home { margin-top: 20px; }
.auth-step-note { margin: -4px 0 14px; color: #666; font-size: 12px; line-height: 1.6; }
.auth-step-note a { color: #555; }
.auth-legal { margin: 22px 0 0; color: #666; font-size: 12px; line-height: 1.6; text-align: center; }
.auth-legal a { color: #555; text-decoration: underline; }
.forgot-password button { padding: 0; color: #f00; border: none; background: none; font: inherit; font-size: 14px; cursor: pointer; }
.forgot-password button:hover { text-decoration: underline; }
.back-to-home a { color: #666; text-decoration: none; font-size: 14px; }
.back-to-home a:hover { color: #f00; }
.loading { display: inline-block; width: 20px; height: 20px; border: 3px solid #fff; border-radius: 50%; border-top-color: transparent; animation: spin 1s ease-in-out infinite; }
.nickname-validation { min-height: 20px; margin-top: 4px; font-size: 13px; }
.nickname-validation[data-state="error"] { color: #f00; }
.nickname-validation[data-state="success"] { color: #28a745; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Google ログイン（docs/google-login.md） */
.auth-google { margin-bottom: 18px; }
.auth-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 13px; border: 1px solid #dadce0; border-radius: 5px; background: #fff; color: #3c4043; font-size: 16px; font-weight: 700; cursor: pointer; }
.auth-google-btn:hover { background: #f8f9fa; }
.auth-google-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-google-icon { width: 18px; height: 18px; background: conic-gradient(from -45deg, #ea4335 0 90deg, #fbbc05 90deg 180deg, #34a853 180deg 270deg, #4285f4 270deg 360deg); border-radius: 50%; -webkit-mask: radial-gradient(circle, transparent 42%, #000 44%); mask: radial-gradient(circle, transparent 42%, #000 44%); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: #888; font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid #eee; }
.auth-step-lead { margin: 0 0 16px; color: #555; line-height: 1.6; }
.auth-step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.auth-step-actions .link-button, .auth-recovery-link { background: none; border: 0; padding: 0; color: #666; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.auth-reauth { margin-top: 14px; padding: 12px; border: 1px solid #eee; border-radius: 6px; display: grid; gap: 8px; }
.auth-reauth[hidden] { display: none; }
.auth-btn--secondary { background: #666; }
.auth-btn--secondary:hover { background: #444; }
.auth-link-retry { margin-top: 10px; display: flex; gap: 12px; flex-wrap: wrap; }
.auth-handle-field { display: flex; align-items: center; }
.auth-handle-field .auth-handle-at { padding: 0 6px 0 2px; color: #888; font-weight: 700; }
.auth-handle-field input { flex: 1; }
