/* 登入頁 —— 照原本的設計搬回來（舊網頁 style/auth-overlay.css，user 2026-11-04：「我登入有自己的設計」）。
   刻意固定深色、不跟主題走；--auth-* 只活在這張畫面裡。
   桌面（≥900）= 一張玻璃 sheet 左品牌欄 / 右登入卡；手機（<900）= 品牌在上、卡從底緣升起。
   沒搬：開場那片 WebGL 光（網頁本來就關掉了）、語言切換器、開場交棒動畫。 */
.auth {
  --boot-bg: #0a0a0c;
  --auth-ink: #ededee;
  --auth-ink-muted: #8a8a92;
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  color: var(--auth-ink);
  background: var(--boot-bg);
  overflow: hidden;
}
.auth-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.auth-sheet { position: relative; z-index: 1; width: 90%; max-width: 400px; }
.auth-card {
  padding: 36px 30px 28px; text-align: center;
  background: rgba(20, 20, 26, .6);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.auth-aside { display: none; }
.auth-welcome { display: none; }
.auth-welcome h2 { font-size: 22px; font-weight: 650; color: var(--auth-ink); margin: 0 0 4px; letter-spacing: -.3px; }
.auth-welcome p { font-size: 15px; color: var(--auth-ink-muted); margin: 0; }

.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.auth-features li { display: flex; align-items: flex-start; gap: 12px; }
.auth-feat-ico { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); color: #b9b4ee; }
.auth-feat-txt b { display: block; font-size: 15px; font-weight: 600; color: #e6e6ea; }
.auth-feat-txt em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--auth-ink-muted); line-height: 1.45; }

.auth-mark { width: 64px; height: 64px; margin: 0 auto 14px; display: block; filter: drop-shadow(0 10px 26px rgba(93, 108, 230, .45)); }
.auth-brand { font-size: 28px; font-weight: 700; color: var(--auth-ink); margin: 0 0 6px; letter-spacing: -.5px; }
.auth-tagline { color: var(--auth-ink-muted); font-size: 15px; margin: 0 0 28px; line-height: 1.5; }

.auth-btn {
  width: 100%; padding: 13px 20px; border-radius: 10px;
  background: #fff; color: #1a1a1f; border: 1px solid rgba(0, 0, 0, .08);
  font-size: 16px; font-weight: 500; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s ease, box-shadow .12s ease;
}
@media (hover: hover) { .auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139, 127, 217, .25); } }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled, .auth-btn.is-loading { opacity: .5; cursor: progress; }
.auth-btn--apple { background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .14); }
@media (hover: hover) { .auth-btn--apple:hover { background: #0a0a0a; } }
.auth-btn--secondary { background: rgba(255, 255, 255, .05); color: var(--auth-ink); border: 1px solid rgba(255, 255, 255, .12); }
@media (hover: hover) { .auth-btn--secondary:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); } }
.auth-stack { display: flex; flex-direction: column; gap: 10px; }

.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #6a6a72; font-size: 12px; letter-spacing: 1px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .08); }

.auth-input {
  width: 100%; padding: 12px 14px; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px;
  color: var(--auth-ink); font-size: 15px; font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.auth-input::placeholder { color: #6a6a72; }
.auth-input:focus { outline: none; border-color: rgba(139, 127, 217, .5); background: rgba(255, 255, 255, .06); }
.auth-pw { position: relative; display: flex; }
.auth-pw .auth-input { padding-right: 46px; }
.auth-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 8px; color: #6a6a72; cursor: pointer;
}
@media (hover: hover) { .auth-eye:hover { color: var(--auth-ink); background: rgba(255, 255, 255, .06); } }
.auth-eye:focus-visible { outline: 2px solid rgba(139, 127, 217, .6); outline-offset: 1px; color: var(--auth-ink); }
.auth-lab { font-size: 13px; color: var(--auth-ink-muted); text-align: left; }

.auth-sheet-only { display: none; }
.auth-back { align-items: center; gap: 4px; margin: 0 0 8px; padding: 6px 10px 6px 0; background: none; border: 0; color: var(--auth-ink-muted); font: inherit; font-size: 15px; cursor: pointer; min-height: 44px; }
@media (hover: hover) { .auth-back:hover { color: var(--auth-ink); } }
.auth-status { margin-top: 14px; font-size: 12px; color: #ff7878; min-height: 16px; line-height: 1.5; }
.auth-status.success { color: #6dde8a; }
.auth-hint { margin: 8px 0 0; font-size: 12px; color: #7a7a82; line-height: 1.5; text-align: center; }
.auth-foot { margin: 16px 0 0; font-size: 11px; color: #6a6a72; line-height: 1.6; }
.auth-foot a { color: #9a9a9f; }
.auth-invite { margin: 0 0 18px; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .9);
  background: linear-gradient(155deg, rgba(139, 127, 217, .16), rgba(91, 108, 255, .06)); border: 1px solid rgba(139, 127, 217, .28); }

/* 桌面：雙欄玻璃 sheet */
@media (min-width: 900px) {
  .auth-sheet {
    width: 100%; max-width: 880px; display: grid; grid-template-columns: 1fr 1fr;
    background: rgba(18, 18, 24, .55);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .08); border-radius: 24px; overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  }
  .auth-aside {
    display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 52px 44px; text-align: left;
    background: linear-gradient(155deg, rgba(139, 127, 217, .18) 0%, rgba(91, 108, 255, .07) 55%, transparent 100%);
    border-right: 1px solid rgba(255, 255, 255, .07);
  }
  .auth-aside .auth-mark { width: 84px; height: 84px; margin: 0 0 20px; }
  .auth-aside .auth-brand { font-size: 34px; margin-bottom: 10px; }
  .auth-aside .auth-tagline { margin-bottom: 0; line-height: 1.65; }
  .auth-card {
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    border: none; box-shadow: none; border-radius: 0; padding: 52px 46px; text-align: left;
    display: flex; flex-direction: column; justify-content: center;
  }
  .auth-card-head { display: none; }
  .auth-welcome { display: block; margin-bottom: 22px; }
}

/* 手機：品牌在上、卡從底緣升起（舊設計 B 案）；Email 是第二片 */
@media (max-width: 899px) {
  .auth { align-items: stretch; }
  .auth-sheet {
    width: 100%; max-width: none; display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .30) 45%, rgba(0, 0, 0, .55) 100%);
  }
  .auth-card-head { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 16px 16px 44px; }
  .auth-card-head .auth-mark { width: 84px; height: 84px; margin: 0; }
  .auth-card-head .auth-brand { margin: 14px 0 0; }
  .auth-card-head .auth-tagline { margin: 6px 0 0; }
  .auth-card {
    position: relative; flex: none; text-align: left;
    padding: 22px max(20px, calc((100% - 460px) / 2)) calc(24px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(30, 30, 40, .62) 0%, rgba(18, 18, 24, .72) 100%);
    backdrop-filter: blur(52px) saturate(200%); -webkit-backdrop-filter: blur(52px) saturate(200%);
    border: 0; border-radius: 28px 28px 0 0;
    box-shadow: 0 -26px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .05);
  }
  .auth-btn { padding: 16px 20px; min-height: 52px; }
  .auth-welcome { display: block; margin-bottom: 20px; }
  .auth-sheet-only { display: flex; }
  .auth-or { display: none; }
  .auth[data-step="pick"] .auth-step--email { display: none; }
  .auth[data-step="email"] .auth-step--pick, .auth[data-step="email"] .auth-welcome { display: none; }
}
