/* ============ FS Member 原型 — 共用樣式 ============ */
:root {
  --gold: #cbb58b;
  --gold-dark: #8b7044;
  --gold-grad: linear-gradient(90deg, #b59a68 0%, #887044 100%);
  --gold-btn: linear-gradient(180deg, #d8c6a3 0%, #b99a63 100%);
  --dark-btn: radial-gradient(circle, #3b414d 0%, #242b36 100%);
  --ink: #1e2329;
  --text: #343943;
  --muted: #626670;
  --soft: #b2b2b2;
  --navy: #19202a;
  --container: 1240px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #fff; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; }
.container { width: 100%; max-width: calc(var(--container) + 48px); margin: 0 auto; padding: 0 24px; }

/* 桌機 / 手機切換 (RWD 斷點 768) */
.m-only { display: none !important; }
@media (max-width: 767px) {
  .d-only { display: none !important; }
  .m-only { display: block !important; }
  .m-only.flex { display: flex !important; }
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 35px; border-radius: 5px; font-size: 15px; color: #fff; white-space: nowrap;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn-dark { background: var(--dark-btn); border: 1px solid var(--gold); }
.btn-gold { background: var(--gold-btn); border: 1px solid #bca477; }
.pill-gold {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #fff; border-radius: 50px; white-space: nowrap;
}

/* ---------- 跑馬燈 ---------- */
.marquee {
  position: relative; display: flex; align-items: center;
  background: #fff; border-radius: 50px; overflow: hidden;
}
.marquee .label { flex: none; height: 100%; font-size: 20px; padding: 0 25px; }
.marquee .track { position: relative; flex: 1; overflow: hidden; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%); }
.marquee .track a { position: absolute; top: 50%; left: 100%; transform: translateY(-50%);
  white-space: nowrap; animation: marquee 18s linear infinite; }
.marquee .track:hover a { animation-play-state: paused; }
@keyframes marquee { from { left: 100%; transform: translate(0, -50%); } to { left: 0; transform: translate(-100%, -50%); } }

/* ---------- 輪播 ---------- */
.carousel { position: relative; overflow: hidden; }
.carousel .slides { position: absolute; inset: 0; }
.carousel .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.carousel .slide.on { opacity: 1; z-index: 1; }
.carousel .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carousel .dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.carousel .dots button { width: 10px; height: 10px; border-radius: 10px; background: rgba(255,255,255,.55); transition: width .3s, background .3s; }
.carousel .dots button.on { width: 35px; background: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 12px 24px; border-radius: 8px;
  font-size: 15px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* ---------- 原型工具：顯示熱區 (類似 Axure 的 Highlight Hotspots) ---------- */
.proto-tool {
  position: fixed; left: 12px; bottom: 12px; z-index: 10000;
  background: rgba(30,35,41,.85); color: #fff; font-size: 12px;
  padding: 6px 10px; border-radius: 6px; opacity: .55; transition: opacity .2s;
}
.proto-tool:hover { opacity: 1; }
@media (max-width: 767px) { .proto-tool { left: auto; right: 12px; bottom: 172px; font-size: 11px; padding: 4px 8px; } }
body.show-hot a, body.show-hot button:not(.proto-tool), body.show-hot [data-href] {
  outline: 2px dashed #1e90ff !important; outline-offset: -2px; background-color: rgba(30,144,255,.12);
}
.hotspot { position: absolute; display: block; }

/* ============ 彈窗（登入／註冊／忘記密碼／完善資料） ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55);
  display: none; overflow-y: auto; padding: 24px 16px;
}
.modal-mask.show { display: flex; }
.modal {
  margin: auto; width: 480px; max-width: 100%; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); display: none;
}
.modal.show { display: block; }
.modal-hd { height: 48px; background: #121720; display: flex; align-items: center; padding: 0 16px 0 20px; }
.modal-hd h3 { font-size: 16px; font-weight: 500; color: var(--gold); }
.modal-hd .close { margin-left: auto; width: 20px; height: 20px; }
.modal-hd .close img { width: 20px; height: 20px; }
.modal-bd { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; font-weight: 500; color: var(--navy); line-height: 16px; }
.field > label .req { color: #d1493a; margin-left: 4px; }
.field .row { display: flex; gap: 8px; }
.field .row .ipt { flex: 1; }
.ipt {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border: 1px solid #b8b2a8; border-radius: 10px; background: #fff; transition: border-color .15s;
}
.ipt:focus-within { border-color: var(--gold); }
.ipt input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 13px; color: var(--navy); background: none; }
.ipt input::placeholder { color: #b8b2a8; }
.ipt .eye { width: 20px; height: 20px; flex: none; opacity: .9; }
.ipt .eye img { width: 20px; height: 20px; }
.ipt .eye.on { opacity: .45; }
.field .err { display: none; font-size: 12px; color: #d1493a; line-height: 14px; }
.field.invalid .ipt { border-color: #d1493a; }
.field.invalid .err { display: block; }
.btn-code {
  flex: none; width: 96px; height: 40px; border: 1px solid var(--gold); border-radius: 5px; background: #fff;
  font-size: 13px; color: var(--gold-dark);
}
.btn-code:disabled { color: #b8b2a8; border-color: #ddd; cursor: default; }

.link-row { display: flex; justify-content: space-between; font-size: 13px; line-height: 16px; }
.link-row a { color: var(--gold-dark); text-decoration: underline; }
.btn-block { width: 100%; height: 40px; font-size: 15px; font-weight: 500; }
.other-label { font-size: 12px; color: #b8b2a8; line-height: 14px; }
.btn-tg {
  width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid #bca477; border-radius: 5px; background: #fff; font-size: 14px; font-weight: 500; color: var(--navy);
}
.btn-tg img { width: 20px; height: 20px; }
.btn-tg:hover { background: #faf7f1; }

.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 16px; cursor: pointer; }
.check input { display: none; }
.check .box { flex: none; width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; margin-top: -2px; }
.check .box img { width: 12px; height: 12px; display: none; }
.check input:checked + .box { background: var(--gold); }
.check input:checked + .box img { display: block; }
.check.invalid .box { border-color: #d1493a; }

.notice { display: flex; gap: 8px; padding: 8px 0; }
.notice::before { content: ""; flex: none; width: 3px; border-radius: 2px; background: var(--gold); }
.notice b { display: block; font-size: 13px; font-weight: 500; color: var(--navy); line-height: 16px; margin-bottom: 4px; }
.notice p { font-size: 12px; color: var(--muted); line-height: 14px; }

body.modal-open { overflow: hidden; }
@media (max-width: 767px) {
  .modal-mask { padding: 24px 0; }
  .modal { width: 100%; }
}
