/* ================= MangMang 电脑版「红白任天堂」（桌面优先，手机请走 /m） ================= */
:root {
  --mm-bg: #ffffff;
  --mm-bg-deep: #f2f2f2;
  --mm-card: #ffffff;
  --mm-card2: #f6f6f6;
  --mm-line: #e6e6e6;
  --mm-text: #484848;
  --mm-muted: #969696;
  /* 任天堂红（主行动色） */
  --mm-red: #e60012;
  --mm-red-deep: #ac000d;
  --mm-red-ink: #ffffff;
  --mm-red-grad: linear-gradient(135deg, #ff3345, #e60012);
  --mm-red-soft: #fdeef0;
  --mm-red-line: #f3c6ca;
  /* 旧引用相容（原鎏金主行动色 → 任天堂红） */
  --mm-gold: var(--mm-red);
  --mm-gold-deep: var(--mm-red-deep);
  --mm-gold-ink: var(--mm-red-ink);
  --mm-gold-grad: var(--mm-red-grad);
  --mm-red-dark: var(--mm-red-deep);
  --mm-yellow: #f5a623;
  --mm-purple: #8b5cf6;
  --mm-purple-soft: #c084fc;
  /* 等级色：SP 金 / A 橙 / B 紫 / C 蓝（SP 保留金色专用渐层） */
  --mm-sp: #d9a514;
  --mm-sp-grad: linear-gradient(135deg, #f6d878, #dfa32e);
  --mm-sp-ink: #241d05;
  --mm-a: #ff7a45;
  --mm-b: #8b5cf6;
  --mm-c: #38a2e8;
  /* Banner 素材比例：web 与 m 两端共用，改这里两端一起变（后台 banners.php 的建议尺寸也要同步） */
  --mm-banner-ratio: 1920 / 819;
  /* 一番赏等级 icon 的高度，宽度由各字比例自动换算 */
  --lv-ico-h: 20px;
}
html, body { background: var(--mm-bg); }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--mm-text); font-size: 15px;
  --bs-body-bg: var(--mm-bg);
  --bs-body-color: var(--mm-text);
  --bs-border-color: var(--mm-line);
  --bs-secondary-color: var(--mm-muted);
  --bs-tertiary-bg: var(--mm-card2);
  --bs-secondary-bg: var(--mm-card2);
}
::selection { background: rgba(230,0,18,.18); }
* { scrollbar-width: thin; scrollbar-color: #cfcfcf transparent; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ================= 顶部导航：任天堂红底 + 白色胶囊 logo ================= */
.site-header { position: sticky; top: 0; z-index: 1030; background: var(--mm-red); border-bottom: 0; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.site-header .hd-inner { max-width: 1280px; margin: 0 auto; height: 68px; padding: 0 32px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 1.35rem; color: var(--mm-red); text-decoration: none; letter-spacing: .5px; }
.brand:hover { color: var(--mm-red-deep); }
.brand-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--mm-red); color: #fff; font-size: 1.1rem; box-shadow: 0 2px 10px rgba(230,0,18,.28); }
.brand-logo { height: 40px; display: block; }
.hd-links { display: flex; gap: 4px; flex: 1; }
.hd-links a { color: rgba(255,255,255,.82); text-decoration: none; font-weight: 700; font-size: .98rem; padding: 9px 16px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; }
.hd-links .nav-ico { height: 24px; width: auto; object-fit: contain; }
.hd-links a:hover { color: #fff; background: rgba(255,255,255,.12); }
.hd-links a.active { color: #fff; background: rgba(255,255,255,.18); }
.hd-right { display: flex; align-items: center; gap: 10px; }
.hd-bal { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #fff; color: var(--mm-red); border-radius: 20px; padding: 6px 15px; font-weight: 800; font-size: .9rem; text-decoration: none; }
.hd-bal:hover { color: var(--mm-red-deep); background: #ffe3e6; border-color: #ffe3e6; }
.hd-avt { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.badge-dot { position: absolute; top: -4px; right: -4px; background: var(--mm-red); color: #fff; font-size: .62rem; border-radius: 10px; padding: 1px 5px; }
/* 红底顶栏内元件反白（语言/铃铛/登入） */
.site-header .btn-light { --bs-btn-bg: transparent; --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.6); --bs-btn-hover-bg: rgba(255,255,255,.14); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #fff; --bs-btn-active-bg: rgba(255,255,255,.2); --bs-btn-active-color: #fff; }
.site-header .btn-danger { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: var(--mm-red); --bs-btn-hover-bg: #ffe3e6; --bs-btn-hover-border-color: #ffe3e6; --bs-btn-hover-color: var(--mm-red-deep); --bs-btn-active-bg: #ffe3e6; --bs-btn-active-color: var(--mm-red-deep); }
.site-header .badge-dot { background: #fff; color: var(--mm-red); font-weight: 800; }

/* 子页标题列 */
.page-head { display: flex; align-items: center; gap: 12px; padding: 22px 0 4px; font-weight: 800; font-size: 1.3rem; }
.page-head a.bk { color: var(--mm-muted); text-decoration: none; font-size: 1.35rem; line-height: 1; }
.page-head a.bk:hover { color: var(--mm-red); }

.site-main { min-height: calc(100vh - 68px - 220px); padding-bottom: 60px; }

/* 内容窄栏页（表单/流程页自动置中收窄） */
.pg-login .pg-in, .pg-register .pg-in, .pg-settings .pg-in, .pg-address .pg-in, .pg-bindphone .pg-in, .pg-bindemail .pg-in, .pg-editprofile .pg-in,
.pg-recharge .pg-in, .pg-withdraw .pg-in, .pg-daily .pg-in, .pg-freebox .pg-in, .pg-invite .pg-in,
.pg-coupons .pg-in, .pg-messages .pg-in, .pg-orders .pg-in, .pg-box_raffle .pg-in { max-width: 780px; margin: 0 auto; }
.pg-records .pg-in, .pg-winners .pg-in, .pg-follows .pg-in { max-width: 900px; margin: 0 auto; }
.pg-box_blindbox .pg-in { max-width: 1020px; margin: 0 auto; }
.pg-mine .pg-in, .pg-profile .pg-in { max-width: 1020px; margin: 0 auto; }

/* ================= 页尾：任天堂红底白字 ================= */
.site-footer { background: var(--mm-red); border-top: 0; margin-top: 40px; }
.site-footer .ft-inner { max-width: 1280px; margin: 0 auto; padding: 40px 32px 20px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h6 { color: #fff; font-weight: 800; margin-bottom: 14px; font-size: .95rem; }
.site-footer .ft-brand { margin-bottom: 10px; }
.site-footer .brand-logo { height: 36px; }
.site-footer p, .site-footer a { color: rgba(255,255,255,.78); font-size: .85rem; text-decoration: none; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.ft-copy { border-top: 1px solid rgba(255,255,255,.25); text-align: center; color: rgba(255,255,255,.7); font-size: .78rem; padding: 16px 0; }

/* ================= 通用元件 ================= */
.mm-card { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; padding: 16px; }
.lv-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 20px; padding: 0 6px; border-radius: 6px; color: #fff; font-size: .72rem; font-weight: 800; }
/* 头奖（抽奖玩法）沿用原本的金色文字徽章 */
.lv-grand { background: var(--mm-sp-grad); color: var(--mm-sp-ink); box-shadow: 0 0 8px rgba(217,165,20,.45); }
/* 一番赏等级 SP/A/B/C 改用图片 icon：文字隐藏，宽度按各图原始比例算，改 --lv-ico-h 即可整站缩放 */
.lv-SP, .lv-A, .lv-B, .lv-C {
  background: no-repeat center / contain;
  height: var(--lv-ico-h); padding: 0; min-width: 0;
  border-radius: 0; box-shadow: none; color: transparent; font-size: 0;
}
.lv-SP { background-image: url(../img/level/lv_sp.webp); width: calc(var(--lv-ico-h) * 1.508); }
.lv-A  { background-image: url(../img/level/lv_a.webp);  width: calc(var(--lv-ico-h) * 1.092); }
.lv-B  { background-image: url(../img/level/lv_b.webp);  width: calc(var(--lv-ico-h) * 1.023); }
.lv-C  { background-image: url(../img/level/lv_c.webp);  width: calc(var(--lv-ico-h) * 0.985); }
/* 奖品卡左上角的角标：原本是有内距的色块，换 icon 后要把内距/圆角/文字色一起取消 */
.prize-card .lv-tag.lv-SP, .prize-card .lv-tag.lv-A,
.prize-card .lv-tag.lv-B, .prize-card .lv-tag.lv-C { padding: 0; border-radius: 0; color: transparent; top: 6px; left: 6px; }
.btn-mm { background: var(--mm-red); color: #fff; border: 0; border-radius: 12px; padding: 12px; font-weight: 800; width: 100%; box-shadow: 0 3px 12px rgba(230,0,18,.22); }
.btn-mm:hover { color: #fff; background: var(--mm-red-deep); }
.btn-mm:disabled { opacity: .55; }
.empty { text-align: center; color: var(--mm-muted); padding: 60px 0; }
.empty i { font-size: 3rem; display: block; margin-bottom: 8px; opacity: .4; }
#mm-toast { position: fixed; top: 40%; left: 50%; transform: translate(-50%, -50%); background: rgba(40,40,40,.94); border: 0; color: #fff; padding: 12px 22px; border-radius: 12px; z-index: 3000; display: none; max-width: 420px; text-align: center; font-size: .9rem; }
.keep-white { background: #fff !important; color: #1c1c1e !important; }
.keep-white .text-muted { color: #6c6c72 !important; }
.min-w-0 { min-width: 0; }

/* ================= 首页 ================= */
.home-hero { display: grid; grid-template-columns: 1fr 380px; gap: 20px; padding-top: 24px; }
/* Banner 比例与 /m 端一致（--mm-banner-ratio），素材照这个比例做就不会被裁 */
.hh-banner { aspect-ratio: var(--mm-banner-ratio); }
.hh-banner .carousel, .hh-banner .carousel-inner, .hh-banner .carousel-item { height: 100%; }
.hh-banner .carousel-item img { width: 100%; height: 100%; border-radius: 18px; object-fit: cover; }
.hh-side { display: flex; flex-direction: column; gap: 14px; }
.hero-cta { flex: 1; border-radius: 18px; padding: 26px 24px; position: relative; overflow: hidden; display: block; text-decoration: none;
  background: linear-gradient(135deg, #ff4353, #e60012 62%, #c9000f);
  border: 1px solid #c9000f; box-shadow: 0 8px 22px rgba(230,0,18,.22); }
.hero-cta:hover { border-color: var(--mm-red-deep); }
.hero-cta .eyebrow { font-size: .68rem; font-weight: 800; letter-spacing: 3px; color: rgba(255,255,255,.85); }
.hero-cta h2 { font-size: 1.6rem; font-weight: 900; line-height: 1.3; color: #fff; margin: 8px 0 4px; }
.hero-cta .sub { font-size: .82rem; color: rgba(255,255,255,.82); margin-bottom: 16px; }
.hero-cta .go { display: inline-block; border-radius: 12px; padding: 10px 24px; font-weight: 900; font-size: .92rem; background: #fff; color: var(--mm-red); box-shadow: 0 3px 12px rgba(0,0,0,.15); }
.hero-cta .art { position: absolute; right: 6px; bottom: -12px; font-size: 84px; transform: rotate(-8deg); filter: drop-shadow(0 4px 12px rgba(0,0,0,.22)); }
/* 后台上传图片版：整块换成图，去掉红底与内距 */
.hero-cta-img { padding: 0; background: none; border-color: transparent; }
.hero-cta-img img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }

/* 快捷入口（横向胶囊卡） */
.quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 22px 0 0; }
.quick-grid a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--mm-text); font-size: .92rem; font-weight: 700; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; padding: 12px 16px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.quick-grid a:hover { border-color: var(--mm-red); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.quick-grid .q-ico { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
/* 图片版快捷图标（本身已带 3D 立体与阴影，不再叠底色/圆角/投影） */
.quick-grid img.q-ico { width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; background: none; box-shadow: none; border-radius: 0; }
.q-timer { display: inline-block; background: #fff; border: 1px solid var(--mm-red-line); color: var(--mm-red); font-size: .74rem; border-radius: 6px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.q-label-hl { display: inline-block; background: var(--mm-red); color: #fff; border-radius: 8px; padding: 1px 10px; font-weight: 700; }

/* 恭喜开奖流 */
.congrats-bar { margin: 26px 0 0; background: linear-gradient(180deg, var(--mm-red-soft), #fff 60%); border: 1px solid var(--mm-red-line); border-radius: 14px; padding: 12px 14px 14px; position: relative; overflow: hidden; }
.congrats-bar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--mm-red), #ff8a94); }
.congrats-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.congrats-head .ttl { font-weight: 900; font-style: italic; letter-spacing: .5px; color: var(--mm-text); font-size: 1.05rem; }
.congrats-head .ttl::before { content: ''; display: inline-block; width: 4px; height: 14px; background: var(--mm-red); border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.congrats-track { overflow: hidden; }
.congrats-inner { display: flex; gap: 12px; transition: transform .5s ease; }
.congrats-item { flex: 0 0 24%; display: flex; align-items: center; gap: 10px; background: var(--mm-red-soft); border: 1px solid var(--mm-red-line); border-radius: 12px; padding: 10px 12px; position: relative; overflow: hidden; text-decoration: none; color: inherit; }
/* 滑入定格特效：轻弹跳 + 白色扫光 */
.congrats-item.pop { animation: ci-pop .55s cubic-bezier(.34,1.56,.64,1); }
@keyframes ci-pop { 0% { transform: scale(.95); } 60% { transform: scale(1.035); } 100% { transform: scale(1); } }
.congrats-item.pop::after { content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 55%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.8) 50%, transparent); transform: skewX(-18deg); animation: ci-shine .7s ease .15s; }
@keyframes ci-shine { to { left: 135%; } }
/* 恭喜小卡背景：六色随机（civ1~civ6，渲染时每张卡随机挂一个），之后换 png/jpg 直接改对应 url */
.congrats-item.civ1, .congrats-item.civ2, .congrats-item.civ3, .congrats-item.civ4, .congrats-item.civ5, .congrats-item.civ6 { background-size: cover; background-position: center; }
.congrats-item.civ1 { background-image: url(../img/congrats_item_bg1.svg); border-color: #f28e9a; }
.congrats-item.civ1 .nm { color: #7a1420; }
.congrats-item.civ1 .pz { color: #99424c; }
.congrats-item.civ1 .pz b { color: #c3000f; }
.congrats-item.civ2 { background-image: url(../img/congrats_item_v2.svg); border-color: #b8000e; }
.congrats-item.civ2 .nm { color: #fff; }
.congrats-item.civ2 .pz { color: rgba(255,255,255,.88); }
.congrats-item.civ2 .pz b { color: #ffe066; }
.congrats-item.civ3 { background-image: url(../img/congrats_item_v3.svg); border-color: #eb9c37; }
.congrats-item.civ3 .nm { color: #6f4200; }
.congrats-item.civ3 .pz { color: #93621a; }
.congrats-item.civ3 .pz b { color: #d43a00; }
.congrats-item.civ4 { background-image: url(../img/congrats_item_v4.svg); border-color: #b489ec; }
.congrats-item.civ4 .nm { color: #45156f; }
.congrats-item.civ4 .pz { color: #6b4699; }
.congrats-item.civ4 .pz b { color: #7d1fd1; }
.congrats-item.civ5 { background-image: url(../img/congrats_item_v5.svg); border-color: #7fb0e8; }
.congrats-item.civ5 .nm { color: #123c6b; }
.congrats-item.civ5 .pz { color: #3c6491; }
.congrats-item.civ5 .pz b { color: #0b5ed7; }
.congrats-item.civ6 { background-image: url(../img/congrats_item_v6.svg); border-color: #6cc9a1; }
.congrats-item.civ6 .nm { color: #0f5c3c; }
.congrats-item.civ6 .pz { color: #3a7d61; }
.congrats-item.civ6 .pz b { color: #0c8a5a; }
.congrats-item img.avt { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.congrats-item img.pimg { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; margin-left: auto; }
.congrats-item .nm { font-weight: 700; font-size: .84rem; color: var(--mm-text); }
.congrats-item .pz { font-size: .76rem; color: var(--mm-muted); }
.congrats-item .pz b { color: var(--mm-red); }

/* 分类 + 盒子网格 */
.cat-tabs { display: flex; gap: 26px; overflow-x: auto; padding: 26px 2px 6px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a { white-space: nowrap; color: var(--mm-muted); text-decoration: none; font-weight: 700; font-size: 1.05rem; padding-bottom: 8px; position: relative; }
.cat-tabs a.active { color: var(--mm-red); }
.cat-tabs a.active::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 0; height: 3px; border-radius: 2px; background: var(--mm-red); }
.box-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 16px 0; }
.box-card { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--mm-text); display: block; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.box-card:hover { transform: translateY(-4px); border-color: var(--mm-red); box-shadow: 0 10px 24px rgba(0,0,0,.1); color: var(--mm-text); }
.box-card .imgwrap { position: relative; }
.box-card img.cover { width: 100%; aspect-ratio: 1; object-fit: cover; }
.box-card .sold { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
/* 售出数更新特效：轻微弹跳 */
.box-card .sold.bump { animation: sold-bump .5s ease-out; }
@keyframes sold-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); background: rgba(0,0,0,.72); }
  100% { transform: scale(1); }
}
/* 数字实时更新特效：内页「第几抽」/已售数跳一下（首页列表用上面的 sold-bump） */
.num-bump { display: inline-block; animation: num-bump .55s ease-out; }
@keyframes num-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); text-shadow: 0 0 12px rgba(255,255,255,.85); }
  100% { transform: scale(1); }
}
.box-card .info { padding: 12px 14px 14px; }
.box-card .nm { font-size: .95rem; font-weight: 700; line-height: 1.35; height: 2.7em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.box-card .pr { color: var(--mm-red); font-weight: 900; font-size: 1.1rem; }
.box-card .play-badge { position: absolute; left: 0; top: 0; z-index: 2; color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 11px; border-radius: 14px 0 14px 0; }
.play-badge.blindbox { background: linear-gradient(135deg, #4facfe, #0068d8); }
.play-badge.raffle { background: linear-gradient(135deg, #c084fc, #8e44e8); }

/* ================= 盒子详情（双栏） ================= */
.bd-grid { display: grid; grid-template-columns: 1fr 400px; gap: 24px; align-items: start; padding-top: 20px; }
.bd-cover { border-radius: 18px; overflow: hidden; border: 1px solid var(--mm-line); }
.bd-cover img { width: 100%; height: 380px; object-fit: cover; display: block; }
.bd-sec-title { font-weight: 900; font-size: 1.1rem; margin: 24px 0 4px; display: flex; align-items: center; gap: 8px; }
.bd-sec-title::after { content: ""; flex: 1; height: 1px; background: var(--mm-line); }
.prize-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 12px 0; }
.prize-card { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 12px; overflow: hidden; position: relative; }
.prize-card .lv-tag { position: absolute; top: 0; left: 0; z-index: 2; border-radius: 0 0 10px 0; padding: 2px 10px; color: #fff; font-size: .74rem; font-weight: 900; }
.prize-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.prize-card .pp { position: absolute; right: 6px; top: auto; bottom: 66px; }
.prize-card .prob { position: absolute; right: 8px; bottom: 56px; background: rgba(0,0,0,.55); color: #fff; font-size: .68rem; border-radius: 8px; padding: 1px 7px; }
.prize-card .nm { font-size: .78rem; padding: 6px 8px 0; height: 2.5em; overflow: hidden; line-height: 1.25; }
.prize-card .pr { color: var(--mm-red); font-weight: 800; font-size: .85rem; padding: 2px 8px 8px; }
.prize-card .bb-role { position: absolute; right: 6px; top: 6px; z-index: 2; }
.prize-card.bb-hidden-card { box-shadow: 0 0 0 2px #c084fc, 0 0 14px rgba(139,92,246,.35); }

/* 右侧购买面板 */
.buy-panel { position: sticky; top: 88px; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 18px; padding: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.buy-panel .bp-title { font-size: 1.3rem; font-weight: 900; line-height: 1.35; }
.buy-panel .bp-price { color: var(--mm-red); font-weight: 900; font-size: 1.7rem; margin: 8px 0 2px; }
.buy-panel .bp-price small { color: var(--mm-muted); font-weight: 600; font-size: .85rem; }
.bp-stats { display: flex; text-align: center; background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 12px; padding: 10px 0; margin: 12px 0; }
.bp-stats > div { flex: 1; }
.bp-stats .v { color: var(--mm-red); font-weight: 900; font-variant-numeric: tabular-nums; }
.bp-stats .k { font-size: .72rem; color: var(--mm-muted); }
.prob-bar { display: flex; align-items: center; background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 12px; padding: 10px 8px; margin-bottom: 12px; }
.prob-bar .pcol { flex: 1; text-align: center; }
.prob-bar .lv { font-weight: 900; }
/* 机率列的等级用大一号的 icon，块级要 margin auto 才会置中 */
.prob-bar .lv[class*="lv-"] { --lv-ico-h: 26px; margin: 0 auto 2px; }
.prob-bar .pv { font-size: .75rem; color: var(--mm-muted); }
.prob-bar .rec-btn { background: #fff; color: var(--mm-red); border: 1px solid var(--mm-red-line); border-radius: 10px; padding: 8px 12px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.bp-online { text-align: center; color: var(--mm-muted); font-size: .8rem; margin-bottom: 12px; }
.draw-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.draw-bar button { background: var(--mm-red); color: #fff; border: 0; border-radius: 12px; padding: 13px 0; font-weight: 900; font-size: .98rem; box-shadow: 0 3px 12px rgba(230,0,18,.22); }
.draw-bar button:hover { background: var(--mm-red-deep); }
.draw-bar button:active { transform: translateY(1px); }
.draw-bar button.free { grid-column: 1 / -1; background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; box-shadow: 0 3px 14px rgba(139,92,246,.35); }
.draw-bar button:disabled { grid-column: 1 / -1; background: #c4c4c4; color: #fff; box-shadow: none; cursor: not-allowed; }
.draw-bar button:disabled:hover { background: #c4c4c4; }
/* 前台分页条 */
.front-pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 22px 0 6px; }
.front-pager a, .front-pager .cur { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border-radius: 10px; border: 1px solid var(--mm-line); background: #fff; color: var(--mm-text); text-decoration: none; font-weight: 700; font-size: .9rem; }
.front-pager a:hover { border-color: var(--mm-red); color: var(--mm-red); }
.front-pager .cur { background: var(--mm-red); border-color: var(--mm-red); color: #fff; }
.front-pager .dots { color: #b5b5b5; }

/* 售罄盲盒：列表卡置灰 + 角标 */
.box-card.soldout .cover { filter: grayscale(1); opacity: .8; }
.soldout-badge { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); color: #fff; font-weight: 900; font-size: 1.15rem; letter-spacing: 3px; }

/* 中奖记录（面板内滚动） */
.win-list { background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 12px; padding: 8px; height: 210px; overflow: hidden; position: relative; margin-top: 14px; }
.win-list .wl-inner { display: flex; flex-direction: column; gap: 6px; }
.win-item { display: flex; align-items: center; gap: 8px; background: var(--mm-card); border-radius: 10px; padding: 6px 10px; font-size: .78rem; }
.win-item img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.win-item .t { color: var(--mm-muted); }

/* 旧版相容（box_blindbox / box_raffle 沿用的类） */
.detail-top { display: grid; grid-template-columns: 320px 1fr; gap: 18px; padding-top: 20px; }
.detail-boximg { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.detail-boximg img { width: 100%; height: 300px; object-fit: cover; }
.detail-stats { display: flex; text-align: center; padding: 10px 0; }
.detail-stats > div { flex: 1; }
.detail-stats .v { color: var(--mm-red); font-weight: 900; }
.detail-stats .k { font-size: .72rem; color: var(--mm-muted); }
.draw-counter { background: var(--mm-red); border: 1px solid var(--mm-red); color: #fff; text-align: center; border-radius: 12px; padding: 10px; font-weight: 900; font-size: 1.1rem; letter-spacing: 1px; margin-top: 14px; font-variant-numeric: tabular-nums; }

/* ================= 盲盒玩法 ================= */
.bb-hint { background: var(--mm-red-soft); border: 1px solid var(--mm-red-line); border-radius: 10px; margin-top: 12px; padding: 10px 14px; font-size: .84rem; color: var(--mm-text); }
.bb-role { display: inline-block; font-size: .64rem; font-weight: 800; color: #fff; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.bb-role.basic { background: #9a9a9a; }
.bb-role.hidden { background: linear-gradient(135deg, #8b5cf6, #5b21b6); box-shadow: 0 0 8px rgba(139,92,246,.5); }
.bb-stage { position: fixed; inset: 0; z-index: 2000; display: none; flex-direction: column; overflow-y: auto; background: radial-gradient(120% 90% at 50% 0%, #ff3345 0%, #e60012 55%, #c9000f 100%); }
.bb-stage.show { display: flex; }
.bb-inner { width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; position: relative; flex: 1; display: flex; flex-direction: column; }
.bb-area { flex: 1; display: flex; align-items: center; justify-content: center; }
.bb-grid { display: grid; gap: 14px; width: 100%; }
.bb-grid.g-one { grid-template-columns: repeat(4, 1fr); }
.bb-grid.g-case { grid-template-columns: repeat(3, 1fr); padding: 0 6px; }
.bb-box { position: relative; aspect-ratio: 3/4; border-radius: 14px; background: #fff; border: 2px solid #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.bb-grid.g-case .bb-box { aspect-ratio: 4/5; }
.bb-box .emo { font-size: 2.2rem; }
.bb-grid.g-case .bb-box .emo { font-size: 3rem; }
.bb-box .qm { color: var(--mm-red); font-weight: 900; font-size: 1.25rem; margin-top: 2px; }
.bb-box .no { position: absolute; left: 9px; top: 7px; color: #b8b8b8; font-size: .74rem; font-weight: 700; }
.bb-box.sel { border-color: #ffd400; box-shadow: 0 0 0 3px rgba(255,212,0,.5), 0 6px 16px rgba(0,0,0,.22); transform: scale(1.07); }
/* 后台上传 PNG 选盒：透明容器，PNG 本体即选择项 */
.bb-box.bb-imgbox { background: transparent; border: 0; box-shadow: none; aspect-ratio: 1; }
.bb-grid.g-case .bb-box.bb-imgbox { aspect-ratio: 1; }
.bb-box.bb-imgbox img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(0,0,0,.28)); }
.bb-box.bb-imgbox.sel { border: 0; box-shadow: none; transform: scale(1.12); }
.bb-box.bb-imgbox.sel img, .bb-box.bb-imgbox.opening img { filter: drop-shadow(0 0 12px rgba(255,212,0,.95)); }
.bb-box.bb-imgbox.opening { border: 0; box-shadow: none; }
.bb-box.dim { opacity: .3; transform: scale(.92); }
.bb-box.opening { border-color: #ffd400; box-shadow: 0 0 0 3px rgba(255,212,0,.6), 0 8px 20px rgba(0,0,0,.26); animation: bbShake .5s ease-in-out 2; z-index: 2; }
@keyframes bbShake { 0%,100% { transform: scale(1.12) rotate(0deg); } 25% { transform: scale(1.12) rotate(-5deg); } 75% { transform: scale(1.12) rotate(5deg); } }
.flip-wrap.bb-single .flip-card { width: 190px; height: 240px; }
.flip-card.bb-glow .fc-front { box-shadow: 0 0 0 2px #c084fc, 0 0 26px rgba(192,132,252,.8); }
/* 盲盒开盒特效：深紫 3D 立体盒（preserve-3d 真实接合），顶盖掀开→盒子淡出→奖品升起 */
.ob { position: relative; width: 108px; height: 150px; }
.flip-wrap.bb-single .ob { width: 200px; height: 278px; }
.ob-box3d { position: absolute; left: 0; right: 0; bottom: 2%; height: 64%; z-index: 2; --w: 50px; --h: 66px; --d: 40px; animation: obBob 1.4s ease-in-out infinite; transition: opacity .35s ease .85s; }
.flip-wrap.bb-single .ob-box3d { --w: 98px; --h: 130px; --d: 78px; }
/* 淡出放在外层普通容器：opacity 直接挂在 preserve-3d 元素上会把 3D 场景压扁（变形） */
.ob.open .ob-box3d { animation: obRip .3s ease; opacity: 0; }
.cube3 { position: absolute; left: 50%; bottom: 10%; width: var(--w); height: var(--h); margin-left: calc(var(--w) / -2);
  transform-style: preserve-3d; transform: perspective(620px) rotateX(-18deg) rotateY(-32deg);
  transition: transform .35s ease .85s; }
.ob.open .cube3 { transform: perspective(620px) rotateX(-18deg) rotateY(-32deg) scale(.75) translateY(14%); }
.c3f { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(196,181,253,.3); }
.c3-front { width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2); transform: translateZ(calc(var(--d) / 2)); background: linear-gradient(165deg, #7c3aed, #4c1d95); }
.c3-back  { width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2); transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); background: #3b0d66; }
.c3-right { width: var(--d); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--d) / -2); transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); background: linear-gradient(165deg, #5b21b6, #2e1065); }
.c3-left  { width: var(--d); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--d) / -2); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); background: #2e1065; }
.c3-bottom{ width: var(--w); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--w) / -2); transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); background: #1e0a3c; }
.c3-lidw  { width: var(--w); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--w) / -2); transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); border: 0; background: transparent; transform-style: preserve-3d; }
.c3-lid { position: absolute; inset: 0; background: linear-gradient(120deg, #8b5cf6, #6d28d9); border: 1px solid rgba(196,181,253,.45); display: flex; align-items: center; justify-content: center; transform-origin: top center; transition: transform .55s cubic-bezier(.5,1.1,.6,1) .3s; transform-style: preserve-3d; }
.ob.open .c3-lid { transform: rotateX(125deg); }
.c3-front img { width: 84%; max-height: 88%; object-fit: contain; }
.c3-right img { width: 80%; max-height: 82%; object-fit: contain; opacity: .92; }
.c3-lid img { width: 56%; max-height: 88%; object-fit: contain; opacity: .95; transform: translateZ(1px); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ob-prize { position: absolute; left: 4%; right: 4%; top: 4%; height: 62%; display: flex; align-items: center; justify-content: center; z-index: 1; opacity: 0; transform: translateY(46%) scale(.2); }
.ob.open .ob-prize { opacity: 1; transform: translateY(0) scale(1); transition: transform .55s cubic-bezier(.34,1.56,.64,1) .95s, opacity .3s ease .95s; z-index: 3; }
.ob-prize img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.ob-prize .bb-role { position: absolute; right: -2px; top: -4px; z-index: 3; }
.ob-burst { position: absolute; left: 50%; top: 36%; width: 150%; aspect-ratio: 1; transform: translate(-50%,-50%) scale(.2); border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,212,0,.45) 0 9deg, transparent 9deg 26deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%); mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  opacity: 0; z-index: 0; }
.ob.open .ob-burst { opacity: 1; transform: translate(-50%,-50%) scale(1); transition: transform .5s ease .92s, opacity .3s ease .92s; }
.ob-rare .ob-burst { background: repeating-conic-gradient(rgba(192,132,252,.55) 0 9deg, transparent 9deg 26deg); }
.ob-rare .ob-prize img { filter: drop-shadow(0 0 14px rgba(192,132,252,.95)); }
@keyframes obRip { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 70% { transform: rotate(3deg); } }
@keyframes obBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.bb-banner { min-height: 0; }
.bb-hit { text-align: center; color: #fff; font-weight: 900; font-size: 1.1rem; padding: 8px 0; animation: lsPop .45s forwards; text-shadow: 0 1px 0 rgba(0,0,0,.2); }
.bb-actions { display: flex; gap: 12px; justify-content: center; padding-top: 12px; }
.bb-btn { border: 0; border-radius: 24px; padding: 12px 34px; font-weight: 800; color: var(--mm-red); background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.bb-btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.7); color: #fff; box-shadow: none; }

/* ================= 抽奖玩法 ================= */
.rf-hero img { width: 100%; max-height: 340px; object-fit: cover; display: block; border-radius: 16px; margin-top: 16px; }
.rf-prize { display: flex; gap: 12px; align-items: center; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; margin-top: 14px; padding: 14px 16px; }
.rf-prize > img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.rf-progress { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; margin-top: 14px; padding: 16px; }
.rf-progress .bar { height: 12px; border-radius: 8px; background: var(--mm-card2); border: 1px solid var(--mm-line); overflow: hidden; }
.rf-progress .fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #ff4353, #e60012); transition: width .5s; }
.rf-winner { background: var(--mm-red-soft); border: 1px solid var(--mm-red-line); border-radius: 14px; margin-top: 14px; padding: 20px; text-align: center; }
.rf-winner .ttl { font-weight: 900; color: var(--mm-red); }
.rf-winner .avt { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--mm-red); margin-top: 8px; }
.rf-winner .nm { font-weight: 800; margin-top: 4px; }
.rf-winner .no { font-size: .85rem; color: var(--mm-muted); }
.rf-winner .me { margin-top: 8px; font-weight: 900; color: var(--mm-red); animation: lsPop .45s forwards; }
.rf-mine { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; margin-top: 14px; padding: 14px 16px; }
.rf-mine .nos { display: flex; flex-wrap: wrap; gap: 6px; max-height: 96px; overflow-y: auto; }
.rf-mine .nos span { background: var(--mm-red-soft); color: var(--mm-red); border: 1px solid var(--mm-red-line); border-radius: 6px; padding: 1px 9px; font-size: .78rem; font-weight: 700; }
.rf-parts { margin-top: 14px; }
.rf-parts .item { display: flex; align-items: center; gap: 10px; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; font-size: .85rem; }
.rf-parts .item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.rf-parts .item .no { color: var(--mm-red); font-weight: 700; }
.rf-parts .item .t { color: var(--mm-muted); font-size: .74rem; }
.rf-bar { display: flex; gap: 12px; align-items: center; position: sticky; bottom: 0; background: rgba(255,255,255,.97); border: 1px solid var(--mm-line); border-radius: 14px; padding: 12px 14px; margin-top: 16px; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.rf-bar .qty { display: flex; align-items: center; border: 1px solid var(--mm-line); border-radius: 22px; overflow: hidden; background: var(--mm-card2); }
.rf-bar .qty button { width: 40px; height: 42px; border: 0; background: transparent; font-size: 1.1rem; font-weight: 800; color: var(--mm-red); }
.rf-bar .qty input { width: 56px; height: 42px; border: 0; background: transparent; color: var(--mm-text); text-align: center; font-weight: 800; -moz-appearance: textfield; }
.rf-bar .qty input::-webkit-outer-spin-button, .rf-bar .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.rf-bar .join { flex: 1; }

/* ================= 集市 ================= */
.mkt-tabs { display: flex; gap: 22px; padding: 24px 2px 2px; align-items: center; }
.mkt-tabs a { color: var(--mm-muted); font-weight: 700; font-size: 1.02rem; text-decoration: none; padding-bottom: 8px; position: relative; }
.mkt-tabs a.active { color: var(--mm-red); }
.mkt-tabs a.active::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 3px; border-radius: 2px; background: var(--mm-red); }
.mkt-sub { display: flex; align-items: center; gap: 8px; padding: 14px 0 0; }
.mkt-sub a { text-decoration: none; color: var(--mm-muted); font-size: .84rem; font-weight: 700; padding: 5px 15px; border-radius: 16px; background: var(--mm-card2); border: 1px solid var(--mm-line); }
.mkt-sub a.active { color: #fff; background: var(--mm-red); border-color: var(--mm-red); }
.shop-cats { flex-wrap: wrap; }
.shop-cats a { white-space: nowrap; }
.listing-card { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; padding: 14px 16px; margin: 14px 0 0; }
.listing-head { display: flex; align-items: center; gap: 10px; }
.listing-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.listing-items { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; }
.listing-items .li { position: relative; flex: 0 0 100px; }
.listing-items .li img { width: 100px; height: 100px; border-radius: 10px; object-fit: cover; }
.listing-items .cnt { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; border-radius: 6px; padding: 0 5px; }
.sold-strip { background: var(--mm-red-soft); border: 1px solid var(--mm-red-line); color: var(--mm-text); border-radius: 10px; padding: 8px 12px; margin-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.ex-item { display: flex; align-items: center; gap: 10px; background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.ex-item > img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.ex-item .nm { font-size: .86rem; font-weight: 700; line-height: 1.25; }
.ex-item .pr { color: var(--mm-red); font-weight: 800; font-size: .86rem; }
.ex-swap { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.ex-swap .ex-item.half { flex: 1; margin-top: 0; min-width: 0; }
.ex-swap .ex-item.half > img { width: 48px; height: 48px; }
.ex-swap .ex-item.half .nm { font-size: .76rem; }
.ex-swap .ex-item.half .pr { font-size: .78rem; }
.ex-swap .arr { font-size: 1.1rem; color: var(--mm-muted); }
.ex-pick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-height: 50vh; overflow-y: auto; }
.ex-pick { border: 2px solid transparent; border-radius: 10px; background: var(--mm-card2); padding: 6px; text-align: center; cursor: pointer; }
.ex-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.ex-pick .nm { font-size: .72rem; font-weight: 700; height: 2.1em; overflow: hidden; line-height: 1.05; margin-top: 3px; }
.ex-pick .pr { color: var(--mm-red); font-size: .74rem; font-weight: 800; }
.ex-pick.sel { border-color: var(--mm-red); box-shadow: 0 0 8px rgba(230,0,18,.25); }
.ex-wish { margin-top: 6px; background: var(--mm-red-soft); border: 1px solid var(--mm-red-line); border-radius: 10px; padding: 6px 10px; font-size: .8rem; line-height: 1.35; word-break: break-word; }

/* 发货：选择收货地址 */
.addr-pick-list { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
#addrModal .modal-body { max-height: 86vh; overflow-y: auto; }
.ap-form { border-top: 1px solid var(--mm-line); padding-top: 10px; }
.ex-note-box { background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 10px; padding: 8px 10px; font-size: .78rem; line-height: 1.5; color: var(--mm-muted); }
.addr-pick { display: flex; align-items: flex-start; gap: 8px; border: 2px solid var(--mm-line); border-radius: 12px; background: var(--mm-card2); padding: 8px 10px; cursor: pointer; margin: 0; }
.addr-pick:has(input:checked) { border-color: var(--mm-red); }
.addr-pick input { margin-top: 3px; accent-color: var(--mm-red); }
.addr-pick .ap-body { display: block; min-width: 0; flex: 1; }
.addr-pick .ap-top { display: block; font-size: .86rem; }
.addr-pick .ap-addr { display: block; font-size: .78rem; color: var(--mm-muted); margin-top: 2px; }

/* ================= 仓库 ================= */
.wh-head { background: linear-gradient(135deg, #ff4353, #c9000f); border: 1px solid #c9000f; border-radius: 18px; color: #fff; padding: 22px 26px; margin-top: 20px; box-shadow: 0 8px 22px rgba(230,0,18,.2); }
.wh-body { background: transparent; padding: 16px 0 90px; min-height: 40vh; }
.wh-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.wh-item { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 12px; overflow: hidden; position: relative; }
.wh-item img.pi { width: 100%; aspect-ratio: 1; object-fit: cover; }
.wh-item .cnm { font-size: .78rem; padding: 5px 8px 0; height: 2.4em; overflow: hidden; }
.wh-item .cpr { color: var(--mm-red); font-weight: 800; font-size: .84rem; padding: 0 8px 8px; }
.wh-item .chk { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); cursor: pointer; }
.wh-item.sel { border-color: var(--mm-red); }
.wh-item.sel .chk { background: var(--mm-red); border-color: var(--mm-red); }
.wh-item.sel .chk::after { content: "✓"; color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 900; }
.wh-bar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: min(720px, calc(100vw - 64px)); background: rgba(255,255,255,.98); border: 1px solid var(--mm-line); border-radius: 16px; box-shadow: 0 10px 26px rgba(0,0,0,.14); padding: 12px 18px; display: flex; align-items: center; gap: 10px; z-index: 1029; }

/* ================= 我的 ================= */
.mine-top { margin-top: 20px; }
.mine-user { display: flex; align-items: center; gap: 14px; }
.mine-user img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--mm-red); }
.level-card { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.wallet-card { background: linear-gradient(135deg, #ff4353, #c9000f); border: 1px solid #c9000f; color: #fff; border-radius: 16px; padding: 18px 22px; margin: 16px 0; box-shadow: 0 8px 22px rgba(230,0,18,.2); }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-cards > a { border-radius: 14px; padding: 16px; text-decoration: none; color: var(--mm-text); background: var(--mm-card); border: 1px solid var(--mm-line); }
.feat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px 6px; padding: 16px 8px; }
.feat-grid a { text-align: center; color: var(--mm-text); text-decoration: none; font-size: .8rem; }
.feat-grid i { font-size: 1.6rem; display: block; margin-bottom: 5px; color: var(--mm-red); opacity: .9; }
.mm-card.mx-3 { margin-left: 0 !important; margin-right: 0 !important; }

/* ================= 会员主页 ================= */
.pf-head { text-align: center; padding: 26px 20px 18px; background: linear-gradient(135deg, var(--mm-red-soft), #fff); border: 1px solid var(--mm-line); border-radius: 18px; margin-top: 20px; }
.pf-head .avt { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; border: 3px solid var(--mm-red); box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.pf-stats { display: flex; justify-content: center; gap: 40px; margin: 14px 0; }
.pf-stats .v { font-weight: 900; font-size: 1.1rem; }
.pf-stats .k { font-size: .74rem; color: var(--mm-muted); }
.pf-tabs { flex-wrap: wrap; }
.pf-rec { display: flex; align-items: center; gap: 12px; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 12px; margin-top: 10px; padding: 10px 14px; }
.pf-rec img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.pf-rec .nm { font-size: .88rem; font-weight: 700; }
.pf-rec .pr { color: var(--mm-red); font-weight: 800; font-size: .88rem; white-space: nowrap; }
a.pf-link { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; flex-grow: 1; min-width: 0; }

/* ================= 付款/结果 ================= */
.pay-balance-card { background: linear-gradient(135deg, #ff4353, #c9000f); border: 1px solid #c9000f; color: #fff; border-radius: 14px; padding: 14px; }
.pay-balance-card .bal { font-size: 1.6rem; font-weight: 900; color: #fff; }
.pay-row { display: flex; align-items: center; justify-content: space-between; background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.anim-toggle .form-check-input:checked { background-color: var(--mm-red); border-color: var(--mm-red); }
.result-pop { text-align: center; }
.result-pop .r-item { background: var(--mm-card2); border-radius: 12px; padding: 10px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; text-align: left; }
.result-pop .r-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.result-glow { animation: winpulse 1.2s infinite; }
@keyframes winpulse { 0%,100% { text-shadow: 0 0 8px rgba(230,0,18,.55) } 50% { text-shadow: 0 0 22px rgba(230,0,18,.9) } }

/* ================= 开盒抽奖舞台 (PRIZE POOL)：任天堂红斜纹 ================= */
.lottery-stage { position: fixed; inset: 0; z-index: 2000; display: none; flex-direction: column; overflow-y: auto;
  background-color: #e60012;
  background-image: linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%),
                    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%);
  background-size: 64px 64px; background-position: 0 0, 32px 32px; }
.lottery-stage.show { display: flex; }
.ls-inner { width: 100%; max-width: 640px; margin: 0 auto; padding: 20px 14px; display: flex; flex-direction: column; min-height: 100%; }
.ls-back { background: none; border: 0; color: #fff; font-size: 1.5rem; align-self: flex-start; padding: 2px 6px; }
.ls-title { text-align: center; font-size: 2.1rem; font-weight: 900; font-style: italic; letter-spacing: 1px; margin: 8px 0 20px;
  color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.ls-frame { position: relative; border: 2px solid #fff; border-radius: 14px; background: #fff; padding: 20px 12px; box-shadow: 0 0 0 6px rgba(0,0,0,.12), 0 14px 34px rgba(0,0,0,.25); }
.ls-side { position: absolute; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; font-size: .6rem; letter-spacing: 3px; color: #c9c9c9; font-weight: 700; }
.ls-side.l { left: -1px; } .ls-side.r { right: -1px; }
.ls-pointer { position: absolute; width: 0; height: 0; z-index: 5; filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }
.ls-pointer.top { top: 4px; left: 50%; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 12px solid var(--mm-red); }
.ls-pointer.bottom { bottom: 4px; left: 50%; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 12px solid var(--mm-red); }
.ls-pointer.left { left: 2px; top: 50%; transform: translateY(-50%); border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 12px solid var(--mm-red); }
.ls-pointer.right { right: 2px; top: 50%; transform: translateY(-50%); border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-right: 12px solid var(--mm-red); }
.lottery-stage.mode-h .ls-pointer.left, .lottery-stage.mode-h .ls-pointer.right { display: none; }
.lottery-stage.mode-v .ls-pointer.top, .lottery-stage.mode-v .ls-pointer.bottom { display: none; }
.ls-viewport { background: linear-gradient(180deg, #ececec, #fff 45%, #fff 55%, #ececec); border-radius: 8px; overflow: hidden; position: relative; }
.reel-h { height: 190px; display: flex; align-items: center; }
.reel-h .reel-track { display: flex; will-change: transform; }
.reel-item { flex: 0 0 118px; text-align: center; }
.reel-item img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
.reel-item .ped { width: 74px; height: 10px; margin: 4px auto 0; background: linear-gradient(180deg, #ff5261, #c9000f); border-radius: 3px; transform: perspective(60px) rotateX(45deg); }
.reel-cols { display: flex; gap: 8px; height: 300px; padding: 0 6px; }
.reel-v { flex: 1; overflow: hidden; background: rgba(0,0,0,.05); border-radius: 8px; position: relative; }
.reel-v .reel-track { display: flex; flex-direction: column; will-change: transform; }
.reel-v .reel-item { flex: 0 0 100px; padding-top: 8px; }
.reel-v .reel-item img { width: 66px; height: 66px; }
.reel-v .reel-item .ped { width: 60px; height: 8px; }
.lottery-stage.mode-c .ls-pointer { display: none; }
.flip-wrap { min-height: 300px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; padding: 26px 8px; }
.flip-card { width: 96px; height: 126px; perspective: 700px; }
.flip-card .fc-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.35,1.4,.5,1); }
.flip-card.flip .fc-inner { transform: rotateY(180deg); }
.flip-card:not(.flip) { animation: fcBob 1.6s ease-in-out infinite; }
.flip-card:nth-child(2n):not(.flip) { animation-delay: .4s; }
.flip-card:nth-child(3n):not(.flip) { animation-delay: .8s; }
.fc-back, .fc-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 10px; }
.fc-back { background: repeating-linear-gradient(45deg, #e60012 0 12px, #d3000f 12px 24px); border: 2px solid #fff; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2.2rem; font-weight: 900; box-shadow: 0 4px 10px rgba(0,0,0,.28); }
.fc-front { transform: rotateY(180deg); background: #fff; border: 1px solid var(--mm-line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.fc-front img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }
.fc-front .ped { width: 54px; height: 8px; background: linear-gradient(180deg, #ff5261, #c9000f); border-radius: 3px; transform: perspective(50px) rotateX(45deg); }
.fc-front .lvb { position: absolute; left: 4px; top: 4px; }
.fc-front .bb-role { position: absolute; right: 6px; top: 6px; z-index: 2; }
.fc-front.rare { border-color: var(--mm-sp); animation: rareGlow 1.2s ease-in-out infinite; }
@keyframes fcBob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
.burst-wrap { position: relative; min-height: 330px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.burst-box { font-size: 5.5rem; filter: drop-shadow(0 0 26px rgba(0,0,0,.28)); animation: bShake .12s infinite; }
.burst-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(230,0,18,.28), transparent 70%); animation: bPulse .9s infinite; }
.burst-flash { position: absolute; inset: 0; background: radial-gradient(circle, #fff, rgba(255,255,255,0) 72%); opacity: 0; pointer-events: none; z-index: 3; }
.burst-flash.on { animation: bFlash .55s forwards; }
.burst-grid { position: absolute; inset: 0; display: none; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 16px 8px; align-content: center; }
.burst-grid.on { display: grid; }
.bg-card { position: relative; background: #fff; border: 1px solid var(--mm-line); border-radius: 8px; text-align: center; padding: 4px 2px 6px; }
.bg-card img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.18)); }
.bg-card .ped { width: 70%; height: 6px; margin: 2px auto 0; background: linear-gradient(180deg, #ff5261, #c9000f); border-radius: 2px; transform: perspective(40px) rotateX(45deg); }
.bg-card .lvb { position: absolute; left: 2px; top: 2px; transform: scale(.78); transform-origin: left top; }
.bg-card.rare { border-color: var(--mm-sp); animation: rareGlow 1.2s ease-in-out infinite; }
@keyframes bShake { 0% { transform: rotate(-5deg) scale(1) } 50% { transform: rotate(5deg) scale(1.06) } 100% { transform: rotate(-5deg) scale(1) } }
@keyframes bPulse { 0%,100% { transform: scale(1); opacity: .75 } 50% { transform: scale(1.3); opacity: 1 } }
@keyframes bFlash { 0% { opacity: 0 } 18% { opacity: 1 } 100% { opacity: 0 } }
@keyframes rareGlow { 0%,100% { box-shadow: 0 0 8px rgba(217,165,20,.45) } 50% { box-shadow: 0 0 20px rgba(217,165,20,.95) } }
.ls-final { min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 16px 0; }
.ls-final .reel-item { animation: lsPop .5s cubic-bezier(.2,1.6,.4,1); }
.ls-final .reel-item img { width: 96px; height: 96px; }
@keyframes lsPop { 0% { transform: scale(.3); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
.ls-btn { display: block; width: 100%; margin: 18px 0 8px; padding: 13px; border-radius: 14px; border: 0; font-weight: 900; letter-spacing: 2px; font-size: 1rem;
  background: rgba(0,0,0,.22); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.28); }
.ls-btn.close { background: #fff; color: var(--mm-red); box-shadow: 0 5px 0 rgba(0,0,0,.22); }
.ls-congrats { margin-top: 18px; padding: 14px 0 30px; border-top: 1px solid rgba(255,255,255,.35); }
.ls-congrats-title { text-align: center; font-weight: 900; font-style: italic; letter-spacing: 2px; color: #fff; margin-bottom: 14px; }
.ls-congrats-title::before, .ls-congrats-title::after { content: " · "; color: rgba(255,255,255,.7); }
.ls-results { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 120px; }
.ls-rcard { width: 108px; background: #fff; border: 1px solid var(--mm-line); border-radius: 10px; overflow: hidden; text-align: center; position: relative; opacity: 0; }
.ls-rcard.show { animation: lsPop .45s forwards; }
.ls-rcard img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.ls-rcard .cnt { position: absolute; right: 4px; top: 84px; color: #fff; font-size: .7rem; text-shadow: 0 1px 3px #000; }
.ls-rcard .nm { color: var(--mm-text); font-size: .68rem; padding: 3px 4px 0; height: 2.1em; overflow: hidden; }
.ls-rcard .pr { color: var(--mm-red); font-weight: 800; font-size: .78rem; padding-bottom: 6px; }
.ls-rcard .lvb { position: absolute; left: 4px; top: 4px; }

/* ================= 表单页 ================= */
.form-page { padding: 14px 0; }
.auth-logo { text-align: center; padding: 44px 0 22px; }
.auth-logo .big { width: 80px; height: 80px; border-radius: 20px; background: var(--mm-red); color: #fff; font-size: 2.5rem; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(230,0,18,.3); }

/* ================= Bootstrap 亮色微调（红白主题） ================= */
.btn-light { --bs-btn-bg: var(--mm-card2); --bs-btn-color: var(--mm-text); --bs-btn-border-color: var(--mm-line); --bs-btn-hover-bg: #ececec; --bs-btn-hover-color: var(--mm-text); --bs-btn-hover-border-color: #d8d8d8; --bs-btn-active-bg: #ececec; --bs-btn-active-color: var(--mm-text); }
.btn-danger { --bs-btn-bg: var(--mm-red); --bs-btn-border-color: var(--mm-red); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--mm-red-deep); --bs-btn-hover-border-color: var(--mm-red-deep); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--mm-red-deep); --bs-btn-active-color: #fff; font-weight: 700; }
.btn-outline-danger { --bs-btn-color: var(--mm-red); --bs-btn-border-color: var(--mm-red-line); --bs-btn-hover-bg: var(--mm-red); --bs-btn-hover-border-color: var(--mm-red); }
.btn-dark { --bs-btn-bg: #484848; --bs-btn-border-color: #484848; --bs-btn-color: #fff; --bs-btn-hover-bg: #333; --bs-btn-hover-border-color: #333; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #333; --bs-btn-active-color: #fff; }
.btn-outline-dark { --bs-btn-color: #484848; --bs-btn-border-color: #b8b8b8; --bs-btn-hover-bg: #484848; --bs-btn-hover-border-color: #484848; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #484848; --bs-btn-active-color: #fff; }
.text-danger { color: var(--mm-red) !important; }
/* 付款等 modal 必须盖过选盒/抽奖舞台（z-index 2000） */
.modal { z-index: 2100; }
.modal-backdrop { z-index: 2090; }
.modal-content { background: #fff; border: 1px solid var(--mm-line); color: var(--mm-text); }
.modal-header, .modal-footer { border-color: var(--mm-line); }
.form-control, .form-select { background-color: #fff; border-color: #d8d8d8; color: var(--mm-text); }
.form-control:focus, .form-select:focus { background-color: #fff; border-color: var(--mm-red); color: var(--mm-text); box-shadow: 0 0 0 .2rem rgba(230,0,18,.12); }
.form-control::placeholder { color: #b0b0b0; }
.input-group-text { background-color: var(--mm-card2); border-color: #d8d8d8; color: var(--mm-muted); }
.dropdown-menu { background: #fff; border: 1px solid var(--mm-line); }
.dropdown-item { color: var(--mm-text); }
.dropdown-item:hover { background: var(--mm-card2); color: var(--mm-text); }
.dropdown-item.active { background: var(--mm-red); color: #fff; }
.list-group-item { background: var(--mm-card); border-color: var(--mm-line); color: var(--mm-text); }
.card { background: var(--mm-card); border-color: var(--mm-line); }
.alert-warning { background: #fff8e6; border-color: #f5dfa1; color: #8a6d1a; }
.alert-info { background: #eaf5fc; border-color: #bcdff2; color: #2a6f9e; }
.nav-tabs { border-color: var(--mm-line); }
.nav-tabs .nav-link.active { background: var(--mm-card); border-color: var(--mm-line) var(--mm-line) var(--mm-card); color: var(--mm-red); }
a { color: var(--mm-red); }
a:hover { color: var(--mm-red-deep); }

a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid rgba(230,0,18,.6); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .box-card, .flip-card .fc-inner { transition: none; }
  .flip-card:not(.flip), .burst-box, .burst-glow, .result-glow, .fc-front.rare, .bg-card.rare { animation: none; }
}

/* 窄视窗兜底（<1080px 仍可用，建议走 /m） */
@media (max-width: 1080px) {
  .wrap { padding: 0 16px; }
  .home-hero { grid-template-columns: 1fr; }
  .bd-grid { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .box-grid { grid-template-columns: repeat(2, 1fr); }
  .prize-grid { grid-template-columns: repeat(3, 1fr); }
  .wh-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .congrats-item { flex: 0 0 48%; }
  .feat-grid { grid-template-columns: repeat(4, 1fr); }
  .site-footer .ft-inner { grid-template-columns: 1fr 1fr; }
  .hd-links a { padding: 9px 10px; }
}

/* 设置页（分组列表） */
.set-group { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; margin: 14px 0 0; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 15px 16px; border: 0; background: transparent; color: var(--mm-text); text-decoration: none; font-size: .95rem; text-align: left; }
.set-row + .set-row { border-top: 1px solid var(--mm-line); }
a.set-row:hover, button.set-row:hover { background: var(--mm-card2); color: var(--mm-text); }
.set-row .sr-val { display: flex; align-items: center; gap: 4px; color: var(--mm-muted); font-size: .88rem; min-width: 0; }
.set-row .sr-val .bi-chevron-right { font-size: .8rem; color: #c9c9c9; }
.set-logout { display: block; margin: 18px 0; padding: 14px; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; text-align: center; color: var(--mm-red); font-weight: 700; text-decoration: none; }
.set-logout:hover { background: var(--mm-red-soft); color: var(--mm-red); }

/* 协议/政策内容页 */
.pg-agreement .pg-in { max-width: 780px; margin: 0 auto; }
.agree-body { background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; margin: 14px 0 24px; padding: 24px; font-size: .95rem; line-height: 1.9; word-break: break-word; }
.agree-body img { max-width: 100%; height: auto; }
.agree-body table { max-width: 100%; }

/* 跳过开盒动画：盲盒奖品直接呈现最终状态 */
.ob.noanim .ob-box3d { display: none; }
.ob.noanim .ob-prize { opacity: 1; transform: none; transition: none; z-index: 3; }
.ob.noanim .ob-burst { opacity: 1; transform: translate(-50%,-50%) scale(1); transition: none; }
.set-row .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.set-row .form-check-input:checked { background-color: var(--mm-red); border-color: var(--mm-red); }

/* 分类图片（后台上传 PNG 时前台以图代字） */
.cat-tabs a img { height: 36px; max-width: 120px; object-fit: contain; display: block; opacity: .55; transition: opacity .15s; }
.cat-tabs a.active img { opacity: 1; }
.mkt-sub a.has-img { padding: 3px 10px; display: flex; align-items: center; }
.mkt-sub a img { height: 24px; max-width: 96px; object-fit: contain; display: block; }

/* 收货地址表单 */
.addr-form .af-label { display: block; font-weight: 700; font-size: .9rem; margin: 14px 0 8px; }
.addr-form .af-label:first-of-type { margin-top: 4px; }
.addr-form .af-input { border-radius: 12px; padding: 11px 14px; }
.addr-form .af-group .input-group-text { border-radius: 12px 0 0 12px; background: var(--mm-card2); font-weight: 700; font-size: .85rem; color: var(--mm-muted); }
.addr-form .af-group .af-input { border-radius: 0 12px 12px 0; }
.addr-form textarea.af-input { min-height: 96px; }
.af-default { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: .9rem; }
.af-default .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.af-default .form-check-input:checked { background-color: var(--mm-red); border-color: var(--mm-red); }

/* 编辑资料（昵称/选择头像/头像框） */
.ep-head { display: flex; align-items: center; gap: 16px; padding: 18px 16px 8px; }
.ep-ava { position: relative; width: 84px; height: 84px; flex: 0 0 auto; }
.ep-ava .av { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--mm-card2); }
.ep-ava .fr { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; object-fit: contain; pointer-events: none; }
.ep-nick { border-radius: 10px; font-weight: 700; }
.ep-tabs { display: flex; margin: 10px 12px 0; background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 12px; padding: 4px; }
.ep-tabs button { flex: 1; border: 0; background: transparent; font-weight: 700; padding: 9px; border-radius: 9px; color: var(--mm-muted); }
.ep-tabs button.active { background: var(--mm-card); color: var(--mm-text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 12px; padding: 16px; }
.ep-item { border: 0; background: transparent; padding: 0; display: block; }
.ep-item .imgwrap { display: block; position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; padding: 3px; }
.ep-item.sel .imgwrap { border-color: var(--mm-red); }
.ep-item .imgwrap img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ep-item .imgwrap img.fr-img { border-radius: 0; object-fit: contain; }
.ep-item .lk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.ep-item.locked { opacity: .45; }
.ep-item .lvl { display: block; text-align: center; font-size: .72rem; color: var(--mm-muted); margin-top: 4px; }
.ep-none { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--mm-line); position: relative; overflow: hidden; }
.ep-none::after { content: ""; position: absolute; left: 50%; top: -8%; height: 116%; width: 2px; background: var(--mm-line); transform: rotate(45deg); }

/* 头像框叠加（mine / profile） */
.ava-wrap { position: relative; display: inline-block; flex: 0 0 auto; }
.ava-wrap img.ava-frame { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; object-fit: contain; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; pointer-events: none; background: transparent; }

/* ===== 官方商店：商品详情（product.php） ===== */
.si-wrap { display: grid; grid-template-columns: 315px 1fr; gap: 22px; align-items: start; margin-top: 20px; }
.si-hero { position: relative; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 16px; overflow: hidden; }
.si-hero img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.si-out { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; font-size: 1.6rem; font-weight: 900; letter-spacing: 3px; }
.si-price { color: var(--mm-red); font-size: 2rem; font-weight: 900; line-height: 1.2; }
.si-name { font-size: 1.15rem; font-weight: 800; line-height: 1.35; margin-bottom: 6px; }
.si-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .85rem; margin-top: 10px; }
.si-note { font-size: .82rem; color: var(--mm-muted); margin-top: 10px; }
.si-sec { margin-top: 16px; border-top: 1px solid var(--mm-line); padding-top: 14px; }
.si-sec-t { font-weight: 800; margin-bottom: 10px; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sv-chip { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--mm-line); border-radius: 10px; background: var(--mm-card); font-size: .82rem; cursor: pointer; transition: border-color .15s ease; }
.sv-chip:hover { border-color: var(--mm-red); }
.sv-chip img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.sv-chip .nm { line-height: 1.25; overflow: hidden; }
.sv-chip.sel { border-color: var(--mm-red); color: var(--mm-red); box-shadow: 0 0 0 1px var(--mm-red) inset; }
.sv-chip.off { opacity: .45; cursor: not-allowed; background: #f2f2f2; }
.sv-chip.off:hover { border-color: var(--mm-line); }
.sv-chip.off .nm { text-decoration: line-through; }
.si-buy { margin-top: 18px; display: flex; gap: 10px; align-items: center; }
.si-buy .btn-mm { width: auto; min-width: 220px; }
@media (max-width: 860px) { .si-wrap { grid-template-columns: 1fr; } .si-hero { max-width: 75%; margin: 0 auto; } }
/* ================= 语言切换：红金胶囊 + 卡片式选单 ================= */
.lang-switch .lang-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 13px 6px 10px; border-radius: 999px; line-height: 1;
  background: linear-gradient(180deg, #ffffff, #fdf6ec);
  border: 2px solid #ecca8b;
  box-shadow: 0 3px 10px rgba(0,0,0,.16), inset 0 0 0 1px #fff;
  color: var(--mm-red); font-weight: 800; font-size: .95rem;
}
.lang-switch .lang-btn:hover { background: linear-gradient(180deg, #ffffff, #fff0dd); }
.lang-switch .lang-globe { font-size: 1.1rem; }
.lang-switch .lang-caret { font-size: .68rem; transition: transform .18s; }
.lang-switch .lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.lang-menu {
  --bs-dropdown-min-width: 244px;
  padding: 10px; margin-top: 0;
  border: 2px solid #ecca8b; border-radius: 20px; background: #fffdf9;
  box-shadow: 0 16px 38px rgba(120,60,20,.20);
}
.lang-title {
  display: flex; align-items: center; gap: 10px; padding: 4px 4px 12px;
  color: #c9a24a; font-weight: 800; font-size: .85rem; letter-spacing: .14em; white-space: nowrap;
}
.lang-title::before, .lang-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #eed9ac); }
.lang-title::after { background: linear-gradient(90deg, #eed9ac, transparent); }

.lang-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 14px; text-decoration: none; color: var(--mm-text); font-weight: 700;
}
.lang-item + .lang-item { border-top: 1px solid #f5ece0; }
.lang-item:hover { background: var(--mm-red-soft); color: var(--mm-text); }
.lang-item.on { background: linear-gradient(135deg, #ffdde2, #fff0f2); color: var(--mm-red); }
.lang-name { flex: 1; }
.lang-badge {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mm-red-soft); color: var(--mm-red); font-weight: 900; font-size: .82rem;
}
.lang-item.on .lang-badge { background: var(--mm-red-grad); color: #fff; box-shadow: 0 3px 8px rgba(230,0,18,.32); }
.lang-check { color: var(--mm-red); font-size: 1.15rem; }

/* ================= 盲盒抽赏记录（mysterybox_records.php） ================= */
.dr-tabs { display: flex; align-items: center; gap: 10px; padding: 16px 0 12px; }
.dr-tabs a { flex: 0 0 auto; min-width: 96px; text-align: center; padding: 9px 20px; border-radius: 12px; text-decoration: none; font-weight: 800; color: var(--mm-muted); background: var(--mm-card2); border: 1px solid var(--mm-line); }
.dr-tabs a:hover { color: var(--mm-text); }
.dr-tabs a.active { background: #1c1c22; border-color: #1c1c22; color: #fff; }
.dr-list { padding-bottom: 28px; }
.dr-row { display: flex; align-items: center; gap: 12px; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; }
/* SP / A 用渐层描边突显 */
.dr-row.rare { border-color: transparent; background:
    linear-gradient(var(--mm-card), var(--mm-card)) padding-box,
    linear-gradient(120deg, #ff9d2d, #ff2d3d 55%, #ff5f8f) border-box; border: 2px solid transparent; }
.dr-row .avt { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.dr-main { flex: 1 1 auto; min-width: 0; }
.dr-nm { font-weight: 800; display: flex; align-items: center; gap: 6px; }
.dr-tm { font-size: .8rem; color: var(--mm-muted); margin-top: 2px; }
.dr-right { text-align: right; flex: 0 0 auto; }
.dr-no { font-size: .86rem; color: var(--mm-text); white-space: nowrap; }
.dr-row.rare .dr-no { color: var(--mm-red); font-weight: 800; }
.dr-lv { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.dr-lv b { color: var(--mm-red); }

/* ================= 商品图一律 contain，绝不裁切 =================
   后台上传时会等比缩小并补透明边成正方形（config 的 UPLOAD_SQUARE_DIRS / UPLOAD_SQUARE_SIZE），
   所以正常情况下 contain 与 cover 结果相同；旧图或比例不对的图在这里也只会留白，不会被切掉。
   注意：这里只列「会进背包的商品图」，头像、盲盒封面、Banner 仍维持 cover。 */
.prize-card img,
.congrats-item img.pimg,
.rf-prize > img,
.listing-items .li img,
.ex-item > img,
.ex-pick img,
.wh-item img.pi,
.pf-rec img,
.result-pop .r-item img,
.ls-rcard img,
.reel-item img,
.si-hero img,
.sv-chip img,
.pts-card img.cover,
.box-card img.cover.prod { object-fit: contain; }

/* ================= 盲盒图统一 1:1，不裁切 =================
   web 跟随 m 的比例：列表图与详情图（含盲盒玩法、抽奖玩法的大图）一律正方形 contain。
   后台上传会补成 UPLOAD_BOX_LIST_SIZE / UPLOAD_BOX_DETAIL_SIZE 的正方形透明底。 */
.box-card img.cover,
.bd-cover img,
.detail-boximg img,
.rf-hero img { width: 100%; height: auto; aspect-ratio: 1; max-height: none; object-fit: contain; }
/* 抽奖玩法的大图：1:1 contain，显示宽度取原本的 1/4 并置中 */
.rf-hero img { width: 25%; display: block; margin-left: auto; margin-right: auto; }
/* web 盲盒玩法内页首屏：左轮播 / 中间大图 / 右侧购买 + 端数隐藏款 */
.detail-top { grid-template-columns: 320px minmax(0, 1fr) 300px; align-items: stretch; }
/* 左栏轮播跟中间图片等高、上缘对齐：内层绝对定位才不会被 30 笔纪录撑高 */
.detail-top .win-list { height: auto; margin-top: 0; }
.detail-top .win-list .wl-inner { position: absolute; left: 8px; right: 8px; top: 8px; }
.bb-side { align-self: end; }   /* 右栏贴齐图片下缘 */
.detail-boximg { background: none; border: 0; border-radius: 0; overflow: visible; }
.detail-boximg img { width: 100%; max-width: 440px; margin: 0 auto; }
.bb-side { display: flex; flex-direction: column; gap: 14px; }
.bb-side .draw-bar { grid-template-columns: 1fr; }
.bb-side .detail-stats { display: flex; text-align: center; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 14px; padding: 12px 0; }
.bb-side .detail-stats > div { flex: 1; }
.bb-side .detail-stats .v { color: var(--mm-red); font-weight: 900; font-size: 1.25rem; }
.bb-side .detail-stats .k { font-size: .76rem; color: var(--mm-muted); }

/* ================= web 一番赏内页首屏：左轮播 / 中间封面 / 右购买面板 ================= */
.bd-top { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; padding-top: 20px; }
/* 轮播与封面另开一层 grid：这一层的高度只由封面决定，轮播才会刚好等于图片高度
   （若跟购买面板同一层，面板比较高，轮播会被拉到面板的高度） */
.bd-left { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: stretch; }
.bd-left .win-list { height: auto; margin-top: 0; }
.bd-left .win-list .wl-inner { position: absolute; left: 8px; right: 8px; top: 8px; }
/* 封面缩到原本的一半并置中，外框拿掉 */
.bd-left .bd-cover { border: 0; border-radius: 0; overflow: visible; }
.bd-left .bd-cover img { width: 100%; max-width: 400px; height: auto; aspect-ratio: 1; object-fit: contain; margin: 0 auto; display: block; }
.bd-top .buy-panel { position: static; }
@media (max-width: 1080px) { .bd-top, .bd-left { grid-template-columns: 1fr; } }

/* 提款：锁定后的银行资料（首次提款后不可自行修改） */
.bank-locked { background: var(--mm-card2); border: 1px solid var(--mm-line); border-radius: 12px; padding: 10px 12px; }
.bank-locked .bl-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .86rem; }
.bank-locked .bl-row span { color: var(--mm-muted); flex: 0 0 auto; }
.bank-locked .bl-row b { text-align: right; word-break: break-all; }
.bank-locked .bl-note { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--mm-line); font-size: .76rem; line-height: 1.5; color: var(--mm-muted); }
