/* =========================================================
   PlayMatch v11 — midnight-soft 結構樣式(全站共用 + 首頁)
   代幣一律取自 theme-midnight-soft.css,禁寫死色值。
   佈局概念:手機優先、底部 tab bar、卡片密度高、大圓角。
   ========================================================= */

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); } /* 錨點跳轉讓出 sticky 頂欄 */

/* 全站滾輪主題化:深底禁原生亮灰滾輪(Firefox 走 scrollbar-color,WebKit 走偽元素) */
html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--coral) 32%, var(--bg)) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--coral) 30%, var(--bg));
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--coral) 50%, var(--bg)); }

/* 反白 / 點擊高亮 / 鍵盤焦點:一律吃主題色,蓋掉原生藍 */
::selection { background: color-mix(in srgb, var(--coral) 28%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; /* 手機點擊不閃原生灰黑高亮(:active / hover 回饋已足) */
  padding-bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); /* 讓出底部 tab bar(含 iOS safe area) */
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; } /* 分頁面板 / 條件區塊用 hidden 屬性切換;帶 display 的 class(如 .bo-card 的 grid)不得蓋過 */
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font-family: inherit; }
/* 表單基準:去原生外觀、主題 caret / placeholder、字級 >=16px(iOS 聚焦不觸發縮放) */
input, textarea, select {
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px;
  caret-color: var(--coral);
  accent-color: var(--coral);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
svg { width: 1em; height: 1em; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; letter-spacing: .01em; } /* serif 只載到 700,900 會假粗 */

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.section { padding: 44px 0; }

/* 漸層字(標題強調) */
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 進場動畫 ---------- */
.reveal { opacity: 0; transform: translateY(22px) scale(.985); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .hero-badge .dot, .stack-card { animation: none; } /* 首屏無限動畫一併停用 */
}

/* ---------- 頂欄 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--header-h);
  padding: 0 18px;
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-brand); color: var(--on-accent);
  box-shadow: var(--shadow-pop);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-weight: 900; font-size: 19px; letter-spacing: .01em; }
.brand-name em { font-style: normal; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 桌機膠囊 nav(手機隱藏,由 tab bar 接手) */
.pillnav {
  display: none;
  align-items: center; gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 5px;
}
.pillnav-link {
  padding: 8px 20px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 15px; color: var(--text-soft);
  transition: all .25s var(--ease);
}
.pillnav-link:hover { color: var(--text); }
.pillnav-link.is-current { background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }

.topbar-login {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--grad-brand); color: var(--on-accent);
  font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-pop);
  transition: transform .25s var(--ease);
}
.topbar-login:hover { transform: translateY(-2px); }
.topbar-login svg { width: 15px; height: 15px; }

@media (min-width: 900px) {
  .pillnav { display: inline-flex; }
  body { padding-bottom: 0; }
}

/* ---------- 手機底部 tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); /* safe area 外加,內容盒不被壓縮 */
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--text-faint);
  transition: color .2s;
}
.tab svg { width: 21px; height: 21px; }
.tab.is-current { color: var(--coral); }
.tab-home { transform: translateY(-10px); }
.tab-home-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-brand); color: var(--on-accent);
  box-shadow: var(--shadow-pop);
}
.tab-home-btn svg { width: 21px; height: 21px; }
.tab-home span:last-child { color: var(--text-faint); }
.tab-home.is-current span:last-child { color: var(--coral); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-pill);
  font-weight: 800; font-size: 15px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad-brand); color: var(--on-accent); box-shadow: var(--shadow-pop); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px color-mix(in srgb, var(--coral) 28%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }
.btn-soft { background: var(--violet-soft); color: var(--violet); }
.btn-soft:hover { background: var(--surface-2); }
.btn-block { width: 100%; }

/* ---------- 區塊標頭 ---------- */
.section-head { margin-bottom: 22px; }
.section-head .eyebrow,
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-pill);
  background: var(--violet-soft); color: var(--violet);
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(24px, 4.5vw, 34px); }
.section-head p { color: var(--text-soft); margin-top: 6px; font-size: 15px; }

/* ---------- 標籤 chip ---------- */
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--surface); border: 2px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--text-soft);
  white-space: nowrap;
  transition: all .25s var(--ease);
}
.tag-chip svg { width: 14px; height: 14px; }
.tag-chip:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-2px); }
.tag-chip.is-active { background: var(--grad-chip); border-color: transparent; color: var(--on-accent); box-shadow: var(--shadow-pop); }

/* ---------- 狀態 pill(彩色底) ---------- */
.worker-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 800;
}
/* 基底:狀態圓點(worker-status 內與篩選 chip 內共用;chip 用 [data-st] 覆寫色) */
.st-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.worker-status[data-st="idle"]    { background: var(--st-idle-soft);    color: var(--st-idle); }
.worker-status[data-st="enroute"] { background: var(--st-enroute-soft); color: var(--st-enroute); }
.worker-status[data-st="busy"]    { background: var(--st-busy-soft);    color: var(--st-busy); }
.worker-status[data-st="off"]     { background: var(--st-off-soft);     color: var(--st-off); }
.worker-status[data-st="hold"]    { background: var(--st-hold-soft);    color: var(--st-hold); }
.st-dot[data-st="idle"]    { background: var(--st-idle); }
.st-dot[data-st="enroute"] { background: var(--st-enroute); }
.st-dot[data-st="busy"]    { background: var(--st-busy); }
.st-dot[data-st="off"]     { background: var(--st-off); }
.st-dot[data-st="hold"]    { background: var(--st-hold); }

/* ---------- 身分切換(五端雛型展示用,左下浮動膠囊;正式版不存在) ---------- */
.role-switch {
  position: fixed; left: 14px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 65;
}
.role-switch summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-pill);
  background: var(--bg-elev); color: var(--text-soft);
  border: 1px solid var(--line); box-shadow: var(--shadow-soft);
  font-size: 12px; font-weight: 800;
}
.role-switch summary::-webkit-details-marker { display: none; }
.role-switch summary i { width: 8px; height: 8px; border-radius: 50%; background: var(--role-dot, var(--coral)); }
.role-switch-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  min-width: 190px; display: grid; gap: 2px;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 6px; box-shadow: var(--shadow-pop);
}
.role-switch-menu a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--text-soft);
}
.role-switch-menu a i { width: 8px; height: 8px; border-radius: 50%; }
.role-switch-menu a:hover { background: var(--surface-2); color: var(--text); }
.role-switch-menu a.is-current { background: var(--coral-soft); color: var(--coral); }
.role-switch-menu a small { margin-left: auto; font-size: 11px; color: var(--text-faint); font-weight: 700; }
@media (min-width: 900px) { .role-switch { bottom: 22px; } }

/* ---------- 夥伴 App 卡 ---------- */
.worker-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.worker-card:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-pop); }
.worker-photo { position: relative; aspect-ratio: 4 / 4.6; overflow: hidden; }
.worker-photo img { width: 100%; height: 100%; object-fit: cover; }
.worker-photo .worker-status { position: absolute; top: 10px; left: 10px; z-index: 2; }
/* 疊在照片上的狀態 pill:*-soft 低透明底撐不住亮部照片 → 補一層深色墊底(background-image 疊在各狀態 soft 底色之上,狀態色仍透出) */
.worker-photo .worker-status,
.worker-status.wk-photo-st {
  background-image: linear-gradient(color-mix(in srgb, var(--bg) 55%, transparent), color-mix(in srgb, var(--bg) 55%, transparent));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.worker-info { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.worker-name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.worker-name strong { font-size: 17px; font-weight: 900; white-space: nowrap; }
.worker-name small { color: var(--text-faint); font-size: 12px; font-weight: 700; white-space: nowrap; }
.worker-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.worker-tags span {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill);
  background: var(--violet-soft); color: var(--violet);
}
.worker-tags span:nth-child(2) { background: var(--coral-soft); color: var(--coral); }
.worker-tags span:nth-child(3) { background: var(--amber-soft); color: var(--amber); }
/* margin-top:auto 把價格列釘在卡底,標籤行數不同也不會高低不均 */
.worker-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.worker-price {
  display: inline-flex; align-items: baseline; gap: 3px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--grad-chip); color: var(--on-accent);
  font-size: 12px; font-weight: 700;
}
.worker-price strong { font-family: var(--font-num); font-size: 15px; }
/* 0052:收費等級名(A 級 …)放在價格前,細字不搶價格 */
.worker-price .worker-tier { font-style: normal; font-size: 11px; font-weight: 800; opacity: .85; margin-right: 2px; }
.worker-served { font-size: 12px; color: var(--text-faint); font-weight: 700; white-space: nowrap; }

/* ---------- 頁首帶(內頁) ---------- */
.page-head { padding: 34px 0 6px; }
.page-head h1 { font-size: clamp(26px, 5.5vw, 38px); }
.page-head p { color: var(--text-soft); margin-top: 8px; font-size: 15px; }

/* ---------- modal ---------- */
.pm-modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); /* 深色主題:--text 是亮色,混出來變亮遮罩 → 改用 --bg 混深色遮罩 */
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.pm-modal.is-open { opacity: 1; pointer-events: auto; }
.pm-modal-box {
  width: min(88vw, 380px);
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 30px 26px; text-align: center;
  box-shadow: var(--shadow-pop);
  transform: translateY(16px) scale(.96); transition: transform .3s var(--ease);
}
.pm-modal.is-open .pm-modal-box { transform: none; }
.pm-modal-box h3 { font-size: 20px; margin-bottom: 10px; }
.pm-modal-box p { color: var(--text-soft); font-size: 14px; margin-bottom: 20px; }

/* ---------- 展示導覽(浮動;手機讓出 tab bar) ---------- */
.demo-next {
  position: fixed; right: 14px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 65;
  display: flex; flex-direction: column; gap: 2px;
  padding: 11px 18px; border-radius: var(--radius);
  background: var(--text); color: var(--bg-elev);
  box-shadow: 0 14px 34px rgba(4, 8, 16, .5); /* 深底上 --text 混色會變亮暈,固定深藍黑影 */
  transition: transform .25s var(--ease);
}
.demo-next:hover { transform: translateY(-3px); }
.demo-next-cap { font-size: 10px; letter-spacing: .12em; opacity: .65; font-weight: 700; }
.demo-next-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; }
.demo-next-label svg { width: 15px; height: 15px; }
@media (min-width: 900px) { .demo-next { bottom: 22px; } }

/* ---------- 頁尾 ---------- */
.site-footer { padding: 10px 18px 26px; }
.footer-card {
  max-width: var(--maxw); margin: 0 auto;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px 24px; box-shadow: var(--shadow-soft);
}
.footer-brandline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-brandline strong { font-size: 18px; font-weight: 900; }
.footer-slogan {
  font-size: 12px; font-weight: 800; color: var(--violet);
  background: var(--violet-soft); padding: 3px 12px; border-radius: var(--radius-pill);
}
.footer-desc { color: var(--text-soft); font-size: 13px; margin: 12px 0 16px; max-width: 480px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.footer-links a {
  font-size: 13px; font-weight: 700; color: var(--text-soft);
  padding: 7px 14px; border-radius: var(--radius-pill); background: var(--bg);
  transition: all .2s;
}
.footer-links a:hover { color: var(--coral); background: var(--coral-soft); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--text-faint); font-size: 12px;
}
.footer-legal a:hover { color: var(--coral); }

/* =========================================================
   首頁(index)
   ========================================================= */

/* ---------- hero:漸層 blob + 疊層夥伴小卡 ---------- */
.hero { position: relative; overflow: hidden; padding: 42px 0 30px; }
.hero-blobs { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: blob-drift 14s ease-in-out infinite alternate; }
/* 深底上 *-soft 透明度太低看不見,blob 改固定金 / 紫微光(低調但可辨) */
.blob-a { width: 340px; height: 340px; left: -120px; top: -80px; background: rgba(212, 175, 110, .30); }
.blob-b { width: 300px; height: 300px; right: -100px; top: 30px; background: rgba(124, 92, 214, .26); animation-delay: -5s; }
.blob-c { width: 260px; height: 260px; left: 30%; bottom: -140px; background: rgba(232, 180, 90, .22); animation-delay: -9s; }
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 26px) scale(1.15); }
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; gap: 30px; align-items: center;
}
.hero-copy .hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow-soft);
  font-size: 13px; font-weight: 800; color: var(--text-soft);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-idle); animation: pulse-dot 1.6s infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 var(--st-idle-soft); } 50% { box-shadow: 0 0 0 6px var(--st-idle-soft); } }
.hero-copy h1 { font-size: clamp(34px, 8vw, 58px); margin: 16px 0 14px; letter-spacing: -.01em; }
.hero-copy .sub { color: var(--text-soft); font-size: 16px; max-width: 440px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* 疊層小卡(微旋轉漂浮) */
.hero-stack { position: relative; height: 330px; }
.stack-card {
  position: absolute;
  width: 168px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: float-y 5s ease-in-out infinite alternate;
}
.stack-card img { aspect-ratio: 4 / 4.4; object-fit: cover; width: 100%; }
.stack-card .stack-meta { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; }
.stack-card .stack-meta strong { font-size: 14px; font-weight: 900; }
.stack-1 { left: 4%; top: 24px; transform: rotate(-7deg); z-index: 1; }
.stack-2 { left: 50%; top: 0; margin-left: -84px; z-index: 3; width: 182px; animation-delay: -1.6s; }
.stack-3 { right: 4%; top: 40px; transform: rotate(7deg); z-index: 2; animation-delay: -3.2s; }
@keyframes float-y {
  from { translate: 0 0; }
  to   { translate: 0 -14px; }
}
.hero-ticker {
  position: relative; z-index: 2;
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px;
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: var(--radius-pill);
  padding: 9px 16px; box-shadow: var(--shadow-soft);
  font-size: 13px; font-weight: 700; color: var(--text-soft);
}
.ticker-item strong { font-family: var(--font-num); font-size: 16px; color: var(--text); }
.ticker-item svg { width: 15px; height: 15px; color: var(--coral); }

@media (min-width: 900px) {
  .hero { padding: 64px 0 40px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero-stack { height: 380px; }
  .stack-card { width: 196px; }
  .stack-2 { width: 214px; margin-left: -107px; }
}

/* ---------- 興趣宮格 ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.cat-cell {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 6px 13px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-soft);
  font-size: 12px; font-weight: 800; color: var(--text-soft);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
}
.cat-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); color: var(--text); }
.cat-icon {
  width: 42px; height: 42px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cat-icon svg { width: 20px; height: 20px; }
.cat-cell:nth-child(3n+1) .cat-icon { background: var(--coral-soft); color: var(--coral); }
.cat-cell:nth-child(3n+2) .cat-icon { background: var(--violet-soft); color: var(--violet); }
.cat-cell:nth-child(3n)   .cat-icon { background: var(--amber-soft); color: var(--amber); }
.cat-more { background: var(--grad-brand); color: var(--on-accent); box-shadow: var(--shadow-pop); }
.cat-more:hover { color: var(--on-accent); }
.cat-more .cat-icon { background: rgba(255, 255, 255, .2); color: var(--on-accent); }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(8, 1fr); } }

/* ---------- 精選夥伴:橫向滑軌 ---------- */
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rail-more { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 800; color: var(--violet); white-space: nowrap; transition: color .2s var(--ease), transform .2s var(--ease); }
.rail-more:hover { color: var(--coral); transform: translateX(2px); }
.rail-more svg { width: 15px; height: 15px; }
.workers-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74%;
  gap: 14px; overflow-x: auto; padding: 6px 18px 18px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -18px;
}
.workers-rail::-webkit-scrollbar { display: none; }
.workers-rail .worker-card { scroll-snap-align: start; }
@media (min-width: 640px) { .workers-rail { grid-auto-columns: 40%; } }
@media (min-width: 900px) { .workers-rail { grid-auto-columns: minmax(0, 1fr); grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 6px 0 0; } }
@media (min-width: 1100px) { .workers-rail { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* ---------- 怎麼玩:粗進度直列步驟 ---------- */
.flow-list { display: grid; gap: 12px; counter-reset: flow; }
.flow-item {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 18px 18px 16px; box-shadow: var(--shadow-soft);
}
.flow-num {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-weight: 700; font-size: 19px;
  background: var(--grad-brand); color: var(--on-accent);
  box-shadow: var(--shadow-pop);
}
.flow-item:nth-child(2) .flow-num { background: var(--grad-warm); }
.flow-item:nth-child(3) .flow-num { background: var(--grad-cool); }
.flow-item:nth-child(4) .flow-num { background: var(--grad-chip); }
.flow-item h3 { font-size: 16px; margin-bottom: 3px; }
.flow-item p { color: var(--text-soft); font-size: 14px; }
.flow-note { margin-top: 16px; text-align: center; color: var(--text-soft); font-size: 14px; font-weight: 700; }
.flow-note em { font-style: normal; color: var(--coral); }
@media (min-width: 900px) {
  .flow-list { grid-template-columns: repeat(4, 1fr); }
  .flow-item { flex-direction: column; }
}

/* ---------- 安心玩:圖 + 彩色小磚 ---------- */
.safety-wrap { display: grid; gap: 18px; }
.safety-visual { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.safety-visual img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.eta-float {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elev); border-radius: var(--radius-pill);
  padding: 9px 15px; box-shadow: var(--shadow-pop);
  font-size: 13px; font-weight: 700;
}
.eta-float svg { width: 15px; height: 15px; color: var(--coral); }
.eta-float strong { color: var(--coral); }
.safety-tiles { display: grid; gap: 10px; }
.safety-tile {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-soft);
}
.safety-tile-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.safety-tile-icon svg { width: 20px; height: 20px; }
.safety-tile:nth-child(1) .safety-tile-icon { background: var(--violet-soft); color: var(--violet); }
.safety-tile:nth-child(2) .safety-tile-icon { background: var(--coral-soft); color: var(--coral); }
.safety-tile:nth-child(3) .safety-tile-icon { background: var(--amber-soft); color: var(--amber); }
.safety-tile h3 { font-size: 15px; margin-bottom: 2px; }
.safety-tile p { color: var(--text-soft); font-size: 13px; }
@media (min-width: 900px) {
  .safety-wrap { grid-template-columns: 1.1fr .9fr; align-items: center; }
}

/* ---------- 儲值 CTA:漸層滿版卡 ---------- */
.topup-banner {
  position: relative; overflow: hidden;
  background: var(--grad-brand); color: var(--on-accent);
  border-radius: var(--radius-lg);
  padding: 34px 24px; text-align: center;
  box-shadow: var(--shadow-pop);
}
.topup-banner::before,
.topup-banner::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.topup-banner::before { width: 180px; height: 180px; left: -60px; top: -60px; }
.topup-banner::after { width: 240px; height: 240px; right: -90px; bottom: -120px; }
.topup-banner h2 { font-size: clamp(22px, 4.5vw, 30px); position: relative; z-index: 1; }
.topup-banner p { position: relative; z-index: 1; margin: 8px 0 20px; opacity: .92; font-size: 14px; }
.topup-banner .btn { position: relative; z-index: 1; }
.topup-banner .btn-white { background: var(--bg-elev); color: var(--coral); box-shadow: 0 10px 26px rgba(4, 8, 16, .35); } /* 金漸層上的深色鈕;亮色 --text 混影改固定深藍黑影 */
.topup-banner .btn-white:hover { transform: translateY(-2px); }
.topup-banner .btn-line { background: transparent; color: var(--on-accent); border: 2px solid color-mix(in srgb, var(--on-accent) 45%, transparent); } /* 邊框吃同字色:金漸層上深字配白框會打架 */
.topup-banner .btn-line:hover { background: rgba(255, 255, 255, .14); }
.topup-banner .banner-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
