/* 会员点商城 · Q 版糖果网游风（2026-10-08 改版）
   叠加在全站底座 styles.css 之上（天空背景、统一顶栏、草地页脚沿用底座）。
   CSP 禁止内联 style 属性：动态位置、颜色由 mall.js 通过 CSSOM 设置。
   手机防闪屏：去点击高亮、关双击缩放；悬停效果只写在 (hover: hover) and (pointer: fine) 里；
   卡片不常驻 will-change / filter，成功动画只在弹窗打开时短暂播放。 */
.mall-page {
  --pink: #ff6fa5;
  --pink-deep: #e04585;
  --lemon: #ffc53a;
  --mint: #22c3a3;
  --mint-deep: #129c82;
  --sky2: #3b9cf3;
  --grape: #9b7af2;
  --coral: #ff7a55;
  --wood: #6b3a14;
  --price: #ff6a1a;
  --ink2: #4a3a5c;
  --soft: #7a5a8c;
  --card-line: #f1e4f6;
  --shadow-q: 0 6px 0 rgba(120, 70, 140, .1), 0 16px 30px -14px rgba(120, 70, 140, .42);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mall-page button, .mall-page select, .mall-page a, .mall-page input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.px { image-rendering: pixelated; }

.mall-shell { position: relative; z-index: 1; flex: 1; width: min(100% - 24px, 1180px); margin: 0 auto; padding: 20px 0 46px; }

/* ================= 提示条 ================= */
.mall-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 90;
  max-width: min(92vw, 560px);
  padding: 10px 20px;
  color: #fff;
  background: linear-gradient(180deg, #4fc98a, #22a46a);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-q);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in .45s var(--ease-jelly);
}
.mall-toast.error { background: linear-gradient(180deg, #ff8f8f, #ef4f62); }

/* ================= 糖果按钮 ================= */
.candy-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 22px;
  overflow: hidden;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 999px;
  font: 800 15px/1 var(--font-body);
  letter-spacing: 1px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .3s var(--ease-jelly), box-shadow .2s ease;
}
.candy-btn:active { transform: translateY(3px) scale(.96); }
.candy-btn:disabled { cursor: wait; opacity: .6; transform: none; }
.candy-sm { height: 34px; padding: 0 14px; border-width: 2px; font-size: 13px; }
.candy-sun { color: #5a2c05; background: linear-gradient(180deg, #ffe07a, #ff9f2e); box-shadow: 0 5px 0 #d8701b; }
.candy-pink { background: linear-gradient(180deg, #ff9cc6, #ff5c98); box-shadow: 0 5px 0 #d4437a; text-shadow: 0 1px 0 rgba(120, 20, 60, .3); }
.candy-mint { background: linear-gradient(180deg, #5fe0c2, #1fb492); box-shadow: 0 4px 0 #13876d; text-shadow: 0 1px 0 rgba(10, 80, 60, .3); }
.candy-ghost { color: var(--grape); background: #fff; border-color: #e6dcfb; box-shadow: 0 4px 0 #d9ccf7; }

/* ================= 登录 ================= */
.mall-login { display: flex; justify-content: center; padding: 26px 0 10px; }
.login-card {
  position: relative;
  width: min(100%, 440px);
  padding: 30px 30px 26px;
  background: var(--card);
  border: 4px solid #fff;
  border-radius: 30px;
  box-shadow: var(--shadow-q);
  animation: rise-in .6s var(--ease-jelly) backwards;
}
.login-card::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 30px;
  left: 30px;
  height: 7px;
  background: var(--candy);
  border-radius: 0 0 8px 8px;
}
.login-mascots { display: flex; justify-content: center; align-items: flex-end; gap: 14px; height: 64px; margin-bottom: 4px; }
.login-mascots img { max-height: 60px; animation: hop 1.6s var(--ease-jelly) infinite; }
.login-mascots img:nth-child(2) { animation-delay: .2s; }
.login-mascots img:nth-child(3) { animation-delay: .4s; }
.login-card h1 {
  margin: 4px 0 2px;
  color: var(--pink-deep);
  font-family: var(--font-title);
  font-size: 30px;
  letter-spacing: 3px;
  text-align: center;
  text-shadow: 0 3px 0 #fff, 0 5px 0 rgba(224, 69, 133, .18);
}
.login-sub { margin: 0 0 18px; color: var(--soft); font-size: 13px; text-align: center; }
.login-form { display: grid; gap: 12px; }
.login-form label { color: var(--leaf); }
.login-captcha { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: center; }
.login-captcha input { text-align: center; text-transform: uppercase; letter-spacing: 4px; }
.login-captcha-img { width: 150px; height: 48px; background: #f6f0fb; border: 2px solid var(--card-line); border-radius: 14px; cursor: pointer; }
.login-submit { width: 100%; height: 50px; margin-top: 6px; font-size: 16px; letter-spacing: 3px; }
.login-hint { margin: 0; color: var(--soft); font-size: 13px; text-align: center; }
.login-hint a { color: var(--price); font-weight: 800; text-decoration: none; }

/* ================= 顶部横幅：标题 + 会员点余额 ================= */
.mall-hero {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 120%, rgba(255, 255, 255, .55) 0 60px, transparent 61px),
    radial-gradient(circle at 92% -30%, rgba(255, 255, 255, .4) 0 90px, transparent 91px),
    linear-gradient(115deg, #ff9cc6 0%, #ffb86b 38%, #ffd96a 62%, #8fe0c8 100%);
  border: 4px solid #fff;
  border-radius: 32px;
  box-shadow: var(--shadow-q);
  animation: rise-in .6s var(--ease-jelly) backwards;
}
.hero-art { position: relative; height: 104px; overflow: hidden; }
.hero-pet { position: absolute; bottom: 0; animation: hop 1.8s var(--ease-jelly) infinite; }
.hero-pet-a { left: 4px; max-height: 70px; }
.hero-pet-b { left: 52px; max-width: 96px; max-height: 92px; animation-delay: .35s; }
.hero-spark { position: absolute; color: #fff; font-size: 20px; text-shadow: 0 0 8px rgba(255, 255, 255, .9); animation: twinkle 2.4s ease-in-out infinite; }
.hero-spark.s1 { top: 0; left: 18px; }
.hero-spark.s2 { top: 22px; left: 118px; font-size: 15px; animation-delay: .8s; }
.hero-spark.s3 { top: 52px; left: 56px; font-size: 13px; animation-delay: 1.5s; }
.hero-eyebrow { margin: 0; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 3px; text-shadow: 0 1px 0 rgba(160, 60, 40, .35); }
.hero-text h1 {
  margin: 2px 0 4px;
  color: #fff;
  font-family: var(--font-title);
  font-size: 38px;
  letter-spacing: 4px;
  line-height: 1.15;
  text-shadow: 0 3px 0 #e0576f, 0 6px 0 rgba(150, 40, 60, .25);
}
.hero-sub { margin: 0; color: #6a2f12; font-size: 13.5px; font-weight: 700; }
.hero-wallet {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 190px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, .92);
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: 0 5px 0 rgba(224, 106, 18, .22);
}
.wallet-label { color: var(--soft); font-size: 12.5px; font-weight: 800; letter-spacing: 1px; }
.wallet-value { display: inline-flex; align-items: center; gap: 6px; color: var(--price); font-family: var(--font-title); font-size: 28px; line-height: 1; }
.wallet-value b { font-weight: 400; }
.wallet-value.bump { animation: bump .6s var(--ease-jelly); }

/* 会员点小宝石图标 */
.gem {
  display: inline-block;
  flex: none;
  width: .78em;
  height: .78em;
  background: linear-gradient(135deg, #b8f3ff 0%, #4bb8ff 45%, #7a5cff 100%);
  border: 2px solid #fff;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(60, 40, 140, .35);
  transform: rotate(45deg);
}

/* ================= 商城 / 购买记录切换 ================= */
.mall-switch { display: flex; justify-content: center; gap: 10px; margin: 18px 0 14px; }
.switch-btn {
  padding: 9px 22px;
  color: var(--ink2);
  background: #fff;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(120, 70, 140, .14);
  font: 800 15px/1.2 var(--font-body);
  cursor: pointer;
  transition: transform .3s var(--ease-jelly), background .2s ease, color .2s ease;
}
.switch-btn.active { color: #fff; background: linear-gradient(180deg, #b39bff, #8a63f0); box-shadow: 0 4px 0 #6a45cf; }

/* ================= 推荐横幅 ================= */
.rec-banner {
  position: relative;
  margin-bottom: 16px;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, #fff6cf, #ffe7f1);
  border: 4px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-q);
}
.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 4px 10px; }
.rec-badge {
  padding: 5px 16px;
  color: #fff;
  background: linear-gradient(180deg, #ff8f6b, #ff5c7a);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 0 #d8435e;
  font-family: var(--font-title);
  font-size: 18px;
  letter-spacing: 3px;
}
.rec-badge::before { content: "★ "; color: #fff3a8; }
.rec-tip { margin: 0; color: #c2410c; font-size: 13px; font-weight: 700; }
.rec-strip { display: flex; gap: 12px; padding: 4px 4px 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rec-card {
  position: relative;
  display: grid;
  flex: none;
  justify-items: center;
  gap: 4px;
  width: 132px;
  padding: 12px 8px 10px;
  color: var(--ink2);
  background: #fff;
  border: 3px solid #fff;
  border-radius: 22px;
  box-shadow: 0 4px 0 rgba(255, 140, 90, .25);
  font: inherit;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .3s var(--ease-jelly);
}
.rec-card .vs-icon { width: 64px; height: 64px; }
.rec-name { display: -webkit-box; overflow: hidden; min-height: 34px; color: var(--ink2); font-size: 13px; font-weight: 800; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rec-price { display: inline-flex; align-items: center; gap: 4px; color: var(--price); font-size: 15px; font-weight: 800; }

/* ================= 分类页签 ================= */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 8px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 14px 0 6px;
  color: var(--ink2);
  background: #fff;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(120, 70, 140, .13);
  font: 800 14px/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: transform .3s var(--ease-jelly), background .2s ease, color .2s ease;
}
.cat-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  background: var(--c-soft);
  border-radius: 50%;
}
.cat-ico img { max-width: 30px; max-height: 30px; }
.cat-ico.star { color: #fff; background: linear-gradient(180deg, #ffd65e, #ff9f2e); font-size: 18px; }
.cat-ico.all { color: #fff; background: linear-gradient(180deg, #8fd3f7, #3b9cf3); font-size: 16px; }
.cat-count {
  min-width: 22px;
  padding: 2px 6px;
  color: var(--c);
  background: var(--c-soft);
  border-radius: 999px;
  font-size: 12px;
  text-align: center;
}
.cat-tab.active { color: #fff; background: var(--c); box-shadow: 0 4px 0 var(--c-deep); }
.cat-tab.active .cat-count { color: var(--c); background: #fff; }
.cat-tab.active .cat-ico:not(.star):not(.all) { background: #fff; }
.cat-desc { min-height: 20px; margin: 2px 6px 10px; color: var(--soft); font-size: 13px; font-weight: 700; }

/* ================= 搜索与排序 ================= */
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-box {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  color: inherit;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(120, 70, 140, .12), inset 0 0 0 2px var(--card-line);
  font-size: inherit;
}
.search-box input { flex: 1; height: 38px; padding: 0; background: transparent; border: 0; box-shadow: none; font-family: var(--font-body); font-size: 14.5px; }
.search-box input:focus { box-shadow: none; }
.sort-box { display: inline-flex; align-items: center; gap: 6px; color: var(--grape); font-size: 13.5px; font-weight: 800; }
.sort-box select {
  height: 40px;
  padding: 0 12px;
  color: var(--ink2);
  background: #fff;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(120, 70, 140, .12), inset 0 0 0 2px var(--card-line);
  font: 700 14px var(--font-body);
}
.result-count { margin-left: auto; color: var(--grape); font-size: 13px; font-weight: 800; }

/* ================= 商品卡片 ================= */
.mall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.vs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 14px 12px 12px;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-q);
  cursor: pointer;
  transition: transform .3s var(--ease-jelly), box-shadow .2s ease;
  animation: card-pop .45s var(--ease-jelly) backwards;
}
.vs-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 92px;
  background: linear-gradient(180deg, var(--c-soft), #fff);
  border-radius: 21px 21px 0 0;
}
.vs-card > * { position: relative; }
.vs-icon {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-top: 4px;
  background: radial-gradient(circle at 50% 38%, #fff 0 46%, var(--c-mid) 47% 100%);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--c-mid);
}
.vs-icon img { transform: scale(1.3); transition: transform .4s var(--ease-jelly); }
.vs-icon .no-img { color: var(--c); font-size: 30px; }
/* 材料包：大图是包内材料，右下角叠一个礼包小图标 + 数量 */
.vs-icon .pack-mini {
  position: absolute;
  right: -10px;
  bottom: -8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #fff;
  border: 2px solid #ffd08a;
  border-radius: 50%;
  box-shadow: 0 2px 0 rgba(224, 106, 18, .25);
}
.vs-icon .pack-mini img { max-width: 30px; max-height: 30px; transform: none; }
.pack-num {
  position: absolute;
  bottom: -10px;
  left: 50%;
  padding: 1px 8px;
  color: #fff;
  background: var(--mint);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}
/* 角标：热卖/新品/限时/超值/礼包 */
.vs-tag {
  position: absolute;
  top: 10px;
  left: -6px;
  z-index: 2;
  padding: 3px 10px 3px 9px;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px 999px 999px 4px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .12);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  transform: rotate(-6deg);
}
.vs-tag.t1 { background: linear-gradient(180deg, #ff7a7a, #f0405a); }
.vs-tag.t2 { background: linear-gradient(180deg, #5fe0c2, #1fb492); }
.vs-tag.t3 { background: linear-gradient(180deg, #b39bff, #8a63f0); }
.vs-tag.t4 { background: linear-gradient(180deg, #ffc35a, #ff8a1f); }
.vs-tag.t1::before { content: "🔥"; }
.vs-tag.t2::before { content: "✨"; }
.vs-tag.t3::before { content: "⏰"; }
.vs-tag.t4::before { content: "💰"; }
.vs-gift {
  position: absolute;
  top: 10px;
  right: -6px;
  z-index: 2;
  padding: 3px 9px;
  color: #a4400b;
  background: linear-gradient(180deg, #fff3b0, #ffd65e);
  border: 2px solid #fff;
  border-radius: 999px 999px 4px 999px;
  box-shadow: 0 3px 0 rgba(224, 106, 18, .25);
  font-size: 12px;
  font-weight: 800;
  transform: rotate(6deg);
}
.vs-gift::before { content: "🎁"; }
.vs-name {
  display: -webkit-box;
  overflow: hidden;
  width: 100%;
  margin-top: 8px;
  color: var(--ink2);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  word-break: break-all;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.vs-desc {
  display: -webkit-box;
  overflow: hidden;
  width: 100%;
  min-height: 34px;
  margin: 0;
  color: #8a5fb0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  word-break: break-all;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.vs-cat { padding: 1px 10px; color: var(--c); background: var(--c-soft); border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.vs-price { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--price); font-family: var(--font-title); font-size: 22px; line-height: 1.1; }
.vs-price small { color: #e0741a; font-family: var(--font-body); font-size: 12px; font-weight: 800; }
.vs-buy { width: 100%; height: 38px; margin-top: 4px; font-size: 14px; }
.vs-card.poor .vs-price { color: #c8508c; }
.vs-card.poor .vs-buy { background: linear-gradient(180deg, #d8c8f0, #b8a2e0); box-shadow: 0 5px 0 #9a83c8; }

/* 分类配色（按分类号循环：主色、浅底、中间色、深色；不用 color-mix，旧版手机 WebView 也能显示） */
.vs-card, .cat-tab, .buy-icon, .confirm-item, .c1 { --c: #ff6fa5; --c-soft: #ffe3ee; --c-mid: #ffc2d9; --c-deep: #d4437a; }
.c2 { --c: #3b9cf3; --c-soft: #e0f0fe; --c-mid: #b9dcfb; --c-deep: #2272c2; }
.c3 { --c: #9b7af2; --c-soft: #efe9fe; --c-mid: #d7cafb; --c-deep: #6a45cf; }
.c4 { --c: #22b89a; --c-soft: #dcf6f0; --c-mid: #aee9dc; --c-deep: #138a72; }
.c5 { --c: #f39a1e; --c-soft: #fff0db; --c-mid: #fdd9a3; --c-deep: #c26f08; }
.c6 { --c: #ff7a55; --c-soft: #ffe8e1; --c-mid: #ffc9b9; --c-deep: #d4532f; }
.c0, .done-item { --c: #ff9f2e; --c-soft: #fff1dc; --c-mid: #ffd9a6; --c-deep: #d8701b; }

/* 空结果、分页 */
.mall-empty { display: grid; justify-items: center; gap: 6px; padding: 30px 10px; color: var(--grape); font-weight: 800; }
.mall-empty img { max-height: 60px; animation: hop 1.6s var(--ease-jelly) infinite; }
.mall-empty p { margin: 0; }
.mall-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 0; }
.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  color: var(--grape);
  background: #fff;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(120, 70, 140, .14);
  font: 800 14px var(--font-body);
  cursor: pointer;
  transition: transform .3s var(--ease-jelly);
}
.page-btn.active { color: #fff; background: linear-gradient(180deg, #b39bff, #8a63f0); box-shadow: 0 4px 0 #6a45cf; }
.page-btn:disabled { cursor: default; opacity: .45; }

/* ================= 购买记录 ================= */
.orders-card { padding: 16px 18px 18px; background: #fff; border: 4px solid #fff; border-radius: 28px; box-shadow: var(--shadow-q); }
.orders-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.orders-head p { margin: 0; color: var(--grape); font-size: 13.5px; font-weight: 800; }
.orders-scroll { overflow-x: auto; }
.orders-table { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
.orders-table th { padding: 8px 10px; color: #fff; background: linear-gradient(180deg, #b39bff, #8a63f0); font-weight: 800; text-align: left; }
.orders-table th:first-child { border-radius: 14px 0 0 14px; }
.orders-table th:last-child { border-radius: 0 14px 14px 0; }
.orders-table td { padding: 10px; color: var(--ink2); background: #fbf6ff; font-weight: 700; }
.orders-table td:first-child { border-radius: 14px 0 0 14px; color: var(--pink-deep); }
.orders-table td:last-child { border-radius: 0 14px 14px 0; color: var(--sky2); }
.orders-table td.num { color: var(--price); }
.orders-table td.empty { color: var(--grape); text-align: center; }

/* ================= 弹窗 ================= */
.vs-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(74, 46, 92, .42);
  animation: fade-in .2s ease;
}
.vs-modal {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100vh - 32px);
  padding: 22px 22px 20px;
  overflow-y: auto;
  background: var(--card);
  border: 4px solid #fff;
  border-radius: 30px;
  box-shadow: 0 10px 0 rgba(120, 70, 140, .15), 0 30px 60px -20px rgba(60, 20, 80, .6);
  animation: modal-pop .45s var(--ease-jelly);
}
.vs-modal h2 { margin: 0; color: var(--ink2); font-family: var(--font-title); font-size: 24px; letter-spacing: 2px; }
.vs-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  color: var(--pink-deep);
  background: #ffe3ef;
  border: 2px solid #fff;
  border-radius: 50%;
  font: 800 22px/1 var(--font-body);
  cursor: pointer;
}
.buy-top { display: flex; align-items: center; gap: 16px; padding-right: 30px; }
.buy-icon .vs-icon { width: 96px; height: 96px; }
.buy-cat { margin: 0 0 2px; color: var(--grape); font-size: 12.5px; font-weight: 800; }
.buy-price { display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 0; color: var(--price); font-size: 14px; font-weight: 800; }
.buy-price b { font-family: var(--font-title); font-size: 24px; font-weight: 400; }
.buy-effect { margin: 14px 0 0; padding: 10px 14px; color: #5b3d7a; background: #f6efff; border-radius: 16px; font-size: 14px; font-weight: 700; line-height: 1.6; }
.buy-pack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pack-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; color: #0f7a64; background: #e2f8f2; border-radius: 999px; font-size: 13px; font-weight: 800; }
.pack-chip img { max-width: 28px; max-height: 28px; }
.buy-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 14px; }
.buy-field { display: grid; gap: 6px; color: var(--leaf); font-size: 13px; font-weight: 800; }
.buy-field select {
  height: 44px;
  padding: 0 12px;
  color: var(--ink2);
  background: #fff;
  border: 2px solid var(--card-line);
  border-radius: 14px;
  font: 700 14px var(--font-body);
}
.qty-stepper { display: inline-flex; justify-self: start; align-items: center; height: 44px; background: #fff; border: 2px solid var(--card-line); border-radius: 999px; }
.qty-stepper button {
  width: 40px;
  height: 40px;
  color: #fff;
  background: linear-gradient(180deg, #ff9cc6, #ff5c98);
  border: 2px solid #fff;
  border-radius: 50%;
  font: 800 20px/1 var(--font-body);
  cursor: pointer;
}
.qty-stepper input { width: 52px; height: 40px; padding: 0; background: transparent; border: 0; box-shadow: none; font: 800 18px var(--font-body); text-align: center; -moz-appearance: textfield; }
.qty-stepper input::-webkit-inner-spin-button, .qty-stepper input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.buy-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--card-line); }
.buy-total { display: inline-flex; align-items: center; gap: 5px; margin: 0; color: var(--ink2); font-size: 14px; font-weight: 800; }
.buy-total b { color: var(--price); font-family: var(--font-title); font-size: 26px; font-weight: 400; }
.buy-after { grid-column: 1; margin: 0; color: var(--mint-deep); font-size: 12.5px; font-weight: 800; }
.buy-after.short { color: #e0405a; }
.buy-bottom .candy-btn { grid-row: 1 / span 2; grid-column: 2; }

.confirm-modal, .done-modal { text-align: center; }
.confirm-item { display: flex; justify-content: center; margin: 14px 0 6px; }
.confirm-text { margin: 6px 0 0; color: var(--ink2); font-size: 15px; font-weight: 700; line-height: 1.7; white-space: pre-line; }
.confirm-total { margin: 8px 0 0; color: var(--price); font-family: var(--font-title); font-size: 24px; }
.confirm-error { margin: 10px 0 0; color: #e0405a; font-size: 14px; font-weight: 800; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }

/* 购买成功：礼盒弹开、商品跳出、彩纸星星 */
.done-stage { position: relative; height: 170px; margin: -4px auto 6px; }
.gift { position: absolute; bottom: 8px; left: 50%; width: 96px; height: 80px; transform: translateX(-50%); }
.gift-box {
  position: absolute;
  bottom: 0;
  left: 6px;
  width: 84px;
  height: 58px;
  background:
    linear-gradient(90deg, transparent 37px, #ffe07a 37px 47px, transparent 47px),
    linear-gradient(180deg, #ff8fbc, #ff5c98);
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: 0 5px 0 #d4437a;
}
.gift-lid {
  position: absolute;
  bottom: 52px;
  left: 0;
  z-index: 1;
  width: 96px;
  height: 22px;
  background:
    linear-gradient(90deg, transparent 43px, #ffe07a 43px 53px, transparent 53px),
    linear-gradient(180deg, #ffa3cb, #ff6fa5);
  border: 3px solid #fff;
  border-radius: 8px;
}
.gift-lid::before, .gift-lid::after {
  content: "";
  position: absolute;
  top: -16px;
  width: 22px;
  height: 18px;
  border: 5px solid #ffd23f;
  border-radius: 50% 50% 10% 50%;
}
.gift-lid::before { left: 24px; transform: rotate(-20deg); }
.gift-lid::after { right: 24px; transform: scaleX(-1) rotate(-20deg); }
.done-item { position: absolute; bottom: 40px; left: 50%; opacity: 0; transform: translateX(-50%); }
.done-item .vs-icon { width: 82px; height: 82px; }
.done-stage.play .gift { animation: gift-shake .5s ease-in-out; }
.done-stage.play .gift-lid { animation: lid-fly .7s .45s var(--ease-out) forwards; }
.done-stage.play .done-item { animation: item-rise .8s .6s var(--ease-jelly) forwards; }
.confetti { position: absolute; top: 60px; left: 50%; width: 9px; height: 13px; border-radius: 3px; pointer-events: none; animation: confetti-fly 1.8s var(--ease-out) forwards; }
.confetti.star { width: auto; height: auto; color: #ffc53a; background: none; font-size: 18px; }
.done-text { margin: 6px 0 0; color: var(--ink2); font-size: 15px; font-weight: 700; line-height: 1.7; }
.done-text b { color: var(--pink-deep); }

/* ================= 动画 ================= */
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-9px); } 60% { transform: translateY(-4px); } }
@keyframes twinkle { 0%, 100% { opacity: .3; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes card-pop { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -20px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(26px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes gift-shake { 0%, 100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(-50%) rotate(-8deg); } 75% { transform: translateX(-50%) rotate(8deg); } }
@keyframes lid-fly { to { opacity: 0; transform: translate(40px, -70px) rotate(35deg); } }
@keyframes item-rise { 0% { opacity: 0; transform: translate(-50%, 30px) scale(.4); } 70% { opacity: 1; transform: translate(-50%, -62px) scale(1.12); } 100% { opacity: 1; transform: translate(-50%, -50px) scale(1); } }
@keyframes confetti-fly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.5); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}

/* ================= 只给鼠标设备的悬停效果（触屏不粘悬停） ================= */
@media (hover: hover) and (pointer: fine) {
  .candy-btn:hover { transform: translateY(-2px) scale(1.03); }
  .switch-btn:hover, .cat-tab:hover, .page-btn:hover:not(:disabled) { transform: translateY(-2px); }
  .vs-card:hover { transform: translateY(-6px); box-shadow: 0 10px 0 rgba(120, 70, 140, .1), 0 22px 36px -14px rgba(120, 70, 140, .5); }
  .vs-card:hover .vs-icon img { transform: scale(1.5) rotate(-6deg); }
  .rec-card:hover { transform: translateY(-4px) rotate(-1deg); }
  .vs-close:hover { background: #ffd0e3; }
  .qty-stepper button:hover { filter: brightness(1.06); }
  .login-captcha-img:hover { border-color: var(--pink); }
}

/* ================= 手机 ================= */
@media (max-width: 760px) {
  .mall-shell { padding-top: 14px; }
  .mall-hero { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 14px 14px 16px; border-radius: 24px; }
  .hero-art { height: 70px; }
  .hero-pet-a { left: 6px; max-width: 60px; max-height: 56px; }
  .hero-pet-b, .hero-spark.s2 { display: none; }
  .hero-text h1 { font-size: 27px; letter-spacing: 2px; }
  .hero-sub { font-size: 12px; }
  .hero-wallet { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; min-width: 0; padding: 8px 12px; }
  .wallet-value { font-size: 24px; }
  .cat-tabs { flex-wrap: nowrap; margin: 0 -12px; padding: 4px 12px 8px; overflow-x: auto; scrollbar-width: none; }
  .cat-tab { height: 42px; font-size: 13px; }
  .mall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vs-card { padding: 12px 8px 10px; border-radius: 20px; }
  .vs-card::before { height: 78px; border-radius: 17px 17px 0 0; }
  .vs-icon { width: 72px; height: 72px; }
  .vs-name { font-size: 13.5px; }
  .vs-desc { font-size: 11.5px; }
  .vs-price { font-size: 19px; }
  .vs-tag, .vs-gift { font-size: 11px; }
  .result-count { width: 100%; margin-left: 4px; }
  .buy-form { grid-template-columns: 1fr; }
  .vs-modal { padding: 18px 16px 16px; border-radius: 26px; }
  .vs-modal h2 { font-size: 20px; letter-spacing: 1px; }
  .buy-icon .vs-icon { width: 80px; height: 80px; }
  .buy-bottom { grid-template-columns: 1fr; }
  .buy-bottom .candy-btn { grid-row: auto; grid-column: auto; width: 100%; }
  .rec-card { width: 116px; }
}
@media (max-width: 380px) {
  .mall-grid { gap: 8px; }
  .vs-buy { height: 34px; font-size: 13px; }
  .login-captcha { grid-template-columns: minmax(0, 1fr) 120px; }
  .login-captcha-img { width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .vs-card, .rec-card, .vs-modal, .mall-toast { animation: none; }
  .done-stage .done-item { opacity: 1; transform: translate(-50%, -50px); }
}
