:root {
  --bg: #fbf8f9;
  --bg-gradient: linear-gradient(180deg, #fdf1f4 0%, #fbf8f9 45%, #fbf8f9 100%);
  --card: #fff;
  --primary: #fe2c55; --primary-dark: #e0234a; --accent: #25f4ee;
  --coin: #f9b800;
  --text: #161823; --text-sub: #86888f; --border: #ececec;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Microsoft JhengHei", Roboto, Arial, sans-serif;
  background: var(--bg-gradient); color: var(--text);
  background-attachment: fixed;
}
a { color: var(--primary); text-decoration: none; }

/* 頁首：融入背景、取消實心白 */
.topbar {
  background: transparent; border-bottom: 1px solid rgba(231, 222, 225, 0.6);
  padding: 12px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px;
  color: inherit; text-decoration: none; cursor: pointer;
}
a.logo:hover { opacity: 0.75; }
.logo .dot {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  display: block;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }

/* 右上角使用者頭像 + 下拉 */
.top-user { position: relative; }
.top-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #ffc98a, #ff8a5a);
  color: #fff; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  overflow: hidden;
}
.top-avatar:hover { filter: brightness(1.05); }
.top-popover {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 260px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 14px 14px 8px;
  display: none; z-index: 1200;
}
.top-popover.show { display: block; }
.top-popover::before {
  content: ""; position: absolute;
  top: -6px; right: 12px;
  width: 12px; height: 12px; background: #fff;
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.tp-info { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.tp-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #ffc98a, #ff8a5a);
  color: #fff; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tp-text { min-width: 0; }
.tp-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-id { font-size: 12px; color: var(--text-sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-divider { height: 1px; background: var(--border); margin: 10px -14px; }
.tp-logout {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text); font-size: 14px;
  padding: 8px 4px; border-radius: 6px;
}
.tp-logout:hover { background: #f7f8fa; color: var(--primary); }
.tp-logout svg { width: 16px; height: 16px; }

main { max-width: 820px; margin: 28px auto; padding: 0 16px; }

/* ─────── 鑽石專屬充值服務 modal ─────── */
.recharge-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55);
  display: none; align-items: center; justify-content: center;
  z-index: 250; padding: 20px;
}
.recharge-mask.show { display: flex; animation: fadeIn .18s; }
.recharge-popup {
  width: 100%; max-width: 440px; max-height: 92vh;
  background: linear-gradient(180deg, #ffe2c8 0%, #fff3df 28%, #fff 65%);
  border-radius: 18px;
  overflow-y: auto; overflow-x: hidden;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  animation: zoomIn .22s;
}
.recharge-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.75); border: none; cursor: pointer;
  font-size: 18px; color: #555;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.recharge-close:hover { background: #fff; }

.recharge-notice {
  margin: 14px 14px 0;
  background: #f5e6c8;
  border-radius: 8px; padding: 9px 12px;
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: #7a5a1e; line-height: 1.6;
}
.recharge-notice .ico { font-size: 13px; flex-shrink: 0; }

.recharge-hero {
  padding: 22px 22px 4px;
  position: relative;
}
.recharge-hero .hero-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #6b6d76;
  margin-bottom: 6px;
}
.recharge-hero .hero-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #c9d3e0, #5a6072);
}
.recharge-hero .hero-title {
  font-size: 28px; font-weight: 800; color: #161823;
  margin: 0; letter-spacing: -1px; line-height: 1.1;
}
.recharge-hero .hero-decor {
  position: absolute; right: 12px; bottom: -8px;
  font-size: 64px; line-height: 1;
  pointer-events: none;
}

.recharge-steps {
  margin: 14px;
  background: linear-gradient(180deg, #fffcf6 0%, #fff 100%);
  border-radius: 16px;
  border: 1px solid #f0e6d4;
  overflow: hidden;
  padding-bottom: 18px;
}
.steps-banner {
  background: linear-gradient(135deg, #2c2c34 0%, #1a1a22 100%);
  color: #fff; padding: 12px 18px;
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}

.step-item {
  display: flex; gap: 14px;
  padding: 16px 18px 0;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: ""; position: absolute;
  left: 28px; top: 38px; bottom: -2px;
  border-left: 1px dashed #c4b89d;
}
.step-num {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: #1a1a22; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  margin-top: 2px;
  position: relative; z-index: 1;
}
.step-body { flex: 1; min-width: 0; }
.step-head {
  font-size: 14.5px; font-weight: 700; color: #161823;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px;
}
.step-head .eye-toggle {
  cursor: pointer; font-size: 13px; color: #888;
  user-select: none;
}
.step-head .step-link {
  color: #888; font-size: 12.5px; font-weight: 500;
  text-decoration: none;
}

.step-card {
  background: rgba(255, 245, 230, 0.45);
  border: 1px solid rgba(196, 184, 157, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
}
.bank-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13.5px;
}
.bank-row + .bank-row { border-top: 1px dashed rgba(196, 184, 157, 0.3); }
.bank-row .lbl { color: #6b6d76; flex-shrink: 0; min-width: 56px; }
.bank-row .val {
  flex: 1; color: #161823; font-weight: 500;
  letter-spacing: 2px; word-break: break-all;
}
.bank-row .val.masked { font-family: "SF Mono", Menlo, Consolas, monospace; }
.bank-row .copy-btn {
  background: none; border: none; cursor: pointer;
  padding: 2px 4px; font-size: 14px; color: #888;
  line-height: 1;
}
.bank-row .copy-btn:hover { color: #161823; }

.step-desc {
  font-size: 12.5px; color: #6b6d76;
  line-height: 1.6; margin-bottom: 10px;
}
.step-suboption {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: rgba(255, 245, 230, 0.45);
  border: 1px solid rgba(196, 184, 157, 0.3);
  border-radius: 10px;
  margin-top: 8px;
}
.step-suboption .ico {
  font-size: 18px; flex-shrink: 0;
}
.step-suboption .sub-text { flex: 1; min-width: 0; }
.step-suboption .sub-text strong {
  font-size: 14px; color: #161823;
  display: block; margin-bottom: 2px;
}
.step-suboption .sub-desc {
  font-size: 12px; color: #6b6d76; line-height: 1.5;
}
.step-suboption .sub-link {
  font-size: 12.5px; color: #888;
  text-decoration: none; flex-shrink: 0;
}

.step-bullets {
  list-style: none; padding: 0; margin: 0;
  font-size: 13px; color: #6b6d76;
  line-height: 1.7;
}
.step-bullets li {
  position: relative; padding-left: 14px;
  margin-bottom: 4px;
}
.step-bullets li::before {
  content: "•"; position: absolute; left: 0; top: 0;
  color: #c4b89d;
}

/* ─── 充值 modal 子彈窗（限額 / 報備說明 / 報備 form） ─── */
.sub-mask { z-index: 260; }
.sub-popup {
  width: 100%; max-width: 440px; max-height: 92vh;
  background: linear-gradient(180deg, #ffe2c8 0%, #fff3df 28%, #fff 65%);
  border-radius: 18px;
  overflow-y: auto; overflow-x: hidden;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  animation: zoomIn .22s;
}
.sub-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px;
  position: relative;
}
.sub-header .back {
  cursor: pointer; font-size: 22px; color: #555; line-height: 1;
  user-select: none; padding: 4px 8px; border-radius: 6px;
}
.sub-header .back:hover { background: rgba(0,0,0,0.05); }
.sub-header .sub-title {
  flex: 1; text-align: center; font-size: 16px; font-weight: 700; color: #161823;
  margin-right: 38px;
}

.sub-empty {
  text-align: center; padding: 80px 20px 40px;
}
.sub-empty .empty-icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  background: #e5e5e7; border-radius: 50%;
}
.sub-empty .empty-title { font-size: 15px; color: #161823; font-weight: 600; margin-bottom: 6px; }
.sub-empty .empty-desc { font-size: 13px; color: #999; }

.report-card {
  margin: 4px 14px 14px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(196, 184, 157, 0.3);
}
.report-card h4 {
  margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #161823;
}
.report-bullets {
  list-style: none; padding: 0; margin: 0 0 18px;
  font-size: 13px; color: #6b6d76; line-height: 1.7;
}
.report-bullets li {
  position: relative; padding-left: 14px; margin-bottom: 6px;
}
.report-bullets li::before {
  content: "•"; position: absolute; left: 0; top: 0; color: #c4b89d;
}
.report-btn {
  width: 100%; padding: 11px 0;
  background: #fff; color: #161823;
  border: 1px solid #ececec; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .12s;
}
.report-btn:hover { border-color: #1a1a22; }

/* 報備 form: 底部 sheet style */
.recharge-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  width: 100%; max-width: 440px; margin: 0 auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  max-height: 70vh; overflow-y: auto;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.15);
  animation: sheetUp .22s ease-out;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-header {
  padding: 16px 20px; display: flex; align-items: center; justify-content: center;
  position: sticky; top: 0; background: #fff; border-bottom: 1px solid #f0f0f2;
  z-index: 1;
}
.sheet-title { font-size: 15px; font-weight: 600; color: #161823; }
.sheet-close {
  position: absolute; right: 16px; top: 14px;
  background: none; border: none; cursor: pointer;
  width: 28px; height: 28px; font-size: 18px; color: #555;
}

.report-form { padding: 8px 20px 24px; }
.form-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f7;
}
.form-lbl {
  flex-shrink: 0; width: 80px;
  font-size: 14px; font-weight: 600; color: #161823;
}
.report-form input[type="text"] {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font-size: 13.5px; color: #161823;
  font-family: inherit;
}
.report-form input::placeholder { color: #bbb; }

.form-actions { margin-top: 22px; }
.form-submit {
  width: 100%; padding: 12px 0;
  background: linear-gradient(92deg, #ff3a5f 0%, #fe2c55 55%, #f5204f 100%);
  color: #fff; border: none; border-radius: 8px;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(254, 44, 85, 0.22);
}

/* 私人專屬收款帳號 banner（金色標頭、置於 main-card 之上） */
/* 比例對齊 douyin.com/pay 官方：725×76 ≈ 9.54:1（扁長橫條） */
.banner-private {
  margin-bottom: 18px;
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  aspect-ratio: 9.54 / 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.banner-private img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 主卡片：上白（登入條）下暖白（內容）分層，陰影更柔 */
.main-card {
  position: relative;
  background: #faf8f9;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 4px 18px rgba(254, 44, 85, 0.05);
  /* 不使用 overflow: hidden，避免裁切下拉 popover；
     圓角改由 .card-top / .card-body 各自實現。 */
}
.card-top {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #fff6f8 65%, #ffeaef 100%);
  padding: 22px 32px;
  border-bottom: 1px solid #f3e8eb;
  border-radius: 16px 16px 0 0;
}
/* 抖音 D 浮水印：獨立裝飾層，自己 overflow:hidden，不會裁切 popover */
.card-top-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}
.card-top-decor::after {
  content: "";
  position: absolute;
  top: -20px; right: -16px;
  width: 110px; height: 110px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23fecbd4' d='M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5.8 20.1a6.34 6.34 0 0 0 10.86-4.43V8.4a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1.84-.83Z'/></svg>") no-repeat center / contain;
  opacity: 0.22;
  transform: rotate(8deg);
}
.card-top > .login-bar { position: relative; z-index: 1; }
.card-body {
  padding: 22px 32px 24px;
  background: #faf8f9;
  border-radius: 0 0 16px 16px;
}

/* 登入條 */
.login-bar {
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
.login-bar .usr-wrap {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; flex: 1;
}
.login-bar .usr-wrap.logged { cursor: default; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #f0f0f2, #e0e0e4);
  color: #9ea0a6;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; overflow: hidden;
}
.avatar.logged {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; font-weight: 700;
}
.usr-text .title-row { font-size: 15px; font-weight: 600; color: var(--text); }
.usr-text .sub-row { font-size: 12px; color: var(--text-sub); margin-top: 2px; display: none; }
.login-bar.has-user .usr-text .sub-row { display: block; }
.login-bar .switch-wrap { position: relative; }
.login-bar .switch-btn {
  font-size: 13px; color: var(--primary);
  background: #fff; border: 1px solid var(--primary);
  border-radius: 999px; padding: 5px 12px;
  cursor: pointer; transition: all 0.15s;
}
.login-bar .switch-btn:hover { background: var(--primary); color: #fff; }
.login-bar.has-user .switch-wrap { display: inline-block; }
.login-bar:not(.has-user) .switch-wrap { display: none; }

/* 切換抖音號 popover */
.switch-popover {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 330px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid #eef0f2; border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  z-index: 900; display: none; overflow: hidden;
}
.switch-popover.show { display: block; }
.sw-header {
  padding: 14px 16px; font-size: 15px; font-weight: 700; color: var(--text);
  background: #fafbfc; border-bottom: 1px solid #eef0f2;
}
.sw-list {
  max-height: 280px; overflow-y: auto;
  padding: 8px;
}
.sw-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.sw-item:hover { background: #f7f8fa; }
.sw-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sw-text { flex: 1; min-width: 0; }
.sw-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-id {
  font-size: 12px; color: var(--text-sub); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #d8d9dc; flex-shrink: 0;
  position: relative;
}
.sw-radio.active { border-color: var(--primary); }
.sw-radio.active::after {
  content: ""; position: absolute; inset: 2px;
  border-radius: 50%; background: var(--primary);
}
.sw-empty {
  padding: 28px 16px; text-align: center; color: var(--text-sub); font-size: 13px;
}
.sw-footer {
  padding: 10px 12px; border-top: 1px solid #eef0f2;
}
.sw-add-btn {
  display: block; width: 100%;
  padding: 10px 0; text-align: center;
  border: 1px solid #e5e6eb; border-radius: 8px;
  background: #fff; color: var(--text); font-size: 14px;
  cursor: pointer; transition: all .15s;
}
.sw-add-btn:hover { border-color: var(--primary); color: var(--primary); }
.sw-add-form { display: flex; gap: 6px; margin-bottom: 8px; }
.sw-add-form input {
  flex: 1; min-width: 0; padding: 9px 10px;
  border: 1px solid #e5e6eb; border-radius: 8px; font-size: 14px;
}
.sw-add-confirm {
  padding: 9px 14px; border: none; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.sw-unbind {
  border: none; background: transparent; color: #c4c4cc; cursor: pointer;
  font-size: 14px; padding: 2px 6px; line-height: 1; align-self: center;
}
.sw-unbind:hover { color: var(--primary); }

/* 套餐區標題 */
.section-row {
  display: flex; align-items: baseline; gap: 10px;
  margin: 22px 0 16px;
  position: relative;
}
.section-row h2 {
  margin: 0; font-size: 18px; font-weight: 700;
}
.section-row .tip { font-size: 12px; color: var(--text-sub); }

/* 套餐網格 */
.packages {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  position: relative;
}
.pkg {
  position: relative;
  border: 1px solid #ececec; border-radius: var(--radius);
  padding: 18px 14px; cursor: pointer;
  transition: all .15s; background: #fff; user-select: none;
  min-height: 92px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.pkg:hover { border-color: #ffb7c3; }
.pkg.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff0f4 0%, #fff8fa 70%);
  box-shadow: 0 0 0 1px var(--primary) inset;
}
/* 選中狀態右上角角標（參考 douyin.com/pay） */
.pkg.active::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-top: 22px solid var(--primary);
  border-left: 22px solid transparent;
}
.pkg.active::before {
  content: "";
  position: absolute;
  top: 3px; right: 3px;
  width: 7px; height: 4px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
  z-index: 1;
}
.pkg .coin-line {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 22px; font-weight: 700; line-height: 1;
  color: var(--text);
}
.pkg.active .coin-line { color: var(--primary); }
.pkg .coin-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  object-fit: contain;
  display: inline-block;
}
.pkg .price {
  margin-top: 8px; font-size: 13px; color: var(--text-sub);
  letter-spacing: 0.2px; text-align: center;
}
.pkg.active .price { color: var(--primary); }

/* 自訂金額卡 */
.pkg.custom {
  align-items: center; justify-content: center;
  text-align: center; gap: 6px;
  position: relative;
}
/* popover 展開時覆蓋 .pkg 的 overflow:hidden，讓 280×~110px 的浮層能完整浮出卡片外；
   未展開時仍走 .pkg 的 overflow:hidden，避免 active 角標溢出圓角。 */
.pkg.custom:has(.custom-popover.show) { overflow: visible; }
.pkg.custom .label { font-size: 15px; font-weight: 600; color: var(--text); }
.pkg.custom .hint { font-size: 12px; color: var(--text-sub); }
.pkg.custom.active .label { color: var(--primary); }

/* Popover */
.custom-popover {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  width: 280px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  padding: 14px;
  z-index: 20;
  display: none; cursor: default;
}
.custom-popover.show { display: block; }
.custom-popover::before {
  content: ""; position: absolute;
  top: -6px; right: 46px;
  width: 12px; height: 12px;
  background: #fff; transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}
.custom-popover .inp-wrap {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; background: #fafafa;
}
.custom-popover .inp-wrap .yen {
  color: var(--text-sub); font-size: 15px; margin-right: 6px;
}
.custom-popover .inp-wrap input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-size: 14px; color: var(--text); padding: 0;
}
.custom-popover .inp-wrap input::placeholder { color: #b5b7bd; }
.custom-popover .pop-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px;
}
.custom-popover .pop-actions button {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 7px 18px; border-radius: 6px; font-size: 13px;
  cursor: pointer; transition: all 0.15s;
}
.custom-popover .pop-actions .cancel:hover { color: var(--text-sub); }
.custom-popover .pop-actions .confirm {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.custom-popover .pop-actions .confirm:hover { background: var(--primary-dark); }
.custom-popover .pop-actions .confirm:disabled {
  background: #ffb3c1; border-color: #ffb3c1; cursor: not-allowed;
}

/* 應付金額卡片（包住 amount-line + 換算明細，視覺一體） */
.amount-card {
  margin: 26px 0 16px;
  background: #ffffff;
  border: 1px solid #f3e8eb;
  border-radius: 10px;
  overflow: hidden;
}
/* 應付金額列（在 .amount-card 內，無自身邊框/背景） */
.amount-line {
  display: flex; align-items: baseline; gap: 6px;
  padding: 14px 16px;
  position: relative;
}
.amount-line .label { font-size: 15px; color: var(--text); }
.amount-line .num {
  color: var(--primary); font-size: 30px; font-weight: 700; letter-spacing: 0.5px;
}
.amount-line .sum-toggle {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  padding: 2px 8px; border-radius: 8px;
  transition: background .12s;
}
.amount-line .sum-toggle:hover { background: rgba(254, 44, 85, 0.06); }
.amount-line .sum-toggle .toggle-arrow {
  font-size: 14px; color: #86888f; font-weight: 500;
  transition: opacity .2s;
}
.amount-line .sum-toggle.expanded .toggle-arrow { opacity: 0.4; }
.amount-line .sum-toggle.no-rate { cursor: default; }
.amount-line .sum-toggle.no-rate:hover { background: transparent; }
.amount-line .sum-toggle.no-rate .toggle-arrow { display: none; }

.sum-detail {
  padding: 10px 16px;
  background: #fafafa;
  font-size: 12.5px; color: #6b6d76;
  animation: detailIn .18s ease-out;
}
/* 展開時 detail 在上、line 在下：detail 用底部分隔線收尾 */
.amount-card .sum-detail + .amount-line { border-top: 1px dashed #f3e8eb; }
.sum-detail-row {
  display: flex; justify-content: space-between; padding: 4px 0;
}
.sum-detail-row:not(:last-child) { border-bottom: 1px dashed #ececec; }
.sum-detail-row > span:last-child { color: #161823; font-weight: 600; }

/* 立即充值按鈕：內含多品牌 icon + 文字 */
.btn-pay {
  width: 100%; border: none; border-radius: 10px;
  background: linear-gradient(92deg, #ff3a5f 0%, #fe2c55 55%, #f5204f 100%);
  color: #fff;
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-size: 17px; font-weight: 600; cursor: pointer;
  transition: filter .15s, transform .15s;
  position: relative;
  box-shadow: 0 6px 14px rgba(254, 44, 85, 0.25);
}
.btn-pay:hover:not(:disabled) { filter: brightness(1.06); }
.btn-pay:active:not(:disabled) { transform: translateY(1px); }
.btn-pay:disabled {
  background: #ffb3c1; box-shadow: none; cursor: not-allowed;
}

/* 協議文字 */
.agreement {
  display: flex; align-items: center; gap: 6px;
  margin-top: 14px; font-size: 13px; color: var(--text-sub);
}
.agreement input { margin: 0; }
.agreement a { color: var(--primary); }

/* Toast */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  padding: 10px 16px; background: rgba(0,0,0,.82); color: #fff;
  border-radius: 8px; font-size: 14px; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }
.toast.error { background: rgba(178, 34, 34, .92); } /* toast(msg, "error")：錯誤訊息與一般提示區分 */

/* 登入 Modal */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
  display: none; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 14px;
  width: 380px; max-width: calc(100vw - 32px);
  padding: 26px 28px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.2s ease-out;
  position: relative;
}
@keyframes modalIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
/* 關閉按鈕 */
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-sub);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #f2f3f5; color: var(--text); }

.modal .field {
  display: flex; align-items: center;
  border: 1px solid transparent; border-radius: 999px;
  padding: 12px 16px; margin-bottom: 12px;
  background: #f2f3f5;
  position: relative;
}
.modal .field:focus-within { background: #fff; border-color: var(--border); }

.modal .field input {
  flex: 1; min-width: 0; border: none; outline: none;
  background: transparent; font-size: 14px; color: var(--text);
}
#loginPhone { text-align: center; }
/* 錯誤列：保留 16px 佔位（錯誤出現時按鈕不位移，避免使用者第二下誤點下方協議連結），
   但佔位本身已構成按鈕上方的留白 → 不再另加 margin-bottom，改由按鈕的 margin-top 微調。 */
.modal .err {
  color: var(--primary); font-size: 12px; margin: -4px 0 0; min-height: 16px;
}

.btn-login-full {
  display: block; width: 100%;
  border: none; background: var(--primary); color: #fff;
  padding: 12px 0; font-size: 16px; font-weight: 600;
  border-radius: 999px; cursor: pointer;
  margin-top: 2px;
  transition: background .15s;
}
.btn-login-full:hover:not(:disabled) { background: var(--primary-dark); }
.btn-login-full:disabled {
  background: #ffb3c1; cursor: not-allowed;
}

.modal-agreement {
  text-align: center; font-size: 12px; color: var(--text-sub);
  margin-top: 14px; line-height: 1.6;
}
.modal-agreement a { color: var(--primary); text-decoration: none; }
.modal-agreement a:hover { text-decoration: underline; }

/* 充值協議 / 安全提示 Modal */
.info-box {
  background: #fff; border-radius: 12px;
  width: 580px; max-width: calc(100vw - 32px);
  max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  animation: modalIn .2s ease-out;
  position: relative;
  overflow: hidden;
}
.info-header {
  padding: 18px 48px 16px 24px;
  font-size: 17px; font-weight: 700;
  border-bottom: 1px solid #eef0f3;
  color: var(--text);
}
.info-body {
  padding: 18px 24px 20px;
  overflow-y: auto;
  font-size: 13.5px; color: #4a4c51; line-height: 1.85;
}
.info-body h4 {
  margin: 14px 0 6px; font-size: 14px; font-weight: 700;
  color: var(--text);
}
.info-body h4:first-of-type { margin-top: 0; }
.info-body p { margin: 0 0 8px; }
.info-body ol, .info-body ul { margin: 0 0 10px; padding-left: 22px; }
.info-body ol li, .info-body ul li { margin-bottom: 4px; }
.info-body em { color: var(--primary); font-style: normal; font-weight: 600; }
.info-footer {
  padding: 10px 20px 14px;
  border-top: 1px solid #eef0f3;
  display: flex; justify-content: flex-end; gap: 8px;
}
.info-ok-btn {
  padding: 8px 20px; border-radius: 6px;
  background: var(--primary); border: 1px solid var(--primary);
  color: #fff; cursor: pointer; font-size: 14px;
}
.info-ok-btn:hover { background: var(--primary-dark); }

@media (max-width: 720px) {
  .packages { grid-template-columns: repeat(2, 1fr); }
  .card-top { padding: 18px 18px; }
  .card-body { padding: 18px 18px; }
  .custom-popover { right: auto; left: 0; width: 260px; }
  .custom-popover::before { right: auto; left: 46px; }
}

/* ============ Phase 2: 訂單確認 + 結帳 modal ============ */
.flow-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
  display: none; align-items: center; justify-content: center; z-index: 200;
  padding: 16px;
}
.flow-mask.show { display: flex; animation: fadeIn .18s; }
.flow-card {
  background: #fff; border-radius: 18px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  animation: zoomIn .22s; max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.flow-card.lg { max-width: 480px; }
.flow-card-header {
  padding: 22px 24px 14px; border-bottom: 1px solid #f0f0f2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.flow-card-header h3 {
  margin: 0; font-size: 17px; font-weight: 700; color: #161823;
}
.flow-card-body {
  padding: 18px 24px; font-size: 14px; color: #161823;
}
.flow-card-footer {
  padding: 14px 20px 20px;
  display: flex; gap: 10px;
}
.flow-card-footer button {
  flex: 1;
  padding: 12px 0; border-radius: 10px; border: 1px solid #ececec;
  background: #fff; color: #6b6d76;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: all .12s; font-family: inherit;
}
.flow-card-footer button:hover { color: #161823; }
.flow-card-footer button.primary {
  background: linear-gradient(92deg, #ff3a5f 0%, #fe2c55 55%, #f5204f 100%);
  color: #fff; border-color: var(--primary, #fe2c55);
  box-shadow: 0 6px 14px rgba(254, 44, 85, 0.25);
}
.flow-card-footer button.primary:hover { box-shadow: 0 8px 18px rgba(254, 44, 85, 0.32); }
.flow-card-footer button:disabled { opacity: 0.55; cursor: wait; }

/* hidden 屬性必須贏過元件自己的 display 宣告（否則 el.hidden = true 對設了 display 的元素無效）*/
[hidden] { display: none !important; }

/* ---------- 客服：未登入時的驗證引導 ---------- */
.support-verify { text-align: center; padding: 14px 4px 6px; }
.support-verify .sv-ico { font-size: 30px; line-height: 1; margin-bottom: 12px; }
.support-verify .sv-title { font-size: 15.5px; font-weight: 700; color: #161823; margin-bottom: 10px; }
.support-verify .sv-desc {
  font-size: 13px; line-height: 1.75; color: #6b6d76; margin: 0 0 18px;
  text-align: left; background: #fafafa; border-radius: 10px; padding: 12px 14px;
}
.support-verify .sv-desc strong { color: #161823; font-weight: 600; }
.support-verify .sv-btn {
  width: 100%; padding: 12px 0; border-radius: 10px; border: none;
  background: linear-gradient(92deg, #ff3a5f 0%, #fe2c55 55%, #f5204f 100%); color: #fff;
  font-size: 14.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  box-shadow: 0 6px 14px rgba(254, 44, 85, 0.25); transition: box-shadow .15s;
}
.support-verify .sv-btn:hover { box-shadow: 0 8px 18px rgba(254, 44, 85, 0.32); }
.support-verify .sv-hours { margin-top: 14px; font-size: 12px; color: #a8aab0; }

/* ---------- 線上客服聊天 ---------- */
.support-status { font-size: 11.5px; color: #86888f; font-weight: 600; }
/* 客服視窗用右上角 × 關閉（沿用登入 / 說明視窗的 .modal-close 尺寸與色票，不另立一套）。
   .modal-close 原本靠 absolute 貼在 .modal 角落，而 .flow-card 未定位、絕對定位會跑到
   遮罩的視窗角落 → 這裡改當 .flow-card-header 的 flex 項目，只覆蓋定位方式。
   狀態字改靠右，與 × 貼齊成一組（標題仍在最左）。 */
#supportMask .modal-close { position: static; flex: 0 0 auto; }
#supportMask .support-status { margin-left: auto; }
.support-status.online { color: #16a34a; }
.chat-log {
  height: 320px; max-height: 46vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 4px 2px;
}
.chat-empty { margin: auto; text-align: center; font-size: 12.5px; color: #86888f; line-height: 1.7; }
.chat-msg { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg.in { align-self: flex-end; align-items: flex-end; }
.chat-msg.out { align-self: flex-start; align-items: flex-start; }
.chat-msg .bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.chat-msg.in .bubble { background: var(--primary, #fe2c55); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.out .bubble { background: #f2f3f5; color: #161823; border-bottom-left-radius: 4px; }
.chat-msg .time { font-size: 10.5px; color: #a8aab0; margin-top: 3px; }
/* 送出失敗：氣泡轉為警示樣式並標註，避免使用者誤以為已送達 */
.chat-msg.failed .bubble { background: #fdeaea; color: #b91c1c; border: 1px solid #f6cccc; }
.chat-msg.failed .time::after { content: " · 未送出"; color: #b91c1c; font-weight: 600; }
.chat-input-row {
  /* 底部留白原本由 .flow-card-footer 的 20px 提供，footer 移除後由輸入列自己補上 */
  display: flex; gap: 8px; padding: 12px 24px 20px; border-top: 1px solid #f0f0f2; margin-top: 4px;
}
.chat-input-row input {
  flex: 1 1 auto; height: 42px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid #ececec; background: #fafafa; font-size: 14px; font-family: inherit; color: #161823;
  transition: border .15s, background .15s;
}
.chat-input-row input:focus { outline: none; background: #fff; border-color: var(--primary, #fe2c55); }
.chat-input-row button {
  flex: 0 0 auto; height: 42px; padding: 0 18px; border-radius: 10px; border: none;
  background: linear-gradient(92deg, #ff3a5f 0%, #fe2c55 55%, #f5204f 100%); color: #fff;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.chat-input-row button:disabled { opacity: .55; cursor: wait; }

/* 實名驗證守門對話窗 body */
.gate-lead {
  margin: 0 0 14px; font-size: 14px; line-height: 1.7; color: #45474f;
}
.gate-points {
  margin: 0; padding: 14px 16px; list-style: none;
  background: #fbf8f9; border: 1px solid #f0e6ea; border-radius: 10px;
}
.gate-points li {
  position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.9; color: #161823;
}
.gate-points li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary, #fe2c55);
}
.gate-points li .k { color: #6b6d76; }
.gate-note {
  margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: #86888f;
}

/* 訂單確認 body */
.confirm-kv {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 9px 0; font-size: 14px;
}
.confirm-kv + .confirm-kv,
.confirm-detail + .confirm-kv { border-top: 1px dashed #ececec; }
.confirm-kv .k { color: #6b6d76; }
.confirm-kv .v { color: #161823; font-weight: 600; text-align: right; word-break: break-all; }
.confirm-kv .v.amount { color: var(--primary, #fe2c55); font-size: 18px; }

/* 應付金額行可點開明細 */
.confirm-kv.confirm-toggle {
  cursor: pointer; user-select: none;
  transition: background .12s;
  margin: 0 -8px; padding-left: 8px; padding-right: 8px;
  border-radius: 6px;
}
.confirm-kv.confirm-toggle:hover { background: rgba(0, 0, 0, 0.03); }
.confirm-kv.confirm-toggle .toggle-arrow {
  display: inline-block; margin-left: 6px; font-size: 11px;
  color: #86888f; transition: transform .2s;
  font-weight: normal;
}
.confirm-kv.confirm-toggle.expanded .toggle-arrow { opacity: 0.5; }
.confirm-detail {
  padding: 10px 12px; margin: 6px 0 0;
  background: #fafafa; border-radius: 8px;
  font-size: 12.5px; color: #6b6d76;
  border-left: 3px solid #ffd6de;
  animation: detailIn .18s ease-out;
}
@keyframes detailIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.confirm-kv-sub {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 4px 0;
}
.confirm-kv-sub:not(:last-child) { border-bottom: 1px dashed #eee; }
.confirm-kv-sub > span:last-child { color: #161823; font-weight: 600; }

/* 結帳 modal — header 倒數 chip */
.checkout-countdown {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  background: #fff5f7; color: var(--primary, #fe2c55);
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
}
.checkout-countdown.warn {
  background: #fee2e2; color: #b91c1c;
  animation: countdownPulse 1s ease-in-out infinite;
}
@keyframes countdownPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* 結帳 amount block */
.checkout-amount-box {
  background: linear-gradient(135deg, #fff5f7 0%, #ffeaef 100%);
  border-radius: 12px;
  padding: 16px 18px; margin-bottom: 16px;
  text-align: center;
}
.checkout-order-ref {
  font-size: 11.5px; color: #6b6d76; margin-bottom: 6px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.checkout-amount-label {
  font-size: 12px; color: #6b6d76; margin-bottom: 2px;
}
.checkout-amount-value {
  font-size: 28px; font-weight: 800; color: var(--primary, #fe2c55); letter-spacing: -0.5px;
}
.checkout-amount-value.checkout-amount-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  padding: 2px 8px; border-radius: 8px;
  transition: background .12s;
}
.checkout-amount-value.checkout-amount-toggle:hover { background: rgba(254, 44, 85, 0.06); }
.checkout-amount-value .toggle-arrow {
  font-size: 14px; font-weight: 500; color: #86888f;
  transition: opacity .2s;
}
.checkout-amount-value.expanded .toggle-arrow { opacity: 0.4; }
.checkout-amount-detail {
  margin: 10px auto 0;
  max-width: 280px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-size: 12.5px; color: #6b6d76;
  text-align: left;
  animation: detailIn .18s ease-out;
}
.checkout-amount-detail .confirm-kv-sub > span:last-child { color: #161823; }

/* 結帳 section */
.checkout-section { margin-bottom: 18px; }
.checkout-section:last-child { margin-bottom: 0; }
.checkout-section-title {
  font-size: 12.5px; font-weight: 700; color: #6b6d76;
  letter-spacing: 0.5px; margin: 0 0 10px;
  text-transform: uppercase;
}

/* 銀行卡 */
.checkout-bank-card {
  border: 1px solid #f0e8eb; border-radius: 12px;
  padding: 6px 14px; background: #fdfbfc;
}
.checkout-bank-row {
  display: flex; gap: 10px;
  padding: 10px 0;
}
.checkout-bank-row + .checkout-bank-row {
  border-top: 1px dashed #ececec;
}
.checkout-cell {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.checkout-cell-label {
  font-size: 11px; color: #6b6d76;
}
.checkout-cell-value {
  font-size: 13.5px; color: #161823; font-weight: 600;
  word-break: break-all;
}
.checkout-cell-value.mono {
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

/* 帳號簡訊派送 row：完整帳號只走簡訊，畫面僅留末 3 碼對照。
   早期的「帳號可複製」樣式（.checkout-copy-*）已隨這個決策一併移除。 */
.checkout-bank-row + .checkout-sms-row { border-top: 1px dashed #ececec; }
.checkout-sms-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 0;
}
.checkout-sms-head {
  display: flex; align-items: center; gap: 10px;
}
.checkout-sms-head .label {
  font-size: 11px; color: #6b6d76;
  width: 64px; flex-shrink: 0;
}
.checkout-sms-masked {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 700; color: #161823;
  letter-spacing: 1px;
}
.checkout-sms-status {
  font-size: 11.5px; line-height: 1.5; color: #6b6d76;
}
.checkout-sms-status b { color: #161823; font-weight: 700; }
.checkout-sms-status.fail { color: #ef4444; }
.checkout-sms-status .times { margin-left: 6px; color: #86888f; }
.checkout-sms-btn {
  flex: 1;
  display: block; width: 100%;
  background: #fff; border: 1px solid #ececec; border-radius: 8px;
  padding: 8px 12px; cursor: pointer; transition: all .12s;
  font-size: 13px; font-weight: 600; color: #161823;
}
.checkout-sms-btn:hover:not(:disabled) {
  border-color: var(--primary, #fe2c55); color: var(--primary, #fe2c55);
  background: #fff5f7;
}
.checkout-sms-btn:disabled {
  color: #86888f; background: #f7f7f8; cursor: default;
}

/* topbar 匯率 chip */
.rate-chip {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 14px;
  background: rgba(254, 44, 85, 0.08);
  color: var(--primary, #fe2c55);
  font-size: 12px; font-weight: 500;
  border: 1px solid rgba(254, 44, 85, 0.18);
  margin-right: 10px;
  white-space: nowrap;
}
.rate-chip strong { font-weight: 700; margin: 0 2px; }
/* 可點擊態沿用 .logo 的既有慣例（a.logo:hover 也是 opacity: 0.75），不另立一套 hover 語言 */
a.rate-chip { cursor: pointer; text-decoration: none; }
a.rate-chip:hover { opacity: 0.75; }

/* 聯繫客服浮動按鈕 */
.support-fab {
  position: fixed; right: 16px; bottom: 80px; top: auto;
  width: 60px; padding: 14px 0;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: grab; z-index: 90;
  color: #161823; font-family: inherit;
  transition: box-shadow .18s, border-color .18s, color .18s;
  touch-action: none;
  user-select: none;
}
.support-fab.dragging {
  cursor: grabbing;
  transition: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.support-fab:hover {
  box-shadow: 0 10px 24px rgba(254, 44, 85, 0.12);
  border-color: var(--primary, #fe2c55);
  color: var(--primary, #fe2c55);
  transform: translateY(-2px);
}
.support-fab .icon { font-size: 22px; }
.support-fab .text {
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
}
@media (max-width: 720px) {
  .support-fab { right: 10px; top: auto; bottom: 80px; width: 52px; padding: 10px 0; }
}

/* 聯繫客服 modal 內容 */
/* 結帳 hint */
.checkout-hint {
  font-size: 11.5px; color: #6b6d76; line-height: 1.5;
  text-align: center; margin: 8px 0 0; padding: 10px 14px;
  background: #fafafa; border-radius: 8px;
}

/* 退回 banner（被 admin 退回時顯示原因）*/
.checkout-reject-banner {
  background: #fee2e2; border: 1px solid #fecaca; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px;
}
.checkout-reject-banner .title {
  font-size: 13px; font-weight: 700; color: #b91c1c; margin-bottom: 4px;
}
.checkout-reject-banner .reason {
  font-size: 12.5px; color: #7f1d1d; padding: 6px 8px; background: #fff;
  border-radius: 6px; word-break: break-all; line-height: 1.5;
}
.checkout-reject-banner .hint {
  font-size: 11.5px; color: #b91c1c; margin-top: 6px;
}

/* proof section */
.checkout-section-title .hint-text {
  font-weight: 400; color: #86888f; text-transform: none;
  letter-spacing: 0; margin-left: 6px; font-size: 11.5px;
}
/* 已提交憑證清單（拆匯：一張訂單多筆匯款） */
.proof-list { display: flex; flex-direction: column; gap: 6px; }
.proof-list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  background: #fafafa; border: 1px solid #f0f0f2;
  font-size: 13px; color: #161823;
}
.proof-list-seq {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ececec; color: #6b6d76;
  font-size: 11px; font-weight: 700;
}
.proof-list-main { flex: 1 1 auto; min-width: 0; }

/* 審核中訂單的補件入口（首頁充值卡頂端） */
.resume-proof {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 12px 14px;
  border-radius: 10px;
  background: #fff7ed; border: 1px solid #fed7aa;
}
.resume-proof .rp-text { flex: 1 1 auto; min-width: 0; line-height: 1.45; }
.resume-proof .rp-title { display: block; font-size: 13px; font-weight: 700; color: #92400e; }
.resume-proof .rp-sub {
  display: block; font-size: 11.5px; color: #a16207;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.resume-proof .rp-btn {
  flex: 0 0 auto; border: none; border-radius: 8px;
  padding: 9px 14px; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 700;
  background: #92400e; color: #fff;
}
.resume-proof .rp-btn:hover { background: #7c3512; }

.proof-row {
  display: flex; align-items: center; gap: 8px;
}
.proof-last5 {
  flex: 1; padding: 9px 12px; border: 1px solid #ececec; border-radius: 8px;
  font-size: 14px; font-family: "SF Mono", Menlo, Consolas, monospace; letter-spacing: 1px;
  text-align: center; font-family: inherit;
}
.proof-last5:focus {
  outline: none; border-color: var(--primary, #fe2c55);
  box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}
.proof-divider { color: #86888f; font-size: 12px; flex-shrink: 0; }
.proof-upload {
  flex: 1; padding: 9px 12px; border: 1px dashed #d1d5db; border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px; color: #6b6d76;
  font-family: inherit; transition: all .12s;
}
.proof-upload:hover { border-color: var(--primary, #fe2c55); color: var(--primary, #fe2c55); }

.proof-preview {
  margin-top: 10px; padding: 10px; border: 1px solid #ececec; border-radius: 10px;
  background: #fafafa;
  display: flex; align-items: center; gap: 10px;
}
.proof-preview img {
  width: 60px; height: 60px; object-fit: cover; border-radius: 6px;
  cursor: zoom-in; border: 1px solid #ececec;
}
.proof-preview .name {
  flex: 1; font-size: 12px; color: #6b6d76; word-break: break-all;
}
.proof-remove {
  padding: 5px 10px; border: 1px solid #fecaca; border-radius: 6px;
  background: #fff; color: #dc2626; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.proof-remove:hover { background: #fee2e2; }

/* ---------- KYC chip(整合到 title-row,當 verified badge) ---------- */
.title-row { display: inline-flex; align-items: center; gap: 8px; }
.kyc-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
  cursor: pointer; transition: filter .15s;
  white-space: nowrap;
  border: 0; font-family: inherit;
}
.kyc-chip:hover { filter: brightness(0.95); }
.kyc-chip.approved { background: #dcfce7; color: #166534; }
.kyc-chip.pending  { background: #fef3c7; color: #92400e; }
.kyc-chip.rejected { background: #fee2e2; color: #991b1b; }
/* 未驗證是唯一「需要使用者動作」的狀態 → 實心品牌紅 + 光暈脈動，
   跟 rejected 的淺紅底(淺底深字)靠「實心 vs 淺色」區分，不靠色相 */
.kyc-chip.none {
  /* 用 --primary-dark 不用 --primary：11px 白字配 #fe2c55 對比僅 3.7:1(WCAG AA 不過)，
     #e0234a 為 4.7:1 過關；hover 走共用的 filter，不跟「深色=hover」的既有慣例衝突 */
  background: var(--primary-dark, #e0234a); color: #fff;
  box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.55);
  animation: kycAlertPulse 1.8s ease-out infinite;
}
.kyc-chip.none:hover { animation-play-state: paused; }
@keyframes kycAlertPulse {
  0%   { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(254, 44, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .kyc-chip.none { animation: none; }
}

/* ═════════════════════════════════════════════════════════════
   CSP 收嚴：原內聯 style 屬性搬遷（style-src 'self'，已移除 unsafe-inline）
   注意：以下「初始隱藏」由 CSS 規則提供，顯示端 JS 一律明確指定 display 值
   （CSSOM 賦值不受 CSP 管制）。不可再用 el.style.display = "" 還原顯示——
   那會回落到這些規則而保持隱藏。
   ═════════════════════════════════════════════════════════════ */
#rateChip,
#topUser,
#kycChip,
#swAddForm,
#loginPwdField,
#loginCodeField,
#loginNewPwdField,
#loginPwdHint,
#loginOtpHint,
#loginResendRow,
#loginForgotRow { display: none; }

.modal-title { text-align: center; font-weight: 700; font-size: 16px; margin: 2px 0 14px; }

.pw-eye {
  background: none; border: none; color: #888; font-size: 13px;
  cursor: pointer; padding: 0 0 0 8px; flex-shrink: 0;
}

#loginPwdHint { font-size: 12px; margin: -6px 0 8px; padding-left: 6px; }
#pwHintLen, #pwHintAlnum { color: #cbd0d6; }
#loginOtpHint { font-size: 12px; color: #888; margin: -2px 0 6px; }
#loginResendRow { font-size: 12px; margin: -2px 0 8px; text-align: right; }
#loginResend { color: #888; }
#loginResendTimer { color: #bbb; }
#loginForgotRow { text-align: right; margin: -2px 0 8px; }
#loginForgot { font-size: 12px; color: #888; }

/* 訂單結果卡（過期 / 送出審核）：原為 index.js 模板字串內聯 style，改為 class */
.result-card { text-align: center; padding: 20px 0 8px; }
.result-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 14px;
}
.result-icon.expired { background: #fee2e2; color: #dc2626; }
.result-icon.ok      { background: #dcfce7; color: #16a34a; }
.result-title { margin: 0 0 6px; font-size: 18px; }
.result-desc  { color: #6b6d76; font-size: 13.5px; line-height: 1.6; margin-bottom: 18px; }
.result-meta  { background: #fafafa; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #6b6d76; text-align: left; }
.result-meta-row { display: flex; justify-content: space-between; padding: 3px 0; }
.result-meta-val { color: #161823; font-weight: 600; }
.result-meta-val.mono { font-family: 'SF Mono', Menlo, Consolas, monospace; }

/* 憑證上傳：檔案 input 永久隱藏、預覽區初始隱藏（JS 顯示時明確給 display:flex） */
#proofFile, #proofPreview { display: none; }

/* ═════════════════════════════════════════════════════════════
   首頁 2026：品牌敘事 + 既有充值互動島
   只調整首頁外層與互動卡視覺；Modal / KYC / 結帳契約沿用原機制。
   ═════════════════════════════════════════════════════════════ */
:root {
  --text-sub: #5f6169;
  --primary-strong: #c8143e;
  --ink: #111116;
  --surface-soft: #f4f4f6;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 8%, rgba(254, 44, 85, .08), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(37, 244, 238, .08), transparent 24rem),
    #f7f7f8;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 16px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, [role="button"], [role="radio"]):focus-visible {
  outline: 3px solid #007f83;
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 180;
  padding: 0 28px;
  border-bottom: 1px solid rgba(17, 17, 22, .08);
  background: rgba(255, 255, 255, .86);
}
/* 毛玻璃掛在 ::before 而非 .topbar 自身：backdrop-filter 非 none 會使該元素成為
   position:fixed 子孫的 containing block，而「聯繫客服」按鈕收在頁首裡（手機需要
   static 排進頁首），桌機的 fixed + bottom:80px 會改成相對 72px 高的頁首解析 →
   整顆按鈕被推到視窗上緣外（實測 top:-88px）。改掛 ::before 後視覺不變，
   .topbar 不再建立 containing block，fixed 回到相對視窗解析。 */
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.topbar-inner {
  width: min(1240px, 100%);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
}
.logo {
  flex: 0 0 auto;
  white-space: nowrap;
  letter-spacing: -.02em;
}
.logo .dot { width: 30px; height: 30px; }
.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.top-nav a {
  position: relative;
  padding: 24px 0;
  color: #3f4047;
  font-size: 13px;
  font-weight: 650;
}
.top-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 17px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: right .2s ease;
}
.top-nav a:hover::after { right: 0; }
.topbar-right {
  flex: 0 0 auto;
  gap: 8px;
}
.rate-chip { margin-right: 0; }

main.site-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.hero {
  position: relative;
  isolation: isolate;
  width: min(1240px, calc(100% - 48px));
  min-height: 590px;
  margin: 24px auto 0;
  padding: 72px 68px;
  border-radius: 34px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  align-items: center;
  gap: 46px;
  color: #fff;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(135deg, #17171d 0%, #0d0d12 60%, #14131b 100%);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 30px 80px rgba(17, 17, 22, .2);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, rgba(255,255,255,.045), transparent 38%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .27;
  pointer-events: none;
}
.hero-glow-pink { left: -110px; bottom: -150px; background: var(--primary); }
.hero-glow-cyan { top: -150px; right: -80px; background: var(--accent); }
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dadade;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .16em;
}
.eyebrow span {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
.hero h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(46px, 5.2vw, 72px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 850;
}
.hero h1 em {
  color: #fff;
  font-style: normal;
  background: linear-gradient(92deg, #fff 5%, #ffc2cf 48%, #a4fffb 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  max-width: 580px;
  margin: 26px 0 0;
  color: #b8b8c0;
  font-size: 16px;
  line-height: 1.85;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}
.hero-btn {
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.hero-btn:hover { transform: translateY(-2px); }
.hero-btn-primary {
  color: #fff;
  background: var(--primary-strong);
  box-shadow: 0 12px 30px rgba(200, 20, 62, .28);
}
.hero-btn-primary span { font-size: 17px; }
.hero-btn-secondary {
  color: #fff;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
}
.hero-btn-secondary:hover { background: rgba(255,255,255,.12); }
.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 28px;
  color: #c9c9cf;
  font-size: 12px;
}
.hero-notes span { display: inline-flex; align-items: center; gap: 6px; }
.hero-notes i {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #001615;
  background: var(--accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-orbit {
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(255,255,255,.025), 0 0 0 118px rgba(255,255,255,.018);
}
.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 18px currentColor;
}
.hero-orbit::before { top: 42px; left: 65px; color: var(--accent); background: currentColor; }
.hero-orbit::after { right: 22px; bottom: 108px; color: var(--primary); background: currentColor; }
.hero-brand-mark {
  position: absolute;
  top: 6px;
  right: 14px;
  width: 96px;
  height: 96px;
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(7deg);
  box-shadow: 0 18px 40px rgba(0,0,0,.32);
}
.hero-brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-card {
  position: relative;
  z-index: 2;
  width: min(380px, 100%);
  padding: 26px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255,255,255,.96);
  box-shadow: 0 30px 70px rgba(0,0,0,.36);
  transform: rotate(-2deg);
}
.preview-head,
.preview-coin,
.preview-details > div,
.preview-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-head { gap: 20px; }
.preview-head > div { display: flex; flex-direction: column; gap: 4px; }
.preview-head strong { font-size: 18px; }
.preview-kicker { color: #777982; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.preview-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f5158;
  font-size: 10px;
  font-weight: 700;
}
.preview-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #15803d;
  box-shadow: 0 0 0 4px rgba(21,128,61,.12);
}
.preview-coin {
  justify-content: flex-start;
  gap: 14px;
  margin: 25px 0;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0f4, #f7ffff);
}
.preview-coin-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 7px 20px rgba(17,17,22,.09);
}
.preview-coin-icon img { width: 100%; height: 100%; object-fit: cover; }
.preview-coin > div:last-child { display: flex; flex-direction: column; gap: 2px; }
.preview-coin span { color: #686a72; font-size: 11px; }
.preview-coin strong { font-size: 26px; letter-spacing: -.03em; }
.preview-details {
  padding: 0 2px 16px;
  display: grid;
  gap: 10px;
}
.preview-details span { color: #686a72; font-size: 11px; }
.preview-details strong { font-size: 12px; }
.preview-confirm {
  justify-content: center;
  gap: 7px;
  padding: 12px;
  border-radius: 12px;
  color: #065f46;
  background: #ecfdf5;
  font-size: 11px;
  font-weight: 750;
}
.preview-confirm span {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #047857;
  font-size: 10px;
}
.hero-float {
  position: absolute;
  z-index: 3;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(17,17,22,.8);
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 700;
}
.hero-float-one { left: -14px; bottom: 58px; }
.hero-float-two { right: -18px; top: 124px; }

.trust-strip {
  position: relative;
  z-index: 4;
  width: min(1080px, calc(100% - 96px));
  margin: -34px auto 0;
  padding: 23px 30px;
  border: 1px solid rgba(17,17,22,.08);
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 48px rgba(17,17,22,.09);
}
.trust-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}
.trust-item + .trust-item { border-left: 1px solid #e7e7ea; }
.trust-number {
  flex: 0 0 auto;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
}
.trust-item > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.trust-item strong { font-size: 13px; }
.trust-item > div span { color: var(--text-sub); font-size: 11px; line-height: 1.4; }

.recharge-section {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 108px 24px 96px;
  scroll-margin-top: 74px;
}
.section-heading { max-width: 720px; margin: 0 auto 46px; text-align: center; }
.section-kicker,
.process-kicker {
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .18em;
}
.section-heading h2,
.confidence-intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.section-heading > p:last-child {
  margin: 16px 0 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.7;
}
.recharge-layout {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}
.process-card {
  position: sticky;
  top: 96px;
  padding: 30px 28px;
  border-radius: 24px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 20px 50px rgba(17,17,22,.16);
  scroll-margin-top: 96px;
}
.process-kicker { color: #83efeb; }
.process-card h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.process-list { margin: 30px 0 0; padding: 0; list-style: none; }
.process-list li {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding-bottom: 25px;
}
.process-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 36px;
  bottom: 7px;
  width: 1px;
  background: linear-gradient(#4a4a51, #29292f);
}
.process-num {
  width: 34px;
  height: 34px;
  border: 1px solid #45454c;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #212127;
  font-size: 10px;
  font-weight: 850;
}
.process-list strong { display: block; padding-top: 5px; font-size: 14px; }
.process-list p { margin: 7px 0 0; color: #aaaab2; font-size: 12px; line-height: 1.65; }
.process-help {
  padding: 14px;
  border: 1px solid #36363d;
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #1b1b21;
}
.process-help > span {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #071918;
  background: var(--accent);
  font-size: 11px;
  font-weight: 900;
}
.process-help p { margin: 0; color: #aaaab2; font-size: 11px; line-height: 1.55; }
.process-help strong { display: block; color: #fff; margin-bottom: 2px; }
.recharge-workspace { min-width: 0; }
.recharge-workspace .banner-private { margin-bottom: 14px; }
button.banner-private {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.recharge-workspace .main-card {
  border: 1px solid rgba(17,17,22,.08);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17,17,22,.1);
}
.recharge-workspace .card-top { border-radius: 24px 24px 0 0; }
.recharge-workspace .card-body { border-radius: 0 0 24px 24px; }
.pkg:focus-visible { outline-offset: 1px; }
.pkg[role="radio"] { min-height: 96px; }
.btn-pay {
  min-height: 52px;
  background: linear-gradient(92deg, #d41643 0%, var(--primary-strong) 100%);
  box-shadow: 0 8px 22px rgba(200,20,62,.24);
}

.confidence-section {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto 88px;
  padding: 68px;
  border-radius: 32px;
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: 58px;
  background: #eeeef1;
  scroll-margin-top: 88px;
}
.confidence-intro > p:last-child {
  max-width: 430px;
  margin: 22px 0 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.8;
}
.confidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.confidence-card {
  min-height: 220px;
  padding: 26px;
  border: 1px solid rgba(17,17,22,.08);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17,17,22,.05);
}
.confidence-card:first-child { grid-column: 1 / -1; min-height: 205px; }
.confidence-card-dark { color: #fff; background: var(--ink); }
.confidence-icon {
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--primary-strong);
  background: #fff0f4;
  font-size: 10px;
  font-weight: 850;
}
.confidence-card-dark .confidence-icon { color: #071918; background: var(--accent); }
.confidence-card h3 { margin: 24px 0 10px; font-size: 18px; letter-spacing: -.02em; }
.confidence-card p { margin: 0; color: var(--text-sub); font-size: 12.5px; line-height: 1.75; }
.confidence-card-dark p { color: #b9b9c1; max-width: 620px; }
.confidence-tag {
  margin-top: auto;
  padding-top: 20px;
  color: #777982;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
}
.confidence-card-dark .confidence-tag { color: #83838d; }

.site-footer {
  color: #fff;
  background: var(--ink);
}
.site-footer-inner {
  width: min(1240px, 100%);
  min-height: 112px;
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
}
.footer-brand img { width: 32px; height: 32px; border-radius: 50%; }
.site-footer p { margin: 0; color: #a9a9b1; font-size: 11px; text-align: center; }
.footer-links { display: flex; justify-content: flex-end; gap: 20px; }
.footer-links a { color: #d0d0d5; font-size: 11px; }
.footer-links a:hover { color: #fff; }

@media (max-width: 1080px) {
  .top-nav { display: none; }
  .topbar-right { margin-left: auto; }
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr);
    padding: 58px 48px;
    gap: 24px;
  }
  .hero-float { display: none; }
  .recharge-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
  .process-card { padding: 27px 23px; }
  .confidence-section { padding: 50px; gap: 36px; }
}

@media (max-width: 860px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 58px 50px 48px;
  }
  .hero-copy { max-width: 650px; }
  .hero-visual { width: min(500px, 100%); min-height: 410px; margin: 4px auto 0; }
  .trust-strip { width: calc(100% - 64px); grid-template-columns: 1fr; padding: 8px 26px; }
  .trust-item { padding: 16px 4px; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid #e7e7ea; }
  .recharge-layout { grid-template-columns: 1fr; }
  .process-card { position: static; }
  .process-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .process-list li { grid-template-columns: 1fr; padding: 0; }
  .process-list li::after { display: none; }
  .confidence-section { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 70px; }
  body { padding-bottom: 0; }
  .topbar { padding: 0 14px; }
  .topbar-inner { min-height: 62px; gap: 10px; }
  .logo { gap: 8px; }
  .logo .dot { width: 30px; height: 30px; }
  .topbar-right { min-width: 0; }
  .rate-chip { max-width: 142px; padding: 5px 8px; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
  .top-avatar { width: 36px; height: 36px; }
  .hero {
    width: calc(100% - 24px);
    margin-top: 12px;
    padding: 42px 24px 32px;
    border-radius: 25px;
  }
  .eyebrow { margin-bottom: 17px; font-size: 10px; }
  .hero h1 { font-size: clamp(36px, 11vw, 44px); line-height: 1.1; }
  .hero h1 em { display: inline-block; font-size: .86em; white-space: nowrap; }
  .hero-lead { margin-top: 20px; font-size: 14px; line-height: 1.75; }
  .hero-actions { align-items: stretch; flex-direction: column; margin-top: 28px; }
  .hero-btn { width: 100%; min-height: 50px; }
  .hero-notes { gap: 10px; margin-top: 22px; }
  .hero-notes span { width: 100%; }
  .hero-visual { min-height: 345px; }
  .hero-orbit { width: 310px; height: 310px; }
  .hero-brand-mark { top: 0; right: -2px; width: 68px; height: 68px; border-radius: 21px; }
  .preview-card { padding: 20px; border-radius: 20px; transform: none; }
  .preview-status { max-width: 108px; text-align: right; }
  .preview-coin { margin: 18px 0; padding: 14px; }
  .trust-strip { width: calc(100% - 24px); margin-top: 14px; border-radius: 18px; }
  .recharge-section { padding: 76px 14px 72px; }
  .section-heading { margin-bottom: 32px; text-align: left; padding: 0 8px; }
  .section-heading h2,
  .confidence-intro h2 { font-size: 36px; }
  .recharge-layout { display: flex; flex-direction: column; }
  .recharge-workspace { width: 100%; order: 1; }
  .process-card { width: 100%; order: 2; border-radius: 22px; }
  .process-list { grid-template-columns: 1fr; gap: 0; }
  .process-list li { grid-template-columns: 34px 1fr; padding-bottom: 23px; }
  .process-list li:not(:last-child)::after { display: block; }
  .recharge-workspace .main-card { border-radius: 20px; }
  .recharge-workspace .card-top { border-radius: 20px 20px 0 0; }
  .recharge-workspace .card-body { border-radius: 0 0 20px 20px; }
  .card-top { padding: 18px 16px; }
  .card-body { padding: 18px 14px 20px; }
  .login-bar { align-items: flex-start; gap: 10px; }
  .login-bar .switch-btn { min-height: 40px; padding: 7px 10px; }
  .packages { gap: 9px; }
  .pkg { min-height: 88px; padding: 15px 10px; }
  .custom-popover { right: 0; left: auto; width: min(270px, calc(100vw - 44px)); }
  .custom-popover::before { right: 44px; left: auto; }
  .agreement { align-items: flex-start; line-height: 1.55; }
  .confidence-section { width: calc(100% - 24px); margin-bottom: 56px; padding: 38px 22px; border-radius: 25px; }
  .confidence-grid { grid-template-columns: 1fr; }
  .confidence-card:first-child { grid-column: auto; }
  .confidence-card { min-height: 210px; }
  .site-footer-inner { min-height: auto; grid-template-columns: 1fr; justify-items: center; padding: 34px 20px; }
  .footer-brand { justify-self: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .support-fab {
    position: static;
    inset: auto;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: none;
    cursor: pointer;
    touch-action: auto;
  }
  .support-fab .icon { font-size: 20px; }
  .support-fab .text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .flow-card { max-height: calc(100dvh - 24px); }
}

/* 最高檔的幣數是 9 個字元（1,999,980），22px 在 320px 寬的兩欄格線下會撐破卡片（實測溢出 1px）。
   只在 360px 以下縮字級，375px（iPhone）以上維持原本的視覺比例不動。 */
@media (max-width: 360px) {
  .pkg .coin-line { font-size: 19px; gap: 4px; }
}

@media (max-width: 390px) {
  .logo span { display: none; }
  .rate-chip { max-width: 128px; }
  .preview-head { align-items: flex-start; }
  .preview-coin strong { font-size: 23px; }
  .section-row { align-items: flex-start; gap: 8px; }
  .section-row .tip { max-width: 150px; text-align: right; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-btn:hover,
  .support-fab:hover { transform: none; }
}
