/* ログインの画面（#gate）と、「ログインとセキュリティ」の画面（security.js）。2026-11-22・docs/login-security.md
 * 寸法は、よく使われるサービスのログインの画面（Notion・Vercel・Stripe・GitHub・Figma・Linear・Supabase・freee・Atlassian）を
 * 2026-11-22 に測ってそろえた。入力欄とボタンは高さ44px（スマートフォンは48px）、入力の文字は16px（iPhone で拡大されない大きさ）、
 * 角の丸みは8px、ラベルは入力欄の上、入力欄の間は16px。notion-theme.css・notion.css の #gate の古い指定より強くするため #auth-form を付ける */
/* ログインの画面は、アプリのメニューのボタン（130）・AI のボタン（1900）・AI の画面（2001）より手前に出す */
#gate { z-index:9500; }
#gate #auth-form { box-sizing:border-box; width:420px; max-width:100%; padding:40px 40px 32px; border:1px solid #E6E6E6; border-radius:12px;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06); -webkit-backdrop-filter:none; backdrop-filter:none;
  font-family:Inter, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif; color:#1A1A1A; text-align:left; }
#gate #auth-form .lg-brand { font-size:22px; line-height:1; font-weight:800; letter-spacing:-.4px; margin:0 0 28px; color:#1A1A1A; }
#gate #auth-form .lg-title { font-size:22px; line-height:1.35; font-weight:700; letter-spacing:0; margin:0 0 6px; color:#1A1A1A; }
#gate #auth-form .lg-lead { font-size:14px; line-height:1.65; color:#6B6B6B; margin:0 0 24px; }
#gate #auth-form .lg-label { display:block; font-size:13px; line-height:1.4; font-weight:600; color:#1A1A1A; margin:0 0 6px; }
#gate #auth-form .lg-label-row { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 6px; }
#gate #auth-form .lg-label-row .lg-label { margin:0; }
/* 最初の画面（Google で続ける／メールアドレス）と、パスワードの画面は、見出しの下に説明の文を置かない。見出しとの間をあける */
#gate #auth-form #auth-step1 .lg-title { margin-bottom:24px; }
/* 入力欄 */
#gate #auth-form .lg-input { box-sizing:border-box; display:block; width:100%; height:44px; min-height:0; margin:0 0 16px; padding:0 12px;
  font-size:16px; line-height:1.4; color:#1A1A1A; background:#fff; border:1px solid #D0D0D0; border-radius:8px; box-shadow:none;
  transition:border-color .12s ease, box-shadow .12s ease; }
#gate #auth-form .lg-input::placeholder { color:#A0A0A0; }
#gate #auth-form .lg-input:focus { outline:none; border-color:#1A1A1A; box-shadow:0 0 0 3px rgba(26,26,26,.10); }
#gate #auth-form .lg-code { font-size:20px; letter-spacing:.3em; text-align:center; font-variant-numeric:tabular-nums; padding:0 8px; }
/* ボタン（主: 黒・副: 白地に枠線）。アプリのほかの画面のボタンと同じ黒 */
#gate #auth-form .lg-btn { box-sizing:border-box; display:flex; align-items:center; justify-content:center; gap:10px; width:100%; height:44px;
  min-height:0; margin:0; padding:0 16px; font-size:15px; line-height:1; font-weight:600; border-radius:8px; cursor:pointer;
  transition:background-color .12s ease, border-color .12s ease, opacity .12s ease; transform:none; }
#gate #auth-form .lg-primary { margin-top:8px; background:#1A1A1A; color:#fff; border:1px solid #1A1A1A; }
#gate #auth-form .lg-primary:hover { background:#333; border-color:#333; }
#gate #auth-form .lg-secondary { background:#fff; color:#1A1A1A; border:1px solid #D0D0D0; font-weight:500; }
#gate #auth-form .lg-secondary:hover { background:#F7F7F7; }
#gate #auth-form .lg-secondary + .lg-secondary { margin-top:10px; }
#gate #auth-form .lg-btn:disabled { opacity:.55; cursor:default; }
#gate #auth-form .lg-btn:focus-visible, #gate #auth-form .lg-link:focus-visible { outline:2px solid #1A1A1A; outline-offset:2px; }
#gate #auth-form .lg-google svg { width:18px; height:18px; flex-shrink:0; }
/* 「または」の区切り */
#gate #auth-form .lg-or { display:flex; align-items:center; gap:12px; margin:20px 0; font-size:12px; line-height:1; color:#8A8A8A; }
#gate #auth-form .lg-or::before, #gate #auth-form .lg-or::after { content:""; flex:1; height:1px; background:#E6E6E6; }
/* 文字のリンク */
#gate #auth-form .lg-link { display:inline; width:auto; height:auto; min-height:0; margin:0; padding:0; background:none; border:0; box-shadow:none;
  font-size:13px; line-height:1.5; font-weight:500; color:#4B4B4B; text-decoration:underline; text-decoration-color:#BDBDBD;
  text-underline-offset:3px; cursor:pointer; border-radius:0; }
#gate #auth-form .lg-link:hover { color:#1A1A1A; text-decoration-color:#1A1A1A; background:none; }
#gate #auth-form .lg-link:disabled { color:#A0A0A0; text-decoration:none; cursor:default; }
#gate #auth-form .lg-forgot { font-size:13px; }
#gate #auth-form .lg-links { display:flex; justify-content:center; margin:16px 0 0; }
#gate #auth-form .lg-links-row { gap:20px; }
/* ログインするアカウントとワークスペース */
#gate #auth-form .lg-account { display:flex; align-items:center; gap:12px; margin:12px 0 20px; padding:10px 12px; border:1px solid #E6E6E6;
  border-radius:10px; background:#FAFAFA; }
#gate #auth-form .lg-account-icon { width:32px; height:32px; border-radius:8px; background:#1A1A1A; color:#fff; display:flex; align-items:center;
  justify-content:center; font-size:14px; font-weight:700; flex-shrink:0; }
#gate #auth-form .lg-account-text { flex:1; min-width:0; }
#gate #auth-form .lg-account-name { font-size:14px; line-height:1.4; font-weight:600; color:#1A1A1A; }
#gate #auth-form .lg-account-email { font-size:13px; line-height:1.4; color:#6B6B6B; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#gate #auth-form .lg-account-change { flex-shrink:0; }
#gate #auth-form .lg-switch { display:block; margin:-12px 0 20px; }
/* エラー・お知らせ（空のときは出さない） */
#gate #auth-form .lg-alert { min-height:0; margin:0 0 16px; padding:10px 12px; border-radius:8px; font-size:13px; line-height:1.6;
  color:#B42318; background:#FEF3F2; border:1px solid #FECDCA; }
#gate #auth-form .lg-alert.ok { color:#067647; background:#ECFDF3; border-color:#ABEFC6; }
#gate #auth-form .lg-alert:empty { display:none; }
#gate #auth-form .lg-hint { font-size:12.5px; line-height:1.6; color:#6B6B6B; margin:-8px 0 16px; }
#gate #auth-form .lg-note { margin:28px 0 0; padding:20px 0 0; border-top:1px solid #EEEEEE; font-size:12px; line-height:1.7; color:#8A8A8A; }
#gate #auth-form .tenant-pick-list { margin:0; }
/* スマートフォン: 枠の無い1列（Notion・Vercel・GitHub と同じ）。押しやすいよう入力欄とボタンは48px */
@media (max-width:640px) {
  #gate { align-items:flex-start; }
  #gate #auth-form { width:100%; padding:40px 8px 24px; border:0; border-radius:0; background:transparent; box-shadow:none; }
  #gate #auth-form .lg-brand { margin-bottom:32px; }
  #gate #auth-form .lg-title { font-size:20px; }
  #gate #auth-form .lg-input, #gate #auth-form .lg-btn { height:48px; }
}

/* ログインとセキュリティ */
.sec-card { border:1px solid var(--nt-line); border-radius:12px; background:#fff; padding:16px 18px; margin:0 0 12px; max-width:760px; }
.sec-h { font-size:14.5px; font-weight:700; color:var(--nt-text); margin:0 0 8px; display:flex; align-items:center; gap:8px; }
.sec-on, .sec-off { font-size:11px; font-weight:600; border-radius:4px; padding:1px 7px; }
.sec-on { background:#E8F5EE; color:#1f7a4d; }
.sec-off { background:#F4F4F5; color:var(--nt-text-2); }
.sec-kv { display:flex; gap:12px; font-size:13px; padding:4px 0; }
.sec-kv span { width:120px; flex-shrink:0; color:var(--nt-text-3); }
.sec-kv b { font-weight:600; color:var(--nt-text); word-break:break-all; }
.sec-note { font-size:12.5px; line-height:1.7; color:var(--nt-text-2); margin:4px 0 10px; }
.sec-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.sec-row input { border:1px solid var(--nt-line-2); border-radius:8px; padding:8px 10px; font-size:13px; font-family:inherit; min-width:200px; flex:1; }
.sec-msg { font-size:12.5px; margin:8px 0 0; min-height:0; }
.sec-msg.ok { color:#1f7a4d; }
.sec-msg.bad { color:#c2362f; }
.sec-steps { font-size:12.5px; line-height:1.8; color:var(--nt-text-2); margin:8px 0; padding-left:20px; }
.sec-steps code { font-size:12px; background:#F4F4F5; padding:1px 5px; border-radius:4px; word-break:break-all; }
.sec-qr { display:block; width:168px; height:168px; margin:6px 0 10px; border:1px solid var(--nt-line); border-radius:8px; background:#fff; }
