@charset "utf-8";
/* ============================================================================
   發盈娛樂城 /action/ 改版樣式表 —— base.css
   取代式:不覆蓋 style.css,由 head_clean.php 單獨載入,自己撐完整版面。
   色票取自 WP 前台 fwin66.net 實測(深藍黑 + 橘金 + 青綠),與站群其他站不共用。
   還原方式:控制器把 view 指回舊樣板即可,本檔與舊檔無任何耦合。
   ========================================================================== */

/* ---------------------------------------------------------------- 設計 token */
:root {
  /* 底色:深藍黑,取自 WP 前台 body #080C18 */
  --bg:        #080c18;
  --bg-2:      #0e1428;
  --bg-3:      #141c34;
  --panel:     #111a2e;
  --panel-2:   #18213a;
  --panel-hi:  #1e2846;

  /* 線 */
  /* 邊框 alpha 不低於 .15:深底上卡片對背景只有 1.1~1.2,邊界靠這條線,太淡等於沒有 */
  --line:      rgba(255,255,255,.16);
  --line-2:    rgba(255,255,255,.22);
  --line-gold: rgba(255,200,92,.26);

  /* 品牌色 */
  --gold:      #ffc85c;
  --gold-hi:   #ffdd9a;
  --gold-dim:  #d9a53f;
  --orange:    #ffa51f;
  --orange-hi: #ffbb52;
  --teal:      #3fe0d0;
  --teal-dim:  #2bb5a8;
  --on-gold:   #2a1a00;

  /* 文字 */
  --txt:       #e8edf7;
  --txt-2:     #c7d2e9;
  --txt-3:     #a3b0cd;      /* 弱字:只給標籤/時間戳,不給成句內文 */
  --txt-on-p:  #dfe6f4;

  /* 狀態 */
  --ok:        #6ee7b7;
  --warn:      #ffc85c;
  --bad:       #ff8f88;

  /* 間距尺度(天條 37:單一尺度,不逐處手調) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px; --s10: 72px;

  /* 區塊間距:三個斷點各一組,不共用(天條 37) */
  --sect:      32px;   /* 區塊之間 */
  --sect-top:  20px;   /* 首區塊貼頁首 */
  --sect-end:  40px;   /* 尾端留白 */
  --edge:      16px;   /* 內容左右安全距 */

  /* 版面 */
  --header-h:  56px;
  --rail-w:    136px;
  --bnav-h:    62px;
  --maxw:      1200px;
  --r1: 8px; --r2: 12px; --r3: 16px; --r4: 22px;

  /* 字級(天條 34/42:內文 16、區塊標題 24) */
  --f-h1: 28px; --f-h2: 24px; --f-h3: 19px; --f-body: 16px; --f-sm: 14px;

  --shadow:    0 6px 20px rgba(0,0,0,.38);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.5);
}

@media (min-width: 768px) {
  :root { --sect: 40px; --sect-top: 24px; --sect-end: 56px; --edge: 24px; --header-h: 60px; }
}
@media (min-width: 1024px) {
  :root { --sect: 56px; --sect-top: 32px; --sect-end: 72px; --edge: 32px; --header-h: 64px; }
}

/* ---------------------------------------------------------------- 基礎重置 */
*, *::before, *::after { box-sizing: border-box; }

/* 捲軸條全站隱藏,捲動照常(Owner 要求:所有頁面卷軸不要出現) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: var(--f-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.35; color: var(--txt); }
h1 { font-size: var(--f-h1); }
h2 { font-size: var(--f-h2); }
h3 { font-size: var(--f-h3); }
h4 { font-size: 17px; }
p  { margin: 0 0 var(--s3); }
p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
table { border-collapse: collapse; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 容器:限寬置中(天條 55),左右用長寫,不用 padding 簡寫 —— 簡寫會清掉 main 的 padding-bottom */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

/* 區塊只設上間距(天條 38) */
.sect { margin-top: var(--sect); }
.sect:first-child { margin-top: var(--sect-top); }

.sect-hd {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin-top: 0;
}
.sect-hd h1, .sect-hd h2 { font-size: var(--f-h2); letter-spacing: .01em; }
.sect-hd .en {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--txt-3); font-weight: 500;
}
.sect-hd .more {
  margin-left: auto; font-size: var(--f-sm); color: var(--gold);
  display: inline-flex; align-items: center; gap: 2px;
  padding: 12px 4px; margin-top: -12px; margin-bottom: -12px;   /* 版面不變,但按得到 */
}

/* 滿版背景區塊(天條 39):背景鋪滿視窗寬,內容再限寬 */
.full { width: 100%; }

/* ---------------------------------------------------------------- 頁首 */
.hd {
  position: fixed; inset: 0 0 auto 0; z-index: 1030;
  height: var(--header-h);
  background: rgba(8,12,24,.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hd-in {
  height: 100%;
  display: flex; align-items: center; gap: var(--s3);
  max-width: var(--maxw); margin: 0 auto;
  padding-left: var(--edge); padding-right: var(--edge);
}
.hd-logo { display: flex; align-items: center; flex: 0 0 auto; min-height: 44px; }
.hd-logo img { height: 34px; width: auto; display: block; }

.hd-nav { display: none; margin-left: var(--s5); }
@media (min-width: 992px) {
  .hd-nav { display: flex; align-items: center; gap: var(--s1); }
}
.hd-nav a {
  display: inline-flex; align-items: center;
  height: 40px; padding: 0 12px;
  color: var(--txt-2); font-size: 15px; font-weight: 500;
  border-radius: var(--r1);
}
.hd-nav a:hover { color: var(--gold); background: rgba(255,255,255,.05); }
.hd-nav a.on { color: var(--gold); background: rgba(255,200,92,.1); }

.hd-right { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }

/* 登入後的餘額塊 */
.hd-bal {
  display: none; align-items: center; gap: var(--s2);
  height: 40px; padding: 0 var(--s3);
  background: rgba(0,0,0,.34);
  border: 1px solid var(--line-gold); border-radius: var(--r4);
}
@media (min-width: 480px) { .hd-bal { display: inline-flex; } }
.hd-bal .id { font-size: 13px; color: var(--txt-3); max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-bal .amt { font-size: 15px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.hd-bal .rf {
  width: 30px; height: 30px; min-width: 30px; padding: 0; border: 0;
  border-radius: 50%; background: rgba(255,255,255,.08); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  position: relative;
}
/* 視覺 30px,點擊區撐到 44(天條 34) */
.hd-bal .rf::after { content: ""; position: absolute; inset: -7px; }
.hd-bal .rf:hover { background: rgba(255,200,92,.2); }

/* ---------------------------------------------------------------- 按鈕系統 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 var(--s5);
  font-size: var(--f-body); font-weight: 700; line-height: 1;
  border: 1px solid transparent; border-radius: var(--r4);
  cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-gold  { background: linear-gradient(180deg, var(--gold-hi), var(--orange)); color: var(--on-gold); }
.btn-gold:hover  { background: linear-gradient(180deg, #ffe7b8, var(--orange-hi)); color: var(--on-gold); }
.btn-line  { background: transparent; border-color: var(--line-gold); color: var(--gold); }
.btn-line:hover  { border-color: var(--gold); background: rgba(255,200,92,.1); color: var(--gold-hi); }
.btn-ghost { background: rgba(255,255,255,.06); border-color: var(--line); color: var(--txt); }
.btn-ghost:hover { background: rgba(255,255,255,.11); color: var(--txt); }
.btn-sm { min-height: 44px; padding: 0 var(--s4); font-size: var(--f-sm); }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-off { opacity: .55; cursor: not-allowed; }

/* 電腦版按鈕系統(≥992px):主要送出 280×48 置中,一頁只留一顆實心 */
@media (min-width: 992px) {
  .btn-submit { width: 280px; height: 48px; margin-left: auto; margin-right: auto; }
}

/* 沒有 class 的裸 button 不要掉回瀏覽器預設白底(對比 1.14 的來源) */
button { font-family: inherit; font-size: var(--f-body); }
button:not([class]) {
  min-height: 44px; padding: 0 var(--s4);
  background: var(--panel-2); color: var(--txt);
  border: 1px solid var(--line); border-radius: var(--r1); cursor: pointer;
}

/* ---------------------------------------------------------------- 跑馬燈公告 */
.mq {
  display: flex; align-items: center; gap: var(--s3);
  height: 40px; overflow: hidden;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.mq-tag {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; margin-left: var(--edge);
  background: rgba(255,200,92,.14); color: var(--gold);
  border-radius: var(--r1); font-size: 13px; font-weight: 700;
}
.mq-track { flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
.mq-track span {
  display: inline-block; padding-left: 100%;
  font-size: var(--f-sm); color: var(--txt-2);
  animation: mq-run 38s linear infinite;
}
@keyframes mq-run { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .mq-track span { animation: none; padding-left: 0; }
  .mq-track { overflow-x: auto; }
}

/* ---------------------------------------------------------------- 主視覺 */
.hero { position: relative; overflow: hidden; border-radius: var(--r3); background: var(--panel); }
/* 對齊線上橫幅的實際尺寸 2000x600:這站的橫幅文案分佈在左右兩端,
   套比較方的比例會把重點裁掉,所以三個斷點一律用原比例、不裁切。 */
.hero img { width: 100%; display: block; aspect-ratio: 10 / 3; object-fit: cover; }
.hero-dots { display: flex; gap: 6px; justify-content: center; margin-top: var(--s3); }
.hero-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.24); cursor: pointer; position: relative;
}
.hero-dots i::after { content: ""; position: absolute; inset: -18px; }
.hero-dots i.on { background: var(--gold); width: 22px; border-radius: 4px; }

/* ---------------------------------------------------------------- 大廳:側欄 + 卡片 */
.lobby { display: block; }
@media (min-width: 992px) {
  .lobby { display: flex; align-items: flex-start; gap: var(--s6); }
}

/* 分類軌:桌機直式側欄,手機橫向捲動列 */
.rail {
  display: flex; gap: var(--s2);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: var(--s2);
}
.rail a {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 88px; min-height: 66px; padding: var(--s2) var(--s3);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2);
  color: var(--txt-2); font-size: var(--f-sm); font-weight: 500;
  white-space: nowrap;      /* 四個中文字不要斷成兩行 */
}
.rail a img, .rail a i { width: 26px; height: 26px; display: block; font-size: 22px; line-height: 1; color: var(--gold); }
.rail a.on {
  color: var(--on-gold); border-color: transparent;
  background: linear-gradient(180deg, var(--gold-hi), var(--orange));
}
.rail a.on img, .rail a.on i { color: var(--on-gold); }

@media (min-width: 992px) {
  .rail {
    flex: 0 0 var(--rail-w); flex-direction: column; overflow: visible;
    position: sticky; top: calc(var(--header-h) + var(--s4));
    padding-bottom: 0;
  }
  .rail a { width: 100%; min-width: 0; flex-direction: row; justify-content: flex-start; gap: var(--s2); padding: 0 var(--s3); min-height: 48px; }
  .rail a i { font-size: 18px; width: 18px; height: 18px; }
}
.lobby-body { flex: 1 1 auto; min-width: 0; }

/* 遊戲卡格狀
   用 flex 不用 grid:grid 的空軌道會在卡片數少於欄數時留一格空白,
   flex 只是靠左排。卡片寬度都是容器的同一等分,各分區大小一致(不為了填滿而拉伸)。 */
.grid-g { display: flex; flex-wrap: wrap; gap: var(--s3); }
.grid-g > * { min-width: 0; flex: 0 1 calc((100% - var(--s3)) / 2); }
@media (min-width: 560px)  { .grid-g > * { flex-basis: calc((100% - 2 * var(--s3)) / 3); } }
@media (min-width: 768px)  { .grid-g > * { flex-basis: calc((100% - 3 * var(--s3)) / 4); } }
@media (min-width: 992px)  { .grid-g { gap: var(--s4); } .grid-g > * { flex-basis: calc((100% - 3 * var(--s4)) / 4); } }
@media (min-width: 1200px) { .grid-g > * { flex-basis: calc((100% - 4 * var(--s4)) / 5); } }

/* 一兩張卡的分區(這站的體育與彩票各只有一家)改成橫幅卡:
   圖在左、字在右、跨滿整列 —— 一張小卡孤零零擺左上角、右邊空一大片更難看。 */
.grid-g.few > * { flex: 1 1 100%; }
@media (min-width: 560px) {
  .grid-g.few .gcard { display: flex; align-items: stretch; }
  .grid-g.few .gcard-fig { flex: 0 0 38%; max-width: 320px; }
  .grid-g.few .gcard-fig img { aspect-ratio: auto; height: 100%; min-height: 160px; }
  .grid-g.few .gcard-bd {
    flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center;
    padding: var(--s5);
  }
  .grid-g.few .gcard-bd .nm { font-size: var(--f-h3); }
}

.gcard {
  display: block; position: relative;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r2); overflow: hidden;
  color: var(--txt);
}
.gcard:hover { border-color: var(--line-gold); color: var(--txt); }
.gcard:hover .gcard-fig img { transform: scale(1.04); }
.gcard-fig { position: relative; overflow: hidden; background: var(--bg-3); }
.gcard-fig img {
  width: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover;
  transition: transform .28s ease;
}
.gcard-bd { padding: var(--s3); }
.gcard-bd .nm { font-size: var(--f-body); font-weight: 700; line-height: 1.4; }
.gcard-bd .en {
  display: block; margin-top: 2px;
  font-size: 12px; letter-spacing: .06em; color: var(--txt-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gcard .tag {
  position: absolute; top: var(--s2); left: var(--s2);
  padding: 4px 8px; border-radius: var(--r1);
  background: rgba(8,12,24,.82); color: var(--gold);
  font-size: 12px; font-weight: 700; line-height: 1.2;
}
.gcard .tag.teal { color: var(--teal); }

/* 兩欄區間讓落單的最後一張跨滿,不留尾巴(天條 55) */
@media (max-width: 559px) {
  .grid-g > :last-child:nth-child(odd) { grid-column: span 2; }
  .grid-g > :last-child:nth-child(odd) .gcard-fig img { aspect-ratio: 2 / 1; }
}

/* ---------------------------------------------------------------- 快捷/優惠卡 */
.grid-q { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .grid-q { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid-q > * { min-width: 0; }
.qcard {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 64px; padding: var(--s3);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2);
  color: var(--txt);
}
.qcard:hover { border-color: var(--line-gold); color: var(--txt); }
.qcard i { font-size: 22px; color: var(--gold); line-height: 1; }
.qcard .t { font-size: var(--f-body); font-weight: 700; }
.qcard .s { display: block; font-size: 13px; color: var(--txt-3); }

/* 活動圖是 2000x600 的橫幅,三欄會把每張壓到 370px 寬、圖上的字看不清楚 */
.grid-p { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .grid-p { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 奇數則時最後一張跨滿兩欄,右邊不留空格(天條 55) */
  .grid-p > :last-child:nth-child(odd) { grid-column: span 2; }
  .grid-p > :last-child:nth-child(odd) > img { aspect-ratio: 20 / 3; }
}
.grid-p > * { min-width: 0; }
.pcard {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r2); overflow: hidden; color: var(--txt);
}
.pcard:hover { border-color: var(--line-gold); color: var(--txt); }
/* 與原圖同比例,不裁切 —— 這些橫幅的文案橫向鋪滿,裁掉兩端就少一半訊息 */
.pcard > img { width: 100%; display: block; aspect-ratio: 10 / 3; object-fit: cover; }
.pcard .bd { padding: var(--s4); }
.pcard .bd h3 {
  font-size: 17px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard .bd p {
  margin-top: 6px; font-size: var(--f-body); color: var(--txt-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------------------------------------------------------------- 面板 / 表單 */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r3); padding: var(--s5);
}
.panel > * { min-width: 0; }
.panel-hd { display: flex; align-items: center; gap: var(--s2); margin-top: 0; }
.panel-hd h2, .panel-hd h3 { font-size: var(--f-h3); }

.form-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-grid > * { min-width: 0; }
.fld { min-width: 0; }
.fld > label, .fld > .lb {
  display: block; margin-bottom: 6px;
  font-size: var(--f-sm); font-weight: 500; color: var(--txt-2);
}
.fld .val { font-size: var(--f-body); color: var(--txt); }
.fld .val.empty { color: var(--txt-3); }

input[type="text"], input[type="password"], input[type="tel"], input[type="email"],
input[type="number"], input[type="date"], input[type="search"], input:not([type]),
select, textarea, .form-control {
  width: 100%; min-height: 44px; padding: 10px var(--s3);
  background: var(--bg-3); color: var(--txt);
  border: 1px solid var(--line-2); border-radius: var(--r1);
  font-size: var(--f-body); font-family: inherit; line-height: 1.5;
}
textarea { min-height: 96px; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23a3b0cd'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 36px;
}
input:focus, select:focus, textarea:focus, .form-control:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,200,92,.16); outline: 0;
}
/* 比 bootstrap 具體才蓋得過去(bootstrap 的 #6c757d 只有 4.2:1) */
input::placeholder, textarea::placeholder, .form-control::placeholder { color: var(--txt-3); opacity: 1; }

/* 檔案選擇:原生按鈕的字改不掉(永遠 Choose File),用 label 當按鈕 */
.pickwrap input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pickbtn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 var(--s4);
  background: rgba(255,255,255,.06); color: var(--txt);
  border: 1px solid var(--line-2); border-radius: var(--r1);
  font-size: var(--f-sm); font-weight: 500; cursor: pointer;
}
.pickbtn:hover { background: rgba(255,255,255,.11); }
.pickname { margin-left: var(--s2); font-size: var(--f-sm); color: var(--txt-3); }

.hint { font-size: var(--f-body); color: var(--txt-2); }
.note { font-size: var(--f-body); color: var(--txt-2); line-height: 1.6; }

/* 狀態籤 */
.st {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r4);
  font-size: 13px; font-weight: 700; line-height: 1.4;
}
.st.done { background: rgba(110,231,183,.16); color: var(--ok); }
.st.todo { background: rgba(255,200,92,.16); color: var(--warn); }
.st.wait { background: rgba(63,224,208,.16); color: var(--teal); }

/* ---------------------------------------------------------------- 會員中心 */
.mc { display: block; }
@media (min-width: 1024px) {
  .mc { display: flex; align-items: flex-start; gap: var(--s6); }
  .mc-side { flex: 0 0 210px; position: sticky; top: calc(var(--header-h) + var(--s4)); }
  .mc-body { flex: 1 1 auto; min-width: 0; }
}
/* 手機不要同時出現側欄與分頁列 */
.mc-side { display: none; }
@media (min-width: 1024px) { .mc-side { display: block; } }

.mc-side a {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 46px; padding: 0 var(--s4);
  color: var(--txt-2); font-size: var(--f-body); border-radius: var(--r1);
}
.mc-side a + a { margin-top: var(--s1); }
.mc-side a i { font-size: 18px; color: var(--txt-3); }
.mc-side a:hover { background: rgba(255,255,255,.05); color: var(--txt); }
.mc-side a.on { background: rgba(255,200,92,.12); color: var(--gold); }
.mc-side a.on i { color: var(--gold); }

/* 手機分頁列:六等分,圖示在上文字在下,不捲動 */
.mc-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s1); }
@media (min-width: 1024px) { .mc-tabs { display: none; } }
.mc-tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 58px; padding: var(--s2) 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r1);
  color: var(--txt-2); font-size: 12px; line-height: 1.2; text-align: center;
}
.mc-tabs a i { font-size: 18px; color: var(--txt-3); }
.mc-tabs a.on { border-color: var(--line-gold); background: rgba(255,200,92,.1); color: var(--gold); }
.mc-tabs a.on i { color: var(--gold); }

/* 會員頁標題帶 */
.mc-top {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) 0;
}
.mc-top .back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: -10px;
  color: var(--txt-2); font-size: 20px;
}
.mc-top h1 { font-size: var(--f-h2); }
.mc-top .sub { font-size: var(--f-sm); color: var(--txt-3); }

/* 餘額總覽 */
.sum-band {
  display: grid; gap: var(--s3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) { .sum-band { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sum-band > * { min-width: 0; }
.stat {
  padding: var(--s4);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2);
}
.stat .k { font-size: var(--f-sm); color: var(--txt-3); }
.stat .v {
  margin-top: 2px; font-size: 22px; font-weight: 700; color: var(--gold);
  font-variant-numeric: tabular-nums; word-break: break-all;
}
.stat.teal .v { color: var(--teal); }

/* 任務卡 */
.task { border: 1px solid var(--line-gold); background: linear-gradient(180deg, rgba(255,200,92,.08), transparent 60%); }
.task .steps { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); margin-top: var(--s4); }
@media (min-width: 768px) { .task .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.task .steps > * { min-width: 0; }
.step {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding: var(--s4);
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r2);
}
.step .no {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,200,92,.16); color: var(--gold);
  font-size: var(--f-sm); font-weight: 700;
}
.step.ok .no { background: rgba(110,231,183,.16); color: var(--ok); }
.step .t { font-size: var(--f-body); font-weight: 700; }
.step .d { margin-top: var(--s1); font-size: var(--f-body); color: var(--txt-2); }
.step .btn { margin-top: var(--s3); }
@keyframes task-flash { 0%,100% { box-shadow: 0 0 0 0 rgba(255,200,92,0); } 50% { box-shadow: 0 0 0 6px rgba(255,200,92,.34); } }
.task.flash { animation: task-flash 1.1s ease 2; }

/* 折疊卡(帳戶管理:收起只看標題 + 狀態籤) */
details.fold {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r2); overflow: hidden;
}
details.fold + details.fold { margin-top: var(--s3); }
details.fold > summary {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 56px; padding: var(--s3) var(--s4);
  cursor: pointer; list-style: none; font-weight: 700;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after {
  content: "\F282"; font-family: "bootstrap-icons";
  margin-left: auto; color: var(--txt-3); font-weight: 400; transition: transform .2s;
}
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > summary .st { margin-left: auto; }
details.fold > summary .st + ::after { margin-left: var(--s2); }
.fold-bd { padding: 0 var(--s4) var(--s5); border-top: 1px solid var(--line); padding-top: var(--s4); }

/* ---------------------------------------------------------------- 表格 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); }
/* 表格內文也算內文,不是標籤 —— 天條 34 的 16px 底線一樣適用 */
table.tbl { width: 100%; font-size: var(--f-body); background: var(--panel); }
table.tbl.wide { min-width: 640px; }
table.tbl th, table.tbl td {
  padding: 12px var(--s3); text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
table.tbl th { background: var(--panel-2); color: var(--txt-2); font-weight: 700; font-size: 13px; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td { color: var(--txt); }
/* 兩邊貼邊、中間空一片:第一與最後一欄收窄 */
table.tbl th:first-child, table.tbl td:first-child,
table.tbl th:last-child,  table.tbl td:last-child { width: 1%; }
.tbl-scroll-hint { margin-top: var(--s2); font-size: 13px; color: var(--txt-3); display: none; }
.can-scroll .tbl-scroll-hint { display: block; }
.tbl-empty { padding: var(--s8) var(--s4); text-align: center; color: var(--txt-3); }

/* ---------------------------------------------------------------- 底部固定導覽 */
.bnav {
  position: fixed; inset: auto 0 0 0; z-index: 1035;
  height: var(--bnav-h);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s1);
  padding: 0 var(--s2);
  background: rgba(11,16,32,.97);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 992px) { .bnav { display: none; } }
.bnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 44px; position: relative;
  color: var(--txt-3); font-size: 12px; line-height: 1.15;
}
.bnav a i { font-size: 20px; line-height: 1; }
.bnav a.on { color: var(--gold); }
.bnav a.on::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2px;
  background: var(--gold); border-radius: 0 0 2px 2px;
}

/* ---------------------------------------------------------------- 版面骨架 */
.page { padding-top: var(--header-h); }
main { display: block; padding-bottom: var(--sect-end); }
/* 手機底部固定列的留白 */
@media (max-width: 991px) {
  main { padding-bottom: calc(var(--bnav-h) + var(--sect-end)); }
}

/* 漂浮客服 */
.cs-float {
  position: fixed; right: var(--s4); z-index: 1032;
  bottom: calc(var(--bnav-h) + var(--s4) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2);
}
@media (min-width: 992px) { .cs-float { bottom: var(--s6); } }
.cs-float .cs-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: linear-gradient(180deg, var(--gold-hi), var(--orange)); color: var(--on-gold);
  font-size: 24px; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); cursor: pointer;
}
.cs-float .cs-list {
  display: none; flex-direction: column; gap: var(--s2);
  padding: var(--s3); min-width: 172px;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--r2); box-shadow: var(--shadow-lg);
}
.cs-float.open .cs-list { display: flex; }
.cs-float .cs-list a {
  display: flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s3);
  color: var(--txt); font-size: var(--f-sm); border-radius: var(--r1);
  background: rgba(255,255,255,.05);
}
.cs-float .cs-list a:hover { background: rgba(255,200,92,.14); color: var(--gold); }

/* ---------------------------------------------------------------- 彈窗相容層
   舊 modal.js / bootstrap 用 inline style.display 開關,所以佈局走 block + margin,
   寫 flex 會被 inline style 蓋掉。 */
.modal {
  display: none;               /* 少了這行會整頁吃掉點擊 */
  position: fixed; inset: 0; z-index: 1050;
  overflow-x: hidden; overflow-y: auto;
  background: rgba(3,6,14,.72);
  -webkit-overflow-scrolling: touch;
}
.modal.show, .modal.in { display: block; }
.modal-dialog {
  position: relative;
  width: 86%; max-width: 420px;
  margin: 9vh auto;
}
@media (min-width: 992px) { .modal-dialog { width: 33%; min-width: 380px; } }
.modal-content {
  background: var(--panel); color: var(--txt);
  border: 1px solid var(--line-2); border-radius: var(--r3);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line);
}
.modal-title, .modal-header h4 { font-size: var(--f-h3); font-weight: 700; margin: 0; }
.modal-header .close, button.close {
  margin-left: auto; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; color: var(--txt-2);
  font-size: 24px; line-height: 1; cursor: pointer; opacity: 1;
}
.modal-header .close:hover, button.close:hover { color: var(--gold); }
.modal-body { padding: var(--s5); }
.modal-footer {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5); border-top: 1px solid var(--line);
}
.modal-backdrop { display: none !important; }   /* 遮罩由 .modal 自己畫 */
.modal-body .form-group + .form-group { margin-top: var(--s4); }
.modal-body label { display: block; margin-bottom: 6px; font-size: var(--f-sm); color: var(--txt-2); }
#chkImg { border-radius: var(--r1); margin-left: var(--s2); vertical-align: middle; cursor: pointer; }

/* 舊樣板的 alert */
.alert { padding: var(--s3) var(--s4); border-radius: var(--r1); font-size: var(--f-sm); }
.alert-danger  { background: rgba(255,143,136,.14); color: var(--bad); border: 1px solid rgba(255,143,136,.3); }
.alert-success { background: rgba(110,231,183,.14); color: var(--ok);  border: 1px solid rgba(110,231,183,.3); }

/* bootstrap 殘留的工具 class,新樣板也會用到 */
.text-center { text-align: center; }
.d-none { display: none !important; }
@media (min-width: 992px) { .d-lg-block { display: block !important; } .d-lg-none { display: none !important; } }
.mt-1 { margin-top: var(--s1); } .mt-2 { margin-top: var(--s2); }
.mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); }

/* 讀不到圖時不要露出破圖的 alt 文字疊在版面上 */
.gcard-fig img, .pcard > img, .hero img { color: transparent; font-size: 0; }

/* ---------------------------------------------------------------- 優惠 */
/* 活動卡:圖是 2000x600 的橫幅。
   單欄時電腦版一張卡就 464px 高、整頁 2196px,一屏看不到兩張;
   ≥1024px 改兩欄(卡寬約 558、圖高 167,圖上的字仍讀得到),整頁收到一半以內。
   align-items:start 讓每張卡各自的高度說了算 —— 同一列有人展開活動辦法時,
   旁邊那張不會被拉高留一片空白。 */
.acards { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
.acards > * { min-width: 0; }
@media (min-width: 768px) {
  .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  /* 奇數則時最後一張跨滿整列,右邊不留空格(天條 55) */
  .acards > :last-child:nth-child(odd) { grid-column: span 2; }
}
.acard {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r3); overflow: hidden;
}
.acard > img { width: 100%; display: block; aspect-ratio: 10 / 3; object-fit: cover; }
.acard-hd {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5);
}
.acard-hd h2 { font-size: var(--f-h3); flex: 1 1 auto; min-width: 0; }
.acard-bd { padding: 0 var(--s5) var(--s5); }
.acard details > summary {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 var(--s4);
  border: 1px solid var(--line-gold); border-radius: var(--r4);
  color: var(--gold); font-size: var(--f-sm); font-weight: 700;
  cursor: pointer; list-style: none;
}
.acard details > summary::-webkit-details-marker { display: none; }
.acard details > summary::after {
  content: "\F282"; font-family: "bootstrap-icons"; font-weight: 400; transition: transform .2s;
}
.acard details[open] > summary::after { transform: rotate(180deg); }
.acard details[open] > summary { border-radius: var(--r4) var(--r4) 0 0; }
.acard-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* 活動內文是後台存的整份 HTML,樣式在這裡統一接住,不逐則改內容 */
.legacy { margin-top: var(--s4); font-size: var(--f-body); line-height: 1.8; color: var(--txt-2); }
.legacy :where(h1, h2, h3, h4, h5) { margin: var(--s5) 0 var(--s2); font-size: var(--f-h3); color: var(--txt); }
.legacy :where(h1, h2, h3, h4, h5):first-child { margin-top: 0; }
.legacy p { margin: 0 0 var(--s3); }
.legacy :where(ul, ol) { margin: 0 0 var(--s3); padding-left: 1.4em; list-style: disc; }
.legacy ol { list-style: decimal; }
.legacy li { margin-bottom: var(--s1); }
.legacy a { color: var(--gold); text-decoration: underline; }
.legacy img { max-width: 100%; height: auto; border-radius: var(--r1); }
.legacy strong, .legacy b { color: var(--txt); }
.legacy table {
  width: 100%; margin: var(--s3) 0; font-size: var(--f-body);
  background: var(--bg-3); border-radius: var(--r1); overflow: hidden;
}
.legacy :where(th, td) {
  padding: 10px var(--s3); border-bottom: 1px solid var(--line);
  text-align: left; white-space: nowrap;
}
.legacy th { background: var(--panel-2); color: var(--txt); font-weight: 700; }
/* 後台貼進來的內容帶寫死的顏色(為淺底寫的),深底上不是看不見就是對比不夠。
   一律接回設計 token —— 紅字是內容作者的強調,映射到品牌的警示色而不是抹成灰,
   強調保住、對比也夠(純 #ff0000 在這個底色上只有 4.4:1)。 */
.legacy [style*="color"] { color: var(--txt-2) !important; }
.legacy [style*="color:#ff0000"], .legacy [style*="color: #ff0000"],
.legacy [style*="color:#FF0000"], .legacy [style*="color:red"],
.legacy [style*="color:#f00"] { color: var(--bad) !important; }
/* 內容裡寫死的背景色同理:淺底的色塊放到深底上會把字吃掉 */
.legacy [style*="background"] { background: transparent !important; }
/* 表格可能很寬,自己包一層水平捲動容器(天條 34) */
.legacy-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------------------------------------------------------- 零碎 */
/* 側欄的導覽面板內距比一般面板小 */
.mc-side .panel { padding: var(--s3); }
/* 總覽卡裡放的是文字不是數字時,字級收一階才不會撐破 */
.stat .v.sm { font-size: 18px; }
/* 登入彈窗的驗證碼那一行 */
.cap-row { display: flex; align-items: center; gap: var(--s3); }
.cap-row input { flex: 1 1 auto; min-width: 0; }
.cap-row #chkImg { flex: 0 0 auto; }
/* 上傳欄:label 當按鈕,原生 input 已視覺隱藏 */
.pickwrap { position: relative; }
.pickwrap .pickbtn { margin-top: 2px; }
/* 郵遞區號套件塞進來的三個欄位 */
.twzipcode select, .twzipcode input { width: 100%; }
.mt-2 { margin-top: var(--s2); }
/* 折疊卡的狀態籤後面才是箭頭,兩者之間留空 */
details.fold > summary .st { margin-left: auto; margin-right: var(--s2); }
details.fold > summary .st ~ ::after { margin-left: 0; }
