/* auth.css — 會員登入／註冊彈窗與 toast 的樣式，給沒有載入 css/style.css 的頁面（命書 solo、合盤 match）用。
   內容是 css/style.css「會員系統」一段的複本＋變數與 .btn-primary 的後備；改首頁那段時要同步這裡（2026-10-06 第四輪：auth-ui 也在命書、合盤載入）。 */
.auth-modal-overlay, .auth-toast {
  --bg: #f7f3ec; --bg-card: #ffffff; --bg-input: #fffdf9; --border: #e4ddce;
  --text: #201d18; --text-dim: #6f685c; --gold: #a6824c; --gold-soft: #c0a070; --radius: 14px;
  color: var(--text);
}
.auth-modal .btn-primary {
  display: block; width: 100%; padding: 14px; border: none; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.1em; color: #1a1505;
  background: linear-gradient(135deg, var(--gold-soft), #a8821c);
}
/* ======== 會員系統：狀態列 / 登入註冊彈窗 ======== */

/* 登入面板底部：訪客模式（不註冊直接進）次選項 */
.auth-guest-continue {
  display: block; width: 100%; margin-top: 14px; padding: 14px 0 2px;
  border: 0; border-top: 1px solid var(--border); background: none;
  color: var(--text-dim); font-family: inherit; font-size: 0.9rem; cursor: pointer; text-align: center;
}
.auth-guest-continue:hover { color: var(--gold); }
.auth-guest-hint { display: block; font-size: 0.75rem; color: var(--text-dim); margin-top: 3px; opacity: 0.8; }

/* 彈窗 */
.auth-modal-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(8, 9, 14, 0.72);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.auth-modal {
  position: relative; width: 100%; max-width: 420px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 22px 24px;   /* 上緣留給右上角 ×，免得壓到分頁鈕 */
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.auth-close {
  position: absolute; top: 4px; right: 8px; background: none; border: none; color: var(--text-dim);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.auth-close:hover { color: var(--gold); }
.auth-title { color: var(--gold); font-size: 1.15rem; margin-bottom: 14px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tab {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-dim);
  padding: 9px 0; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 0.95rem;
}
.auth-tab.is-active { color: var(--gold); border-color: var(--gold); background: rgba(217, 178, 60, 0.12); font-weight: 600; }

.auth-social { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.auth-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer;
  font-family: inherit; font-size: 0.95rem; font-weight: 500; color: var(--text); background: var(--bg-input);
}
.auth-social-btn:hover { border-color: var(--gold-soft); }
/* 登入鈕依兩家品牌規範（第八輪 license#3；標誌是 js/auth-ui.js 內嵌的官方圖形 SVG）：
   Google 淺色版＝白底、#747775 外框、#1F1F1F 字、四色 G 標誌 18px；LINE＝#06C755 綠底白字、白色對話框標誌，
   標誌與文字之間一條 rgba(0,0,0,.08) 分隔線，滑過疊 10% 黑、按下疊 30% 黑。不改標誌顏色與比例。 */
.auth-social-logo { flex: none; display: block; }
.auth-google { background: #fff; border: 1px solid #747775; color: #1f1f1f; }
.auth-google:hover { border-color: #747775; background: #f8f8f8; }
.auth-line { background: #06c755; border: 1px solid #06c755; color: #fff; font-weight: 600; }
.auth-line .auth-social-logo { padding-right: 10px; border-right: 1px solid rgba(0, 0, 0, 0.08); box-sizing: content-box; }
.auth-line:hover { border-color: #06c755; background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); }
.auth-line:active { background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)); }
.auth-divider {
  text-align: center; color: var(--text-dim); font-size: 12px; margin: 4px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-flabel { font-size: 0.82rem; color: var(--text-dim); }
.auth-field input, .auth-field select {
  width: 100%; background: var(--bg-input); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font-size: 0.95rem; font-family: inherit;
}
.auth-field input:focus, .auth-field select:focus { outline: 2px solid var(--focus-ring, #8a6a3a); border-color: transparent; }
/* iOS Safari 對字級小於 16px 的輸入欄會在點下去時自動放大整頁（第八輪 compat#5）：手機寬度一律 16px。 */
@media (max-width: 760px) { .auth-field input, .auth-field select { font-size: 16px; } }
.auth-date { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; }
.auth-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-radio {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--bg-input); cursor: pointer; font-size: 0.9rem;
}
.auth-radio:has(input:checked) { border-color: var(--gold); background: rgba(217, 178, 60, 0.14); }
.auth-radio input { accent-color: var(--gold); width: 17px; height: 17px; padding: 0; margin: 0; flex: none; }   /* 蓋掉 .auth-field input 的 width:100%＋內距，否則手機上字被擠成直排 */
.auth-radio span { white-space: nowrap; }
.auth-hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.auth-note { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
/* 註冊同意勾選（2026-10-08 第六輪法律 #2）：未勾不能送出；字級比 .auth-note 大，避免小到看不見 */
.auth-consent { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; font-size: 0.88rem; line-height: 1.6; color: var(--text); cursor: pointer; }
.auth-consent input { accent-color: var(--gold); width: 18px; height: 18px; margin: 2px 0 0; padding: 0; flex: none; }
.auth-consent a, .auth-social-note a { color: var(--gold); }
.auth-social-note { margin: 6px 0 0; }
/* 另存的命盤（會員面板下半） */
.auth-charts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.auth-charts-title { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 4px 0 0; }
.auth-charts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.auth-charts-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-input); }
.auth-charts-list li.auth-charts-empty { color: var(--text-dim); font-size: 0.85rem; border-style: dashed; }
.auth-chart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.82rem; color: var(--text-dim); line-height: 1.45; }
.auth-chart-info b { color: var(--text); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-chart-btn, .auth-chart-add { font: inherit; font-size: 0.85rem; cursor: pointer; border-radius: 8px; padding: 6px 10px; min-height: 36px; border: 1px solid var(--gold); background: var(--bg-card); color: var(--text); flex: none; }
.auth-chart-btn.auth-chart-del { border-color: var(--border); color: var(--text-dim); }
.auth-chart-btn:hover, .auth-chart-add:hover { background: rgba(217, 178, 60, 0.14); }
.auth-chart-btn:disabled, .auth-chart-add:disabled { opacity: 0.5; cursor: default; }
.auth-charts-new { gap: 8px; }
.auth-chart-add { padding: 9px 12px; }
.auth-charts-msg:empty { display: none; }
.auth-perks { margin: -4px 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-input); }
.auth-perks-title { color: var(--text); font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.auth-perks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.auth-perks-list li { position: relative; padding-left: 14px; font-size: 0.84rem; color: var(--text-dim); line-height: 1.5; }
.auth-perks-list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.auth-err { color: #b3261e; font-size: 0.85rem; }   /* 白底對比約 6.5:1（原 #e88 只有 2.4:1） */
.auth-notice { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--gold); border-radius: 10px; background: var(--bg-input); color: var(--text); font-size: 0.9rem; }
.auth-resend { display: flex; flex-direction: column; gap: 8px; }
.auth-resend-msg:empty { display: none; }
.auth-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-link {
  display: block; margin: 12px auto 0; background: none; border: none; color: var(--text-dim);
  font-size: 0.85rem; cursor: pointer; font-family: inherit; text-align: center; width: 100%;
}
.auth-link:hover { color: var(--gold); text-decoration: underline; }

/* 提示 toast */
.auth-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--bg-card); border: 1px solid var(--gold); color: var(--text);
  padding: 11px 20px; border-radius: 999px; font-size: 0.9rem; z-index: 1100;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity .28s, transform .28s; pointer-events: none;
}
.auth-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
  /* 單顆 CTA 已夠窄，維持與 brand／文A 同一行，不再被擠成第二排 */
  .auth-modal { padding: 40px 16px 20px; }
}
