/* ============================================================
   任務中心（獨立頁）— 左側欄 + 三分頁版型
   配色沿用站台主題：深色底(#16161c) + 面板(#1A1A22) + 紅色強調(#ff230a)。
   質感：漸層面板 + 內光邊 + 柔和陰影 + 漸層圖示磚 + 卡片浮起。
   結構：.tc-page > .tc-layout > [.tc-side | .tc-main]
   分頁：任務列表(tasks) / 我的票券(tickets) / 獎勵預覽(rewards)
   ============================================================ */
[v-cloak] { display: none !important; }

.tc-page {
  --tc-accent: #ff230a;
  --tc-accent2: #ff6a3d;
  --tc-accent-soft: rgba(255, 55, 20, .16);
  --tc-accent-line: rgba(255, 80, 40, .42);
  --tc-glow: rgba(255, 45, 15, .45);
  --tc-panel-a: rgba(255, 255, 255, .055);
  --tc-panel-b: rgba(255, 255, 255, .02);
  --tc-surface: rgba(255, 255, 255, .04);
  --tc-border: rgba(255, 255, 255, .09);
  --tc-border-str: rgba(255, 255, 255, .16);
  --tc-txt: #fff;
  --tc-muted: rgba(255, 255, 255, .58);
  --tc-gold: #f7c24b;
  --tc-gold2: #ffe08a;
  --tc-doing: #f6c343;   /* 進行中：紅綠中間的黃色 */
  --tc-ok: #3ddc84;
  --tc-radius: 16px;
  color: var(--tc-txt);
  font-family: inherit;
  min-height: 72vh;
  padding: 20px 14px 96px;
}
.tc-page *,
.tc-page *::before,
.tc-page *::after { box-sizing: border-box; }
.tc-mono { font-variant-numeric: tabular-nums; }

.tc-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: start;
}

/* 共用面板底 */
.tc-panel {
  background: linear-gradient(160deg, var(--tc-panel-a), var(--tc-panel-b));
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ============ 左側欄 ============ */
.tc-side {
  position: sticky; top: 14px;
  background: linear-gradient(160deg, var(--tc-panel-a), var(--tc-panel-b));
  border: 1px solid var(--tc-border);
  border-radius: 20px;
  padding: 18px 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.tc-side__brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 900; letter-spacing: 1px;
  color: #fff; padding: 2px 4px 16px; margin-bottom: 4px;
  border-bottom: 1px solid var(--tc-border);
}
.tc-side__brandico { display: grid; place-items: center; font-size: 20px; color: var(--tc-accent2); }
.tc-side__nav { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.tc-side__item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 8px; border-radius: 15px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  color: var(--tc-muted); font-size: 13px; font-weight: 700; transition: .25s;
}
.tc-side__ico { display: grid; place-items: center; font-size: 28px; color: var(--tc-muted); transition: .25s; }
.tc-side__item:hover { color: var(--tc-txt); background: var(--tc-surface); }
.tc-side__item:hover .tc-side__ico { color: var(--tc-accent2); }
.tc-side__item.active {
  color: #fff; background: var(--tc-accent-soft); border-color: var(--tc-accent-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.tc-side__item.active .tc-side__ico { color: var(--tc-accent2); }
.tc-side__label { line-height: 1; }
.tc-side__badge {
  position: absolute; top: 10px; right: 16px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: linear-gradient(135deg, #ff5a3c, #e01500); color: #fff; font-size: 11px; line-height: 19px; text-align: center; font-weight: 800;
  box-shadow: 0 2px 6px rgba(224, 21, 0, .5);
}

/* ============ 主內容 ============ */
.tc-main { min-width: 0; }

/* 上方頁籤 */
.tc-toptabs {
  display: flex; gap: 24px; align-items: center;
  border-bottom: 1px solid var(--tc-border);
  margin-bottom: 18px; padding: 2px 2px 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tc-toptab {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 2px 15px; background: none; border: none; cursor: pointer;
  color: var(--tc-muted); font-size: 15px; font-weight: 700; white-space: nowrap; transition: .2s;
}
.tc-toptab i { font-size: 16px; opacity: .9; }
.tc-toptab:hover { color: var(--tc-txt); }
.tc-toptab.active { color: #fff; }
.tc-toptab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--tc-accent2), var(--tc-accent)); box-shadow: 0 0 10px var(--tc-glow);
}
.tc-toptab__badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: linear-gradient(135deg, #ff5a3c, #e01500); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 800;
}

/* ============ 獎勵進度卡 ============ */
.tc-prog {
  display: grid; grid-template-columns: 1fr 300px; gap: 18px;
  padding: 4px 2px 12px; margin-bottom: 8px;
}
.tc-prog__main { min-width: 0; }
.tc-prog__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 30px;
  font-size: 15px; font-weight: 800;
}
.tc-prog__head::before {
  content: ""; width: 4px; height: 17px; border-radius: 2px;
  background: linear-gradient(180deg, var(--tc-accent2), var(--tc-accent)); box-shadow: 0 0 8px var(--tc-glow);
}
.tc-prog__count-tag { font-size: 14px; color: var(--tc-muted); font-weight: 800; }
.tc-prog__done-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--tc-ok);
  background: rgba(61, 220, 132, .14); border: 1px solid rgba(61, 220, 132, .42); padding: 2px 11px; border-radius: 999px;
}
.tc-prog__refresh { margin-left: auto; color: var(--tc-muted); cursor: pointer; font-size: 13px; transition: .3s; }
.tc-prog__refresh:hover { color: var(--tc-accent2); transform: rotate(90deg); }

/* 桌機也可橫向捲動：里程碑節點多／門檻密時軌道會被 railMinWidth 撐寬 */
.tc-prog__track { position: relative; overflow-x: auto; overflow-y: hidden; }
.tc-prog__rail { position: relative; margin: 42px 44px 108px 8px; }
.tc-prog__bar { position: relative; height: 5px; border-radius: 999px; background: rgba(0, 0, 0, .38); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .55); overflow: hidden; }
.tc-prog__fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--tc-accent2), var(--tc-accent));
  box-shadow: 0 0 10px var(--tc-glow); transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

/* 節點：以進度條中線為基準的定位點 */
.tc-prog__node { position: absolute; top: 2.5px; }
/* 幾項（在進度條上面） */
.tc-prog__count {
  position: absolute; left: 0; bottom: 15px; margin-left: 0; transform: translateX(-50%);
  font-size: 12px; font-weight: 700; color: var(--tc-muted); white-space: nowrap; transition: .2s;
}
.tc-prog__node.reached .tc-prog__count { color: #fff; }
.tc-prog__node:hover .tc-prog__count { color: var(--tc-gold2); }
/* 到達點圓點 */
.tc-prog__dot {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 13px; height: 13px; border-radius: 50%; border: 2px solid #4a4a54; background: #2b2b33; transition: .2s;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}
.tc-prog__node:hover .tc-prog__dot { border-color: var(--tc-gold2); transform: translate(-50%, -50%) scale(1.18); }
.tc-prog__node.reached .tc-prog__dot { background: #d5d8e0; border-color: #fff; }      /* 可領取：淺色實心，不高亮 */
.tc-prog__node.claimed .tc-prog__dot { background: #4a4a54; border-color: #3a3a44; }   /* 已領取：灰暗 */
/* 獎勵框（在進度條下面）：實心色塊，往左延伸，尖角在右上角朝上對準到達點 */
.tc-prog__bubble {
  position: absolute; top: 18px; left: auto; right: -14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; white-space: nowrap;
  min-width: 78px; padding: 9px 13px 10px; border-radius: 12px 8px 12px 12px;
  background: linear-gradient(160deg, #3a3a44, #2a2a33);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .12);
}
/* 右上角尖角：尖端對準到達點（node.x） */
.tc-prog__bubble::after {
  content: ""; position: absolute; top: -7px; right: 7px; width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 8px solid #38383f;
}
/* 已領取：整個獎勵框灰暗 */
.tc-prog__node.claimed .tc-prog__bubble { background: linear-gradient(160deg, #2a2a30, #202027); opacity: .55; }
.tc-prog__node.claimed .tc-prog__bubble::after { border-bottom-color: #26262b; }

.tc-prog__gift { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.tc-prog__gift i { font-size: 17px; }
.tc-prog__gift b { font-size: 14px; font-weight: 800; }
/* 領取按鈕：小、白框，不高亮；領取後轉灰 */
.tc-prog__claim {
  align-self: stretch; text-align: center; margin-top: 1px;
  padding: 3px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: transparent;
  font-size: 11px; font-weight: 700; cursor: pointer; color: rgba(255, 255, 255, .5); transition: .2s;
}
.tc-prog__claim:not([disabled]) { border-color: rgba(255, 255, 255, .85); color: #fff; }
.tc-prog__claim:not([disabled]):hover { background: #fff; color: #222; }
.tc-prog__claim[disabled] { cursor: default; }
.tc-prog__claim.claimed { border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .5); }

/* 右側統計卡 */
.tc-prog__cards { display: flex; flex-direction: column; gap: 12px; }
.tc-stat {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--tc-border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.tc-stat__ico {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.tc-stat.gold .tc-stat__ico { color: var(--tc-gold); }
.tc-stat.accent .tc-stat__ico { color: var(--tc-accent2); }
.tc-stat__label { font-size: 12px; color: var(--tc-muted); margin-bottom: 2px; }
.tc-stat__num { font-size: 25px; font-weight: 900; color: #fff; line-height: 1.1; }
/* 手機專用置頂統計列（桌機隱藏） */
.tc-mstats { display: none; }

/* ============ 區塊標題 ============ */
.tc-sec {
  display: flex; align-items: center; gap: 10px; margin: 6px 2px 16px;
  font-size: 16px; font-weight: 800;
}
.tc-sec::before {
  content: ""; width: 4px; height: 17px; border-radius: 2px;
  background: linear-gradient(180deg, var(--tc-accent2), var(--tc-accent)); box-shadow: 0 0 8px var(--tc-glow);
}

/* ============ 任務網格 ============ */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.tc-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02));
  border: 1px solid var(--tc-border); border-radius: 15px; padding: 16px 15px 15px; min-height: 176px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.tc-card:hover { transform: translateY(-4px); border-color: var(--tc-accent-line); box-shadow: 0 14px 30px rgba(0, 0, 0, .34), 0 0 0 1px var(--tc-accent-line); }
.tc-card.is-done { opacity: .55; }
.tc-card.is-done:hover { transform: none; border-color: var(--tc-border); box-shadow: 0 8px 22px rgba(0, 0, 0, .22); }
.tc-card__wm {
  position: absolute; right: -14px; bottom: -18px; font-size: 92px; color: rgba(255, 255, 255, .035);
  transform: rotate(-12deg); pointer-events: none;
}
.tc-card__top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 13px; }
.tc-card__ico {
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--tc-accent2);
}
.tc-card.is-doing .tc-card__ico { color: var(--tc-doing); } /* 進行中：黃色 */
.tc-card.is-ready .tc-card__ico { color: var(--tc-ok); }   /* 可領取：綠色 */
.tc-card.is-done .tc-card__ico { color: var(--tc-muted); } /* 已領取：灰色 */
.tc-card.is-failed .tc-card__ico { color: #f28b8b; }       /* 未達標：紅色 */
.tc-card__prog { font-size: 12px; color: var(--tc-muted); font-weight: 700; }
.tc-card__prog b { color: #fff; }
/* 標題＋說明包裝層：桌機不改變原本直排（透明容器） */
.tc-card__head { display: contents; }
.tc-card__title { position: relative; font-size: 15px; font-weight: 800; margin: 0 0 5px; color: #fff; }
.tc-card__desc {
  position: relative; font-size: 12px; color: var(--tc-muted); margin: 0 0 13px; line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-card__bar { position: relative; height: 5px; border-radius: 999px; background: rgba(0, 0, 0, .3); overflow: hidden; margin-bottom: 13px; }
.tc-card__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--tc-accent2), var(--tc-accent)); box-shadow: 0 0 8px var(--tc-glow); transition: width .5s; }
/* 可領取（達標未領）：進度條轉綠 */
.tc-card.is-ready .tc-card__fill { background: linear-gradient(90deg, #5be89a, #24b869); box-shadow: 0 0 8px rgba(61, 220, 132, .5); }
/* 已完成（已領取）任務：進度條轉灰 */
.tc-card.is-done .tc-card__fill { background: linear-gradient(90deg, #7a7a86, #56565f); box-shadow: none; }
/* 未達標（終局失敗）：卡片淡化、進度條轉紅 */
.tc-card.is-failed { opacity: .6; }
.tc-card.is-failed:hover { transform: none; border-color: var(--tc-border); box-shadow: 0 8px 22px rgba(0, 0, 0, .22); }
.tc-card.is-failed .tc-card__fill { background: linear-gradient(90deg, #f5a3a3, #e05656); box-shadow: none; }
/* 桌機：拆散 foot，讓獎勵/按鈕成為卡片 flex 直接子項，用 order 排出
   標題/說明 → 獎勵 → 進度條 → 按鈕（獎勵在進度條上方） */
.tc-card__foot { display: contents; }
.tc-card__top { order: 0; }
.tc-card__title { order: 1; }
.tc-card__desc { order: 2; }
.tc-card__rewards { order: 3; margin-bottom: 12px; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-card__bar { order: 4; }
.tc-card__foot .tc-btn { order: 5; }
.tc-card__reward { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; }
.tc-card__reward i { font-size: 15px; }
.tc-card__reward b { font-weight: 800; }
/* 綁定洗碼提示（點數獎勵） */
.tc-card__wash { font-size: 10px; font-weight: 700; color: #e6a23c; background: rgba(230,162,60,.14); border-radius: 3px; padding: 1px 4px; margin-left: 2px; }
.tc-prog__wash { font-size: 9px; font-weight: 700; color: #ffd591; margin-left: 2px; }
/* 按鈕：小、精緻、只用外框不填色 */
.tc-btn { min-width: 66px; padding: 5px 15px; border-radius: 999px; border: 1px solid transparent; background: transparent; font-weight: 700; font-size: 12px; cursor: pointer; transition: .2s; }
/* 還沒開始/未簽到：白框 */
.tc-btn.todo { border-color: rgba(255, 255, 255, .7); color: #fff; }
.tc-btn.todo:not([disabled]) { cursor: pointer; }
.tc-btn.todo:not([disabled]):hover { background: rgba(255, 255, 255, .1); }
.tc-btn.todo[disabled] { cursor: default; }
/* 進行中（已有進度）：黃色（紅綠中間色） */
.tc-btn.doing { border-color: rgba(246, 195, 67, .6); background: rgba(246, 195, 67, .12); color: var(--tc-doing); cursor: default; }
/* 可領取：綠色 */
.tc-btn.ready { border-color: rgba(61, 220, 132, .7); color: #5be89a; }
.tc-btn.ready:hover { background: rgba(61, 220, 132, .16); }
/* 已領取：灰色 */
.tc-btn.done { border-color: var(--tc-border-str); color: var(--tc-muted); cursor: default; }
/* 未達標（首儲第一筆未達門檻，終局失敗）：紅灰、禁用 */
.tc-btn.failed { border-color: rgba(245, 108, 108, .5); color: #f28b8b; background: rgba(245, 108, 108, .08); cursor: default; }
/* 審核中（領取審查已送出，待客服審核）：琥珀色、禁用 */
.tc-btn.reviewing { border-color: rgba(230, 162, 60, .5); color: #e6a23c; background: rgba(230, 162, 60, .1); cursor: default; }

/* ============ 任務中心說明 ============ */
.tc-guide { display: flex; flex-direction: column; gap: 14px; }
.tc-guide__item {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--tc-border);
  background: linear-gradient(160deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02));
}
.tc-guide__ico {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--tc-accent2); background: var(--tc-accent-soft);
}
.tc-guide__txt h4 { margin: 0 0 6px; font-size: 15px; font-weight: 800; color: #fff; }
.tc-guide__txt p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--tc-muted); }
.tc-guide__txt b { color: #fff; font-weight: 800; }

/* ============ 我的票券 ============ */
.tc-grid--tickets { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tc-tk {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 15px;
  border: 1px solid; background:
    linear-gradient(135deg, color-mix(in srgb, var(--tk, #64748b) 26%, transparent),
                             color-mix(in srgb, var(--tk, #64748b) 6%, transparent));
  border-color: color-mix(in srgb, var(--tk, #64748b) 48%, transparent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.tc-tk__ico {
  width: 48px; height: 48px; border-radius: 13px; flex: 0 0 48px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; background: color-mix(in srgb, var(--tk, #64748b) 62%, transparent);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.tc-tk__name { font-size: 15px; font-weight: 800; color: #fff; }
.tc-tk__hint { font-size: 12px; color: rgba(255, 255, 255, .6); }
.tc-tk__num { margin-left: auto; font-size: 27px; font-weight: 900; color: #fff; }
.tc-tk__num small { font-size: 12px; color: rgba(255, 255, 255, .6); font-weight: 600; }

/* 持有票券數量列（仿遊戲大廳 lobby-header 圓角膠囊風格） */
.tc-tkbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 16px; border-radius: 50px;
  background: linear-gradient(160deg, var(--tc-panel-a), var(--tc-panel-b));
  border: 1px solid var(--tc-accent-line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06), -1px 0 1px var(--tc-glow);
}
.tc-tkbar__title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; color: #fff; padding-left: 4px; }
.tc-tkbar__title i { color: var(--tc-accent2); }
.tc-tkbar__list { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-left: auto; }
.tc-tkbar__item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 30px; font-size: 13px;
  background: color-mix(in srgb, var(--tk, #64748b) 16%, rgba(255,255,255,.04));
  border: 1px solid color-mix(in srgb, var(--tk, #64748b) 50%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.tc-tkbar__item > i { font-size: 15px; color: color-mix(in srgb, var(--tk, #64748b) 85%, #fff); }
.tc-tkbar__name { color: rgba(255, 255, 255, .82); font-weight: 700; }
.tc-tkbar__num { font-size: 16px; font-weight: 900; color: #fff; }
.tc-tkbar__empty { color: var(--tc-muted); font-size: 13px; }

/* 使用紀錄表格 */
.tc-rec-tip { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--tc-muted); margin: 0 2px 10px; }
.tc-rec {
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, var(--tc-panel-a), var(--tc-panel-b));
  border: 1px solid var(--tc-border);
}
.tc-rec__tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tc-rec__tbl thead th {
  text-align: left; font-weight: 800; color: var(--tc-muted); font-size: 12.5px;
  padding: 12px 14px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid var(--tc-border);
}
.tc-rec__tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--tc-border); color: #fff; }
.tc-rec__tbl tbody tr:last-child td { border-bottom: none; }
.tc-rec__tbl tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.tc-rec__detail { display: block; font-size: 11.5px; color: var(--tc-muted); margin-top: 2px; }
.tc-rec__empty { text-align: center; color: var(--tc-muted); padding: 44px 0 !important; }

/* ============ 獎勵預覽 ============ */
.tc-pv-tip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--tc-muted); margin: 2px 2px 16px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--tc-surface); border: 1px solid var(--tc-border);
}
.tc-grid--preview { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.tc-pv {
  position: relative;
  display: flex; flex-direction: column; gap: 11px; padding: 15px 15px 14px; border-radius: 15px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02));
  border: 1px solid var(--tc-border); box-shadow: 0 8px 22px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.tc-pv.is-ms { border-color: rgba(247, 194, 75, .28); }
.tc-pv__top { display: flex; align-items: center; gap: 11px; padding-right: 30px; }
/* 里程名稱前綴徽章 */
.tc-pv__mstag {
  display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 800; color: #1c1500;
  background: linear-gradient(150deg, var(--tc-gold2), var(--tc-gold)); vertical-align: 1px;
}
.tc-pv__ico {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--tc-accent2);
  background: linear-gradient(150deg, rgba(255, 106, 61, .22), rgba(255, 35, 10, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.tc-pv.is-ms .tc-pv__ico { color: var(--tc-gold); background: linear-gradient(150deg, rgba(247, 194, 75, .22), rgba(247, 194, 75, .06)); }
.tc-pv__meta { min-width: 0; }
.tc-pv__title { font-size: 14.5px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-pv__cond { font-size: 12px; color: var(--tc-muted); margin-top: 3px; }
.tc-pv__tag { font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 999px; line-height: 1.6; }
.tc-pv__tag--new { color: #5be89a; background: rgba(61, 220, 132, .16); border: 1px solid rgba(61, 220, 132, .4); }
.tc-pv__tag--ms { color: var(--tc-gold2); background: rgba(247, 194, 75, .16); border: 1px solid rgba(247, 194, 75, .4); }
.tc-pv__rewards {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 10px; background: rgba(0, 0, 0, .2);
}
.tc-pv__rw { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: #fff; }
.tc-pv__rw i { font-size: 16px; }
.tc-pv__none { color: var(--tc-muted); }
/* VIP 專屬獎勵：卡片右上角皇冠圈圈，點擊開 Bootstrap 彈窗 */
.tc-pv__crown {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  color: var(--tc-gold2); background: rgba(247, 194, 75, .14); border: 1px solid rgba(247, 194, 75, .5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transition: .2s;
}
.tc-pv__crown:hover { background: rgba(247, 194, 75, .26); transform: scale(1.08); }

/* VIP 專屬獎勵彈窗（Bootstrap modal 深色主題） */
.tc-vipmodal {
  background: linear-gradient(160deg, #23232b, #1b1b22);
  border: 1px solid rgba(247, 194, 75, .3); border-radius: 16px; color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.tc-vipmodal .modal-header { border-bottom: 1px solid rgba(255, 255, 255, .1); padding: 15px 18px; }
.tc-vipmodal .modal-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: #fff; }
.tc-vipmodal .modal-title > i { color: var(--tc-gold2); }
.tc-vipmodal .modal-title small { font-size: 12px; font-weight: 600; color: var(--tc-muted); }
.tc-vipmodal .btn-close { filter: invert(1) grayscale(1) brightness(1.6); opacity: .7; }
.tc-vipmodal .btn-close:hover { opacity: 1; }
.tc-vipmodal .modal-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; max-height: 60vh; overflow-y: auto; }
.tc-pv__viprow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 10px; background: rgba(247, 194, 75, .07); border: 1px dashed rgba(247, 194, 75, .3);
}
.tc-pv__viplv { flex: 0 0 auto; font-size: 12.5px; font-weight: 800; color: var(--tc-gold2); min-width: 56px; }
.tc-pv__rwbox { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tc-pv__viprow .tc-pv__rw { font-size: 13px; }

/* ============ 空狀態 ============ */
.tc-empty { text-align: center; color: var(--tc-muted); padding: 44px 0; font-size: 14px; }
.tc-empty--big { padding: 96px 0; }
.tc-empty--big i { font-size: 48px; opacity: .4; display: block; margin-bottom: 16px; }
.tc-empty--big p { margin: 0; font-size: 15px; }

/* ============ 響應式 ============ */
@media (max-width: 900px) {
  .tc-prog { grid-template-columns: 1fr; }
  .tc-prog__cards { flex-direction: row; }
  .tc-stat { flex: 1; }
  .tc-grid { grid-template-columns: repeat(2, 1fr); }
  .tc-grid--tickets { grid-template-columns: repeat(2, 1fr); }
  .tc-grid--preview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .tc-layout { grid-template-columns: 1fr; }
  /* 手機側欄改精簡橫向分段列：隱藏品牌列、圖標＋文字橫排、縮小內距，省空間 */
  .tc-side { position: static; border-radius: 14px; padding: 6px; }
  .tc-side__brand { display: none; }
  .tc-side__nav { flex-direction: row; margin-top: 0; gap: 5px; }
  .tc-side__item {
    flex: 1; flex-direction: row; justify-content: center; align-items: center;
    gap: 7px; padding: 9px 6px; border-radius: 10px; font-size: 13px;
  }
  .tc-side__ico { width: auto; height: auto; font-size: 16px; }
  .tc-side__label { line-height: 1; }
  .tc-side__badge { top: 3px; right: 8px; margin-right: 0; }
  /* 進度條：手機改可橫向捲動，避免里程／任務節點擠在一起 */
  .tc-prog__track {
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;   /* 隱藏滑動條 */
  }
  .tc-prog__track::-webkit-scrollbar { display: none; }
  /* 底部留白加大，讓獎勵氣泡完整落在可捲動軌道內、不被 overflow 裁切 */
  /* min-width 改由 inline railMinWidth 綁定（依節點密度自動撐開） */
  .tc-prog__rail { margin: 40px 24px 132px 8px; }
  /* 需求1：進度標題列與軌道間距縮小 */
  .tc-prog__head { margin-bottom: 6px; }
  /* 類型頁籤：手機不橫向捲動（避免可被拖曳），4 個群組平均分配填滿一列 */
  .tc-toptabs { overflow-x: visible; gap: 6px; justify-content: space-between; }
  .tc-toptab { flex: 1; justify-content: center; gap: 5px; font-size: 13px; padding: 10px 2px 12px; }
  /* 可左右滑動提示：手指＋箭頭浮層，絕對定位覆蓋在進度條線上（加父層提高權重避免被基底 display:none 覆蓋） */
  .tc-prog__main { position: relative; }
  .tc-prog .tc-prog__swipe {
    display: grid; place-items: center; margin: 0;
    position: absolute; top: 62px; left: 50%; transform: translate(-50%, -50%);
    z-index: 6; pointer-events: none;             /* 不擋滑動，觸控會傳到底下軌道 */
  }

  /* 需求1：統計卡改置頂、桌機那組隱藏、尺寸再縮小 */
  .tc-prog__cards { display: none; }
  .tc-mstats { display: flex; gap: 9px; margin-bottom: 14px; }
  .tc-mstats .tc-stat { flex: 1; padding: 9px 11px; gap: 9px; border-radius: 11px; }
  .tc-mstats .tc-stat__ico { font-size: 19px; }
  .tc-mstats .tc-stat__label { font-size: 10.5px; margin-bottom: 1px; }
  .tc-mstats .tc-stat__num { font-size: 16px; }

  /* 需求2：任務改「整列長條」100% 寬（版型參考圖，顏色沿用主題） */
  .tc-grid { grid-template-columns: 1fr; gap: 10px; }
  .tc-card {
    display: grid; grid-template-columns: 46px 1fr auto; align-items: center;
    column-gap: 12px; row-gap: 5px; min-height: 0; padding: 12px 14px;
    grid-template-areas:
      "head head prog"
      "ico  bar  btn"
      "ico  rew  btn";
  }
  /* 頂部標題列：標題＋說明同一行（左），?/? 靠右，下方一條分隔線 */
  .tc-card__head, .tc-card__prog { padding-bottom: 8px; border-bottom: 1px solid var(--tc-border); }
  .tc-card__head {
    grid-area: head; display: flex; align-items: baseline; gap: 7px; min-width: 0;
  }
  .tc-card:hover { transform: none; }         /* 手機不需浮起效果 */
  .tc-card__top, .tc-card__foot { display: contents; }  /* 拆散包裝層，讓子項進入卡片 grid */
  .tc-card__wm { display: none; }             /* 隱藏浮水印圖示 */
  .tc-card__ico {
    grid-area: ico; align-self: center; width: 46px; height: 46px; border-radius: 12px;
    background: var(--tc-accent-soft); font-size: 22px;
  }
  .tc-card.is-ready .tc-card__ico { background: rgba(61, 220, 132, .16); }
  .tc-card.is-doing .tc-card__ico { background: rgba(246, 195, 67, .16); }
  .tc-card.is-done .tc-card__ico { background: rgba(255, 255, 255, .06); }
  .tc-card__prog { grid-area: prog; justify-self: end; align-self: center; }
  .tc-card__title { flex: 0 0 auto; margin: 0; font-size: 14px; }
  /* 說明接在 H3 右邊，字更小、單行省略 */
  .tc-card__desc {
    flex: 1 1 auto; min-width: 0; display: block; margin: 0;
    font-size: 10.5px; line-height: 1.4; color: var(--tc-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .tc-card__bar { grid-area: bar; margin: 0; }
  .tc-card__rewards { grid-area: rew; align-self: center; margin-bottom: 0; }
  .tc-card__foot { display: contents; }
  .tc-btn { grid-area: btn; align-self: center; white-space: nowrap; }

  /* 票券持有列：手機改一般圓角、標題與清單分兩行 */
  .tc-tkbar { border-radius: 14px; padding: 12px 14px; gap: 10px; }
  .tc-tkbar__title { width: 100%; }
  .tc-tkbar__list { margin-left: 0; width: 100%; }
  .tc-tkbar__item { flex: 1 1 auto; justify-content: center; padding: 0; background: none; border: none; box-shadow: none; }
  /* 使用紀錄表格：縮排、字級 */
  .tc-rec__tbl { font-size: 12px; }
  .tc-rec__tbl thead th, .tc-rec__tbl tbody td { padding: 10px 10px; }
}
/* 桌機隱藏；手機由上方 .tc-prog .tc-prog__swipe 顯示成浮層 */
.tc-prog__swipe { display: none; }
/* 手指：出現→點下去→整隻手往左滑→抬起淡出（模擬左滑手勢） */
.tc-prog__swipe i.fa-hand-pointer {
  font-size: 90px; color: #ffffffb3; margin-top: 105px;
  transform-origin: 55% 15%;                 /* 以指尖為中心做「按下」縮放 */
  animation: tcFingerSwipe 2s ease-in-out infinite;
}
@keyframes tcFingerSwipe {
  0%   { transform: translateX(24px) scale(1);    opacity: 0; }   /* 從右側淡入 */
  12%  { transform: translateX(24px) scale(1);    opacity: 1; }
  24%  { transform: translateX(24px) scale(.84);  opacity: 1; }   /* 點下去 */
  32%  { transform: translateX(24px) scale(.84);  opacity: 1; }   /* 短暫停頓 */
  68%  { transform: translateX(-30px) scale(.84); opacity: 1; }   /* 按著往左移 */
  82%  { transform: translateX(-30px) scale(1);   opacity: .4; }  /* 抬起 */
  100% { transform: translateX(-30px) scale(1);   opacity: 0; }   /* 淡出後回圈 */
}
@media (max-width: 480px) {
  .tc-grid--preview { grid-template-columns: 1fr; }
}
