:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eef4ff;
  --grad-a: #2f6bf0;
  --grad-b: #5b4ae0;

  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #9ca3af;
  --line: #e9edf3;
  --line-2: #f1f4f8;
  --bg: #f5f7fb;
  --card: #fff;

  --ok: #16a34a;
  --ok-soft: #e8f7ee;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --bad: #dc2626;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .05);
  --tap: 44px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.6 -apple-system, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

/* ---------- 版面骨架：手機是一欄，桌機才長出側欄 ---------- */

.shell {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  flex: none;
}

.topbar .spacer { flex: 1; }

.tag-pro {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 5px;
  padding: 2px 6px;
  letter-spacing: .04em;
}

.main { padding: 16px; }

/* ---------- 餘額與錢包 ---------- */

.wallet-card {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.wallet-card .label {
  font-size: 12.5px;
  opacity: .85;
  letter-spacing: .02em;
}

.wallet-card .amount {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.wallet-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.bal-link {
  font-size: 12.5px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .45);
  padding-bottom: 1px;
}
.bal-link:hover { border-bottom-color: #fff; }

/* ---------- 分頁切換 ---------- */

.tabs {
  display: flex;
  gap: 6px;
  background: var(--card);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.tabs a {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.tabs a.on {
  background: var(--brand);
  color: #fff;
}

/* ---------- 卡片 ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}

.panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 18px 2px 8px;
  letter-spacing: .01em;
}

/* ---------- 搜尋 ---------- */

.search {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") no-repeat 13px center;
  margin: 12px 14px;
  width: calc(100% - 28px);
}
.search:focus {
  outline: none;
  border-color: var(--brand);
  background-color: #fff;
}

/* ---------- 清單列 ---------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-2);
  cursor: pointer;
  min-height: var(--tap);
}
.row:first-child { border-top: 0; }
.row:hover { background: #fafbfd; }
.row.on { background: var(--brand-soft); }
.row.is-empty { cursor: default; color: var(--ink-3); }

.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row .name {
  font-weight: 600;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row .code {
  font-size: 12px;
  color: var(--ink-3);
}

.row .price {
  font-weight: 700;
  color: var(--brand);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.row .qty { display: none; }

/* 國碼徽章：照參考設計，國碼放大當辨識點 */
.flag {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex: none;
  letter-spacing: .02em;
}

/* ---------- 標籤 ---------- */

.pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--line-2);
  color: var(--ink-2);
  flex: none;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- 按鈕 ---------- */

.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 0 18px;
  height: var(--tap);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .55; cursor: default; }

.btn-solid {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-solid:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-block { width: 100%; }

.btn-ghost {
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  border-color: var(--line);
  color: var(--brand);
}
.btn-ghost:hover { border-color: var(--brand); }

.btn-line {
  background: transparent;
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
  height: 38px;
  font-size: 14px;
}
.btn-line:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }

/* ---------- 購買列 ---------- */

.buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--line-2);
}
.buy-row:first-child { border-top: 0; }
.buy-row .term { font-weight: 600; font-size: 14.5px; }

/* ---------- 提示 ---------- */

.hint {
  font-size: 13px;
  color: var(--ink-3);
  padding: 12px 14px;
  margin: 0;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--warn-soft);
  border: 1px solid #f3e2bf;
  color: var(--warn);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13.5px;
  margin-bottom: 14px;
}

.notice-info {
  background: var(--brand-soft);
  border: 1px solid #d8e4ff;
  color: #1e40af;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
}

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.dot-ok { background: var(--ok); }
.dot-warn { background: #d97706; }
.dot-bad { background: var(--bad); }
.dot-idle { background: var(--ink-3); }

.empty {
  text-align: center;
  padding: 30px 18px;
}
.empty-title { font-weight: 600; margin: 0 0 4px; }
.empty-sub { color: var(--ink-3); font-size: 13.5px; margin: 0; }
.empty-line { color: var(--ink-3); padding: 18px 14px; margin: 0; text-align: center; }

.age { font-size: 12px; color: var(--ink-3); font-weight: 400; }

.foot-note {
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
  padding: 18px 8px 28px;
  margin: 0;
}

.langsel {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink-2);
}

/* ---------- 底部彈出面板 ---------- */

.wsheet {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 24, 39, .45);
  z-index: 60;
}
.wsheet.on { display: flex; }

.wsheet-card {
  background: var(--card);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 10px 18px 22px;
  animation: sheet-up .22s ease-out;
}

@keyframes sheet-up {
  from { transform: translateY(14px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wsheet-card { animation: none; }
}

.wsheet-grip {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 auto 12px;
}

.wsheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.wsheet-title { font-size: 16px; }

.wsheet-x {
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0 4px;
}
.wsheet-x:hover { color: var(--ink); }

.wsheet-lead { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.wsheet-fine { margin: 12px 0 0; color: var(--ink-3); font-size: 12.5px; }
.wsheet-note { margin: 0; display: flex; align-items: center; gap: 8px; min-height: 42px; font-size: 14.5px; }

.wsheet-foot {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.wsheet-foot:empty { margin-top: 0; }
.wsheet-foot .btn { flex: 1; }

/* 明細表：照參考設計的 key 左 value 右 */
.kv {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 4px 14px;
}
.kv div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line-2);
  font-size: 14px;
}
.kv div:first-child { border-top: 0; }
.kv span:first-child { color: var(--ink-2); }
.kv span:last-child { font-weight: 600; text-align: right; }
.kv .strong span:last-child { color: var(--brand); font-size: 16px; }

.wplans { display: flex; flex-wrap: wrap; gap: 8px; }
.wplan {
  flex: 1 1 86px;
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.wplan:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 桌機 ---------- */

@media (min-width: 900px) {
  .shell {
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .main { padding: 20px 24px 40px; }
  .cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
  .cols > * { min-width: 0; }
  .wallet-card { max-width: 420px; }
  .list { max-height: 68vh; }
}

/* ---------- 錢包卡細節 ---------- */

.wallet-card { position: relative; overflow: hidden; }

.wallet-glow {
  position: absolute;
  right: -40px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  pointer-events: none;
}

.wallet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.chain-chip {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.wallet-tagline {
  margin: 10px 0 0;
  font-size: 13px;
  opacity: .9;
  position: relative;
}

/* ---------- 數據帶 ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}

.stats div {
  background: var(--card);
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stats strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.stats span {
  font-size: 11px;
  color: var(--ink-3);
}

/* ---------- 服務色塊：同一個服務永遠同一色，但都是低彩度 ---------- */

.flag.t0 { background: #eef4ff; color: #2563eb; }
.flag.t1 { background: #eafaf1; color: #0f9d58; }
.flag.t2 { background: #fdf0f3; color: #c2375c; }
.flag.t3 { background: #fff6e8; color: #b45309; }
.flag.t4 { background: #f2f0fe; color: #6d4aec; }
.flag.t5 { background: #e9f8fb; color: #0e7490; }
.flag.t6 { background: #fdf1e7; color: #c2410c; }
.flag.t7 { background: #f0f3f7; color: #475569; }
.flag.t8 { background: #fbf0fb; color: #a21caf; }
.flag.t9 { background: #eef7ea; color: #4d7c0f; }

.row .name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.row:hover .flag { filter: brightness(.97); }

.row.on {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

@media (max-width: 420px) {
  .stats strong { font-size: 15.5px; }
  .stats span { font-size: 10.5px; }
}

/* ---------- 服務 LOGO：Simple Icons（CC0），下載在本地不外連 ---------- */
/* 🔴 用 mask 不用 <img>：原始 SVG 沒有 fill，當圖片載入會變成全黑。 */

.ico {
  width: 22px;
  height: 22px;
  display: block;
  background-color: var(--ico-c, var(--ink));
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

.ico-telegram { --ico: url("../img/services/telegram.svg"); --ico-c: #26A5E4; }
.ico-whatsapp { --ico: url("../img/services/whatsapp.svg"); --ico-c: #25D366; }
.ico-google { --ico: url("../img/services/google.svg"); --ico-c: #4285F4; }
.ico-3223 { --ico: url("../img/services/3223.svg"); --ico-c: #0866FF; }
.ico-instagram { --ico: url("../img/services/instagram.svg"); --ico-c: #E4405F; }
.ico-twitter { --ico: url("../img/services/twitter.svg"); --ico-c: #111827; }
.ico-tiktok { --ico: url("../img/services/tiktok.svg"); --ico-c: #111827; }
.ico-openai { --ico: url("../img/services/openai.svg"); --ico-c: #412991; }
.ico-discord { --ico: url("../img/services/discord.svg"); --ico-c: #5865F2; }
.ico-wechat { --ico: url("../img/services/wechat.svg"); --ico-c: #07C160; }
.ico-linemessenger { --ico: url("../img/services/linemessenger.svg"); --ico-c: #00C300; }
.ico-viber { --ico: url("../img/services/viber.svg"); --ico-c: #7360F2; }
.ico-tinder { --ico: url("../img/services/tinder.svg"); --ico-c: #FE3C72; }
.ico-uber { --ico: url("../img/services/uber.svg"); --ico-c: #111827; }
.ico-amazon { --ico: url("../img/services/amazon.svg"); --ico-c: #FF9900; }
.ico-netflix { --ico: url("../img/services/netflix.svg"); --ico-c: #E50914; }
.ico-apple { --ico: url("../img/services/apple.svg"); --ico-c: #111827; }
.ico-steam { --ico: url("../img/services/steam.svg"); --ico-c: #1B2838; }
.ico-paypal { --ico: url("../img/services/paypal.svg"); --ico-c: #003087; }

/* ---------- 信用卡式餘額卡：後面疊兩張做層次 ---------- */

.card-stack {
  position: relative;
  margin-bottom: 26px;
  padding-top: 10px;
}

.card-behind {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 2px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6a7fe8, #7b6ae6);
  opacity: .5;
}

.card-behind-2 {
  left: 20px;
  right: 20px;
  top: -5px;
  opacity: .28;
}

.wallet-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 85% 0%, #5b4ae0 0%, rgba(91, 74, 224, 0) 55%),
    linear-gradient(135deg, #2f6bf0 0%, #3d5fe8 45%, #5b4ae0 100%);
  box-shadow: 0 10px 30px rgba(47, 107, 240, .28);
  margin-bottom: 0;
}

/* 斜向高光，讓卡面不是一塊死色 */
.card-sheen {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 160%;
  background: linear-gradient(104deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .16) 46%, rgba(255, 255, 255, 0) 56%);
  pointer-events: none;
}

.card-glow {
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  pointer-events: none;
}

.wallet-card > * { position: relative; }

.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

/* 晶片 */
.card-chip {
  width: 34px;
  height: 25px;
  border-radius: 5px;
  background: linear-gradient(150deg, #f6d98a, #d9ab46 55%, #f3e3ad);
  position: relative;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.card-chip::before,
.card-chip::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1px;
  background: rgba(0, 0, 0, .18);
}
.card-chip::before { top: 8px; }
.card-chip::after { bottom: 8px; }

.wallet-card .label {
  font-size: 12px;
  opacity: .82;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.wallet-card .amount {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
}

.wallet-card .foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.card-holder {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.card-holder-k {
  font-size: 10.5px;
  opacity: .75;
  letter-spacing: .04em;
}

.card-holder-v {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-card .bal-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 12.5px;
}

.chain-chip {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .02em;
}

.flag-logo { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.flag-logo .ico { width: 21px; height: 21px; }

@media (min-width: 900px) {
  /* 🔴 後面疊的那兩張要跟著卡片收寬，不然桌機上會變成一條橫跨整頁的紫色帶。 */
  .card-stack { max-width: 420px; }
  .wallet-card { max-width: none; }
}

/* ======================================================================
   電腦版：不是把手機版拉寬，而是左邊固定欄（卡片＋數據＋導覽）＋右邊工作區。
   手機維持單欄，所以下面這些全部包在 min-width 裡。
   ====================================================================== */

.frame { display: block; }
.rail { padding: 16px 16px 0; }
.rail-note { display: none; }

@media (min-width: 980px) {
  .shell {
    max-width: 1240px;
    padding: 0 24px;
  }

  .topbar {
    padding: 14px 0;
    background: transparent;
    border-bottom: 1px solid var(--line);
  }

  .frame {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 22px 0 48px;
  }

  .rail {
    position: sticky;
    top: 78px;
    padding: 0;
  }

  .main { padding: 0; }

  /* 左欄：卡片、數據、導覽疊成一落 */
  .card-stack { max-width: none; margin-bottom: 20px; }
  .wallet-card { max-width: none; }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 16px;
  }
  .stats div { padding: 14px 8px; }
  .stats strong { font-size: 19px; }

  /* 導覽改直式，跟一般後台一樣 */
  .tabs {
    flex-direction: column;
    gap: 2px;
    padding: 6px;
  }
  .tabs a {
    text-align: left;
    padding: 11px 14px;
    font-size: 14.5px;
  }

  .rail-note {
    display: block;
    margin: 14px 2px 0;
    font-size: 12px;
    color: var(--ink-3);
    line-height: 1.5;
  }

  /* 右邊工作區：服務在左、國家在右，兩邊等高可各自捲 */
  .cols {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .sec-title { margin-top: 0; }

  .list { max-height: calc(100vh - 230px); }

  /* 右欄沒選服務時不要只有一行小字 */
  #countryPanel .hint {
    padding: 56px 20px;
    text-align: center;
    font-size: 14px;
  }

  .foot-note { text-align: left; padding: 18px 2px 0; }
}

@media (min-width: 1240px) {
  .cols { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
}

/* ---------- 三步驟結帳 ---------- */

.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink-3);
  font-size: 12px;
}

.step-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--line-2);
  color: var(--ink-3);
  flex: none;
}

.steps li.on { color: var(--ink); font-weight: 600; }
.steps li.on .step-n { background: var(--brand); color: #fff; }
.steps li.done { color: var(--ok); }
.steps li.done .step-n { background: var(--ok-soft); color: var(--ok); }

.step-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tips {
  background: var(--brand-soft);
  border: 1px solid #d8e4ff;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-top: 12px;
  color: #1e40af;
  font-size: 12.5px;
}
.tips strong { display: block; margin-bottom: 5px; }
.tips ul { margin: 0; padding-left: 16px; }
.tips li { margin: 2px 0; }

.num-card,
.code-card {
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  margin-bottom: 10px;
}

.num-card { background: #f8fafc; border: 1px solid var(--line); }
.code-card { background: var(--ok-soft); border: 1px solid #c7ebd5; }

.num-k {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.num-v {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  margin-top: 3px;
  user-select: all;
}

.code-v {
  font-size: 30px;
  font-weight: 800;
  color: var(--ok);
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  user-select: all;
}

.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--warn);
  margin-left: 4px;
}
