/* ============================================================
   共用樣式表：登入／註冊／忘記密碼三條流程共用的畫面語彙
   來源：忠實沿用 canvas 線框稿（LoginMobile.dc.html 等）既有的
   class 命名與數值，未擅自調整任何間距或字級（見任務忠於線框要求）。
   本檔採 BEM 命名（非 Tailwind 手寫 CSS 場景，依公司規範 html-css.md §3.1）。
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* ---- 全域防護：表單元素在 flex 容器內的收縮下限 ----
   <input>／<select>／<textarea> 的 UA 預設 `min-width: auto` 加上內建的
   固有寬度（input 的 size 屬性約 20 字元、select 依選項最長文字），會成為
   flex 收縮的下限——導致 `flex:1` 失效、元素撐破容器、內容溢出畫面。
   這是本專案已實際踩到的坑（OTP 六格輸入撐到總寬 1600px、五格跑到畫面外）。
   在這裡一次宣告 min-width:0，避免每次新增 flex 版面都要記得補一次。
   （2026-09-14 加入，屬根因處理：不只修當時壞掉的 OTP，而是讓同類問題
   在其他 flex 容器不會再發生。） */
input,
select,
textarea {
  min-width: 0;
}

body {
  font-family:
    Inter,
    -apple-system,
    "PingFang TC",
    "Noto Sans TC",
    sans-serif;
  color: #111;
}

/* ---- 圖示容器 ---- */
.ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ic svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ic--14 {
  width: 14px;
  height: 14px;
}
.ic--16 {
  width: 16px;
  height: 16px;
}
.ic--18 {
  width: 18px;
  height: 18px;
}
.ic--20 {
  width: 20px;
  height: 20px;
}
.ic--24 {
  width: 24px;
  height: 24px;
}

/* ============================================================
   Mobile 畫面（375×812）
   ============================================================ */

.scr {
  width: 375px;
  height: 812px;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  position: relative;
}

/* ---- iOS 狀態列 56px（含動態島） ----
   鍵盤升起、內容上推時，狀態列必須蓋在所有內容之上（含動態島），
   否則頭像／標題會穿出動態島。白底避免透明時底下內容透出來。 */
.statusbar {
  position: relative;
  width: 100%;
  height: 56px;
  flex: none;
  background: #fff;
  z-index: 70;
}
.statusbar__island {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 10.5px;
  width: 180px;
  height: 35px;
  border-radius: 50px;
  background: #000;
}
.statusbar__time {
  position: absolute;
  left: 47.5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34.469px;
  height: 13px;
}
.statusbar__right {
  position: absolute;
  right: 31px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}
.statusbar__wifi {
  width: 17px;
  height: 12px;
}
.statusbar__battery {
  width: 27px;
  height: 13px;
}
.statusbar svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- iOS home indicator 34px ---- */
.home {
  position: relative;
  width: 100%;
  height: 34px;
  flex: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 45;
}
.scr.is-kb-open .home,
.scr.is-picker-open .home {
  background: transparent;
}
.home__bar {
  width: 134px;
  height: 5px;
  border-radius: 100px;
  background: #020202;
}

/* ---- 頂欄：返回 chevron ＋ 步驟指示 ---- */
.nav {
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 69;
  background: #fff;
}
.nav__back {
  width: 32px;
  height: 32px;
  margin-left: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav__back .ic {
  width: 20px;
  height: 20px;
}
.nav__skip {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #8b8b8f;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav__spacer {
  width: 32px;
  height: 32px;
}

/* 步驟進度條：註冊 A2.1–A2.3 三步；選填問卷 A2.4–A2.5 另計兩步。 */
.steps {
  display: flex;
  align-items: center;
  gap: 5px;
}
.steps__seg {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: #e5e5e5;
}
.steps__seg--on {
  background: #2c2d2e;
}

/* ---- 內容區 ----
   `.body` 用 flex:1 吃掉「狀態列與置底區之間」的所有剩餘空間，`.foot`
   維持 flex:none 固定在底部——這是 19 頁共用的置底骨架（統一規則見
   `.foot` 段落註解）。內容超過可視高度時由 `.body` 自己捲動
   （overflow-y:auto），置底 CTA 區不會跟著捲走、永遠可見。
   （2026-09-14 結構重整：原本 overflow:hidden 會讓超長內容直接被裁掉、
   使用者根本捲不到，改為 auto。） */
.body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 12px 20px 0;
  overflow-y: auto;
  overflow-x: hidden;
}
/* `.inline-cta` 已棄用於「主要 CTA」用途（2026-09-14 結構重整）：
   原本有 6 頁把主 CTA 放在內容區裡的 `.inline-cta`，導致按鈕跟著上方
   內容高度上下浮動（正是老闆說的「按鈕上上下下、跟著上方 UI 跑」）。
   現在主 CTA 一律搬進 `.foot`；本 class 僅保留給「跟內容綁在一起的
   次要動作」（例：A1-x2 的「改用其他號碼註冊」文字鈕）使用。 */
.inline-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: -6px;
}
.inline-cta[hidden],
.foot__alt[hidden] {
  display: none !important;
}
.field__note {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  color: #aeaeb2;
}
.head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.head__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.28;
  color: #111;
  letter-spacing: -0.2px;
}
.head__sub {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #8b8b8f;
}
.optional {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: #aeaeb2;
  background: #f2f2f3;
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---- 表單欄位 ---- */
.fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field-with-hint {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field__label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #454647;
}
/* 標籤列：左側欄位名、右側輔助動作（登入頁「忘記密碼？」） */
.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.field__head .field__label {
  flex: 1;
  min-width: 0;
}
.field__input {
  width: 100%;
  height: 50px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
}
.field__input--focus,
.field__input:focus-within {
  border: 1.5px solid #2c2d2e;
  box-shadow: 0 0 0 3px rgba(44, 45, 46, 0.08);
}
/* 錯誤態外框與紅字同一色 #d32f2f；focus 時仍維持紅框，不退回深灰。 */
.field__input--err {
  border: 1px solid #d32f2f;
  background: #fff;
  box-shadow: none;
}
.field__input--err.field__input--focus,
.field__input--err:focus-within {
  border: 1.5px solid #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}
.field__input input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  color: #111;
  font-family: inherit;
  padding: 0;
}
.field__input input::placeholder {
  color: #aeaeb2;
  font-weight: 400;
}
.field__ph {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 400;
  color: #aeaeb2;
}
.field__val {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  color: #111;
}
.field__eye {
  width: 20px;
  height: 20px;
  flex: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
/* 輸入中出現在欄位右方的圓形清除鈕（iOS whileEditing） */
.field__clear {
  width: 18px;
  height: 18px;
  flex: none;
  border: none;
  padding: 0;
  border-radius: 50%;
  background: #c7c7cc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field__clear[hidden] {
  display: none !important;
}
.field__clear svg {
  display: block;
  width: 8px;
  height: 8px;
}
.field__forgot {
  margin: 0;
  flex: none;
  width: auto;
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: #5d5f61;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline;
  white-space: nowrap;
}

/* 錯誤訊息：只留紅字，不放 icon */
.errmsg {
  display: flex;
  align-items: flex-start;
  margin: 2px 0 0;
}
.errmsg .ic {
  display: none;
}
.errmsg p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  color: #d32f2f;
}

/* 頁首橫幅式錯誤 */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px;
  border: 1px solid #e0e0e2;
  border-radius: 10px;
  background: #f7f7f8;
}
.banner .ic {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}
.banner__txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.banner__t {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #111;
}
.banner__d {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  color: #8b8b8f;
}

/* 密碼規則提示 */
.rules {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
}
.rule {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rule__dot {
  width: 15px;
  height: 15px;
  border-radius: 8px;
  border: 1px solid #d1d1d6;
  flex: none;
}
.rule__dot--on {
  background: #2c2d2e;
  border-color: #2c2d2e;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}
.rule p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: #8b8b8f;
}
.rule--on p {
  color: #454647;
  font-weight: 500;
}
.rule--fail p {
  color: #d32f2f;
  font-weight: 500;
}
.rule--fail .rule__dot {
  border-color: #d32f2f;
}

/* 膠囊選項 */
.qgroup {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qgroup__q {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}
.qgroup__hint {
  margin: -4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: #aeaeb2;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #d1d1d6;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #454647;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.pill--on {
  background: #2c2d2e;
  border-color: #2c2d2e;
  color: #fff;
  font-weight: 600;
}
.pill--on .ic {
  width: 12px;
  height: 12px;
}
.pill .ic {
  width: 0;
  overflow: hidden;
  transition: width 0.1s;
}
.pill--on .ic {
  width: 12px;
}

/* 手機／生日欄位 */
.phone {
  display: flex;
  align-items: center;
  gap: 0;
}
.phone__cc {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 14px;
  height: 100%;
  border-right: 1px solid #e5e5e5;
  flex: none;
}
.phone__cc p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
}
/* 國碼下拉：外觀延續原本純文字的視覺重量，但保留原生 select 的可點擊互動
   （含小三角箭頭，明確傳達「這裡可以切換」，即使目前只有 +886/+852/+86
   三個常見選項也一樣看得出是互動元件）。 */
.phone__cc select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  margin: 0;
  padding: 0 16px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23545454' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 12px 12px;
}
.phone__cc select:focus {
  outline: none;
}
.phone__num {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.phone__num input {
  width: 100%;
}

/* OTP 輸入格 */
.otp {
  display: flex;
  gap: 9px;
}
.otp__cell {
  flex: 1;
  /* min-width:0 是 flex 子項為 <input> 時的必要宣告：
     <input> 的 UA 預設 min-width 是 auto、且內建 size 屬性隱含約 20 字元的
     固有寬度，這個固有寬度會成為 flex 收縮的下限，讓 `flex:1` 無法把六格
     各壓到 1/6 寬。實測後果：第一格佔畫面 85%、第二格被切半、第三到第六格
     整個在畫面外（六格量到 255/254/254/254/254/254px，總寬遠超 375）。
     加上 min-width:0 解除收縮下限後，六格才會真的均分容器寬度。
     （2026-09-14 修正：此前 OTP 三頁皆嚴重跑版。） */
  min-width: 0;
  height: 58px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: #111;
  text-align: center;
  font-family: inherit;
  padding: 0;
  caret-color: transparent;
}
.otp__cell:focus {
  outline: none;
  border: 1.5px solid #2c2d2e;
  box-shadow: 0 0 0 3px rgba(44, 45, 46, 0.08);
}
.otp__cell--err {
  border: 1px solid #d32f2f;
  background: #fff;
}
.otp__cell--err:focus {
  outline: none;
  border: 1.5px solid #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}
.otp--busy {
  opacity: 0.55;
  pointer-events: none;
}
.otp-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.errmsg--center {
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 0;
}
.errmsg--center p {
  text-align: center;
  width: 100%;
}
.sentto {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #8b8b8f;
}
.sentto strong {
  font-weight: 600;
  color: #111;
}
.resend {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #aeaeb2;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.resend--active {
  color: #2c2d2e;
  font-weight: 700;
  text-decoration: underline;
}

/* ---- 置底動作區（統一骨架，19 頁共用同一套規則）----
   置底機制：`.foot` 是 `.scr` 這個 flex column 容器的最後一個子元素，
   用 `margin-top: auto` 把自己推到底部——這樣不需要每頁手動插入
   `<div class="spacer-flex">`，也不需要 `.foot--flush` 這類逐頁修飾符。
   （2026-09-14 結構重整：原本只有 A0／A0-x 兩頁用 spacer-flex 撐開、
   其餘 17 頁放任 `.body{flex:1}` 自然撐開，導致按鈕位置隨內容長短浮動。
   現在改成單一套規則，19 頁一致。）

   左右內距：一律 20px，與 `.body` 的左右 padding 相同，確保置底按鈕的
   左右邊界與上方輸入框完全對齊（同一個 left / right 像素值）。 */
.foot {
  flex: none;
  display: flex;
  /* 反向排列（column-reverse）：讓「主 CTA 按鈕」永遠是置底區最底下的
     元素，附屬元素（說明文字、略過鈕、重新發送）往上堆疊。
     為什麼這樣做：主 CTA 在 HTML 裡永遠寫在 .foot 的第一個位置（語意上
     它是主要動作、tab 順序也應該先到），但視覺上必須固定貼齊畫面底部
     同一個位置。若用正向排列，CTA 會被下方附屬元素往上推——附屬元素
     0 個的頁面 CTA 在 top=706、1 個在 672、2 個在 639.5，19 頁三種高度，
     正是老闆說的「按鈕上上下下」。改成 column-reverse 後，CTA 底邊在
     每一頁都固定距畫面底部 20px（padding-bottom），達成跨頁一致。
     （2026-09-14 結構重整實測：改前 CTA top 有 3 種值，改後全部一致。） */
  flex-direction: column-reverse;
  gap: 14px;
  padding: 12px 20px 20px;
  background: #fff;
}
/* `.foot--login` 已棄用（2026-09-14 結構重整）：原本用來給登入頁一個
   較大的底部留白（30px），但這造成登入頁與其餘頁面的 CTA 垂直位置不一致。
   現在全站統一 20px 底部留白，本修飾符保留為空規則僅為向後相容，
   不再有任何效果，新頁面不要使用。 */
.foot--login {
  /* 刻意留空：置底距離已由 .foot 統一，不再逐頁覆寫 */
}
.btn {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn--primary {
  background: #2c2d2e;
  color: #fff;
}
.btn--disabled {
  background: #e5e5e5;
  color: #aeaeb2;
  cursor: not-allowed;
}
.btn--ghost {
  background: #fff;
  color: #5d5f61;
  border: 1px solid #d1d1d6;
  font-weight: 600;
}
.foot__alt {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: #8b8b8f;
}
.foot__alt strong {
  font-weight: 700;
  color: #2c2d2e;
  text-decoration: underline;
  cursor: pointer;
}
.foot__skip {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #8b8b8f;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
a {
  color: #111;
}
a:hover {
  color: #454647;
}

/* ---- 登入品牌欄 ---- */
.body--login {
  gap: 26px;
  padding-top: 20px;
}
.login-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  padding: 8px 0 4px;
}
.login-brand__avatar {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}
.login-brand__name {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #111;
}
.login-brand__tag {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #8b8b8f;
}

/* ---- App 開啟頁（A0）：置中品牌，無表單、無 CTA ---- */
.splash {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 30px 24px;
  cursor: pointer;
}
.splash .login-brand {
  padding: 0;
  gap: 16px;
}
.splash .login-brand__avatar {
  width: 112px;
  height: 112px;
  border-radius: 26px;
}
.splash .login-brand__name {
  font-size: 22px;
}
.splash .login-brand__tag {
  font-size: 14px;
}

/* ---- 服務條款同意列 ---- */
.agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.agree__box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #d1d1d6;
  flex: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 0;
}
.agree__box--on {
  background: #2c2d2e;
  border-color: #2c2d2e;
  color: #fff;
}
.agree p {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: #454647;
}
.agree strong,
.agree__link {
  font-weight: 600;
  color: #111;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

/* 內頁式頂欄＋條款長文（沿用 TermsService／TermsPrivacy 線框） */
.tnav {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  position: relative;
  z-index: 69;
}
.tnav__t {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111;
}
.tnav__side {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.tnav__side .ic {
  width: 20px;
  height: 20px;
}
.doc {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 20px 24px;
  overflow-y: auto;
}
.doc__meta {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: #aeaeb2;
}
.doc__h {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}
.doc__p {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  color: #454647;
}
.doc__sect {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.doc__lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ln {
  height: 11px;
  border-radius: 3px;
  background: #ebebec;
}
.ln--80 {
  width: 80%;
}
.ln--92 {
  width: 92%;
}
.ln--64 {
  width: 64%;
}
.doc__foot {
  flex: none;
  padding: 12px 20px 8px;
  background: #fff;
  border-top: 1px solid #f0f0f1;
}
.doc-tabs {
  display: flex;
  flex: none;
  padding: 0 20px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}
.doc-tabs__item {
  flex: 1;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #8b8b8f;
  cursor: pointer;
}
.doc-tabs__item.is-on {
  font-weight: 600;
  color: #111;
  border-bottom-color: #2c2d2e;
}
.doc-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
}
.doc-panel.is-on {
  display: flex;
}
.doc-panel[hidden] {
  display: none !important;
}

/* ---- 系統異常 / 空狀態 ---- */
.sys {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 0 30px;
}
.sys__icon {
  width: 96px;
  height: 96px;
  border-radius: 48px;
  background: #f2f2f3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sys__icon svg {
  width: 48px;
  height: 48px;
  display: block;
}
.sys__texts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.sys__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.2px;
}
.sys__desc {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #8b8b8f;
}
.sys__note {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f7f8;
  border: 1px solid #e0e0e2;
}
.sys__note p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  color: #5d5f61;
  text-align: center;
}
.countdown {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #2c2d2e;
  text-align: center;
}

/* ---- 註冊完成 / 密碼重設完成：成功畫面 ---- */
.done {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 30px;
}
.done__badge {
  width: 88px;
  height: 88px;
  border-radius: 44px;
  background: #2c2d2e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.done__badge .ic {
  width: 48px;
  height: 48px;
}
.done__halo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 外圍兩層淡灰色光暈裝飾圈（::before／::after）已依老闆要求移除
   （2026-09-14）：老闆截圖標出打勾圖示外圍的漣漪/光暈效果要拿掉，範圍
   涵蓋全部成功/完成類終點頁（登入成功、A6 註冊完成、A10 密碼重設完成）。
   三頁共用這個 class，改這裡一次生效，不需要逐頁修改 markup；
   .done__halo 本身保留（負責置中佈局），只拿掉裝飾用的兩個偽元素。 */
.done__texts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.done__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.2px;
}
.done__sub {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #8b8b8f;
}
.done__next {
  display: flex;
  align-items: center;
  gap: 8px;
}
.done__next p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #aeaeb2;
}
.dots {
  display: flex;
  gap: 5px;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: #c7c7cc;
}
.dot--on {
  background: #2c2d2e;
}

/* 按鈕載入態（由 app.js 的 DrwuProto.initForm() 於送出時自動套用）
   三個圓點做跳動動畫，明確傳達「正在送出、請稍等」，並在此期間停用
   按鈕避免重複送出。 */
.btn--loading {
  background: #5d5f61;
  color: #fff;
  gap: 8px;
  cursor: progress;
}
.bdots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bdots span {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: #fff;
  animation: bdot-pulse 1s ease-in-out infinite;
}
.bdots span:nth-child(2) {
  animation-delay: 0.15s;
}
.bdots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes bdot-pulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}
/* loading 期間停用的輸入欄位：視覺上淡化，避免使用者以為還能改 */
.field__input--busy {
  opacity: 0.55;
  pointer-events: none;
}

/* 表單重置：input/button 不繼承瀏覽器預設外觀 */
input,
button {
  font-family: inherit;
}
input:focus {
  outline: none;
}
label {
  cursor: pointer;
}

button.field__input {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  color: inherit;
}
button.field__input.field__input--focus {
  border: 1.5px solid #2c2d2e;
  box-shadow: 0 0 0 3px rgba(44, 45, 46, 0.08);
}

/* 撐開版面用的彈性空白（登入頁把表單內容推到置底按鈕上緣） */
.spacer-flex {
  flex: 1;
}

/* 置底區貼齊內容、不額外留頂部間距（用於錯誤態等內容已經滿版的頁面） */
.foot--flush {
  padding-top: 0;
}

/* 次要出口按鈕：不需要滿版寬度時的固定寬度（成功頁的「重新示範」按鈕） */
.btn--auto-width {
  width: 240px;
}

/* 灰置且點不動的元素：本原型未涵蓋 */
.is-disabled-decor {
  cursor: not-allowed;
  opacity: 0.55;
  position: relative;
}

/* 文字型按鈕（視覺上是底線文字，語意上是按鈕）：
   用於「立即註冊」「更換手機號碼」這類藏在句子裡的可點字。 */
.link-inline {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline;
}

/* ---- 模擬 iOS 鍵盤（由畫面底部升起）----
   高度貼齊按鍵列，不含候選字那條空灰底。底距 42px 留給 home indicator。
   內容被擋住時才上推；換欄位若已在可視區就不動。 */
.body {
  position: relative;
  z-index: 1;
  transition: transform 0.32s cubic-bezier(0.2, 0.85, 0.25, 1);
}
/* 對話頁沒有 .body；置底輸入區用 data-kb-dock，鍵盤升起時整塊停在鍵盤上方。 */
[data-kb-dock] {
  position: relative;
  z-index: 46;
  transition: transform 0.32s cubic-bezier(0.2, 0.85, 0.25, 1);
}
.kb {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  z-index: 40;
  background: #d1d3d9;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.85, 0.25, 1);
  padding: 8px 6px 42px;
  pointer-events: none;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.scr.is-kb-open .kb {
  transform: translateY(0);
  pointer-events: auto;
}
/* 原生 iOS 驗證碼建議列：一整條鍵盤灰底，不切三欄。
   直向疊「驗證碼（藍）／從訊息（灰）」並左右置中。沒有建議時 hidden，不留空灰底。 */
.kb__suggest {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: 50px;
  margin: -8px -6px 8px;
  padding: 0;
  background: #d1d3d9;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.29);
}
.kb--numeric .kb__suggest {
  margin: -6px -6px 6px;
}
.kb__suggest[hidden] {
  display: none !important;
}
.kb__suggest-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  margin: 0;
  padding: 4px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.kb__suggest-item:active {
  background: rgba(0, 0, 0, 0.06);
}
.kb__suggest-code {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  color: #007aff;
}
.kb__suggest-label {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.1;
  color: #8e8e93;
}
.kb__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kb__row {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.kb__row--inset {
  padding: 0 16px;
}
.kb__pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 6px;
  padding: 0;
}
.kb--numeric {
  padding: 6px 6px 42px;
}
.kb--numeric .kb__inner {
  gap: 0;
}
.kb__key {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: none;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-size: 18px;
  font-weight: 400;
  font-family: inherit;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
  cursor: pointer;
  padding: 0;
}
.kb__pad .kb__key {
  height: auto;
  min-height: 46px;
  font-size: 22px;
}
.kb__key--util {
  background: #adb3be;
  font-size: 14px;
  font-weight: 600;
  flex: 1.2;
}
.kb__key--wide {
  flex: 1.35;
}
.kb__key--space {
  flex: 3.4;
  font-size: 15px;
  font-weight: 500;
}
.kb__key--ghost {
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
.kb__key:active {
  background: #c5c7cd;
}
/* iOS 系統藍：return／Go 在可送出時是 #007AFF，不是灰色「完成」 */
.kb__key--go {
  background: #007aff;
  color: #fff;
}
.kb__key--go:active {
  background: #0063d1;
  color: #fff;
}
.btn[aria-disabled="true"] {
  pointer-events: none;
}

/* iOS 日期滾輪：貼螢幕底、與假鍵盤同一套 chrome（完成＝系統藍 #007AFF） */
.picker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 42;
  background: #d1d3d9;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.85, 0.25, 1);
  pointer-events: none;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.scr.is-picker-open .picker {
  transform: translateY(0);
  pointer-events: auto;
}
.picker__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 4px;
  background: #f2f2f7;
}
.picker__btn {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: #111;
  padding: 4px 8px;
  cursor: pointer;
}
.picker__btn--done {
  color: #007aff;
  font-weight: 600;
}
.picker__wheels {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  height: 258px;
  padding: 0 8px 42px;
  overflow: hidden;
  background: #d1d3d9;
}
.picker__highlight {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 90px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  z-index: 1;
}
.picker__col {
  position: relative;
  z-index: 2;
  height: 216px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.picker__col::-webkit-scrollbar {
  display: none;
}
.picker__item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  scroll-snap-align: center;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  color: #111;
  width: 100%;
  padding: 0;
  cursor: pointer;
}
.picker__pad {
  height: 90px;
  flex-shrink: 0;
  pointer-events: none;
}

