/* VidGrab membership UI — loaded after index.html's inline styles so it can
   reuse the same design tokens. Everything is namespaced with `vg-` to keep it
   removable in one step. */

:root {
  --vg-gold: #f5b942;
  --vg-gold-2: #ff9500;
  --vg-gold-dim: rgba(245, 185, 66, 0.12);
}

body.vg-locked { overflow: hidden; }

/* ------------------------------------------------------------ quota badge */

.nav-right { display: flex; align-items: center; gap: 10px; }

.vg-auth-loading { pointer-events: none; }
.nav-btn.vg-auth-loading { min-width: 92px; color: transparent; position: relative; }
.nav-btn.vg-auth-loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid var(--border-light); border-top-color: var(--accent-light); border-radius: 50%; animation: vg-auth-spin .8s linear infinite; }
.vg-page-skeleton { display: grid; gap: 14px; min-height: 320px; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); }
.vg-page-skeleton span { display: block; height: 42px; border-radius: 8px; background: linear-gradient(90deg, var(--bg-3), var(--border), var(--bg-3)); background-size: 200% 100%; animation: vg-auth-shimmer 1.4s ease-in-out infinite; }
.vg-page-skeleton span:first-child { width: 42%; height: 28px; }
.vg-page-skeleton span:last-child { width: 72%; }
@keyframes vg-auth-spin { to { transform: rotate(360deg); } }
@keyframes vg-auth-shimmer { 0%,100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .nav-btn.vg-auth-loading::after, .vg-page-skeleton span { animation: none; } }

.vg-quota {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 20px;
  font-size: 12px; color: var(--text-1); white-space: nowrap;
}
.vg-quota[hidden] { display: none !important; }
.vg-quota b { color: var(--text-0); }
.vg-quota .vg-pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0;
}
.vg-quota.low { border-color: rgba(255, 165, 2, 0.5); color: var(--text-0); }
.vg-quota.low .vg-pulse { background: var(--orange); box-shadow: 0 0 0 3px rgba(255, 165, 2, 0.2); }
.vg-quota.pro { border-color: rgba(245, 185, 66, 0.5); background: var(--vg-gold-dim); }
.vg-quota.pro .vg-pulse { background: var(--vg-gold); box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.18); }
/* Pro 临近到期：徽章从「状态展示」变成「待办提示」。 */
.vg-quota.pro.soon { border-color: rgba(255, 165, 2, 0.55); }
.vg-quota.pro.soon .vg-pulse { background: var(--orange); box-shadow: 0 0 0 3px rgba(255, 165, 2, 0.2); }
.vg-quota.pro.soon b { color: var(--orange); }
/* Trial spent: the badge becomes a standing invitation to upgrade. */
.vg-quota.out { border-color: rgba(255, 71, 87, 0.5); color: var(--text-0); cursor: pointer; }
.vg-quota.out b { color: var(--red); }
.vg-quota.out .vg-pulse { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.18); }

/* Trials spent: the primary download CTA becomes the upgrade entry point
   rather than a button that only ever answers 403. */
.grab-btn.vg-locked-cta {
  background: linear-gradient(135deg, var(--vg-gold), var(--vg-gold-2));
  color: #2a1a00;
}

.vg-vip-tag {
  font-size: 10px; font-weight: 800; color: #2a1a00;
  background: linear-gradient(135deg, var(--vg-gold), var(--vg-gold-2));
  padding: 1.5px 7px; border-radius: 5px; letter-spacing: .3px;
}
.vg-pro-tag {
  font-size: 9.5px; font-weight: 800; color: #2a1a00;
  background: linear-gradient(135deg, var(--vg-gold), var(--vg-gold-2));
  padding: 1.5px 5px; border-radius: 4px; letter-spacing: .3px;
}

/* ------------------------------------------------- locked quality options */

.quality-opt.locked {
  border-style: dashed;
  border-color: rgba(245, 185, 66, 0.45);
  background: rgba(245, 185, 66, 0.06);
}
.quality-opt.locked:hover { border-color: var(--vg-gold); background: rgba(245, 185, 66, 0.12); }
.quality-opt.locked .res { color: var(--vg-gold); }
.quality-opt.locked .size { color: var(--vg-gold); font-size: 14px; }

/* Over the per-file ceiling. Unlike a locked option, no upgrade unlocks it,
   so the card is inert and says why instead of inviting a click. */
.quality-opt.too-large {
  border-style: dashed;
  border-color: rgba(255, 71, 87, 0.35);
  background: rgba(255, 71, 87, 0.05);
  opacity: 0.75;
}
.quality-opt.too-large:hover { border-color: var(--red); background: rgba(255, 71, 87, 0.1); }
.quality-opt.too-large .res { color: var(--text-2); }
.quality-opt.too-large .size { color: var(--red); font-size: 11px; }

/* ---------------------------------------------------------- wait countdown */

.vg-wait {
  margin: 0 24px 16px; padding: 14px 18px;
  background: var(--bg-3); border: 1px dashed rgba(245, 185, 66, 0.45);
  border-radius: var(--radius); text-align: center;
}
.vg-wait-row { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13.5px; }
.vg-wait-num {
  font-size: 20px; font-weight: 800; color: var(--vg-gold);
  font-variant-numeric: tabular-nums; min-width: 26px;
}
.vg-wait-sub { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-2); }
.vg-wait-sub a { color: var(--vg-gold); font-weight: 600; cursor: pointer; }

/* ------------------------------------------------------------- ad slot */

.vg-ad {
  margin: 0 auto 56px; max-width: 1100px; padding: 0 24px;
}
.vg-ad-inner {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-2); border: 1px dashed var(--border-light);
  border-radius: var(--radius); padding: 14px 20px;
}
.vg-ad-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: var(--text-2); border: 1px solid var(--border-light);
  padding: 2px 7px; border-radius: 4px; flex-shrink: 0;
}
.vg-ad-txt { font-size: 13px; color: var(--text-1); flex: 1; min-width: 0; }
.vg-ad-cta {
  background: transparent; border: none; color: var(--vg-gold);
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
}

/* --------------------------------------------------------- history toolbar */

.vg-history-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.vg-history-bar h2 { margin-bottom: 0; }
.vg-history-note { font-size: 12px; color: var(--text-2); }
.vg-history-note b { color: var(--vg-gold); font-weight: 600; }
.vg-linkbtn {
  background: transparent; border: none; color: var(--text-2);
  font-size: 12.5px; cursor: pointer; font-family: inherit; text-decoration: underline;
}
.vg-linkbtn:hover { color: var(--text-0); }
.history-status .vg-retain { color: var(--text-2); font-size: 11px; margin-left: 8px; }

/* ---------------------------------------------------------------- overlays */

/* Shared easing: a fast start that settles gently (easeOutQuint-ish). No
   overshoot — a bouncy curve reads as "jumpy" on 60Hz and cheap on 120Hz. */
.vg-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
  background: rgba(5, 5, 10, 0.78);
  backdrop-filter: blur(4px);
  animation: vgScrimIn .24s ease-out;
  will-change: opacity;
}
@keyframes vgScrimIn { from { opacity: 0; } to { opacity: 1; } }
.vg-modal {
  position: relative;
  width: min(520px, 100%); background: var(--bg-1);
  border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .7); overflow: hidden;
  animation: vgPanelIn .34s cubic-bezier(.22, 1, .36, 1); margin: auto;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.vg-modal.wide { width: min(940px, 100%); }
.vg-modal.narrow { width: min(440px, 100%); }
/* 面板只做「上浮 + 淡入」，**不做 scale**：scale 会让整块文字在动画期间重新栅格化
   （中途发虚、边缘抖动），这是「不丝滑」最主要的来源。遮罩 .24s / 面板 .34s
   两段式，让背景先暗下来、面板随后落位，层次比同时开场更清楚。 */
@keyframes vgPanelIn {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Leaving: deliberately quicker than entering so dismissal feels responsive. */
.vg-overlay.vg-closing { animation: vgScrimOut .17s cubic-bezier(.4, 0, 1, 1) forwards; }
.vg-overlay.vg-closing .vg-modal {
  animation: vgPanelOut .17s cubic-bezier(.4, 0, 1, 1) forwards;
}
@keyframes vgScrimOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes vgPanelOut {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(0, -6px, 0); }
}

/* Same screen rendered again (tab switch, post-sign-in refresh): keep the
   frame perfectly still and let only the panel content settle in, instead of
   replaying the whole entrance. */
.vg-overlay.vg-instant { animation: none; }
.vg-overlay.vg-instant .vg-modal { animation: none; }
.vg-overlay.vg-instant .vg-auth { animation: vgPaneIn .2s cubic-bezier(.22, 1, .36, 1); }
@keyframes vgPaneIn {
  from { opacity: 0; transform: translate3d(0, 5px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .vg-overlay, .vg-modal,
  .vg-overlay.vg-closing, .vg-overlay.vg-closing .vg-modal,
  .vg-overlay.vg-instant .vg-auth { animation: none !important; }
}

.vg-close {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  background: transparent; border: none; color: var(--text-2);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px;
}
.vg-close:hover { color: var(--text-0); }
.vg-modal-head { position: relative; padding: 26px 26px 0; text-align: center; }
.vg-modal-head h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.vg-modal-head .vg-desc { font-size: 13px; color: var(--text-1); line-height: 1.65; }
.vg-modal-icon {
  width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 15px;
  display: flex; align-items: center; justify-content: center; font-size: 25px;
  background: linear-gradient(135deg, rgba(245, 185, 66, .22), rgba(255, 149, 0, .12));
  border: 1px solid rgba(245, 185, 66, .35);
}
.vg-modal-body { padding: 20px 26px; }
.vg-modal-foot { padding: 0 26px 24px; }
.vg-modal-foot .vg-sub {
  text-align: center; font-size: 12px; color: var(--text-2);
  margin-top: 12px; cursor: pointer;
}
.vg-modal-foot .vg-sub:hover { color: var(--text-1); }
/* 风险逆转：紧贴 CTA 下方，回答「买错了怎么办」。 */
.vg-trust {
  text-align: center; font-size: 11.5px; color: var(--text-2);
  margin: 10px 0 4px; line-height: 1.6;
}

/* ---------------------------------------------------------------- buttons */

.vg-btn {
  border: none; cursor: pointer; font-family: inherit; font-weight: 600;
  border-radius: var(--radius-sm); font-size: 13.5px; padding: 10px 20px;
  transition: all .15s;
}
.vg-btn:disabled { opacity: .5; cursor: not-allowed; }
.vg-btn-gold { background: linear-gradient(135deg, var(--vg-gold), var(--vg-gold-2)); color: #2a1a00; }
.vg-btn-gold:hover:not(:disabled) { filter: brightness(1.07); }
.vg-btn-primary { background: var(--accent); color: #fff; }
.vg-btn-primary:hover:not(:disabled) { background: var(--accent-light); }
.vg-btn-ghost { background: var(--bg-3); border: 1px solid var(--border); color: var(--text-1); }
.vg-btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-0); }
.vg-btn-block { width: 100%; padding: 13px; font-size: 15px; }
.vg-btn-row { display: flex; gap: 10px; justify-content: center; }

/* ------------------------------------------------------------ comparison */

.vg-cmp { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.vg-cmp-row { display: grid; grid-template-columns: 1fr 76px 92px; font-size: 12px; }
.vg-cmp-row > div { padding: 9px 13px; border-bottom: 1px solid var(--border); }
.vg-cmp-row:last-child > div { border-bottom: none; }
.vg-cmp-head > div { background: var(--bg-2); color: var(--text-2); font-weight: 700; font-size: 11px; }
.vg-cmp-row .yes { color: var(--green); text-align: center; font-weight: 700; }
.vg-cmp-row .no { color: var(--text-2); text-align: center; }
.vg-cmp-row .hi { color: var(--vg-gold); text-align: center; font-weight: 700; }

/* --------------------------------------------------------------- pricing */

.vg-regionbar {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; padding: 18px 26px 0;
}
.vg-rlabel { font-size: 12px; color: var(--text-2); }
.vg-rseg { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 24px; padding: 3px; }
.vg-rbtn {
  background: transparent; border: none; color: var(--text-1); font-family: inherit;
  font-size: 12.5px; font-weight: 600; padding: 7px 15px; border-radius: 20px; cursor: pointer; transition: all .15s;
}
.vg-rbtn:hover { color: var(--text-0); }
.vg-rbtn.active { background: var(--accent); color: #fff; }
/* 区域现在是服务端下发的只读结果（原先的可切换按钮是收入漏洞），用静态标签呈现。 */
.vg-rfixed {
  font-size: 12.5px; font-weight: 600; color: var(--text-0);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
}
.vg-rnote { font-size: 11.5px; color: var(--text-2); width: 100%; text-align: center; margin-top: 9px; line-height: 1.6; }

.vg-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 22px 26px 6px; }
.vg-plan {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 14px 16px; text-align: center; cursor: pointer; position: relative; transition: all .15s;
}
.vg-plan:hover { border-color: var(--border-light); transform: translateY(-2px); }
.vg-plan.sel { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent); }
.vg-plan.best { border-color: rgba(245, 185, 66, .55); }
.vg-plan .vg-flag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--vg-gold), var(--vg-gold-2)); color: #2a1a00;
  font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.vg-plan .vg-nm { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-1); }
/* 该套餐买到的权益档位（Pro · 2K / Pro · 4K）。放在价格上方，让「贵在哪」
   在扫价格的同时就能看到。 */
.vg-plan .vg-tier {
  display: inline-block; margin-bottom: 9px; padding: 2px 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .2px;
  color: var(--vg-gold); background: rgba(245, 185, 66, .12);
  border: 1px solid rgba(245, 185, 66, .3); border-radius: 20px;
  white-space: nowrap;
}
.vg-plan .vg-pr { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.vg-plan .vg-pr small { font-size: 12px; font-weight: 500; color: var(--text-2); }
.vg-plan .vg-per { font-size: 11px; color: var(--text-2); margin-top: 6px; min-height: 16px; }
.vg-plan .vg-save { font-size: 10.5px; color: var(--green); margin-top: 5px; font-weight: 600; min-height: 15px; }
/* 卡片内的权益清单：价格与权益同屏，切换套餐时这一块跟着换 —— 这就是
   「不同价位对应不同权益」在页面上的落点（数据来自 /api/plans，不硬编码）。 */
.vg-plan .vg-pbenefits {
  list-style: none; margin: 12px 0 0; padding: 11px 0 0;
  border-top: 1px dashed var(--border); display: grid; gap: 6px; text-align: left;
}
.vg-plan .vg-pbenefits li {
  position: relative; padding-left: 15px;
  font-size: 11.5px; color: var(--text-2); line-height: 1.45;
}
.vg-plan .vg-pbenefits li::before {
  content: '\2713'; position: absolute; left: 0; top: 0;
  color: var(--green); font-size: 10.5px; font-weight: 800;
}
.vg-plan.sel .vg-pbenefits li { color: var(--text-1); }
.vg-plan.sel .vg-pbenefits { border-top-color: var(--border-light); }

.vg-pricesec { padding: 4px 26px 26px; }
.vg-sticky-buy {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 18px; padding: 14px 18px;
  background: var(--bg-2); border: 1px solid var(--border-light); border-radius: var(--radius);
}
.vg-sticky-buy .vg-l { font-size: 12px; color: var(--text-2); }
.vg-sticky-buy .vg-l b { display: block; font-size: 16px; color: var(--text-0); font-weight: 800; }
.vg-legal { margin-top: 14px; font-size: 11px; color: var(--text-2); line-height: 1.7; text-align: center; }
/* 定价页 FAQ：把「到期 / 退款 / 换设备 / 激活码」四个异议直接答在付款前。 */
.vg-faq {
  margin-top: 16px; border-top: 1px solid var(--border);
  padding-top: 14px; display: grid; gap: 12px;
}
.vg-faq-item { display: grid; gap: 3px; }
.vg-faq-q { font-size: 12.5px; font-weight: 600; color: var(--text-0); }
.vg-faq-a { font-size: 12px; color: var(--text-2); line-height: 1.65; }

/* -------------------------------------------------------------- checkout */

.vg-paywrap { display: grid; grid-template-columns: 1fr 300px; }
.vg-payleft { padding: 26px; }
.vg-payleft h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.vg-payleft .vg-p { font-size: 12.5px; color: var(--text-2); margin-bottom: 18px; }
.vg-sec-label { font-size: 12.5px; color: var(--text-2); margin-bottom: 9px; }
.vg-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.vg-method {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2);
  cursor: pointer; transition: all .15s;
}
.vg-method:hover { border-color: var(--border-light); }
.vg-method.sel { border-color: var(--accent); background: var(--accent-dim); }
.vg-method .vg-ico {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
}
.vg-method .vg-tx strong { display: block; font-size: 13.5px; font-weight: 600; }
.vg-method .vg-tx span { font-size: 11px; color: var(--text-2); }
.vg-method .vg-radio {
  margin-left: auto; width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--border-light); flex-shrink: 0;
}
.vg-method.sel .vg-radio { border-color: var(--accent); background: radial-gradient(circle, #fff 0 34%, var(--accent) 36% 100%); }

.vg-orderbox { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); overflow: hidden; }
.vg-orderbox .vg-or {
  display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px;
  font-size: 12.5px; border-bottom: 1px solid var(--border); color: var(--text-1);
}
.vg-orderbox .vg-or:last-child { border-bottom: none; }
.vg-orderbox .vg-or b { color: var(--text-0); font-weight: 600; text-align: right; word-break: break-all; }
.vg-orderbox .vg-or.total b { font-size: 18px; color: var(--vg-gold); font-weight: 800; }

.vg-payright {
  padding: 26px; background: var(--bg-2); border-left: 1px solid var(--border);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.vg-payright .vg-ttl { font-size: 12.5px; color: var(--text-1); margin-bottom: 14px; }
.vg-qrcard { background: #fff; border-radius: var(--radius); padding: 10px; display: inline-block; position: relative; }
.vg-qr { display: grid; grid-template-columns: repeat(23, 1fr); width: 168px; height: 168px; background: #fff; }
.vg-qr i { display: block; }
.vg-qrcard .vg-qrmask {
  position: absolute; inset: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .82); font-size: 11px; color: #333; text-align: center;
  border-radius: 4px; line-height: 1.5; padding: 8px; font-weight: 600;
}
.vg-hosted {
  width: 172px; min-height: 168px; border: 1px dashed var(--border-light);
  border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center;
}
.vg-hosted .vg-hi { font-size: 26px; }
.vg-hosted .vg-ht { font-size: 12px; color: var(--text-0); font-weight: 600; line-height: 1.5; }
.vg-hosted .vg-hs { font-size: 10.5px; color: var(--text-2); line-height: 1.5; }
.vg-countdown { margin-top: 14px; font-size: 12.5px; color: var(--text-1); }
.vg-countdown b { color: var(--orange); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------- checkout, online modes */
/* Each mode reuses .vg-hosted's silhouette so the panel never jumps between
   deployments — only the wording (and the one control) changes. */

.vg-payhint {
  width: 100%; border: 1px dashed var(--border-light); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 20px 14px; text-align: center;
}
.vg-payhint .vg-hi { font-size: 26px; }
.vg-payhint .vg-ht { font-size: 12px; color: var(--text-0); font-weight: 600; line-height: 1.5; }
.vg-payhint .vg-hs { font-size: 11px; color: var(--text-2); line-height: 1.6; word-break: break-all; }
.vg-payhint.bad { border-color: rgba(255, 71, 87, 0.45); }
.vg-payhint.bad .vg-ht { color: var(--red); }

.vg-qrcard .vg-qr-img { width: 168px; height: 168px; object-fit: contain; display: block; border-radius: 4px; }
.vg-qrhint { margin-top: 8px; font-size: 11px; color: #333; font-weight: 600; }

/* 线下收款的傻瓜式三步：不解释流程，只给下一步该做什么。 */
.vg-steps { width: 100%; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.vg-step { display: flex; gap: 9px; font-size: 11.5px; color: var(--text-1); line-height: 1.55; }
.vg-step b {
  flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%; font-size: 10.5px;
  display: flex; align-items: center; justify-content: center;
  background: var(--vg-gold-dim); color: var(--vg-gold); font-weight: 700;
}

/* 订单号旁边的复制键：线下核销要靠它，不能让人手抄。 */
.vg-orderbox .vg-or .vg-copybtn {
  padding: 3px 9px; font-size: 11px; margin-left: 8px; flex-shrink: 0; align-self: center;
}

/* ---------------------------------------------- success screen: bind account */

.vg-bind {
  width: 100%; text-align: left; margin-top: 16px; padding: 16px 18px;
  border: 1px solid rgba(245, 185, 66, 0.35); border-radius: var(--radius);
  background: var(--vg-gold-dim);
}
.vg-bind.ok { border-color: rgba(46, 204, 113, 0.35); background: rgba(46, 204, 113, 0.08); }
.vg-bind-t { font-size: 13.5px; font-weight: 700; color: var(--text-0); margin-bottom: 6px; }
.vg-bind-s { font-size: 12px; color: var(--text-1); line-height: 1.65; margin-bottom: 12px; }
.vg-bind.ok .vg-bind-s { margin-bottom: 0; }
.vg-bind .vg-sub { text-align: center; margin-top: 8px; }
.vg-hintm { margin-top: 12px; font-size: 11px; color: var(--text-2); line-height: 1.6; }
.vg-simbtn {
  margin-top: 18px; width: 100%; padding: 11px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border-light); background: transparent; color: var(--text-1);
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.vg-simbtn:hover:not(:disabled) { color: var(--text-0); border-color: var(--accent); }
.vg-simbtn:disabled { opacity: .45; cursor: not-allowed; }
.vg-paylink {
  display: inline-block; margin-top: 10px; font-size: 12px; color: var(--accent-light);
  word-break: break-all;
}

/* --------------------------------------------------------------- success */

.vg-succ { padding: 52px 26px; text-align: center; }
.vg-succ .vg-ring {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 210, 160, .12); border: 1px solid rgba(0, 210, 160, .4);
  font-size: 34px; animation: vgRingIn .5s cubic-bezier(.2, 1.4, .4, 1);
}
/* 庆祝性的弹入只留给成功页的圆环 —— 弹窗面板本身不做 scale（见 vgPanelIn）。 */
@keyframes vgRingIn {
  from { opacity: 0; transform: scale(.62); }
  to { opacity: 1; transform: scale(1); }
}
.vg-succ h2 { font-size: 23px; font-weight: 800; margin-bottom: 8px; }
.vg-succ .vg-s { font-size: 13.5px; color: var(--text-1); margin-bottom: 22px; }
.vg-recap {
  max-width: 420px; margin: 0 auto 24px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--bg-2); text-align: left;
}
.vg-recap .vg-r {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px;
  font-size: 12.5px; border-bottom: 1px solid var(--border); color: var(--text-1);
}
.vg-recap .vg-r:last-child { border-bottom: none; }
.vg-recap .vg-r b { color: var(--text-0); }
.vg-recap .vg-r b.gold { color: var(--vg-gold); }

/* --------------------------------------------------------- member centre */

.vg-mem { padding: 26px; }
.vg-member-page #vgMemberPage {
  max-width: 1100px; margin: 0 auto 28px;
}
.vg-member-page .vg-page-head { max-width: 1100px; margin-left: auto; margin-right: auto; text-align: left; }
.vg-member-page .vg-page-head p { max-width: 560px; }
.vg-mem-dashboard { padding: 0; }
.vg-dashboard-top { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .82fr); gap: 16px; }
.vg-dashboard-pass, .vg-dashboard-account, .vg-member-content {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .18);
}
.vg-dashboard-pass {
  overflow: hidden; min-height: 326px;
  border-color: rgba(108, 92, 231, .52);
  background: radial-gradient(circle at 83% 18%, rgba(108, 92, 231, .27), transparent 36%),
    linear-gradient(135deg, #211c42 0%, #15151e 66%);
}
.vg-pass-main { padding: 28px; }
.vg-pass-eyebrow, .vg-section-kicker { display: block; color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.vg-pass-eyebrow { color: var(--vg-gold); }
.vg-pass-crown { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 7px; color: #261a00; background: var(--vg-gold); font-size: 13px; }
.vg-pass-main h2 { margin: 12px 0 6px; font-size: 29px; letter-spacing: -.5px; }
.vg-pass-main > p { margin: 0; max-width: 410px; color: var(--text-1); font-size: 13px; line-height: 1.7; }
.vg-pass-facts { display: grid; grid-template-columns: 1fr 1fr 1.35fr; margin-top: 24px; padding: 13px 0; border: 1px solid rgba(255, 255, 255, .09); border-radius: 11px; background: rgba(10, 10, 15, .29); }
.vg-pass-facts > div { min-width: 0; padding: 0 14px; border-right: 1px solid rgba(255, 255, 255, .09); }
.vg-pass-facts > div:last-child { border-right: 0; }
.vg-pass-facts span, .vg-pass-facts small { display: block; color: var(--text-2); font-size: 10.5px; line-height: 1.5; }
.vg-pass-facts b { display: block; overflow: hidden; margin: 4px 0 2px; color: var(--text-0); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.vg-pass-actions { display: flex; gap: 9px; margin-top: 18px; }
.vg-pass-actions .vg-btn { min-width: 104px; }
.vg-dashboard-account { padding: 22px; }
.vg-dashboard-section-head, .vg-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.vg-dashboard-section-head h2, .vg-pane-head h2 { margin-top: 5px; font-size: 17px; }
.vg-dashboard-textbtn { padding: 0; border: 0; background: none; color: var(--accent-light); cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; }
.vg-dashboard-textbtn:hover { color: var(--text-0); }
.vg-dashboard-textbtn span { padding-left: 2px; font-size: 18px; line-height: 0; vertical-align: -1px; }
.vg-account-identity { display: flex; align-items: center; gap: 11px; margin: 23px 0 16px; }
.vg-account-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid rgba(129, 112, 240, .52); border-radius: 12px; background: var(--accent-dim); color: var(--accent-light); font-weight: 800; }
.vg-account-identity b { display: block; max-width: 210px; overflow: hidden; color: var(--text-0); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.vg-account-identity small { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--text-2); font-size: 11px; }
.vg-account-identity small i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.vg-account-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 11.5px; }
.vg-account-row span { color: var(--text-2); }
.vg-account-row b { color: var(--text-1); font-weight: 550; text-align: right; }
.vg-account-note { margin-top: 13px; color: var(--text-2); font-size: 11px; line-height: 1.65; }
.vg-member-content { margin-top: 16px; padding: 22px; }
.vg-mem-dashboard > .vg-usage { margin-top: 16px; }
.vg-member-content .vg-tabs { margin-bottom: 22px; }
.vg-pane-head { margin-bottom: 15px; }
.vg-pane-head p { margin: 5px 0 0; color: var(--text-2); font-size: 11.5px; line-height: 1.55; }

/* ------------------------------------------------------------ account page */
.vg-account-page .vg-page-head { max-width: 1100px; margin-left: auto; margin-right: auto; text-align: left; }
.vg-page-back { display: inline-block; margin-bottom: 12px; color: var(--accent-light); font-size: 12.5px; text-decoration: none; }
.vg-page-back:hover { color: var(--text-0); }
.vg-account-layout { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(270px, .7fr); gap: 16px; max-width: 1100px; margin: 0 auto 30px; }
.vg-account-main { display: grid; gap: 12px; }
.vg-account-section, .vg-account-aside, .vg-account-empty { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 16px 46px rgba(0, 0, 0, .18); }
.vg-account-section { padding: 21px 22px; }
.vg-account-section h2 { font-size: 16px; margin-bottom: 5px; }
.vg-account-section > p { margin: 0 0 16px; color: var(--text-2); font-size: 11.5px; line-height: 1.6; }
.vg-account-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 15px; }
.vg-account-fields label { color: var(--text-1); font-size: 11.5px; font-weight: 600; }
.vg-account-fields input { box-sizing: border-box; display: block; width: 100%; margin-top: 7px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; outline: 0; background: var(--bg-2); color: var(--text-0); font: inherit; font-size: 13px; }
.vg-account-fields input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108, 92, 231, .12); }
.vg-account-method, .vg-account-linkrow { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.vg-account-method-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid rgba(129, 112, 240, .3); border-radius: 9px; background: var(--accent-dim); color: var(--accent-light); font-size: 16px; }
.vg-account-method > div, .vg-account-linkrow > div { flex: 1; min-width: 0; }
.vg-account-method b, .vg-account-linkrow b { display: block; color: var(--text-0); font-size: 12.5px; }
.vg-account-method small, .vg-account-linkrow small { display: block; overflow: hidden; margin-top: 4px; color: var(--text-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.vg-account-method em { padding: 5px 9px; border: 1px solid rgba(0, 210, 160, .38); border-radius: 999px; color: var(--green); font-size: 11px; font-style: normal; }
.vg-account-linkrow { justify-content: space-between; }
.vg-account-action { padding: 10px 0; color: inherit; text-decoration: none; }
.vg-account-action:hover b, .vg-account-action:hover strong { color: var(--accent-light); }
.vg-account-action strong { color: var(--text-2); font-size: 23px; font-weight: 400; }
.vg-account-danger { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.vg-account-danger > div { min-width: 0; }
.vg-account-danger > div p { margin-bottom: 0; }
.vg-account-danger .vg-btn { flex: 0 0 auto; color: #ff7d8a; border-color: rgba(255, 71, 87, .45); }
.vg-account-danger .vg-btn:hover { background: rgba(255, 71, 87, .1); color: #ff9aa4; }
.vg-dashboard-logout { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.vg-dashboard-logout p { margin: 0; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.vg-dashboard-signout { flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(255, 112, 128, .42); border-radius: 8px; background: transparent; color: #ff8795; font: 600 11px/1 inherit; cursor: pointer; }
.vg-dashboard-signout:hover:not(:disabled) { border-color: rgba(255, 140, 153, .72); background: rgba(255, 71, 87, .1); color: #ffb2bb; }
.vg-dashboard-signout:disabled { cursor: wait; opacity: .65; }
.vg-account-aside { align-self: start; padding: 22px; }
.vg-account-aside-user { display: flex; align-items: center; gap: 11px; margin: 18px 0; }
.vg-account-aside-user > span { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent-dim); border: 1px solid rgba(129, 112, 240, .45); color: var(--accent-light); font-weight: 800; }
.vg-account-aside-user b, .vg-account-aside-user small, .vg-account-aside-plan b, .vg-account-aside-plan small { display: block; }
.vg-account-aside-user b { max-width: 170px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.vg-account-aside-user small, .vg-account-aside-plan small { margin-top: 4px; color: var(--text-2); font-size: 11px; }
.vg-account-aside-plan { margin: 16px 0; padding: 13px 14px; border: 1px solid rgba(245, 185, 66, .32); border-radius: 10px; background: rgba(245, 185, 66, .07); }
.vg-account-aside-plan b { color: var(--vg-gold); font-size: 13px; }
.vg-account-empty { max-width: 560px; margin: 0 auto 28px; padding: 34px; text-align: center; }
.vg-account-empty h2 { font-size: 19px; }
.vg-account-empty p { margin: 10px auto 18px; max-width: 390px; color: var(--text-1); font-size: 13px; line-height: 1.7; }
.vg-account-inline { display: block; margin-top: 15px; color: var(--accent-light); font-size: 12px; }
.vg-memcard {
  background: linear-gradient(135deg, #241f47, #181820); border: 1px solid rgba(108, 92, 231, .4);
  border-radius: var(--radius-lg); padding: 20px 22px;
  display: flex; align-items: center; gap: 18px; margin-bottom: 20px; flex-wrap: wrap;
}
.vg-avatar {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800;
}
.vg-memcard .vg-who { flex: 1; min-width: 180px; }
.vg-memcard .vg-who h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.vg-memcard .vg-who .vg-sub { font-size: 12px; color: var(--text-1); }
.vg-memcard .vg-who .vg-sub b { color: var(--vg-gold); }
.vg-memcard .vg-act { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* 会员中心的第一屏只回答方案、期限、归属三件最关键的事；这些信息过去散在
   顶栏、权益卡和订单里，用户必须来回找才能确认自己购买的内容。 */
.vg-member-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin: -6px 0 14px;
}
.vg-summary-item {
  min-width: 0; padding: 13px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-2);
}
.vg-summary-item > span {
  display: block; margin-bottom: 5px; color: var(--text-2); font-size: 11.5px;
}
.vg-summary-item b {
  display: block; overflow: hidden; color: var(--text-0); font-size: 13px;
  line-height: 1.4; text-overflow: ellipsis; white-space: nowrap;
}
.vg-summary-item small {
  display: block; min-height: 30px; margin-top: 5px; color: var(--text-2);
  font-size: 11px; line-height: 1.45;
}

.vg-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.vg-tab {
  padding: 9px 16px; font-size: 13px; color: var(--text-1); cursor: pointer;
  border-bottom: 2px solid transparent; font-weight: 500;
}
.vg-tab.active { color: var(--text-0); border-bottom-color: var(--accent); font-weight: 600; }
.vg-pane { display: none; }
.vg-pane.active { display: block; }

.vg-benefit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.vg-bcard {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; display: flex; gap: 11px; align-items: flex-start;
}
.vg-bcard .vg-bi {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent-dim); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.vg-bcard .vg-bt { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.vg-bcard .vg-bd { font-size: 11px; color: var(--text-2); line-height: 1.5; }
.vg-bcard.locked { opacity: .55; }
.vg-bcard.locked .vg-bi { background: var(--bg-3); }

.vg-ordrow {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 9px; font-size: 12.5px; flex-wrap: wrap;
}
.vg-ordrow .vg-oid { color: var(--text-2); font-family: ui-monospace, monospace; font-size: 11.5px; }
.vg-ordrow .vg-op { flex: 1; font-weight: 600; min-width: 120px; }
.vg-ordrow .vg-amt { color: var(--vg-gold); font-weight: 700; }
.vg-ordrow .vg-ok { color: var(--green); font-size: 11.5px; font-weight: 600; }
.vg-ordrow .vg-bad { color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.vg-empty { font-size: 13px; color: var(--text-2); padding: 22px 0; text-align: center; }

@media (max-width: 860px) {
  .vg-dashboard-top { grid-template-columns: 1fr; }
  .vg-dashboard-pass { min-height: 0; }
}
@media (max-width: 640px) {
  .vg-member-page .vg-page-head { text-align: left; }
  .vg-pass-main, .vg-dashboard-account, .vg-member-content { padding: 18px; }
  .vg-pass-main h2 { font-size: 24px; }
  .vg-pass-facts { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .vg-pass-facts > div { padding: 11px 13px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .09); }
  .vg-pass-facts > div:last-child { border-bottom: 0; }
  .vg-pass-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .vg-pass-actions .vg-btn { min-width: 0; padding-left: 8px; padding-right: 8px; }
  .vg-member-content .vg-tabs { gap: 0; overflow-x: auto; flex-wrap: nowrap; }
  .vg-member-content .vg-tab { padding-left: 13px; padding-right: 13px; white-space: nowrap; }
  .vg-pane-head { align-items: flex-start; }
  .vg-account-layout { grid-template-columns: 1fr; }
  .vg-account-fields { grid-template-columns: 1fr; }
  .vg-account-section, .vg-account-aside { padding: 18px; }
  .vg-account-danger { align-items: flex-start; flex-direction: column; }
  .vg-account-danger .vg-btn { width: 100%; }
  .vg-dashboard-logout { align-items: flex-start; flex-direction: column; }
  .vg-dashboard-signout { width: 100%; min-height: 38px; }
}

.vg-redeem { display: flex; gap: 10px; max-width: 480px; }
.vg-redeem input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--text-0); font-size: 13px; outline: none;
  font-family: ui-monospace, monospace; letter-spacing: .5px; text-transform: uppercase;
}
.vg-redeem input:focus { border-color: var(--accent); }
.vg-redeem-hint { font-size: 11.5px; color: var(--text-2); margin-top: 10px; line-height: 1.7; max-width: 480px; }

/* --------------------------------------------------------------- batch */

.vg-batch { padding: 26px; }
.vg-batch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.vg-batch-head h2 { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.vg-ta {
  width: 100%; min-height: 104px; resize: vertical;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; color: var(--text-0); font-size: 12.5px; outline: none;
  font-family: ui-monospace, monospace; line-height: 1.7;
}
.vg-ta:focus { border-color: var(--accent); }
.vg-plist { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; max-height: 300px; overflow-y: auto; }
.vg-pitem {
  display: flex; align-items: center; gap: 12px; padding: 11px 15px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12.5px;
}
.vg-pitem .vg-idx {
  width: 22px; height: 22px; border-radius: 6px; background: var(--bg-3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-2); font-weight: 700;
}
.vg-pitem .vg-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vg-pitem .vg-d { font-size: 11px; color: var(--text-2); flex-shrink: 0; }
.vg-pitem .vg-st { font-size: 11px; color: var(--text-2); font-weight: 600; flex-shrink: 0; }
.vg-pitem .vg-st.done { color: var(--green); }
.vg-pitem .vg-st.run { color: var(--accent-light); }
.vg-pitem .vg-st.fail { color: var(--red); }
.vg-batchbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; background: var(--bg-2);
  border: 1px solid var(--border-light); border-radius: var(--radius); flex-wrap: wrap;
}
.vg-batchbar .vg-s { font-size: 12.5px; color: var(--text-1); }
.vg-pl-input { display: flex; gap: 8px; margin-bottom: 10px; }
.vg-pl-input input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 13px; color: var(--text-0); font-size: 12.5px; outline: none;
}
.vg-pl-input input:focus { border-color: var(--accent); }

/* ------------------------------------------------------- generic helpers */

.vg-note {
  margin: 0 26px 4px; padding: 11px 16px; border-radius: var(--radius-sm);
  background: var(--accent-dim); border: 1px solid rgba(108, 92, 231, .32);
  font-size: 12px; color: var(--text-1); line-height: 1.65;
}
.vg-note.warn { background: rgba(255, 165, 2, .1); border-color: rgba(255, 165, 2, .35); }
.vg-note b { color: var(--text-0); }
.vg-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--text-2); font-size: 13px; }

.vg-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-2); border: 1px solid var(--border-light); color: var(--text-0);
  padding: 12px 22px; border-radius: var(--radius); font-size: 13.5px; z-index: 9999;
  animation: vgToastIn .22s cubic-bezier(.22, 1, .36, 1); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); max-width: 90vw;
}
/* toast 从下沿轻轻浮起（不是原地淡入）—— 和弹窗同一套「上浮」语言。
   ⚠️ 关键帧必须带 translateX(-50%)，否则动画期间水平居中会丢。 */
@keyframes vgToastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.vg-toast.ok { border-color: rgba(0, 210, 160, .5); }
.vg-toast.err { border-color: rgba(255, 71, 87, .55); }
.vg-toast.warn { border-color: rgba(255, 165, 2, .55); }

/* ------------------------------------------- cross-device recovery (§22) */

.vg-link { color: var(--vg-gold); text-decoration: none; border-bottom: 1px dashed rgba(245, 185, 66, .5); }
.vg-link:hover { color: var(--vg-gold-2); }

/* "Keep this" block on the payment-success screen. */
.vg-cred {
  max-width: 460px; margin: 0 auto 22px; padding: 16px 18px; text-align: left;
  background: rgba(245, 185, 66, .07); border: 1px solid rgba(245, 185, 66, .34);
  border-radius: var(--radius);
}
.vg-cred-head { font-size: 12.5px; font-weight: 700; color: var(--vg-gold); margin-bottom: 12px; }
.vg-cred-rows { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); }
.vg-cred-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 13px;
  border-bottom: 1px solid var(--border); font-size: 12px;
}
.vg-cred-row:last-child { border-bottom: none; }
.vg-cred-row > span { color: var(--text-2); flex-shrink: 0; width: 52px; }
.vg-cred-row code {
  font-family: ui-monospace, monospace; font-size: 12.5px; letter-spacing: .6px;
  color: var(--vg-gold); font-weight: 700; word-break: break-all;
}
.vg-cred-acts { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.vg-cred-acts .vg-btn { font-size: 12.5px; padding: 9px 16px; }
.vg-cred-tip { font-size: 11.5px; color: var(--text-2); line-height: 1.75; margin-top: 12px; }
.vg-cred-tip b { color: var(--text-1); }

/* Generated activation link. */
.vg-linkbox { margin-top: 10px; }
.vg-link-row { display: flex; gap: 8px; align-items: stretch; }
.vg-link-input {
  flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 12px; color: var(--text-0);
  font-family: ui-monospace, monospace; font-size: 11.5px; outline: none;
}
.vg-link-input:focus { border-color: var(--accent); }
.vg-link-row .vg-btn { font-size: 12px; padding: 9px 16px; flex-shrink: 0; }
.vg-link-tip { font-size: 11px; color: var(--text-2); line-height: 1.7; margin-top: 8px; }

/* Credential list inside the member centre. */
.vg-claim-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 12px; flex-wrap: wrap; }
.vg-claim-title { font-size: 13.5px; font-weight: 700; }
.vg-claim-sub { font-size: 11.5px; color: var(--text-2); }
.vg-claim {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.vg-claim.revoked { opacity: .5; }
.vg-claim-line { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.vg-claim-line b { color: var(--text-0); }
.vg-claim-oid { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-2); }
.vg-claim-meta { font-size: 11.5px; color: var(--text-2); margin-top: 5px; }
.vg-claim-code { font-size: 12px; color: var(--text-1); margin-top: 7px; }
.vg-claim-code code {
  font-family: ui-monospace, monospace; font-size: 12.5px; letter-spacing: .6px;
  color: var(--vg-gold); font-weight: 700;
}
.vg-claim-code.dim { color: var(--text-2); font-style: italic; }
.vg-claim-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.vg-claim-acts .vg-btn { font-size: 11.5px; padding: 8px 14px; }
.vg-claim-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.vg-claim-hint { font-size: 11.5px; color: var(--text-2); }
.vg-claim-empty {
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px dashed var(--border-light);
  font-size: 12.5px; color: var(--text-1);
}
.vg-code-input {
  min-height: auto !important; font-family: ui-monospace, monospace !important;
  letter-spacing: .6px; text-transform: uppercase;
}

/* ------------------------------------------------------- accounts (§23) */

.nav-btn.vg-signed { border-color: rgba(63, 185, 80, .45); }

/* The account screen is the only one that does not sit inside a
   .vg-modal-body, so it carries its own edge padding — matching the 26px
   rhythm used by every other modal. */
.vg-auth { padding: 28px 28px 24px; }

/* Centered identity header — mirrors the paywall's .vg-modal-icon language,
   but in the accent-purple family so the "account" domain reads separately
   from the gold "payment" domain. */
.vg-auth-head { text-align: center; padding: 2px 0 20px; }
.vg-auth-icon {
  width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-light);
  background: linear-gradient(135deg, rgba(108, 92, 231, .22), rgba(108, 92, 231, .07));
  border: 1px solid rgba(108, 92, 231, .38);
}
.vg-auth-icon.ok {
  color: var(--green);
  background: linear-gradient(135deg, rgba(0, 210, 160, .18), rgba(0, 210, 160, .05));
  border-color: rgba(0, 210, 160, .38);
}
.vg-auth-title { font-size: 20px; margin: 0 0 7px; color: var(--text-0); letter-spacing: -.25px; text-align: center; }
.vg-auth-desc {
  font-size: 13px; color: var(--text-2); line-height: 1.65;
  max-width: 320px; margin: 0 auto;
}
.vg-auth-note { margin: 14px 0 4px; }
.vg-auth-trust {
  display: grid; grid-template-columns: 4px 1fr; column-gap: 10px; margin-top: 17px;
  padding: 11px 12px 11px 0; border-top: 1px solid var(--border);
  color: var(--text-1); font-size: 11.5px; line-height: 1.65;
}
.vg-auth-trust::before { content: ''; grid-row: span 2; width: 4px; border-radius: 999px; background: var(--green); }
.vg-auth-trust b { display: block; color: var(--text-1); font-size: 12px; }
.vg-auth-trust span { color: var(--text-2); }

/* Segmented method switch (email / phone) instead of the member-centre
   underline tabs — lighter inside a narrow modal. */
.vg-auth-seg {
  display: flex; gap: 4px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 11px; padding: 3px;
  margin-bottom: 18px;
}
.vg-seg-btn {
  flex: 1; border: none; background: transparent; color: var(--text-1);
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 0; border-radius: 8px; cursor: pointer;
  transition: color .15s, background .15s;
}
.vg-seg-btn:hover { color: var(--text-0); }
.vg-seg-btn.active {
  background: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 2px 10px rgba(108, 92, 231, .35);
}

.vg-field { margin-bottom: 15px; }
.vg-field label {
  display: block; font-size: 12px; color: var(--text-1);
  margin-bottom: 6px; letter-spacing: .02em; font-weight: 500;
}
.vg-field input {
  width: 100%; min-height: 44px; padding: 11px 14px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-0); font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.vg-field input::placeholder { color: var(--text-2); }
.vg-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Password visibility toggle inside the field. */
.vg-pw-wrap { position: relative; }
.vg-pw-wrap input { padding-right: 46px; }
.vg-pw-toggle {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text-2);
  cursor: pointer; border-radius: 8px; padding: 0;
  transition: color .15s, background .15s;
}
.vg-pw-toggle:hover { color: var(--text-0); background: var(--bg-hover); }

/* One primary action; registration and recovery are intentional secondary exits. */
.vg-auth-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.vg-auth-actions .vg-btn-block { min-height: 46px; margin: 0; font-size: 14.5px; }
.vg-auth-secondary { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.vg-auth-create { appearance: none; padding: 0; border: 0; background: transparent; color: var(--accent-light); cursor: pointer; font: inherit; font-weight: 650; }
.vg-auth-create:hover { color: var(--text-0); text-decoration: underline; }
.vg-auth-secondary .vg-link { margin-left: 7px; padding-left: 11px; border-left: 1px solid var(--border); border-bottom: 0; font-size: 12.5px; line-height: 1.5; }

.vg-code-row { display: flex; gap: 8px; align-items: stretch; }
.vg-code-row input { flex: 1; min-width: 0; }
.vg-code-row .vg-btn { flex-shrink: 0; font-size: 12.5px; padding: 0 16px; }

.vg-hint {
  font-size: 11.5px; color: var(--vg-gold); line-height: 1.7;
  background: var(--vg-gold-dim); border-radius: 8px;
  padding: 8px 10px; margin-top: 10px;
}

.vg-or {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 12px; color: var(--text-2); font-size: 11.5px;
}
.vg-or::before, .vg-or::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.vg-third-row { display: flex; gap: 10px; flex-wrap: wrap; }
.vg-third-row .vg-btn { flex: 1 1 120px; }
/* 品牌标记 + 名称。图标是单色的（跟随 currentColor），四个按钮摆在一起时
   不会互相抢视线；纯文字按钮在三四个并排时会读成一堆同质的方块。 */
.vg-third-row .vg-prov { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.vg-third-row .vg-prov svg { flex-shrink: 0; opacity: .9; }
.vg-third-row .vg-prov:disabled { opacity: .75; cursor: progress; }
/* 跳转到第三方站点前的等待指示：那 1–2 秒是对方的白屏，没有反馈用户会再点一次。 */
.vg-spin {
  width: 13px; height: 13px; flex-shrink: 0;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: vgSpin .7s linear infinite;
}
@keyframes vgSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vg-spin { animation-duration: 2.4s; } }

/* 第三方账号补绑邮箱（账号页）。只在「除了第三方之外没有任何进入方式」时出现，
   所以语气是「给你多加一条后路」，不是「你还缺一项配置」。 */
.vg-acct-bind {
  margin-top: 16px; padding: 14px 16px;
  background: var(--bg-2); border: 1px dashed var(--border-light); border-radius: 11px;
}
.vg-acct-bind .vg-bind-why { margin-bottom: 12px; line-height: 1.7; }
.vg-acct-bind .vg-field { margin-bottom: 10px; }
.vg-acct-bind .vg-field input {
  width: 100%; background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 13px; color: var(--text-0);
  font-size: 13px; outline: none; font-family: inherit;
}
.vg-acct-bind .vg-field input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}

.vg-acct-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 4px 14px;
}
.vg-acct-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: var(--text-2);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 13px; margin-bottom: 14px;
}
.vg-acct-strip b { color: var(--text-0); }
/* 未登录不是缺陷态：用正向口气陈述「权益已在本机生效」，而不是把「未登录」标红。 */
.vg-acct-strip.ok { border-color: rgba(46, 204, 113, 0.3); color: var(--text-1); }
.vg-acct-acts { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.vg-link.dim { color: var(--text-2); }
.vg-link.dim:hover { color: var(--text-1); }
/* 昵称 / 联系方式从购买动线挪到了会员中心，这里是它唯一的入口。 */
.vg-memedit { text-align: right; margin: -6px 0 14px; font-size: 11.5px; }
/* 会员中心顶部的续费提醒条。 */
.vg-renew-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 165, 2, 0.08); border: 1px solid rgba(255, 165, 2, 0.35);
  border-radius: 9px; padding: 10px 13px; margin-bottom: 14px;
  font-size: 12.5px; color: var(--text-1);
}
.vg-renew-strip b { color: var(--orange); }
.vg-renew-strip .vg-btn { flex-shrink: 0; padding: 7px 16px; font-size: 12.5px; }

@media (max-width: 640px) {
  .vg-auth { padding: 24px 18px 20px; }
  .vg-third-row { flex-direction: column; }
  .vg-auth-secondary .vg-link { margin-left: 0; padding-left: 0; border-left: 0; }
  .vg-acct-strip { flex-direction: column; align-items: flex-start; gap: 4px; }
  .vg-member-summary { grid-template-columns: 1fr; gap: 8px; }
  .vg-summary-item small { min-height: auto; }
}

@media (max-width: 860px) {
  .vg-plans { grid-template-columns: repeat(2, 1fr); }
  .vg-paywrap { grid-template-columns: 1fr; }
  .vg-payright { border-left: none; border-top: 1px solid var(--border); }
  .vg-modal { width: min(560px, 100%); }
}
@media (max-width: 640px) {
  .vg-overlay { padding: 12px; }
  /* 试用次数是试用模型唯一的进度指示器 —— 移动端原来直接 display:none，
     等于把最重要的进度信息藏起来。改成紧凑样式，并允许导航折行容纳。 */
  .nav-inner { flex-wrap: wrap; row-gap: 8px; }
  .nav-right { gap: 6px; }
  .nav-right .nav-btn { padding: 7px 10px; font-size: 12.5px; }
  .vg-quota { padding: 4px 9px; font-size: 11px; }
  .vg-history-bar { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------ M3 注册送额度 / M4 加固 */

/* 付费墙三 CTA（T3.1）：注册置顶时和「升级」拉开层次，别让两个主按钮打架。 */
.vg-modal-foot .vg-btn-block + .vg-btn-block { margin-top: 10px; }
.signup-hint { margin: -2px 0 6px; font-size: 11.5px; color: var(--text-2); text-align: center; }

/* 购买前置登录拦截弹层（T3.2）。 */
.vg-gate-plan {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px; font-size: 13px; color: var(--text-1);
}
.vg-gate-plan b { color: var(--vg-gold); }
/* 「登录成功后直接进收银台」的承诺行：收进套餐卡内，不再单独一张 note 卡。 */
.vg-gate-hint {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border);
  font-size: 11.5px; color: var(--text-2); line-height: 1.6;
}
/* 弹层里的次出口（激活码/恢复码找回）：必须是文字链接的权重——
   全局 .vg-link 继承 15px 字号还带常显虚线下划线，会和主 CTA 打架。 */
.vg-modal-foot .vg-link {
  display: block; text-align: center; margin-top: 13px;
  font-size: 13px; border-bottom: none;
}
.vg-modal-foot .vg-link:hover { border-bottom: 1px dashed rgba(245, 185, 66, .5); }

/* 注册利益点回显（T3.4）。 */
.vg-auth-promo {
  margin: 8px 0 2px; font-size: 12.5px; color: var(--vg-gold);
  background: var(--vg-gold-dim); border: 1px solid rgba(245, 185, 66, 0.3);
  border-radius: 8px; padding: 7px 10px;
}
.vg-auth-promo b { font-size: 14px; }

/* 合规同意勾选（T4.4）。 */
.vg-consent {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 11.5px; color: var(--text-2); line-height: 1.65;
  margin: 14px 0 4px; cursor: pointer;
}
.vg-consent input { margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }

/* 会员中心免费用量进度（T3.6）。 */
.vg-usage {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px; margin-bottom: 14px;
}
.vg-usage-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12.5px; color: var(--text-2);
}
.vg-usage-head b { color: var(--text-0); font-size: 13px; }
.vg-usage-bar {
  height: 6px; border-radius: 999px; background: var(--bg-3);
  overflow: hidden; margin: 9px 0 8px;
}
.vg-usage-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--vg-gold));
  transition: width 0.35s ease;
}
.vg-usage-tip { font-size: 11.5px; color: var(--text-2); line-height: 1.6; }
.vg-usage-tip b { color: var(--vg-gold); }

/* -------------------------------------------- 定价独立页（/pricing 页面） */
/* 同一套套餐渲染（.vg-plans / .vg-cmp / .vg-faq）原来活在 940px 的宽弹窗里，
   放到整页宽度会拉得过散 —— 收窄居中，让视觉重心落在套餐卡上。 */
.vg-page { padding: 44px 0 72px; }
.vg-page .container { max-width: 980px; }
.vg-page-head { text-align: center; margin-bottom: 22px; }
.vg-page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.vg-page-head p { margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.vg-page .vg-regionbar { padding: 0 0 2px; }
.vg-page .vg-plans { padding: 20px 0 6px; }
.vg-page .vg-pricesec { padding: 4px 0 0; }
.vg-page .vg-faq { margin-top: 22px; }
/* 拉不到套餐时不能只剩空白（页面模式无路可退，弹窗模式可以直接关掉）。 */
.vg-plans-error {
  grid-column: 1 / -1; padding: 22px 18px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text-1); margin: 20px 0 6px;
}

/* Pro 用户点「价格」进来时的状态条：先说清他已经是 Pro，再让他决定要不要叠加。 */
.vg-page-notice {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 0 auto 18px; padding: 11px 16px; max-width: 640px;
  background: var(--accent-dim); border: 1px solid var(--accent);
  border-radius: var(--radius); font-size: 13px; color: var(--text-0);
}
.vg-page-notice[hidden] { display: none; }
.vg-notice-link {
  background: transparent; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent-light); text-decoration: underline;
}

/* 移动端：套餐卡在 860px 折成 2 列后页面会被拉长，购买按钮跟着走会很容易
   被滚出视野 —— 按 PRD §6.10 的做法把它粘在底部（页面内粘性，非全站横幅）。 */
@media (max-width: 860px) {
  .vg-page { padding: 28px 0 56px; }
  .vg-page .vg-sticky-buy {
    position: sticky; bottom: 0; z-index: 5;
    box-shadow: 0 -14px 28px rgba(0, 0, 0, 0.5);
  }
}
@media (max-width: 640px) {
  .vg-page-head h1 { font-size: 24px; }
  .vg-page-head p { font-size: 13px; }
}
