/* ===== 任天堂掌机游戏库 · 移动端商城 ===== */
:root {
  --red: #ff3d3d;
  --red-dark: #e01f1f;
  --purple: #7b5cff;
  --purple-dark: #5b3ce0;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #17181c;
  --sub: #8b8f9a;
  --line: #eef0f3;
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

/* ---------- 全屏容器（真机自适应，无手机外框） ---------- */
.phone {
  position: relative;
  width: 100%; height: 100vh; height: 100dvh;
  background: #fff; overflow: hidden;
}
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
}

/* ---------- 滚动区 ---------- */
.app { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; position: relative; }
.app::-webkit-scrollbar { display: none; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: #fff; padding: 8px 16px 12px;
  display: flex; align-items: center; gap: 8px;
}
.topbar.line { border-bottom: 1px solid var(--line); }
.topbar .title { font-size: 17px; font-weight: 700; }
/* 居中标题（没有返回键的页面，如「用户中心」） */
.topbar.center .title { flex: 1; text-align: center; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 32px; height: 32px; flex: none; border: 0; background: transparent; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); cursor: pointer; border-radius: 50%;
}
.icon-btn:active { background: #f0f1f4; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(140deg, #ff5252, #d81f1f);
  color: #fff; font-weight: 800; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(224, 31, 31, .3);
  overflow: hidden;
}
/* 后台配置了 Logo：用图片铺满，去掉字母底色与阴影 */
.brand-logo.has-img { background: transparent; box-shadow: none; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--sub); margin-top: 2px; }

/* ---------- 搜索框 ---------- */
.searchbar {
  margin: 0 16px 14px; height: 40px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--sub);
}
.searchbar input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--text); }
.searchbar input::placeholder { color: #b3b7c0; }

/* ---------- Banner ---------- */
.banner {
  margin: 0 16px 14px; border-radius: 18px; overflow: hidden; position: relative;
  background: linear-gradient(120deg, #ff4d4d 0%, #e01f1f 55%, #a8102e 100%);
  color: #fff; padding: 18px 16px; display: flex; align-items: center;
  box-shadow: 0 12px 26px rgba(224, 31, 31, .26);
}
.banner::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 62%);
}
.banner-txt { position: relative; z-index: 2; flex: 1; }
.banner-title { font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.banner-desc { font-size: 12.5px; opacity: .88; margin: 6px 0 12px; }
.banner-btn {
  border: 0; border-radius: 999px; padding: 8px 16px;
  background: #fff; color: #d81f1f; font-size: 12.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .16);
}
.banner-art { position: relative; z-index: 2; width: 118px; flex: none; }
.banner-art svg { display: block; width: 100%; height: auto; }

/* ---------- 四宫格入口 ---------- */
.grid4 {
  margin: 0 16px 14px; background: #fff; border-radius: var(--radius);
  padding: 16px 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.grid4 .g-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 0; background: transparent; cursor: pointer; padding: 4px 0;
}
.grid4 .g-ico {
  width: 46px; height: 46px; border-radius: 14px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 8px 16px -6px var(--c2);
}
.grid4 .g-txt { font-size: 12px; color: #3a3d45; font-weight: 500; }
.grid4 .g-item:active { transform: scale(.95); }

/* ---------- 区块 ---------- */
.section { margin: 0 16px 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-title { font-size: 15.5px; font-weight: 700; }
.section-more { font-size: 12.5px; color: var(--sub); display: inline-flex; align-items: center; gap: 2px; cursor: pointer; background: none; border: 0; font-family: inherit; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); }
.card-pad { padding: 14px; }

/* ---------- 模拟器行 ---------- */
.em-row { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border-radius: var(--radius); }
.em-row + .em-row { margin-top: 10px; }
.em-ico {
  width: 48px; height: 48px; flex: none; border-radius: 14px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; font-style: italic;
  background-image: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 10px 18px -8px var(--c2);
}
.em-main { flex: 1; min-width: 0; }
.em-name { font-size: 14.5px; font-weight: 700; }
.em-desc { font-size: 12px; color: var(--sub); margin-top: 4px; }
.btn-mini {
  flex: none; border: 0; border-radius: 999px; padding: 7px 15px;
  background: linear-gradient(120deg, var(--red), var(--red-dark));
  color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 14px -5px rgba(224, 31, 31, .8);
}
.btn-mini:active { opacity: .86; }

/* ---------- 游戏封面（GBA 外壳 + 游戏画面） ---------- */
.cover { position: relative; display: block; width: 100%; min-width: 0; aspect-ratio: 640 / 408; }
.cover-shell { display: block; width: 100%; max-width: 100%; height: auto; position: relative; z-index: 2; pointer-events: none; }
.cover-art {
  position: absolute; z-index: 1; overflow: hidden;
  background-image: linear-gradient(152deg, var(--c1), var(--c2));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff;
}
.cover-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0) 52%),
              radial-gradient(circle at 82% 8%, rgba(255, 255, 255, .32), transparent 46%);
}
.cover-shot { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-short {
  position: relative; z-index: 2; font-size: 12px; font-weight: 900; letter-spacing: 1px;
  text-align: center; line-height: 1.15; padding: 0 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35); font-style: italic;
}
.cover-name { position: relative; z-index: 2; font-size: 8.5px; opacity: .9; }

/* 5 款外壳的「屏幕镂空」位置（实测百分比；画面外扩一点藏在边框下，避免露边） */
.shell-1 .cover-art { left: 23.38%; top: 19.58%; width: 53.25%; height: 56.04%; }
.shell-2 .cover-art { left: 25.35%; top: 22.55%; width: 49.17%; height: 52.20%; }
.shell-3 .cover-art { left: 24.84%; top: 22.75%; width: 50.38%; height: 50.70%; }
.shell-4 .cover-art { left: 24.90%; top: 22.36%; width: 50.13%; height: 50.40%; }
.shell-5 .cover-art { left: 24.78%; top: 22.55%; width: 49.87%; height: 49.10%; }

/* 首页热门推荐 */
.hot-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hot-item { display: block; width: 100%; min-width: 0; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font-family: inherit; }
.hot-name {
  font-size: 13.5px; font-weight: 700; color: #2b2e36;
  margin-top: 8px; text-align: center; line-height: 1.3;
  /* 固定预留两行高度：一行名称 + 一行版本（无版本时名称可占两行），保证网格不被撑乱 */
  min-height: 2.6em;
}
.hot-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.hot-title.one-line { -webkit-line-clamp: 1; }   /* 有版本时名称只占一行，版本单独一行 */
.hot-ver { margin-top: 2px; font-size: 11.5px; font-weight: 600; color: #8a90a2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-item:active { transform: scale(.97); }

/* ---------- 分类列表 ---------- */
.cat-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: #fff; border-radius: var(--radius); width: 100%; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
}
.cat-item + .cat-item { margin-top: 10px; }
.cat-ico {
  width: 44px; height: 44px; flex: none; border-radius: 13px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 9px 18px -8px var(--c2);
}
.cat-name { font-size: 14.5px; font-weight: 700; }
.cat-count { font-size: 12px; color: var(--sub); margin-top: 4px; }
.cat-arrow { color: #c8ccd4; margin-left: auto; }
.cat-item:active { background: #fafafc; }

/* ---------- 标签 ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; color: #6b7078; background: #f3f4f7;
  border-radius: 6px; padding: 2.5px 8px; line-height: 1.4;
}
.tag.plain { background: transparent; padding: 0; color: var(--sub); font-size: 11.5px; }
.tag.soft { background: #fff1f1; color: var(--red-dark); }

/* 分类筛选 chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 0; border-radius: 999px; padding: 7px 15px; font-size: 12.5px; font-family: inherit;
  background: #eceef2; color: #5c6068; cursor: pointer; font-weight: 600;
}
.chip.on { background: linear-gradient(120deg, var(--red), var(--red-dark)); color: #fff; box-shadow: 0 6px 14px -6px rgba(224, 31, 31, .9); }

/* ---------- 游戏列表行 ---------- */
.grow-item { display: flex; gap: 12px; background: #fff; border-radius: var(--radius); padding: 12px; }
.grow-item + .grow-item { margin-top: 10px; }
.grow-cover { width: 76px; flex: none; }
.grow-cover .cover { width: 76px; }
.grow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grow-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.grow-main .tags { margin-top: 6px; }
.grow-buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--red); font-weight: 800; font-size: 15px; }
.price small { font-size: 11px; font-weight: 700; }
.btn-buy {
  border: 0; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700;
  background: linear-gradient(120deg, var(--red), var(--red-dark)); color: #fff; cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 14px -6px rgba(224, 31, 31, .9);
}
.btn-buy:active { opacity: .86; }

/* ---------- 详情页 ---------- */
.hero { position: relative; }
.hero-cover {
  position: relative;
  min-height: 232px;
  background-image: linear-gradient(150deg, var(--c1), var(--c2));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff;
}
.hero-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 34%),
              radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .26), transparent 58%);
}
.hero-back {
  position: absolute; top: 12px; left: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .3); color: #fff;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.hero-short { position: relative; z-index: 2; font-size: 30px; font-weight: 900; font-style: italic; letter-spacing: 2px; text-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
.hero-plat { position: relative; z-index: 2; font-size: 12px; background: rgba(0, 0, 0, .3); padding: 3px 12px; border-radius: 999px; letter-spacing: 1px; }

/* 已上传封面：去掉主题色底，整图按手机屏宽自适应（保持 640:408 原比例，高度自动） */
.hero.has-shot .hero-cover { min-height: 0; background: var(--card); display: block; }
.hero.has-shot .hero-cover::after { display: none; }
.hero.has-shot .hero-shot { position: relative; z-index: 2; width: 100%; margin: 0; padding: 0 14px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .14)); }
.hero.has-shot + .detail-body { margin-top: 0; }

.detail-body { position: relative; margin-top: -18px; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px 24px; }
.detail-title { font-size: 19px; font-weight: 800; }
.detail-meta { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 14px; }
.detail-price { color: var(--red); font-size: 25px; font-weight: 900; letter-spacing: -.5px; }
.detail-price small { font-size: 14px; font-weight: 800; }
.detail-sold { font-size: 12px; color: var(--sub); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.block-title { font-size: 14.5px; font-weight: 700; margin-bottom: 8px; }
.block-text { font-size: 13px; line-height: 1.78; color: #4a4e57; text-align: justify; }

.ship-list { display: flex; flex-direction: column; gap: 10px; }
.ship-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #3f434b; }
.ship-item svg { color: var(--red); flex: none; }

.detail-bar {
  position: sticky; bottom: 0; z-index: 30; margin: 18px -16px -24px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.fav-btn {
  border: 0; background: none; cursor: pointer; color: var(--sub);
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-family: inherit; flex: none;
}
.fav-btn.on { color: var(--red); }
.btn-primary {
  flex: 1; border: 0; border-radius: 999px; padding: 13px; font-size: 15px; font-weight: 700; font-family: inherit;
  background: linear-gradient(120deg, #ff4d4d, var(--red-dark)); color: #fff; cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(224, 31, 31, .95);
}
.btn-primary:active { opacity: .88; }
.btn-primary.block { width: 100%; }
.btn-ghost {
  width: 100%; border-radius: 999px; padding: 12.5px; font-size: 15px; font-weight: 700; font-family: inherit;
  background: #fff; color: #3f434b; border: 1px solid #e3e5ea; cursor: pointer;
}
.btn-ghost:active { background: #f6f7f9; }

/* ---------- 订单 ---------- */
.order-card { background: #fff; border-radius: var(--radius); padding: 13px; }
.order-card + .order-card { margin-top: 10px; }
.order-top { display: flex; align-items: center; gap: 12px; }
.order-cover { width: 66px; flex: none; }
.order-cover .cover { width: 66px; }
.order-main { flex: 1; min-width: 0; }
.order-title { font-size: 14px; font-weight: 700; }
.order-no { font-size: 11.5px; color: var(--sub); margin-top: 5px; }
.order-status { font-size: 12.5px; font-weight: 700; flex: none; text-align: right; }
.st-pending { color: var(--red); }
.st-shipped { color: #f5941a; }
.st-done    { color: #22ab6b; }
.order-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.btn-line {
  border: 1px solid #e3e5ea; background: #fff; border-radius: 999px; padding: 6.5px 14px;
  font-size: 12.5px; font-family: inherit; color: #3f434b; cursor: pointer;
}
.btn-line.red { border-color: #ffd0d0; color: var(--red-dark); background: #fff6f6; }
.btn-line:active { background: #f4f5f7; }
.order-price { margin-left: auto; }

/* 空状态 */
.empty { padding: 70px 0; text-align: center; color: var(--sub); font-size: 13px; }
.empty .em-ico-big { font-size: 42px; margin-bottom: 12px; }

/* ---------- 推广收益 ---------- */
.wallet {
  margin: 0 16px 14px; border-radius: 18px; padding: 18px;
  background: linear-gradient(125deg, #8b6cff 0%, #6b3ce0 55%, #4a24b8 100%);
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 16px 32px -14px rgba(91, 60, 224, .95);
}
.wallet::after { content: ''; position: absolute; right: -50px; bottom: -70px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.wallet-label { font-size: 12.5px; opacity: .85; position: relative; z-index: 2; }
.wallet-row { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; position: relative; z-index: 2; }
.wallet-num { font-size: 32px; font-weight: 900; letter-spacing: -.5px; }
.wallet-num small { font-size: 15px; font-weight: 700; margin-right: 2px; }
.btn-cash {
  border: 0; border-radius: 999px; padding: 8px 16px; background: #fff; color: var(--purple-dark);
  font-size: 12.5px; font-weight: 800; cursor: pointer; font-family: inherit;
}
.wallet-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; position: relative; z-index: 2; }
.wallet-stats .ws { text-align: center; }
.wallet-stats .ws + .ws { border-left: 1px solid rgba(255, 255, 255, .24); }
.ws-label { font-size: 11.5px; opacity: .82; }
.ws-val { font-size: 16px; font-weight: 800; margin-top: 5px; }

.seg { display: flex; background: #fff; border-radius: 14px; padding: 4px; margin: 0 16px 12px; }
.seg button {
  flex: 1; border: 0; background: transparent; border-radius: 11px; padding: 9px 0;
  font-size: 13.5px; font-weight: 700; color: #7b7f88; font-family: inherit; cursor: pointer;
}
.seg button.on { background: #fff3f3; color: var(--red-dark); }

.link-box {
  margin: 0 16px 16px; background: #fff; border-radius: 14px; padding: 14px;
  display: flex; align-items: center; gap: 10px;
}
.link-text { flex: 1; min-width: 0; font-size: 12.5px; color: #4a4e57; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-copy {
  flex: none; border: 0; border-radius: 999px; padding: 7px 15px; font-size: 12.5px; font-weight: 700;
  background: linear-gradient(120deg, var(--red), var(--red-dark)); color: #fff; cursor: pointer; font-family: inherit;
}
.btn-copy:active { opacity: .85; }

.poster {
  margin: 0 16px 16px; border-radius: 18px; padding: 18px; color: #fff;
  background: linear-gradient(150deg, #ff5252, #a8102e); position: relative; overflow: hidden;
  box-shadow: 0 14px 28px -14px rgba(168, 16, 46, .9);
}
.poster-title { font-size: 18px; font-weight: 900; }
.poster-sub { font-size: 11.5px; opacity: .9; margin-top: 6px; }
.poster-code {
  margin-top: 16px; background: #fff; color: #17181c; border-radius: 14px; padding: 14px;
  display: flex; align-items: center; gap: 14px;
}
.qr { width: 74px; height: 74px; flex: none; border-radius: 8px; background: #fff; }
.qr .qr-img { width: 100%; height: 100%; display: block; border-radius: 8px; }
.poster-code .pc-t { font-size: 12px; color: var(--sub); }
.poster-code .pc-v { font-size: 17px; font-weight: 900; margin-top: 6px; letter-spacing: 1px; }

/* ---------------- 推广海报（画布合成的整张海报图，可长按保存） ---------------- */
.poster-wrap { margin: 0 16px 16px; }
.poster-img {
  width: 100%; display: block; border-radius: 16px; background: #fff;
  box-shadow: 0 14px 28px -14px rgba(168, 16, 46, .6);
}
.poster-hint { text-align: center; color: var(--sub); font-size: 12px; margin-top: 10px; }
.poster-save { display: block; width: 100%; margin-top: 10px; }

.inc-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: #fff; border-radius: 14px; }

/* 我邀请的好友 */
.inv-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 14px; margin-bottom: 10px; }
.inv-av {
  width: 34px; height: 34px; flex: none; border-radius: 50%; background: #f2f3f6;
  color: #8b8f9a; display: flex; align-items: center; justify-content: center;
}
.inv-main { flex: 1; min-width: 0; }
.inv-name { font-size: 13.5px; font-weight: 600; color: #2b2e36; }
.inv-sub { font-size: 11.5px; color: var(--sub); }
.inv-right { flex: none; text-align: right; }
.inv-amt { font-size: 14px; font-weight: 800; color: var(--red); }
.inv-cnt { font-size: 11.5px; color: var(--sub); }
.inc-row + .inc-row { margin-top: 8px; }
.inc-ico {
  width: 36px; height: 36px; border-radius: 11px; flex: none; color: #fff;
  background: linear-gradient(140deg, #ff7a6b, #e0432f);
  display: flex; align-items: center; justify-content: center;
}
.inc-title { font-size: 13.5px; font-weight: 600; }
.inc-time { font-size: 11.5px; color: var(--sub); margin-top: 4px; }
.inc-amt { margin-left: auto; color: var(--red); font-weight: 800; font-size: 15px; }
.sec-head-inline { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }

/* ---------- 我的 ---------- */
.profile-head { background: #fff; padding: 10px 16px 22px; display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 62px; height: 62px; border-radius: 50%; flex: none;
  background: linear-gradient(150deg, #8b6cff, #5b3ce0); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px -10px rgba(91, 60, 224, .95);
}
.p-name { font-size: 18px; font-weight: 800; }
.p-id { font-size: 12px; color: var(--sub); margin-top: 6px; }
.p-level {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  background: #fff6ec; color: #e0700f; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700;
}
.menu { background: #fff; border-radius: var(--radius); overflow: hidden; }
.menu-row {
  width: 100%; border: 0; background: #fff; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 15px 14px; font-size: 14.5px; color: #2c2f36; text-align: left;
}
.menu-row + .menu-row { border-top: 1px solid var(--line); }
.menu-row:active { background: #fafafc; }
.menu-ico { color: #6b7078; display: flex; }
.menu-arrow { margin-left: auto; color: #c8ccd4; }

/* ---------- 发货成功 ---------- */
.ship-hero { text-align: center; padding: 26px 16px 20px; background: #fff; }
.ship-check {
  width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(150deg, #4bd07f, #1f9c5c); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 26px -12px rgba(31, 156, 92, .95);
}
.ship-h1 { font-size: 19px; font-weight: 800; }
.ship-h2 { font-size: 13px; color: var(--sub); margin-top: 8px; line-height: 1.6; }
.ship-game { display: flex; align-items: center; gap: 12px; margin: 0 16px 12px; background: #fff; border-radius: 14px; padding: 12px; }
.ship-game .cover { width: 54px; }
.ship-tips { margin: 0 16px 16px; background: #fffaf3; border: 1px solid #ffe9cf; border-radius: 14px; padding: 14px; }
.ship-tips .tt { font-size: 13px; font-weight: 800; color: #e0700f; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ship-tips ol { margin: 0; padding-left: 18px; color: #7a6a58; font-size: 12.5px; line-height: 1.9; }

/* ---------- 底部导航 ---------- */
.tabbar {
  flex: none; height: calc(62px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: flex-start; padding-top: 7px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar button {
  flex: 1; border: 0; background: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #9aa0aa; font-size: 10.5px; padding: 2px 0;
}
.tabbar button.on { color: var(--red); font-weight: 700; }
.tabbar button:active { opacity: .7; }

/* ---------- Toast ---------- */
.toast {
  position: absolute; left: 50%; bottom: 110px; transform: translate(-50%, 12px);
  background: rgba(23, 24, 28, .9); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 999px; z-index: 99;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 78%; text-align: center; backdrop-filter: blur(4px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- FAQ ---------- */
.faq-item { background: #fff; border-radius: 14px; padding: 15px 14px; }
.faq-item + .faq-item { margin-top: 10px; }
.faq-q { font-size: 14px; font-weight: 700; }
.faq-a { font-size: 12.5px; color: #6b7078; line-height: 1.75; margin-top: 8px; }

/* ---------- 模拟器下载（单一入口 + 安卓 / iOS 双端弹窗） ---------- */
.emu-page { padding: 18px 16px 26px; }
.emu-card {
  background: #fff; border-radius: 20px; padding: 26px 20px 22px; text-align: center;
  box-shadow: 0 10px 30px rgba(30,40,80,.08);
}
.emu-logo {
  width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(140deg, var(--c1, #4f8cff), var(--c2, #2b5ce0));
  box-shadow: 0 12px 26px rgba(43,92,224,.3);
}
.emu-card-name { font-size: 20px; font-weight: 800; }
.emu-card-desc { font-size: 13px; color: var(--sub); margin: 8px 0 22px; line-height: 1.6; }
.emu-card-tip {
  margin-top: 14px; font-size: 12px; color: var(--sub);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.emu-mask {
  position: fixed; inset: 0; z-index: 1200; background: rgba(15,18,30,.5);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  animation: emuFade .18s ease;
}
@keyframes emuFade { from { opacity: 0; } to { opacity: 1; } }
.emu-sheet {
  width: 100%; max-width: 420px; background: #fff; border-radius: 22px;
  padding: 22px 18px 16px; animation: emuUp .22s cubic-bezier(.22,.9,.3,1);
}
@keyframes emuUp { from { transform: translateY(26px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.emu-sheet-title { font-size: 17px; font-weight: 800; text-align: center; }
.emu-sheet-sub { font-size: 12.5px; color: var(--sub); text-align: center; margin: 6px 0 18px; }
.emu-opt {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 12px; text-align: center;
  border: 0; border-radius: 16px; padding: 15px 16px; margin-bottom: 10px;
  cursor: pointer; font-family: inherit; color: #fff; transition: transform .12s;
}
.emu-opt.android { background: linear-gradient(120deg, var(--red), var(--red-dark)); box-shadow: 0 8px 18px -6px rgba(224,31,31,.85); }
.emu-opt.ios { background: linear-gradient(120deg, var(--red), var(--red-dark)); box-shadow: 0 8px 18px -6px rgba(224,31,31,.85); }
.emu-opt:active { transform: scale(.985); }
.emu-opt-ico {
  width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.emu-opt-img { width: 100%; height: 100%; object-fit: contain; display: block; flex: none; filter: brightness(0) invert(1); }
/* 苹果源图四周留白较大：放大后居中裁切，让 logo 显示更大（裁掉透明留白，不影响文字） */
.emu-opt.ios .emu-opt-ico { width: 38px; height: 38px; overflow: hidden; }
.emu-opt.ios .emu-opt-img { width: 160%; height: 160%; }
.emu-opt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.emu-opt-txt b { font-size: 15px; font-weight: 700; }
.emu-opt-txt i { font-style: normal; font-size: 11.5px; opacity: .88; }
/* 支付成功引导页：下载链接 + 复制 */
.emu-link-box {
  display: flex; align-items: center; gap: 10px;
  background: #f6f7f9; border: 1px solid #ebedf1; border-radius: 14px;
  padding: 12px; margin-bottom: 16px; cursor: pointer;
}
.emu-link-url {
  flex: 1; min-width: 0; font-size: 12.5px; color: #2b2e36;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.emu-link-copy {
  flex: none; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(120deg, var(--red), var(--red-dark));
  padding: 7px 14px; border-radius: 10px;
}
/* 订单确认页：详情行 + 确认支付按钮 */
.emu-order-box {
  background: #f6f7f9; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px;
}
.emu-order-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px; color: #6b7078;
}
.emu-order-row + .emu-order-row { margin-top: 9px; }
.emu-order-row b { color: #2b2e36; font-weight: 600; }
.emu-order-row b.emu-price { color: var(--red); font-weight: 800; font-size: 15px; }
.emu-pay {
  width: 100%; border: 0; border-radius: 16px; padding: 15px 16px; margin-bottom: 8px;
  background: linear-gradient(120deg, var(--red), var(--red-dark)); color: #fff;
  font-size: 15.5px; font-weight: 700; font-family: inherit; cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(224, 31, 31, .95);
}
.emu-pay:active { opacity: .88; }

.emu-cancel {
  width: 100%; margin-top: 2px; padding: 13px; border: 0; border-radius: 14px;
  background: #f2f3f6; color: #5a5f6b; font-size: 14.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.emu-cancel:active { background: #e8eaef; }

/* ---------------- 订单页：支付方式选择 ---------------- */
.pay-opt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pay-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px;
  background: #fff; cursor: pointer; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.pay-opt:active { transform: scale(.99); }
.pay-ico {
  width: 28px; height: 28px; flex: none; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.pay-ico img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pay-name { flex: 1; text-align: left; font-size: 14.5px; font-weight: 600; color: #2b2e36; }
.pay-radio {
  width: 18px; height: 18px; flex: none; position: relative;
  border: 1.5px solid #d2d6de; border-radius: 50%;
}
.pay-opt.on { border-color: var(--red); background: #fff7f7; }
.pay-opt.on .pay-radio { border-color: var(--red); }
.pay-opt.on .pay-radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--red);
}
.pay-loading { text-align: center; color: var(--sub); font-size: 13px; padding: 14px 0 16px; }
/* 订单页弹层：入场动画只在首次打开时播放（后续局部更新不重绘），避免选择支付方式时闪动 */
.emu-mask.pay-mask, .emu-sheet.pay-sheet { animation: none; }
.emu-mask.pay-mask.anim { animation: emuFade .18s ease; }
.emu-sheet.pay-sheet.anim { animation: emuUp .22s cubic-bezier(.22,.9,.3,1); }
/* ---------- 修改密码弹层 ---------- */
.pwd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pwd-head-ico {
  width: 42px; height: 42px; flex: none; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(140deg, var(--red), var(--red-dark));
  box-shadow: 0 8px 18px -8px rgba(224,31,31,.9);
}
.pwd-head-txt { min-width: 0; }
.pwd-head-txt .emu-sheet-title { text-align: left; font-size: 16.5px; }
.pwd-head-sub { font-size: 12px; color: var(--sub); margin-top: 3px; }
.pwd-form { display: flex; flex-direction: column; gap: 12px; margin: 0 0 18px; }
.pwd-field { display: flex; flex-direction: column; gap: 6px; }
.pwd-label { font-size: 12.5px; color: #6b7078; font-weight: 600; padding-left: 2px; }
.pwd-input {
  width: 100%; box-sizing: border-box; padding: 12px 13px;
  border: 1.5px solid var(--line); border-radius: 13px; background: #f8f9fb;
  font-size: 14.5px; color: #2b2e36; outline: none; font-family: inherit;
  -webkit-appearance: none; transition: border-color .15s, background .15s;
}
.pwd-input::placeholder { color: #a9aeb8; }
.pwd-input:focus { border-color: var(--red); background: #fff; }
#pwd-submit[disabled] { opacity: .6; }

/* ---------- 商品管理（代理定价） ---------- */
/* 统一定价卡片 */
.gm-rule { margin: 12px 16px 10px; background: #fff; border-radius: var(--radius); padding: 14px; }
.gm-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gm-rule-title { font-size: 15px; font-weight: 700; }
.gm-rule-sum { font-size: 12.5px; color: var(--red-dark); font-weight: 700; margin-top: 4px; }
.gm-rule-toggle {
  flex: none; border: 0; background: #fff3f3; color: var(--red-dark); font-family: inherit;
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 6px 13px; cursor: pointer;
}
.gm-rule-tip { font-size: 12px; color: var(--sub); line-height: 1.8; margin-top: 8px; }
.gm-rule-body { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; display: none; }
.gm-rule-body.on { display: block; }

/* 表单字段 */
.gm-field { margin-bottom: 11px; }
.gm-field > label { display: block; font-size: 13px; color: #3f434b; font-weight: 600; margin-bottom: 6px; }
.gm-field input {
  width: 100%; border: 1px solid #e3e5ea; background: #f8f9fb; border-radius: 10px;
  padding: 11px 12px; font-size: 14px; font-family: inherit; color: var(--text);
}
.gm-field input:focus { outline: none; border-color: var(--red); background: #fff; }

/* 搜索框 */
.gm-search {
  margin: 0 16px 10px; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; padding: 10px 13px; color: var(--sub);
}
.gm-search input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 14px; font-family: inherit; color: var(--text); min-width: 0;
}

/* 商品行 */
.gm-list { margin: 0 16px; }
.gm-item { display: flex; gap: 12px; background: #fff; border-radius: var(--radius); padding: 12px; align-items: center; }
.gm-item + .gm-item { margin-top: 10px; }
.gm-cover { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: #eef0f5; flex: none; display: block; }
.gm-cover-ph {
  width: 58px; height: 58px; border-radius: 12px; flex: none; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}
.gm-main { flex: 1; min-width: 0; }
.gm-name { font-size: 14.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-meta { font-size: 11.5px; color: var(--sub); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-prices { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.gm-my { color: var(--red-dark); font-size: 16px; font-weight: 800; }
.gm-cost { font-size: 11.5px; color: var(--sub); }
.gm-badge { font-size: 10.5px; font-weight: 700; color: var(--red-dark); background: #fff3f3; border-radius: 999px; padding: 2px 8px; }
.gm-free { font-size: 13px; font-weight: 700; color: #159b73; }
.gm-edit {
  flex: none; border: 0; background: #fff3f3; color: var(--red-dark); font-family: inherit;
  font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.gm-edit:disabled { background: #f0f1f4; color: #a8adb8; }

/* 编辑弹层 */
.gm-sheet-head { display: flex; gap: 11px; align-items: center; }
.gm-sheet-cover { width: 48px; height: 48px; border-radius: 11px; object-fit: cover; background: #eef0f5; flex: none; }
.gm-sheet-name { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.gm-sheet-sub2 { font-size: 12px; color: var(--sub); margin-top: 3px; }
.gm-sheet-cost {
  background: #f8f9fb; border-radius: 12px; padding: 11px 13px;
  font-size: 13px; color: #3f434b; margin: 13px 0;
}
.gm-sheet-cost b { color: var(--red-dark); font-size: 15px; }
.gm-seg { display: flex; gap: 8px; }
.gm-seg button {
  flex: 1; border: 1px solid #e3e5ea; background: #f8f9fb; color: #5c6068; font-family: inherit;
  font-size: 13px; font-weight: 600; border-radius: 10px; padding: 10px 0; cursor: pointer;
}
.gm-seg button.on { border-color: var(--red); background: #fff7f7; color: var(--red-dark); }
.gm-preview { font-size: 12.5px; color: var(--sub); margin-top: 8px; text-align: right; }
.gm-preview b { color: var(--red-dark); font-size: 15px; }
.gm-actions { margin-top: 14px; }
.gm-more {
  width: 100%; border: 1px solid #e3e5ea; background: #fff; border-radius: 999px; padding: 11px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: #3f434b; cursor: pointer;
}
.gm-loadmore { margin: 14px 16px 0; }
