/* ====== 1. Variables & Reset ====== */
:root {
  /* 颜色：取自已确认的 750px 设计稿（金棕色系周年庆视觉）。 */
  --color-surface-page: #1c1007;
  --color-surface-light: #f3e7c2;
  --color-text-primary: #f5d994;
  --color-text-secondary: #c8a468;
  --color-text-dark: #171717;
  --color-border-gold: #8a6a34;

  /* 字体：页面默认字体栈。 */
  --font-family-base: "Microsoft YaHei", Arial, sans-serif;

  /* 字号：正文字号；其余字号待设计语义确认后再 token 化，不猜测命名。 */
  --font-size-body: .26rem;

  /* 间距/尺寸：44px 为最小触摸热区。 */
  --size-touch-target-min: 44px;
  --space-wechat-titlebar-gap: 0px;

  /* 层级：固定条 < 轻提示。 */
  --z-index-top-bar: 25;
  --z-index-tab-bar: 20;
  --z-index-toast: 30;

  /* 动效与无障碍：减少动态效果时使用。 */
  --motion-duration-reduced: .01ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
button,
input,
textarea {
  margin: 0;
  padding: 0;
}
em{
  font-style: normal;
}
html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  background: var(--color-surface-page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
[role="button"] {
  min-width: var(--size-touch-target-min);
  min-height: var(--size-touch-target-min);
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    animation-duration: var(--motion-duration-reduced);
    animation-iteration-count: 1;
    transition-duration: var(--motion-duration-reduced);
  }
}

/* ====== 2. Layout ====== */
/* 页面根节点：承载布局与整页背景渐变（深棕金） */
.page {
  position: relative;
  width: 7.5rem;
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding-top: max(
    env(safe-area-inset-top, 0px),
    var(--space-wechat-titlebar-gap)
  );
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  background: linear-gradient(180deg, #2b1a0c 0%, #170d05 45%, #0d0703 100%);
}

/* 微信返回后原生标题栏未恢复时，为补偿区域提供固定白底。 */
.page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  z-index: var(--z-index-top-bar);
  width: 7.5rem;
  max-width: 100%;
  height: max(
    env(safe-area-inset-top, 0px),
    var(--space-wechat-titlebar-gap)
  );
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

@supports (min-height: 100dvh) {
  .page {
    min-height: 100dvh;
  }
}

/* ====== 3. Components ====== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.side{
  position: fixed;
  right: 0;
  top: 4rem;
  z-index: 2;
}
.side-link{
  display: block;
  text-align: center;
  line-height: 1.1;
  width: .4rem;
  padding: .1rem 0;
  margin-top: .2rem;
  border: 1px solid #d9d2ab;
  border-radius: .08rem;
  color: #f8e2b3;
  font-size: var(--font-size-body);
  text-decoration: none;
  background: linear-gradient(180deg, #2f1d0a, #3a2309);
}
/* twpop 弹窗内容（按原型画板实现；弹窗外壳由 tw_dialog.min.js 提供）
   内容注入 .twpop-cont 内，字号沿用页面 750px rem 体系 */
.twpop{
  position: relative;
  z-index: 100;
}
.twpop .twpop-main{
  width: 7rem;
  max-width: 7rem;
  border: .02rem solid #ad6407;
  background-image: linear-gradient(top,#fff9f0,#ffefd5);
  background-image: -webkit-linear-gradient(top,#fff9f0,#ffefd5);
  border-radius: .46rem;
  font-size: .24rem;
  box-shadow: 0 0 .05rem .05rem #fff inset;
}
.twpop .twpop-close{
  background: url("../images/close.png") no-repeat center / .36rem;
  height: .8rem;
  width: .8rem;
}
.twpop .twpop-title{
  border: none;
  width:5.05rem;
  height: 1rem;
  padding: 0;
  line-height: .8rem;
  background: url("../images/pop-tit.png") no-repeat center / 100% 100%;
  margin: -.4rem auto 0;
  font-weight: bold;
  font-size: .4rem;
  text-shadow: 0 .04rem 0 #910207;
  color: #fff6cb;

}
.twpop .twpop-cont{
  padding: .3rem;
}
.pop-redpacket .twpop-cont{
  padding: .2rem .1rem;
}
.twpop .twpop-foot{
  margin-top: .2rem;
}
.twpop .twpop-diy-content{
  max-height: 8rem;
}

.twpop-msg .twpop-main,.twpop-load .twpop-main{
  height: auto;
  box-shadow: none;
  border-radius: 0;
}

.twpop .twpop-input, .twpop  .twpop-select{
  height: .64rem;
  line-height: .64rem;
}

.pop-lead {
  color: #333;
  font-size: .3rem;
  text-align: center;
}

/* 弹窗强调值：积分/道具/礼包码等红色大字 */
.pop-strong {
  margin: .12rem 0;
  color: #c73728;
  font-size: .44rem;
  font-weight: bold;
  text-align: center;
}

/* 弹窗说明文字：规则限制等辅助信息 */
.pop-note {
  margin-top: .18rem;
  color: #999;
  font-size: .24rem;
  line-height: 1.6;
  text-align: center;
}

/* 弹窗记录表格：我的奖励 / 我的礼包码
   列表弹窗表格：浅橙黄圆角底，表头略深加粗，数据行细横线分隔（无竖线） */
.pop-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .24rem;
  color: #5d4037;
  background: #fcfbf5;
  border: 1px solid #e5bf76;
  border-radius: .14rem;
  overflow: hidden;
  box-shadow: 0 0 .01rem .01rem #fdfdfb inset;
}

.pop-table th,
.pop-table td {
  padding: .14rem .06rem;
  text-align: center;
  word-break: break-all;
}

.pop-table th {
  font-weight: bold;
  background: #fbedcd;
  border-bottom: 1px solid #f1c579;
}

.pop-table td {
  border-bottom: 1px solid #f1c579;
}

.pop-table tbody tr:last-child td {
  border-bottom: none;
}

/* 活动规则弹窗：条目列表（左对齐、序号符号、舒适行距） */
.pop-rules {
  padding-left: .34rem;
  color: #5d4037;
  font-size: .24rem;
  line-height: 1.7;
  text-align: left;
}

.pop-rules li {
  margin-bottom: .1rem;
}

.pop-rules li:last-child {
  margin-bottom: 0;
}

/* 我的礼包码表格：四列 + 复制按钮，列多取小字号紧凑排布 */
.pop-table-codes {
  font-size: .2rem;
}

.pop-table-codes th,
.pop-table-codes td {
  padding: .12rem .04rem;
}

/* 行内复制按钮：黄橙渐变圆角，复制后文字态由 JS 切换 */
.pop-copy {
  min-width: .6rem;
  height: .4rem;
  padding: 0 .1rem;
  border-radius: .03rem;
  color: #46260e;
  font-size: .18rem;
  line-height: .4rem;
  text-align: center;
  text-decoration: none;
  border: 1px solid #e6a339;
  background: linear-gradient(180deg, #fdf7c8, #fdcf6b);
}

.pop-copy.copied {
  color: #a08040;
  background: #f5ecd8;
}

/* 礼包内容弹窗：兑换商店商品明细，行式清单（物品名左、数量右，虚线分隔） */
.pop-goods {
  margin: .12rem 0 0;
  padding: 0 .12rem;
  color: #5d4037;
  font-size: .24rem;
  line-height: 1.7;
  list-style: none;
  text-align: left;
}

.pop-goods li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .04rem 0;
  border-bottom: 1px dashed #eedcb4;
}

.pop-goods li:last-child {
  border-bottom: none;
}

.pop-goods-count {
  color: #c73728;
  font-weight: bold;
}

/* 红包弹窗（提现/抢中）：玩家祝语头部（空心头像占位+祝语）+ 金额 + 确定按钮 */
.pop-redpacket {
  padding-top: .08rem;
  text-align: center;
}

/* 头部：空心圆头像占位（正式头像素材待提供）+ 祝语两行 */
.pop-head {
  display: flex;
  align-items: center;
  padding: .1rem 0 .3rem .2rem;
  text-align: left;
}

.pop-avatar {
  width: .96rem;
  height: .96rem;
  object-fit: cover;
  border: .04rem solid #d9a53f;
  border-radius: 50%;
  flex-shrink: 0;
}

.pop-head-text {
  margin-left: .2rem;
  color: #46260e;
  font-size: .24rem;
}

.pop-title {
  font-size: .3rem;
  font-weight: bold;
}


/* 金额展示块：浅米底 + 橙金描边圆角（承载金额与说明文字） */
.pop-amount-container {
  margin: 0 .3rem .34rem;
  padding: .2rem 0 .24rem;
  border: .02rem solid #ea9a17;
  border-radius: .24rem;
  background: #fbf0d3;
}

.pop-amount {
  color: #c73728;
  font-size: .6rem;
  font-weight: bold;
}

.pop-amount-note {
  margin-top: .08rem;
  color: #73593f;
  font-size: .26rem;
}

/* 弹窗内主操作按钮：确定等 */
.pop-btn,
.twpop .twpop-btn{
  display: block;
  margin: 0 .2rem;
  height: .76rem;
  border-radius: .38rem;
  color: #46260e;
  font-size: .32rem;
  line-height: .76rem;
  text-decoration: none;
  background-image: linear-gradient(top,#fdfad1,#feca5c);
  background-image: -webkit-linear-gradient(top,#fdfad1,#feca5c);
  border: .02rem solid #a84800;
  box-shadow: 0 0 .02rem .02rem #fff inset;
  font-weight: bold;
  padding: 0;
}

/* ====== 4. Page: Campaign ====== */
/* 顶部游戏信息固定；登录栏单独定位在页面内，滚动时离开视口。 */
.top-bar {
  position: fixed;
  top: max(
    env(safe-area-inset-top, 0px),
    var(--space-wechat-titlebar-gap)
  );
  z-index: var(--z-index-top-bar);
}

/* 顶部游戏信息条 */
.game-bar {
  display: flex;
  align-items: center;
  width: 7.5rem;
  height: 1.42rem;
  padding: 0 .18rem;
  background: url("../images/top.png") no-repeat center / 100% 100%;
}

.game-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  border-radius: .12rem;
}

.game-info {
  flex: 1;
  min-width: 0;
  margin: 0 .2rem;
}

.game-name {
  overflow: hidden;
  color: #ffffff;
  font-size: .32rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-slogan {
  margin-top: .1rem;
  overflow: hidden;
  color: #f8e2b3;
  font-size: .26rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.game-bar .btn {
  flex: none;
  margin: 0;
}

/* 登录条 */
.login-bar {
  position: absolute;
  top: 1.42rem;
  left: 0;
  width: 100%;
  z-index: 2;
  padding: .18rem .3rem;
}

/* 登录按钮：按设计稿实测还原（第一页.jpg x24-257/y167-225）——深棕渐变填充、米金细描边、浅金粗体文字的药丸形按钮 */
.login-btn {
  display: block;
  text-align: center;
  width: 2rem;
  height: .58rem;
  line-height: .54rem;
  padding: 0 .3rem;
  border: 1px solid #d9d2ab;
  border-radius: .14rem;
  color: #f8e2b3;
  font-size: var(--font-size-body);
  text-decoration: none;
  background: linear-gradient(180deg, #2f1d0a, #3a2309);
}

/* 登录后账号信息：类内 display:flex 会覆盖 UA 的 [hidden] 隐藏，需显式规则 */
.login-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: right;
  gap: .18rem;
  color: #ffffff;
  font-size: .22rem;
}

.login-btn[hidden],
.login-info[hidden] {
  display: none;
}

.login-link {
  color: #ffffff;
  text-decoration: underline;
}

/* 会员区 KV */
.member-banner {
  width: 7.15rem;
  margin: 0 auto;
}

/* 模块标题均由各区背景图烘焙；副标题（背景未烘焙）由 HTML 渲染 */
.subtitle {
  line-height: .3rem;
  background: linear-gradient(#fff9e1, #efd77b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: var(--font-size-body);
  text-align: center;
  font-weight: bold;
}

.member-hint {
  margin-top: .24rem;
  color: var(--color-text-secondary);
  font-size: .22rem;
  text-align: center;
}

/* 面板：底部预留固定导航高度与安全区；各区以设计稿长图为背景，顶部对齐、按宽缩放，图下缘由页面渐变底色衔接 */
.panel {
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
}

/* 各区 padding-top 按背景图烘焙元素的下缘对齐（750px 设计稿实测，px/100=rem） */
.panel-welfare {
  /* page1.jpg：KV + 见面礼标题 + 礼物图（下缘约 1050px），内容从礼物图下方开始 */
  padding-top: 10.6rem;
  background-image: url("../images/page1.jpg");
}

.panel-celebration {
  /* page2.jpg：KV + 福利池标题/副标题（约 645-740px）+ 空积分框（772-880px） */
  padding-top: 7.63rem;
  background-image: url("../images/page2.jpg");
}

.panel-gift {
  /* page3.jpg：KV + 好友赠礼标题（678-715px），精选好礼标题烘焙于 1051-1088px */
  background-color: #0e0700;
  padding-top: 7.37rem;
  background-image: url("../images/page3.jpg");
}
.panel-top{
  height: 3.75rem;
}

.panel-member {
  /* page4.jpg：星享会员标题（336-372px） */
  padding-top: 4.38rem;
  background-image: url("../images/page4.jpg");
}

/* 各区大按钮与上方烘焙元素的间距 */
.panel-celebration .btn-receive {
  margin-top: .15rem;
}

.panel-gift .btn-receive {
  width: 6.1rem;
  height: .72rem;
  line-height: .72rem;
}

/* 模块卡：红包雨 / 周年祝福墙（素材为完整卡片图，文字与按钮叠加） */
.card {
  position: relative;
  width: 7.12rem;
  margin: .3rem auto 0;
}

.card-bg {
  width: 100%;
}

.card-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-rain .card-overlay {
  padding-top: 1.12rem;
}

.card-bless .card-overlay {
  padding-top: 13%;
}

.card-title {
  color: var(--color-text-dark);
  font-size: .3rem;
  font-weight: bold;
}

.card-desc {
  color: var(--color-text-dark);
  max-width: 80%;
  margin-top: .1rem;
  font-size: .24rem;
  line-height: 1.5;
  text-align: center;
}

/* 提高特异性，确保覆盖 .btn 的 position: relative */
.card .card-btn {
  position: absolute;
  bottom: .1rem;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}

/* 祝福墙轮播位：叠加在素材自带横条上 */
.bless-carousel {
  position: absolute;
  top: 1.5rem;
  left: .46rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 6.18rem;
  height: 1.6rem;
}

/* 轮播箭头：素材为单个左向箭头（82×82 菱形底），next 态水平镜像 */
.bless-prev,
.bless-next {
  position: relative;
  display: block;
  width: .82rem;
  height: .82rem;
  text-decoration: none;
  background: url("../images/prev-next.png") no-repeat center / 100% 100%;
}

.bless-next {
  transform: scaleX(-1);
}

/* 祝福文本：最多三行，超出省略（-webkit-line-clamp 移动端 WebView 支持良好） */
.celebration-text {
  height: 3.78rem;
}
.celebration-text .btn-receive {
  width: 5.78rem;
  height: .72rem;
  line-height: .72rem;
}
.bless-text {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--color-text-dark);
  font-size: var(--font-size-body);
  line-height: 1.4;
  text-align: center;
}

/* 共庆区：福利池积分文字层（积分框由 page2.jpg 烘焙，772-880px，本层对齐填入文字） */
.pool-bar {
  background: url('../images/pool-bar.png') no-repeat center / 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.91rem;
  height: .88rem;
  line-height: .88rem;
  margin: 0 auto;
}

.pool-text {
  color: #fffbf2;
  font-size: var(--font-size-body);
}

.my-points {
  margin: .12rem 0 0;
  color: var(--color-text-primary);
  font-size: .28rem;
  text-align: center;
}

/* 米白内容卡：兑换商店 / 任务列表（与 page2.jpg 烘焙白卡同宽 660px 对齐叠加） */
.shop,
.task {
  width: 6.6rem;
  margin: 0 auto;
  border-radius: .2rem;
}

/* 兑换商店卡：顶对齐烘焙白卡 1（1109px），"兑换商店"红标签由背景烘焙 */
.shop {
  height: 6rem;
  padding: 0 .30rem;
}

/* 任务列表卡：顶对齐烘焙白卡 2（1742px），内容更高时同色延伸覆盖烘焙卡 */
.task {
  padding: .2rem .3rem;
  height: 4.13rem;
  overflow-y: auto;
}

/* 兑换商店：3×2 网格 */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .18rem;
  list-style: none;
}

.shop-item {
  background: url('../images/shop-item.png') no-repeat center / 100% 100%;
  width: 1.9rem;
  height: 2.67rem;
  text-align: center;
}

.shop-icon {
  width: 1.9rem;
  height: 1.2rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-icon img{
  display: block;
  height: 100%;
  width: auto;
}
.shop-name {
  color: var(--color-text-dark);
  font-size: .24rem;
  line-height: .28rem;
  height: .28rem;
  overflow: hidden;
  text-align: center;
}
.shop-stock {
  height: .24rem;
  line-height: .24rem;
  color: var(--color-text-dark);
  font-size: .18rem;
}

/* 兑换按钮：雪碧图空白金底（154×52 无文字），HTML 文字"兑换"叠加 */
.exchange-btn {
  position: relative;
  display: block;
  width: 1.54rem;
  height: .52rem;
  margin: .1rem auto 0;
  border-radius: .26rem;
  color: #202020;
  font-size: .24rem;
  line-height: .52rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  background: url("../images/btn-sprite.png?v=1.0.2") no-repeat 0 -3.5rem / 6.75rem auto;
}

.shop-cost{
  color: var(--color-text-dark);
  font-size: .18rem;
  line-height: .3rem;
  height: .3rem;
  overflow: hidden;
  text-align: center;
}

/* 任务列表 */
.task-list {
  list-style: none;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: .74rem;
  border-bottom: 1px solid #f4dfc9;
}


.task-name {
  color: var(--color-text-dark);
  font-size: var(--font-size-body);
}

/* 提高特异性，避免被 .btn 的 margin: 0 auto 覆盖导致按钮漂移 */
.task .task-btn {
  position: relative;
  flex: none;
  width: 1.41rem;
  height: .52rem;
  margin: 0;
}

.task-btn-text {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b4a1a;
  font-size: .24rem;
}

.task-btn-todo {

}

.task-btn-todo .task-btn-text {

}

/* 赠礼区：兑换码输入框 */
.code-field {
  background: url('../images/pool-bar.png') no-repeat center / 100% 100%;
  position: relative;
  width: 5.91rem;
  height: .88rem;
  margin: .38rem auto .15rem;
  overflow: hidden;
}

.code-bg {
  width: 100%;
}

.code-input {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0 .3rem;
  border: 0;
  color: #fffbf2;
  font-size: .28rem;
  text-align: center;
  background: transparent;
  outline: none;
}

.code-input::placeholder {
  color: #fffbf2;
}

/* 赠礼区：礼包列表 */
.package-list {
  list-style: none;
  margin: .15rem auto;
  width: 6.64rem;
}

.package-item {
  display: flex;
  margin-bottom: .15rem;
  padding: .1rem;
  border-radius: .2rem;
  background: var(--color-surface-light);
}

.package-side {
  flex: none;
  width: 1.84rem;
  text-align: center;
}

.package-icon {
  width: 1.84rem;
  height: 1.3rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.package-icon img {
  width: auto;
  height: 100%;
}

.package-desc,.package-desc2 {
  padding-left: .1rem;
  color: var(--color-text-dark);
  font-size: .28rem;
  line-height: .44rem;
  height: .44rem;
  text-align: left;
  overflow: hidden;
}
.package-desc2{
  font-size: .24rem;
}
.package-name {
  color: var(--color-text-dark);
  font-size: .24rem;
  line-height: .28rem;
  height: .28rem;
}

.package-price {
  margin-top: .06rem;
  height: .45rem;
  line-height: .45rem;
  border: .02rem solid #ebaf3e;
  color: #2b210b;
  font-size: .24rem;
  background: #f7d694;
  border-radius: .12rem;
  text-align: center;
}

.price-now {
  margin-left: .12rem;
}

.package-main {
  flex: 1;
  min-width: 0;
  margin-left: .1rem;
}

.package-label {
  color: var(--color-text-dark);
  font-size: var(--font-size-body);
  text-align: center;
}

.package-content {
  min-height: .95rem;
  margin: .06rem 0 .1rem;
  padding: .1rem .14rem;
  border-radius: .12rem;
  color: #2b210b;
  font-size: .24rem;
  background: #fffaee;
  display: flex;
  align-items: center;
  justify-content: center;
  border: .02rem solid #d8a63a;
}

/* 立即购买按钮：雪碧图 445×67（自带文字），HTML 文字以 visually-hidden 保留可访问性 */
.buy-btn {
  position: relative;
  display: block;
  width: 4.45rem;
  height: .67rem;
  margin: 0 auto;
  text-decoration: none;
  background: url("../images/btn-sprite.png") no-repeat 0 -4.06rem / 6.75rem auto;
  text-align: center;
}
.buy-btn span{
  color: #ffffff;
  font-size: .35rem;
  display: block;
  height: .67rem;
  line-height: .67rem;
  text-shadow: -1px -1px 0 #ab2519,1px -1px 0 #ab2519,-1px 1px 0 #ab2519, 1px 1px 0 #ab2519;
}
/* 按钮雪碧图：images/btn/ 七张按钮合成（withdraw/claim/speak/receive/go/exchange/buy），定位数据由合成脚本生成 */
.btn {
  position: relative;
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  background: url("../images/btn-sprite.png") no-repeat 0 0 / 6.75rem auto;
}

/* 视觉尺寸小于 44px 时扩大触摸热区，不改变视觉 */
.btn::after,
.login-btn::after,
.exchange-btn::after,
.buy-btn::after,
.bless-prev::after,
.bless-next::after {
  content: "";
  position: absolute;
  top: -4px;
  right: 0;
  bottom: -4px;
  left: 0;
  min-width: var(--size-touch-target-min);
  min-height: var(--size-touch-target-min);
}

.btn-withdraw {
  width: 3.46rem;
  height: .67rem;
  background-position: 0 0;
}

.btn-claim {
  width: 1.41rem;
  height: .52rem;
  background-position: 0 -.71rem;
}

.btn-speak {
  width: 3.46rem;
  height: .67rem;
  background-position: 0 -1.27rem;
}

.btn-receive {
  display: block;
  margin: 0 auto;
  font-size: .32rem;
  color: #3e1902;
  text-align: center;
  background: url('../images/btn-receive.png') no-repeat center / 100% 100%;
  line-height: .76rem;
  height: .76rem;
  width: 6.75rem;
  text-decoration: none;
}

.btn-go {
  width: 1.82rem;
  height: .68rem;
  background-position: 0 -2.78rem;
}

.btn.disabled {
  opacity: .6;
}

/* 底部固定四区导航 */
.tab-bar {
  position: fixed;
  bottom: max(.2rem, env(safe-area-inset-bottom));
  left: 50%;
  z-index: var(--z-index-tab-bar);
  width: 7.1rem;
  height: 1.08rem;
  background: url("../images/menu-bg.png") no-repeat center / 100% 100%;
  transform: translateX(-50%);
}

.tab-list {
  display: flex;
  height: 100%;
  list-style: none;
}

.tab-item {
  flex: 1;
}

.tab-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #cfc6b8;
  font-size: .22rem;
  text-decoration: none;
}

.tab-icon {
  width: auto;
  height: .4rem;
  margin-bottom: .06rem;
}

/* 激活态：白色图标经滤镜转为金色，文字金色加粗 */
.tab-link.active {
  color: var(--color-text-primary);
}

.tab-link.active .tab-icon {
  filter: sepia(1) saturate(2.4) hue-rotate(2deg) brightness(1.1);
}

/* ====== 5. Utilities & Accessibility ====== */
/* 轻提示：正式提示组件待确认是否使用平台 twpop；底部避开固定导航 */
.toast {
  position: fixed;
  right: 0;
  bottom: calc(max(.2rem, env(safe-area-inset-bottom)) + 1.3rem);
  left: 0;
  z-index: var(--z-index-toast);
  width: -moz-fit-content;
  width: fit-content;
  max-width: 80%;
  margin: 0 auto;
  padding: .16rem .32rem;
  border-radius: .08rem;
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  text-align: center;
  background: rgba(0, 0, 0, .8);
}

.twpop .twpop-from-label{
  min-width: .8rem;
  text-align: right;
}
.select2-search--dropdown{display: flex!important;}
.select2-results__option{font-size: .24rem;}
.select2-search--dropdown .select2-search__field{height: .64rem;}
.select2-container--default .select2-selection--single{background: transparent!important;border: none!important;}
.select2-container--default .select2-selection--single .select2-selection__rendered{color:#222!important;}
.select2-container .select2-selection--single{height: .64rem!important;line-height: .64rem!important;}
.select2-container--default .select2-selection--single .select2-selection__rendered{line-height: .64rem!important;}

/* 我的奖励：金额与小按钮同行，列表单独滚动。 */
.pop-reward-cash { display:flex; align-items:center; justify-content:center; gap:.18rem; margin-bottom:.24rem; }
.pop-reward-cash .pop-lead { margin:0; font-size:.3rem; white-space:nowrap; }
.pop-reward-cash .js-reward-withdraw { display:inline-flex; align-items:center; justify-content:center; flex:none; width:auto; min-width:.86rem; min-height:0; height:.42rem; line-height:1; margin:0; padding:0 .14rem; border:1px solid #d29a43; border-radius:.08rem; background:linear-gradient(180deg,#fff3c6 0%,#ffda85 100%); box-shadow:0 1px 0 rgba(255,255,255,.8) inset; color:#694018; font-size:.24rem; font-weight:600; text-decoration:none; box-sizing:border-box; white-space:nowrap; cursor:pointer; appearance:none; }
.pop-reward-cash .js-reward-withdraw:active:not(:disabled) { background:#f7ce77; transform:translateY(1px); }
.pop-reward-cash .js-reward-withdraw:focus-visible { outline:2px solid #a86b22; outline-offset:2px; }
.pop-reward-cash .js-reward-withdraw:disabled { opacity:.6; cursor:default; }
.pop-reward-scroll { max-height:min(4.6rem,calc(100vh - 4.3rem)); overflow-y:scroll; scrollbar-width:thin; scrollbar-color:#c99136 #f8edcf; }
.pop-reward-scroll::-webkit-scrollbar { width:6px; }
.pop-reward-scroll::-webkit-scrollbar-track { background:#f8edcf; border-radius:3px; }
.pop-reward-scroll::-webkit-scrollbar-thumb { background:#c99136; border-radius:3px; }
.pop-reward-scroll .pop-table { margin:0; }
.pop-reward-list { border:1px solid #e5bf76; border-radius:.14rem; overflow:hidden; }
.pop-reward-header { padding-right:6px; background:#fbedcd; }
.pop-reward-list .pop-table { table-layout:fixed; border:0; border-radius:0; box-shadow:none; }
.twpop .pop-rewards .twpop-diy-content { max-height:none; overflow:visible; }
/* 兑换确认：取消与确认左右并排。 */
.twpop .pop-exchange-confirm .twpop-foot {
  display: flex;
  justify-content: center;
  gap: .24rem;
}
.twpop .pop-exchange-confirm .twpop-foot .twpop-btn {
  flex: 1;
  min-width: 0;
  max-width: 2.6rem;
  margin: 0;
}
/* 见面礼外观来自配置表 Z 列，覆盖设计稿中固定的头像框。 */
.panel-welfare { position: relative; }
.welcome-art {
  position: absolute;
  left: 4.29rem;
  top: 7.91rem;
  width: 2.18rem;
  height: 2.13rem;
  box-sizing: border-box;
  border: .02rem solid #cda850;
  border-radius: .1rem;
  background: radial-gradient(ellipse at center, #bc8c3b 0%, #745018 70%, #49300e 100%);
  box-shadow: inset 0 0 .18rem rgba(255,220,130,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.welcome-art img { width: 96%; height: 96%; object-fit: contain; }
.welcome-art img[hidden] { display: none; }
.welcome-art[data-icon-type="frame-square"] img,
.welcome-art[data-icon-type="frame-round"] img { mix-blend-mode: multiply; }
.welcome-art[data-icon-type="frame-square"] img,
.welcome-art[data-icon-type="frame-beast"] img { width: 130%; height: 130%; max-width: none; flex-shrink: 0; }

/* 白底原稿使用浅金底，避免混合后头像框过暗。 */
.welcome-art[data-icon-type="frame-square"],
.welcome-art[data-icon-type="frame-round"] {
  background: radial-gradient(ellipse at center, #fff6d6 0%, #ffe9a7 70%, #d6ac53 100%);
}

/* 公众号入口在领取后仍可打开；二维码按屏幕高度限制尺寸。 */
.task-qr-hint { display: block; font-size: .18rem; line-height: 1.25; color: #9b6b29; text-decoration: underline; }
.pop-task-qr { text-align: center; }
.pop-task-copy { margin: 0 0 .16rem; font-size: .24rem; line-height: 1.5; overflow-wrap: anywhere; }
.pop-task-qr-image { display: block; width: 2.8rem; height: auto; max-width: 100%; max-height: 40vh; object-fit: contain; margin: 0 auto; }
.pop-task-result:empty { display: none; }
.pop-task-result { margin-top: .12rem; font-size: .22rem; color: #b33a26; }

/* 绑定区服搜索：避免继承 rem 根字号，保持输入和结果列表尺寸一致。 */
.twpop .select2-dropdown { font-size:.24rem; color:#333; background:#fffaf0; border-color:#c9ad7d; }
.twpop .select2-search--dropdown { padding:.08rem; }
.twpop .select2-search--dropdown .select2-search__field { box-sizing:border-box; width:100%; min-width:0; height:.52rem; padding:0 .12rem; font-family:inherit; font-size:.24rem; line-height:normal; color:#333; background:#fff; border:1px solid #c9ad7d; border-radius:.04rem; }
.twpop .select2-search--dropdown .select2-search__field::placeholder { font-size:.24rem; color:#999; }
.twpop .select2-results__option { padding:.1rem .12rem; font-size:.24rem; line-height:1.4; }
.twpop .select2-container--default .select2-results > .select2-results__options { max-height:2.4rem; }
/* 充值赠礼：沿用原礼包卡片，按钮和祝福输入框限定在本模块。 */

.twpop .pop-table-codes { table-layout: fixed; width: 100%; }
.twpop .pop-table-codes th:nth-child(1) { width: 22%; }
.twpop .pop-table-codes th:nth-child(2) { width: 24%; }
.twpop .pop-table-codes th:nth-child(3) { width: 34%; }
.twpop .pop-table-codes th:nth-child(4) { width: 20%; }
.twpop .pop-table-codes td { overflow-wrap: anywhere; }
.twpop .pop-table-codes .pop-copy { display: inline-block; white-space: nowrap; margin: .06rem 0; }

/* 专属礼包码允许长连续字符在弹窗内换行，不撑宽内容区。 */
.twpop .pop-gift-code {
  font-size: .36rem;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.4;
}

/* 赠礼领取结果：道具名称与数量逐行对齐。 */
.twpop .gift-result-items { margin: .12rem 0 .24rem; padding: .08rem .24rem; list-style: none; background: #fff8e8; border: 1px solid #ead7ad; border-radius: .12rem; max-height: 3.6rem; overflow-y: auto; }
.twpop .gift-result-items li { display: flex; align-items: baseline; gap: .2rem; padding: .18rem 0; font-size: .28rem; line-height: 1.5; text-align: left; font-weight: normal; }
.twpop .gift-result-items li + li { border-top: 1px solid #eddfc4; }
.twpop .gift-result-name { flex: 1; min-width: 0; color: #614323; overflow-wrap: anywhere; }
.twpop .gift-result-count { flex: 0 0 auto; color: #c73728; font-weight: 600; white-space: nowrap; }
/* 单笔充值档位保留完整领取条件，长金额允许换行。 */
.package-single .package-desc2 {
  height: auto;
  min-height: .44rem;
  overflow: visible;
}
