.lbDock.lbDockPreview [data-lb-wallet-pill],
.lbDock.lbDockPreview [data-lb-wallet-pill] > i { position: relative; }

.lbWalletTrigger {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: #ffffff24;
}
[data-lb-wallet-pill] > i > .lbWalletTrigger { inset: -7px -4px -7px -3px; }
@media (hover: hover) {
  .lbWalletTrigger:hover { box-shadow: inset 0 0 0 1px #ffffff30; }
}
.lbWalletTrigger:focus-visible { outline: 2px solid #e4bcff; outline-offset: 2px; }
[data-lb-wallet-pill] > i > .lbWalletTrigger:focus-visible { outline-offset: -3px; }

html:has(.lbPreviewWallet[open]) { overflow: hidden; }
.lbPreviewWallet {
  --lb-wallet-ink: #f7f2ea;
  --lb-wallet-muted: #bcb7ae;
  --lb-wallet-gold: #f2cc82;
  --lb-wallet-line: #ffffff20;
  --lb-wallet-dark: #141416;
  --lb-wallet-gutter: 24px;
  box-sizing: border-box;
  width: min(540px, calc(100% - 32px));
  max-width: none;
  height: min(726px, calc(100dvh - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  overflow: clip;
  color-scheme: dark;
  color: var(--lb-wallet-ink);
  background: var(--lb-wallet-dark);
  border: 1px solid #5a4e3a;
  border-radius: 21px;
  box-shadow: 0 27px 96px #000b;
  font: 500 15px/1.4 "Segoe UI Variable", "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
.lbPreviewWallet[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lbPreviewWallet[open]:has(.lbWalletFooter:not([hidden])) { height: min(640px, calc(100dvh - 32px)); }
.lbPreviewWallet [hidden] { display: none !important; }
.lbPreviewWallet::backdrop { background: #09090db8; }
.lbPreviewWallet button, .lbWalletMethod { touch-action: manipulation; -webkit-tap-highlight-color: #f2cc8233; }
.lbPreviewWallet :is(button, h2):focus-visible, .lbWalletMethod:has(input:focus-visible) {
  outline: 2px solid var(--lb-wallet-gold);
  outline-offset: -2px;
}

.lbWalletHeading {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  align-content: center;
  grid-template-rows: 44px 44px;
  padding: 4px 62px 8px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--lb-wallet-line);
  text-align: center;
}
.lbWalletStep { color: var(--lb-wallet-gold); font-size: 12px; letter-spacing: .035em; }
.lbWalletHeading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 790;
  line-height: 1.2;
  text-wrap: balance;
}
.lbWalletIconButton {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--lb-wallet-line);
  border-radius: 10px;
  color: var(--lb-wallet-ink);
  background: #ffffff08;
  cursor: pointer;
}
.lbWalletIconButton:hover { background: #ffffff18; border-color: #ffffff4d; }
.lbWalletClose, .lbWalletBack { position: absolute; bottom: 8px; }
.lbWalletClose { right: var(--lb-wallet-gutter); }
.lbWalletBack { left: var(--lb-wallet-gutter); }
.lbPreviewWallet .lbLocale--wallet { inset: 0 var(--lb-wallet-gutter) auto auto; z-index: 2; }
.lbPreviewWallet .lbLocale--wallet .lbLocaleOptions { inset-inline: auto 0; }

.lbWalletScroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 15px;
  scrollbar-color: #747071 transparent;
}
.lbWalletPanel { padding: 18px var(--lb-wallet-gutter) 20px; }
.lbWalletBalance {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 12px 15px;
  box-sizing: border-box;
  border: 1px solid #8c724788;
  border-radius: 14px;
  background: radial-gradient(ellipse at 15% 0%, #50391d, transparent 68%), linear-gradient(100deg,#2f231a,#211f23 74%);
  box-shadow: inset 0 1px #ffdd9d24;
}
.lbWalletBalance::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 72% 24%, #e9c88985 0 1px, transparent 1.7px),
    radial-gradient(circle at 66% 68%, #ccaa615e 0 1px, transparent 1.65px),
    radial-gradient(circle at 47% 34%, #ffe4a464 0 .8px, transparent 1.55px),
    radial-gradient(circle at 77% 76%, #e9c88976 0 1.25px, transparent 1.95px);
  pointer-events: none;
}
.lbWalletBalanceCoin { display: grid; place-items: center; }
.lbWalletBalanceCoin svg { width: clamp(33px, 10vw, 43px); height: auto; filter: drop-shadow(0 2px 8px #ffb53646); }
.lbWalletBalanceCopy { color: #e9d6bd; font-size: 13px; }
.lbWalletBalanceNumber { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 6px; }
.lbWalletBalanceNumber strong {
  color: var(--lb-wallet-ink);
  font-size: clamp(21px, 6.5vw, 32px);
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.lbWalletBalanceNumber span { color: var(--lb-wallet-gold); font-weight: 740; }
.lbWalletRefresh { color: var(--lb-wallet-gold); }
.lbWalletRefresh[aria-busy="true"] { opacity: .7; cursor: wait; }
@media (prefers-reduced-motion: no-preference) {
  .lbWalletRefresh[aria-busy="true"] svg { animation: lbWalletSpin .7s linear infinite; }
}
@keyframes lbWalletSpin { to { transform: rotate(360deg); } }

.lbWalletSectionHeading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 18px; }
.lbWalletPanel h3, .lbWalletMethods legend { margin: 0; padding: 0; font-size: 16px; font-weight: 760; line-height: 1.25; }
.lbWalletCurrency { color: var(--lb-wallet-muted); font-size: 12px; letter-spacing: .08em; }
.lbWalletNote, .lbWalletBalanceStatus { margin: 4px 0 9px; color: var(--lb-wallet-muted); font-size: 13px; }
.lbWalletBalanceStatus { margin: 6px 0 0; }
.lbWalletHistory { display:inline-flex;align-items:center;min-height:44px;color:var(--lb-wallet-gold);text-decoration:underline;text-underline-offset:3px; }
.lbWalletRetry {
  min-height: 44px;
  padding: 0 12px;
  color: var(--lb-wallet-gold);
  background: #2b231a;
  border: 1px solid #a48352;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}
.lbWalletRetry:hover { background: #3d3023; }
.lbWalletPlanList { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.lbWalletPlan {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 56px;
  padding: 5px 7px 5px 12px;
  box-sizing: border-box;
  border: 1px solid var(--lb-wallet-line);
  border-radius: 10px;
  background: #ffffff06;
}
.lbWalletPlan[data-reviewed] { border-color: #a6804e; background: #e6a95415; }
.lbWalletPlanCoin { display: grid; place-items: center; }
.lbWalletPlanCoin svg { width: 25px; height: 25px; }
.lbWalletPlanAmount { color: #e1c393; font-size: 12px; font-weight: 700; white-space: nowrap; }
.lbWalletPlanAmount strong { color: var(--lb-wallet-ink); font-size: clamp(15px, 4.4vw, 18px); font-variant-numeric: tabular-nums; }
.lbWalletPlanPrice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  align-items: center;
  min-height: 44px;
  min-width: 119px;
  padding: 0 7px 0 10px;
  border: 1px solid #8a7046;
  border-radius: 7px;
  color: #f7dba8;
  background: linear-gradient(#3c2f21,#2b221a);
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-align: right;
  cursor: pointer;
}
.lbWalletPlanPrice:hover { border-color: #eac680; color: #ffedce; background: #55402a; }
.lbWalletPlanPrice svg { width: 14px; }
.lbWalletPlanList[data-checking] .lbWalletPlanPrice { cursor: wait; }

.lbWalletSummary {
  display: grid;
  gap: 8px;
  margin: 10px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--lb-wallet-line);
  border-radius: 11px;
  background: #ffffff07;
}
.lbWalletSummary div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 8px; }
.lbWalletSummary dt { color: var(--lb-wallet-muted); }
.lbWalletSummary dd { margin: 0; font-weight: 720; font-variant-numeric: tabular-nums; text-align: right; }
.lbWalletSummary .lbWalletSummaryPay { padding-top: 8px; border-top: 1px solid var(--lb-wallet-line); }
.lbWalletSummaryPay dd { color: var(--lb-wallet-gold); font-size: 18px; }
.lbWalletMethods { min-width: 0; margin: 0; padding: 4px 0 0; border: 0; }
.lbWalletMethod {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 49px;
  box-sizing: border-box;
  margin-top: 7px;
  padding: 5px 10px;
  border: 1px solid var(--lb-wallet-line);
  border-radius: 9px;
  background: #ffffff05;
  cursor: pointer;
}
.lbWalletMethod:hover { border-color: #ffffff60; background: #ffffff0e; }
.lbWalletMethod:has(:checked) { border-color: #b79055; background: #4c381f61; }
.lbWalletMethod input { width: 16px; height: 16px; margin: 0; accent-color: var(--lb-wallet-gold); cursor: inherit; }
.lbWalletMethodIcon { display: grid; place-items: center; color: #dac5a3; }
.lbWalletMethod > :last-child {
  padding: 2px 6px;
  border: 1px solid #ffffff22;
  border-radius: 5px;
  color: #e0d8cb;
  font-size: 12px;
  text-align: right;
}
.lbWalletMethodDetails { margin: 10px 0 0; color: var(--lb-wallet-muted); font-size: 13px; }
.lbWalletFooter {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(132px,auto);
  align-items: center;
  gap: 12px;
  padding: 10px var(--lb-wallet-gutter) 12px;
  border-top: 1px solid var(--lb-wallet-line);
  color: var(--lb-wallet-muted);
  background: #ffffff04;
  font-size: 13px;
}
.lbWalletFooter button {
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid #84704f;
  border-radius: 8px;
  color: #e2cfad;
  background: #332c24;
  font: inherit;
  font-weight: 730;
}
.lbWalletFooter button:disabled { cursor: not-allowed; }

@media (max-width: 470px) {
  .lbPreviewWallet {
    --lb-wallet-gutter: 14px;
    width: calc(100% - 20px);
    max-width: calc(100% - max(20px, env(safe-area-inset-left) + env(safe-area-inset-right)));
    height: min(726px, calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom))));
    max-height: calc(100% - 24px);
    border-radius: 17px;
  }
  .lbWalletHeading { padding-inline: 61px; }
  .lbWalletHeading h2 { font-size: 22px; }
  .lbWalletPanel { padding-block: 14px; }
  .lbWalletPlan { gap: 7px; padding-left: 9px; }
}
@media (max-width: 350px) {
  .lbWalletPlanPrice { min-width: 97px; font-size: 13px; }
  .lbWalletPlanCoin svg { width: 20px; height: 20px; }
  .lbWalletMethod { gap: 5px; padding-inline: 7px; font-size: 13px; }
}
@media (forced-colors: active) {
  .lbWalletMethod:has(:checked), .lbWalletPlan[data-reviewed] { border-color: Highlight; }
}
