/* ════════════════════════════════════════════════════════════
 * GamePay Mobile · Native-feeling mobile shell
 * 390 × 844 design baseline (iPhone 15 Pro)
 * ════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ───── PHONE PREVIEW SHELL (desktop only) ───── */
.gp-stage {
  min-height: 100vh;
  background: radial-gradient(ellipse at 30% 0%, #1a1d24, #050609 60%);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 32px 16px;
  transition: background .3s;
}
[data-theme="light"] .gp-stage {
  background: radial-gradient(ellipse at 30% 0%, #e6e7e0, #c8cac0 60%);
}
[data-theme="light"] .gp-stage-bezel { background: #2a2d35; box-shadow: 0 0 0 2px #4a4d55, 0 30px 100px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.1); }
[data-theme="light"] .gp-stage-bezel::before, [data-theme="light"] .gp-stage-bezel::after, [data-theme="light"] .gp-stage-bezel > .gp-side-r { background: #4a4d55; }
.gp-stage-bezel {
  width: 412px; height: 870px;
  background: #0a0b0f;
  border-radius: 56px;
  padding: 11px;
  box-shadow: 0 0 0 2px #2a2d35, 0 30px 100px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.05);
  position: relative;
  flex-shrink: 0;
  position: sticky; top: 32px;
}
.gp-stage-bezel::before, .gp-stage-bezel::after {
  content: ""; position: absolute; left: -3px; background: #1a1d24; border-radius: 2px 0 0 2px;
}
.gp-stage-bezel::before { top: 140px; width: 3px; height: 32px; }
.gp-stage-bezel::after  { top: 200px; width: 3px; height: 60px; box-shadow: 0 80px 0 #1a1d24; }
.gp-stage-bezel > .gp-side-r { position: absolute; right: -3px; top: 220px; width: 3px; height: 80px; background: #1a1d24; border-radius: 0 2px 2px 0; }

.gp-app {
  width: 100%; height: 100%;
  background: var(--bg-1);
  border-radius: 46px;
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
@media (max-width: 480px) {
  .gp-stage { padding: 0; min-height: 100dvh; align-items: stretch; }
  .gp-stage-bezel {
    width: 100vw; height: 100dvh; padding: 0; border-radius: 0;
    box-shadow: none; position: static;
  }
  .gp-stage-bezel::before, .gp-stage-bezel::after, .gp-stage-bezel > .gp-side-r { display: none; }
  .gp-app { border-radius: 0; }
}

/* ───── STATUS BAR (decorative) ───── */
.gp-status-bar {
  height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--ink-1);
  position: relative; z-index: 5;
}
.gp-status-bar .gp-island {
  position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  width: 110px; height: 32px; border-radius: 18px; background: #000;
}
.gp-status-bar .gp-status-r {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
}
.gp-status-bar .gp-batt {
  display: inline-block; width: 22px; height: 11px;
  border: 1.2px solid var(--ink-1); border-radius: 3px; padding: 1px; position: relative;
}
.gp-status-bar .gp-batt::after {
  content: ""; position: absolute; right: -3px; top: 50%; transform: translateY(-50%);
  width: 1.4px; height: 5px; background: var(--ink-1); border-radius: 0 1px 1px 0;
}
.gp-status-bar .gp-batt > span {
  display: block; width: 80%; height: 100%; background: var(--ink-1); border-radius: 1px;
}
@media (max-width: 480px) { .gp-status-bar { display: none; } }

/* ───── APP BAR (top) ───── */
.gp-appbar {
  min-height: 56px;
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  /* 用 grid 把左 / 中 / 右 三栏宽度独立 → 标题永远绝对居中
     左右两栏宽度相同（auto），但 title 列居中，无视左右内容多寡 */
}
.gp-appbar-inner {
  position: relative;
  height: 100%;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gp-appbar-leading,
.gp-appbar-actions {
  display: flex; align-items: center; gap: 2px;
  min-width: 36px; /* 让 title 居中始终成立 */
  z-index: 1;
}
.gp-appbar-actions { justify-content: flex-end; }
.gp-appbar.transparent { background: transparent; border-bottom-color: transparent; }
.gp-appbar.scrolled { background: color-mix(in srgb, var(--bg-1) 88%, transparent); border-bottom-color: var(--line); }
.gp-appbar-title {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  /* 给标题让出左右各 60px 空间，避免被两侧按钮压到 */
  max-width: calc(100% - 120px);
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  letter-spacing: -.005em;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
.gp-appbar-title.with-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.gp-appbar-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gp-appbar-logo {
  height: 50px;            /* 默认；被父组件传入的 logoHeight 覆盖 */
  width: auto;
  max-height: 70px;         /* 安全上限,防止用户配置过大撑爆 appbar */
  max-width: 120px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}
.gp-appbar-back,
.gp-appbar-action {
  width: 36px; height: 36px; border-radius: 18px; border: 0; background: transparent; color: var(--ink-1);
  display: grid; place-items: center; cursor: pointer; position: relative;
}
.gp-appbar-action[data-badge]::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px;
  background: var(--acc); border-radius: 50%; border: 2px solid var(--bg-1);
}

/* ───── SCROLL VIEWPORT ───── */
.gp-view {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  position: relative;
  background: var(--bg-1);
  scrollbar-width: none;
}
.gp-view::-webkit-scrollbar { display: none; }
.gp-view.with-tabbar { padding-bottom: 80px; }
.gp-view.with-cta-bar { padding-bottom: 152px; }

/* ───── BOTTOM TAB BAR ───── */
.gp-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 72px; flex-shrink: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--bg-1) 92%, transparent);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid var(--line-2);
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.gp-tabbar button {
  appearance: none; border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  color: var(--ink-3); cursor: pointer;
  position: relative;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .04em;
  transition: color var(--t-fast);
}
.gp-tabbar button[data-active="true"] { color: var(--ink-1); }
.gp-tabbar button[data-active="true"]::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 2px; background: var(--acc);
}
.gp-tabbar button[data-active="true"] .gp-tabicon { color: var(--acc); }
.gp-tabicon {
  width: 24px; height: 24px; display: grid; place-items: center;
  font-size: 18px; line-height: 1;
}
.gp-tablabel { font-size: 10px; font-weight: 600; letter-spacing: .02em; }

/* ───── COMMON ───── */
.gp-page { padding: 16px; }
.gp-page-pad { padding: 16px; }
.gp-stack { display: flex; flex-direction: column; }
.gp-h1 { font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: .95; letter-spacing: -.01em; margin: 0; }
.gp-h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.05; letter-spacing: -.005em; margin: 0; }
.gp-h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.1; margin: 0; }
.gp-mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.gp-mono-sm { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.gp-tab { font-feature-settings: "tnum"; }
.gp-meta { color: var(--ink-3); font-size: 12px; }
.gp-acc { color: var(--acc); }

/* ───── BUTTONS ───── */
.gp-btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 18px; height: 44px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  background: var(--bg-3); color: var(--ink-1);
  transition: transform var(--t-fast), background var(--t-fast);
}
.gp-btn:active { transform: scale(.97); }
.gp-btn[data-variant="primary"] {
  background: var(--acc); color: var(--acc-ink);
}
.gp-btn[data-variant="ghost"] {
  background: transparent; color: var(--ink-1); border: 1px solid var(--line-2);
}
.gp-btn[data-size="sm"] { height: 36px; padding: 0 14px; font-size: 13px; }
.gp-btn[data-size="lg"] { height: 52px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.gp-btn[data-block] { width: 100%; }
/* 禁用态：灰底灰字、明确不可用（覆盖 primary/ghost 变体） */
.gp-btn:disabled,
.gp-btn[disabled],
.gp-btn[data-variant="primary"]:disabled,
.gp-btn[data-variant="primary"][disabled],
.gp-btn[data-variant="ghost"]:disabled,
.gp-btn[data-variant="ghost"][disabled] {
  background: var(--bg-3);
  color: var(--ink-4);
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
}
.gp-btn:disabled:active { transform: none; }

.gp-icon-btn {
  appearance: none; border: 0; background: var(--bg-3); color: var(--ink-1);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
}

/* ───── CARDS ───── */
.gp-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

/* ───── DETAIL BLOCKS ─────
   详情页内容分层：页面 --bg-1，区块卡片 --bg-2，主卡 --bg-3 渐变提亮，
   靠背景深浅 + 边框 + 圆角制造层次与主次。 */
.gp-block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
}
.gp-block:first-child { margin-top: 0; }
/* 商品信息主卡：略微提亮 + 加重边框，作为页面视觉焦点 */
.gp-block-hero {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border-color: var(--line-2);
  box-shadow: var(--shadow-1);
}
.gp-block-title {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.gp-block-divider {
  height: 1px; background: var(--line);
  margin: 16px -16px;
}

/* ───── PILLS / CHIPS ───── */
.gp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  font-size: 12px; font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast);
}
.gp-pill[data-active="true"] {
  background: var(--acc); color: var(--acc-ink); border-color: var(--acc);
  font-weight: 600;
}

.gp-tag {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  font-size: 10px; font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: .06em; text-transform: uppercase;
  border-radius: 4px;
  background: rgba(255,255,255,.06); color: var(--ink-2);
}
.gp-tag[data-variant="acc"] { background: var(--acc); color: var(--acc-ink); }
.gp-tag[data-variant="warn"] { background: var(--warn); color: #2b1900; }
.gp-tag[data-variant="bad"] { background: var(--bad); color: #fff; }

/* ───── HSCROLL ───── */
.gp-hscroll {
  display: flex; gap: 10px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px;
  scroll-snap-type: x mandatory;
}
.gp-hscroll::-webkit-scrollbar { display: none; }
.gp-hscroll > * { flex-shrink: 0; scroll-snap-align: start; }

/* ───── COVER (game art procedural) ───── */
.gp-cover {
  position: relative;
  background: linear-gradient(135deg, var(--cover-a, #2a2f3a) 0%, var(--cover-b, #0c0d11) 100%);
  overflow: hidden;
  border-radius: 10px;
}
.gp-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.06) 3px 4px),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.07) 0%, transparent 50%);
  opacity: .8;
}
.gp-cover.art-grid::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(255,255,255,.05) calc(100% - 1px)),
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(255,255,255,.05) calc(100% - 1px));
  background-size: 20px 20px;
}
.gp-cover.art-halo::after {
  content: ""; position: absolute; inset: -20%;
  background: radial-gradient(circle at 60% 40%, rgba(var(--acc-glow), .2), transparent 50%);
  filter: blur(20px);
}
.gp-cover.art-dots::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 12px 12px;
}
.gp-cover.art-bars::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,.04) 12px 14px);
}
.gp-cover-title {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  font-family: var(--font-display); font-weight: 800;
  color: rgba(255,255,255,.92);
  letter-spacing: -.01em;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  line-height: .95;
}
.gp-cover-mono {
  position: absolute; left: 12px; top: 12px;
  font-family: var(--font-mono); font-size: 10px;
  color: rgba(255,255,255,.7);
  letter-spacing: .08em;
  z-index: 2;
}
.gp-cover-zone {
  position: absolute; right: 12px; top: 12px;
  padding: 4px 8px; border-radius: 4px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,.9); letter-spacing: .08em;
  z-index: 2;
}

/* ───── SECTION HEADER ───── */
.gp-section-h {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin: 24px 0 12px;
}
.gp-section-h .gp-section-tt { display: flex; flex-direction: column; gap: 2px; }
.gp-section-h .gp-section-eyebrow {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  letter-spacing: .1em; text-transform: uppercase;
}
.gp-section-h .gp-section-link {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: .04em; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.gp-section-h .gp-section-link:active { color: var(--acc); }

/* ───── PRODUCT CARD (mobile) ───── */
.gp-pcard {
  display: block; position: relative;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.gp-pcard:active { transform: scale(.98); }
.gp-pcard .gp-pcard-cover { aspect-ratio: 1/1; border-radius: 10px; }
/* 富文本展示 */
.gp-richtext { font-size: 14px; line-height: 1.8; color: var(--ink-2); word-break: break-word; }
.gp-richtext h1, .gp-richtext h2, .gp-richtext h3, .gp-richtext h4 { color: var(--ink-1); font-weight: 700; margin: 10px 0 6px; line-height: 1.35; }
.gp-richtext h3 { font-size: 16px; }
.gp-richtext p { margin: 6px 0; }
.gp-richtext ul, .gp-richtext ol { padding-left: 22px; margin: 6px 0; }
.gp-richtext a { color: var(--acc); text-decoration: underline; }
.gp-richtext img { max-width: 100%; border-radius: 8px; }
/* 限时秒杀倒计时徽标 */
.gp-flash-countdown {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #ff5a3a, #ff2d55);
  padding: 2px 7px; border-radius: 999px; letter-spacing: .02em;
  white-space: nowrap;
}
/* 轮播小圆点 */
.gp-banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.gp-banner-dots .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--line-2); transition: all .2s;
}
.gp-banner-dots .dot[data-active="true"] { width: 16px; background: var(--acc); }
/* 三列网格（首页热门/新品 + 列表网格） */
.gp-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gp-grid3 .gp-pcard-title { font-size: 12px; -webkit-line-clamp: 1; min-height: 0; }
.gp-grid3 .gp-pcard-price { font-size: 16px; }
/* 首页专区横排（一行紧凑卡片） */
.gp-zone-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.gp-zone-row::-webkit-scrollbar { display: none; }
.gp-zone-chip {
  flex: 1 1 0; min-width: 0;
  padding: 10px 8px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  cursor: pointer; text-align: center;
  transition: transform var(--t-fast);
}
.gp-zone-chip:active { transform: scale(.96); }
.gp-zone-chip .gp-zone-chip-name {
  font-size: 12px; font-weight: 600; color: var(--ink-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 悬浮客服按钮（可拖拽） */
.gp-cs-fab {
  position: absolute; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 70%, #000));
  color: var(--acc-ink, #07070a);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.35), 0 0 0 4px color-mix(in srgb, var(--acc) 18%, transparent);
  cursor: grab; touch-action: none; user-select: none;
  font-size: 11px; font-weight: 800; line-height: 1.05; text-align: center;
}
.gp-cs-fab:active { cursor: grabbing; }
.gp-cs-fab svg { display: block; }
.gp-pcard .gp-pcard-info { padding: 8px 2px 0; }
.gp-pcard .gp-pcard-title {
  font-size: 13px; font-weight: 600; line-height: 1.3;
  color: var(--ink-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}
.gp-pcard .gp-pcard-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
}
.gp-pcard .gp-pcard-price {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--ink-1);
}
.gp-pcard .gp-pcard-price-old {
  font-size: 11px; color: var(--ink-3); text-decoration: line-through; margin-left: 4px;
}

/* ───── LIST ROW (compact horizontal) ───── */
.gp-row {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.gp-row:active { background: var(--bg-2); margin: 0 -16px; padding: 12px 16px; border-radius: 0; }
.gp-row .gp-row-cover {
  width: 84px; height: 84px; flex-shrink: 0;
  border-radius: 8px;
}
.gp-row .gp-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* ───── SHEET (bottom action sheet) ───── */
.gp-sheet-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 100;
  animation: gp-fade .2s ease;
}
.gp-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-2);
  border-top-left-radius: 22px; border-top-right-radius: 22px;
  z-index: 101;
  max-height: 80%; display: flex; flex-direction: column;
  animation: gp-sheet-up .3s var(--ease-snap);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.gp-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px; background: var(--ink-3);
  opacity: .4; margin: 8px auto 4px;
}
.gp-sheet-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.gp-sheet-h .gp-sheet-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.gp-sheet-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.gp-sheet-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; }

@keyframes gp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gp-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ───── FULL DIALOG (centered) ───── */
.gp-dialog-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
  animation: gp-fade .2s ease;
}
.gp-dialog {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  width: 100%; max-width: 340px;
  padding: 20px;
}

/* ───── INPUTS ───── */
.gp-input {
  appearance: none;
  width: 100%;
  height: 44px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--ink-1);
  font-size: 14px;
  outline: none;
  transition: border-color var(--t-fast);
}
.gp-input:focus { border-color: var(--acc); }
.gp-input::placeholder { color: var(--ink-3); }
.gp-textarea {
  width: 100%; min-height: 88px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink-1);
  font-size: 14px;
  outline: none;
  resize: vertical;
}

/* ───── SEARCH BAR (in-page) ───── */
.gp-search {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  background: var(--bg-3); border-radius: 20px;
  color: var(--ink-3);
}
.gp-search svg { flex-shrink: 0; }
.gp-search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--ink-1); font-size: 14px;
}
.gp-search input::placeholder { color: var(--ink-3); }

/* ───── SEGMENTED CONTROL ───── */
.gp-seg {
  display: grid; padding: 3px;
  background: var(--bg-3); border-radius: 10px;
  font-size: 13px; font-weight: 500;
}
.gp-seg button {
  appearance: none; background: transparent; border: 0;
  padding: 8px; border-radius: 8px; cursor: pointer;
  color: var(--ink-2);
  transition: all var(--t-fast);
}
.gp-seg button[data-active="true"] {
  background: var(--bg-1);
  color: var(--ink-1);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* ───── LIST ITEM (clickable row, in cards or sections) ───── */
.gp-li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.gp-li:last-child { border-bottom: 0; }
.gp-li:active { background: var(--bg-3); }
.gp-li .gp-li-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg-3); color: var(--acc);
  font-size: 16px;
  flex-shrink: 0;
}
.gp-li .gp-li-main { flex: 1; min-width: 0; }
.gp-li .gp-li-title { font-size: 14px; font-weight: 500; }
.gp-li .gp-li-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.gp-li .gp-li-trail { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 4px; }

/* ───── BOTTOM CTA BAR (sticky) ───── */
.gp-cta-bar {
  position: absolute; left: 0; right: 0; bottom: 72px;
  padding: 10px 14px;
  background: rgba(15,17,22,.92);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid var(--line-2);
  display: flex; gap: 10px; align-items: center;
  z-index: 30;
}

/* ───── TOAST ───── */
.gp-toast {
  position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: rgba(0,0,0,.92);
  color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  z-index: 200;
  animation: gp-fade .2s ease;
  white-space: nowrap;
}

/* ───── HOME-specific ───── */
.gp-hero {
  position: relative;
  padding: 12px 16px 24px;
  overflow: hidden;
}
.gp-hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(255,255,255,.04) calc(100% - 1px)),
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(255,255,255,.04) calc(100% - 1px));
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 30% 30%, black, transparent 80%);
  pointer-events: none;
}
.gp-hero-eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--acc); letter-spacing: .12em; }
.gp-hero h1 { font-size: 56px; line-height: .85; margin: 8px 0 0; font-family: var(--font-display); font-weight: 800; }
.gp-hero h1 .acc { color: var(--acc); display: block; }
.gp-hero h1 .small { display: block; font-size: 14px; font-family: var(--font-body); font-weight: 500; color: var(--ink-3); letter-spacing: 0; text-transform: none; margin-top: 12px; line-height: 1.4; }
.gp-hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.gp-hero-stats .num { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.gp-hero-stats .lab { font-family: var(--font-mono); font-size: 9px; color: var(--ink-3); letter-spacing: .08em; }

/* zone tile (small) */
.gp-zone {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 12px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; min-height: 88px;
  position: relative; overflow: hidden;
}
.gp-zone:active { transform: scale(.97); }
.gp-zone .gp-zone-code { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--ink-1); }
.gp-zone .gp-zone-name { font-size: 11px; color: var(--ink-3); }
.gp-zone .gp-zone-glow {
  position: absolute; right: -20%; bottom: -20%;
  width: 70%; height: 70%;
  border-radius: 50%; opacity: .6;
}

/* limited deal card */
.gp-deal {
  background: linear-gradient(135deg, rgba(var(--acc-glow), .15) 0%, transparent 60%), var(--bg-2);
  border: 1px solid rgba(var(--acc-glow), .3);
  border-radius: 14px;
  padding: 16px;
  display: flex; gap: 14px;
  position: relative; overflow: hidden;
}
.gp-deal-cover {
  width: 88px; aspect-ratio: 1; flex-shrink: 0;
  border-radius: 10px;
}
.gp-deal-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.gp-deal-clock {
  font-family: var(--font-mono); font-size: 11px; color: var(--acc);
  letter-spacing: .08em;
}
.gp-deal-clock .seg { display: inline-block; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.4); margin: 0 2px; }

/* ───── Detail-specific ───── */
.gp-detail-hero {
  position: relative;
  margin: 0 -16px; /* full bleed inside .gp-page */
  aspect-ratio: 1/1; /* 默认正方形，匹配后台推荐的 1:1 封面，不裁剪 */
  background: var(--bg-2);
}
.gp-detail-hero .gp-cover { border-radius: 0; height: 100%; }
/* 真实图片用 contain 而不是 cover：保证完整显示，不被裁掉 */
.gp-detail-hero .gp-cover.gp-cover-img img {
  object-fit: contain;
}
/* 独立详情头图（1000×400 ≈ 2.5:1）：按比例展示并填满（cover） */
.gp-detail-hero.has-detail-img { aspect-ratio: 2.5 / 1; }
.gp-detail-hero.has-detail-img .gp-cover.gp-cover-img img { object-fit: cover; }
.gp-detail-thumbs {
  display: flex; gap: 6px; padding: 8px 16px 0;
  overflow-x: auto; scrollbar-width: none; margin: 0 -16px;
}
.gp-detail-thumbs::-webkit-scrollbar { display: none; }
.gp-detail-thumbs .gp-thumb {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer;
}
.gp-detail-thumbs .gp-thumb[data-active="true"] { border-color: var(--acc); }

.gp-sku-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.gp-sku {
  appearance: none; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink-1);
  border-radius: 10px;
  padding: 12px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left;
  transition: all var(--t-fast);
}
.gp-sku[data-active="true"] {
  border-color: var(--acc); background: rgba(var(--acc-glow), .08);
}
.gp-sku .gp-sku-label { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.gp-sku .gp-sku-price { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.gp-sku[data-active="true"] .gp-sku-price { color: var(--acc); }

.gp-tabs {
  display: flex; border-bottom: 1px solid var(--line);
  margin: 0 -16px; padding: 0 16px;
}
.gp-tabs button {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  padding: 12px 16px;
  font-size: 13px; font-weight: 500; color: var(--ink-3);
  position: relative;
}
.gp-tabs button[data-active="true"] {
  color: var(--ink-1); font-weight: 600;
}
.gp-tabs button[data-active="true"]::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px;
  height: 2px; background: var(--acc);
}

/* ───── Status timeline ───── */
.gp-timeline {
  position: relative; padding-left: 28px;
}
/* 竖线：宽 2px，位于 left:9px → 横向中心 = 10px */
.gp-timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line-2);
}
.gp-timeline-item {
  position: relative;
  padding: 0 0 20px;
}
/* 圆点：宽 12px（含 2px border, box-sizing: border-box），
   父容器 padding-left: 28，圆点 left: -24 → 圆点 left = 4，中心 = 4+6 = 10
   与竖线中心 10 对齐 ✓ */
.gp-timeline-item::before {
  content: ""; position: absolute; left: -24px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-1); border: 2px solid var(--ink-4);
  z-index: 1;
  box-sizing: border-box;
}
.gp-timeline-item[data-state="done"]::before { border-color: var(--acc); background: var(--acc); }
.gp-timeline-item[data-state="active"]::before {
  border-color: var(--acc); background: var(--acc);
  box-shadow: 0 0 0 4px rgba(var(--acc-glow), .25);
  animation: gp-pulse 1.6s ease infinite;
}
@keyframes gp-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(var(--acc-glow), .25); }
  50% { box-shadow: 0 0 0 8px rgba(var(--acc-glow), .12); }
}
.gp-timeline-item .gp-timeline-time {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
}
.gp-timeline-item .gp-timeline-title {
  font-size: 13px; font-weight: 600; margin-top: 2px;
}
.gp-timeline-item .gp-timeline-desc {
  font-size: 12px; color: var(--ink-3); margin-top: 2px;
}

/* ───── User stat cell ───── */
.gp-stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.gp-stat-row .gp-stat-cell { text-align: center; }
.gp-stat-row .gp-stat-cell + .gp-stat-cell { border-left: 1px solid var(--line); }
.gp-stat-row .num { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.gp-stat-row .lab { font-family: var(--font-mono); font-size: 9px; color: var(--ink-3); letter-spacing: .08em; margin-top: 2px; }

/* ───── Order summary box ───── */
.gp-summary { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.gp-summary-row { display: flex; justify-content: space-between; padding: 12px 14px; }
.gp-summary-row + .gp-summary-row { border-top: 1px dashed var(--line); }
.gp-summary-row.total { padding: 14px; background: rgba(var(--acc-glow), .04); }
.gp-summary-row .lab { color: var(--ink-3); font-size: 12px; }
.gp-summary-row .val { font-weight: 600; font-size: 14px; }
.gp-summary-row.total .val { font-family: var(--font-display); font-size: 24px; color: var(--acc); }

/* ───── Faq accordion ───── */
.gp-faq-item { border-bottom: 1px solid var(--line); }
.gp-faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; cursor: pointer;
}
.gp-faq-q .gp-faq-qt { font-size: 14px; font-weight: 500; padding-right: 16px; }
.gp-faq-q .gp-faq-toggle { color: var(--ink-3); transition: transform var(--t-base); }
.gp-faq-item[data-open="true"] .gp-faq-toggle { transform: rotate(45deg); color: var(--acc); }
.gp-faq-a { padding: 0 0 16px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ───── LIGHT THEME · component overrides ───── */
[data-theme="light"] .gp-status-bar .gp-island { background: #1a1d24; }
[data-theme="light"] .gp-cta-bar { background: color-mix(in srgb, var(--bg-1) 95%, transparent); }
[data-theme="light"] .gp-toast { background: rgba(20,22,28,.92); color: #fff; }
[data-theme="light"] .gp-tag { background: rgba(0,0,0,.06); color: var(--ink-2); }
[data-theme="light"] .gp-deal-clock .seg { background: rgba(0,0,0,.08); }
[data-theme="light"] .gp-cover-mono { color: rgba(0,0,0,.5); }
[data-theme="light"] .gp-cover-zone { background: rgba(0,0,0,.5); color: rgba(255,255,255,.95); }
[data-theme="light"] .gp-sheet-overlay,
[data-theme="light"] .gp-dialog-overlay { background: rgba(20,22,28,.45); }
[data-theme="light"] .gp-cover::before {
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.04) 3px 4px),
    radial-gradient(circle at 30% 30%, rgba(0,0,0,.06) 0%, transparent 50%);
}
[data-theme="light"] .gp-cover.art-grid::after,
[data-theme="light"] .gp-cover.art-bars::after {
  background-image:
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(0,0,0,.06) calc(100% - 1px)),
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(0,0,0,.06) calc(100% - 1px));
}
[data-theme="light"] .gp-hero-grid-bg {
  background-image:
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(0,0,0,.05) calc(100% - 1px)),
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(0,0,0,.05) calc(100% - 1px));
}

/* ───── Page enter animation ───── */
.gp-view > .gp-page-enter { animation: gp-page-in .25s var(--ease) both; }
@keyframes gp-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ───── Confetti for pay success ───── */
.gp-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 105; overflow: hidden; }
.gp-confetti span {
  position: absolute; top: -10px; width: 6px; height: 12px;
  animation: gp-confetti-fall 2.4s ease-in forwards;
}
@keyframes gp-confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ============ 真实图片封面 + SKU 缩略图 ============ */
.gp-cover.gp-cover-img {
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
}
.gp-cover.gp-cover-img::before,
.gp-cover.gp-cover-img::after {
  display: none;
}
.gp-cover.gp-cover-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 大图轮播 */
.gp-detail-thumbs .gp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* SKU 中显示图片：方形大图在上、文字在下 */
.gp-sku.has-image {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
}
.gp-sku-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--bg-3);
  overflow: hidden;
}
.gp-sku-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gp-sku.has-image .gp-sku-text {
  align-items: center;
  text-align: center;
}
.gp-sku-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

/* ============ 表单字段校验 - 行内错误提示 ============ */
.gp-field {
  position: relative;
  margin-bottom: 10px;
}
.gp-field:last-child { margin-bottom: 0; }

/* 错误态：边框红 + 浅色背景 + shake 一次 */
.gp-input.is-invalid,
.gp-textarea.is-invalid {
  border-color: var(--bad) !important;
  background: rgba(255, 90, 110, 0.06);
  animation: gpShake 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes gpShake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}
.gp-field-err {
  font-size: 11px;
  color: var(--bad);
  margin-top: 4px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: gpFadeIn 0.2s ease;
}
.gp-field-err::before {
  content: "⚠";
  font-size: 11px;
}
@keyframes gpFadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 顶部全局错误（仅用于非字段类错误，例如服务条款 / 服务端返回） */
.gp-form-err-banner {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 90, 110, 0.12);
  border: 1px solid rgba(255, 90, 110, 0.4);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  animation: gpFadeIn 0.2s ease;
}
