/* ============================================================
   auth-site.css —— 把 Codex 的 v2 帳號畫面（auth.css＋auth-v2.css）接進正式站
   - 正式站的 #view 已經有左右留白，這裡取消 .auth-v2 自己的寬度計算
   - 帳號頁「登入設定」區（js/account-login.js）
   - 頂欄的「登入｜註冊」（未登入才顯示）
   只用 .auth-live／.acct-login／[data-auth-nav] 限定，不動其他頁面。
   ============================================================ */
#view .auth-live { width: 100%; max-width: 1040px; min-height: 0; margin: 0 auto; padding-bottom: 24px; }
.auth-live .v2-alert, .auth-live .v2-status { margin: 0 0 16px; overflow-wrap: anywhere; }
.auth-live .auth-form > .v2-alert, .auth-live .auth-form > .v2-status { margin: 0; }
.auth-live .v2-alert[hidden], .auth-live .v2-status[hidden] { display: none; }
.auth-live .v2-alert .auth-btn { margin-top: 8px; }
.auth-live .au-cfgerr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.auth-live .au-cfgerr p { margin: 0; }
.auth-live .v2-method .auth-form { gap: 18px; }
.auth-live .v2-method > .v2-alert, .auth-live .v2-method > .v2-status { margin-bottom: 16px; }
.auth-live .au-onebtn { width: min(360px, 100%); margin: 0 auto; }
.auth-live .au-onebtn .v2-alert { text-align: left; }
.auth-live .v2-choices .v2-alert, .auth-live .v2-choices .v2-status { margin: 0; }
.auth-live .au-forgot .auth-form { gap: 14px; }
.auth-live .au-admin { max-width: 520px; }
.auth-live .v2-state .auth-actions { flex-direction: column; align-items: stretch; width: min(360px, 100%); margin-left: auto; margin-right: auto; }
.auth-live .v2-state .auth-actions > * { width: 100%; }
.auth-live .v2-textlink { color: var(--auth-accent); }
.auth-live input[type="text"], .auth-live input[type="password"] { max-width: 100%; }

/* ---------- 帳號頁：登入設定 ---------- */
.acct-login { color: var(--text); }
.acct-login .al-title { margin: 0 0 12px; font-size: 17px; }
.acct-login .al-table { width: 100%; border-collapse: collapse; margin: 0 0 8px; table-layout: fixed; }
.acct-login .al-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acct-login .al-table th, .acct-login .al-table td { padding: 10px 0; border-bottom: 1px solid var(--auth-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; font-size: 15px; }
.acct-login .al-table th { width: 128px; padding-right: 12px; color: var(--auth-muted); font-weight: 600; }
.acct-login .al-table td { font-weight: 700; }
.acct-login .auth-small { font-weight: 400; }
.acct-login .al-inline { display: inline-flex; min-height: 44px; padding: 0 4px; vertical-align: middle; }
.acct-login .al-sec { border-top: 1px solid var(--auth-line); }
.acct-login .al-sec > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-size: 16px; font-weight: 800; cursor: pointer; list-style: none; }
.acct-login .al-sec > summary::-webkit-details-marker { display: none; }
.acct-login .al-sec > summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--auth-accent); }
.acct-login .al-sec[open] > summary::after { content: "−"; }
.acct-login .al-sec__body { padding: 4px 0 20px; }
.acct-login .al-sec__body > p { margin: 0 0 12px; }
.acct-login .auth-form { gap: 16px; }
.acct-login .al-reauth { margin: 12px 0 16px; padding: 16px; border: 1px solid var(--auth-line); border-left: 4px solid var(--auth-accent); border-radius: 6px; background: #f6faf8; }
.acct-login .al-reauth__t { margin: 0; font-size: 17px; }
.acct-login .al-reauth__t:focus { outline: none; }
.acct-login .al-confirm { padding: 14px 16px; border: 1px solid #c67d88; border-left-width: 4px; border-radius: 4px; background: #fff6f7; }
.acct-login .al-confirm p { margin: 0 0 12px; }
.acct-login .al-confirm p:focus { outline: none; }
.acct-login .al-events { list-style: none; margin: 0 0 12px; padding: 0; }
.acct-login .v2-status, .acct-login .v2-alert { margin: 0 0 12px; }
.acct-login .v2-alert[hidden] { display: none; }
.acct-login .auth-field input { height: 48px; }

/* ---------- 頂欄：登入｜註冊（登入後由 auth.js 加上 hidden）---------- */
[data-auth-nav][hidden] { display: none !important; }
/* 手機頂欄的「登入」：桌面有完整導覽，所以只在窄螢幕顯示（跟 base.css 隱藏 .topnav 的斷點一致） */
.topbar-auth { display: none; }
@media (max-width: 860px) {
  .topbar-auth {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
    color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
  }
  .topbar-auth:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
}

@media (max-width: 700px) {
  .acct-login .al-table th { width: 96px; }
  .auth-live .v2-tabs { gap: 20px; }
  .auth-live .v2-login-heading .v2-art { width: 80px; height: 60px; flex-basis: 80px; }
}
