/* 只补本工具自己的组件，主站外观完全交给 style.css */

/* ---- 免扫码账号列表 ---- */
.quickbox { width: 86%; max-width: 5.6rem; margin-top: .18rem; }
.quickbox-title { font-size: .15rem; color: #b87c06; margin-bottom: .1rem; text-align: center; }
.quick-item { display: flex; align-items: center; gap: .1rem; background: #f6f7f9; border: 1px solid #e3e6ea; border-radius: .08rem; padding: .1rem .12rem; margin-bottom: .1rem; cursor: pointer; }
.quick-item.cur { border-color: #e0a800; background: #fffaf0; }
.quick-item img { width: .42rem; height: .42rem; border-radius: .08rem; }
.quick-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.quick-info b { font-size: .16rem; color: #1f2329; }
.quick-info span { font-size: .12rem; color: #7a7d85; margin-top: .02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-item em { font-size: .12rem; color: #b87c06; font-style: normal; }

/* ---- 扫码 / Cookie ---- */
.login-entry { display: flex; flex-direction: column; align-items: center; width: 100%; }
.login-btn { margin-top: 1.5rem; }
.login-btn2 { margin-top: .5rem; }
.login-btn img, .login-btn2 img { max-width: 100%; }
.quick-entry { font-size: .13rem; color: #007bff; margin-top: .28rem; cursor: pointer; text-decoration: underline; }
.qr-back { font-size: .13rem; color: #808690; margin-top: .18rem; cursor: pointer; }
.qr-back:hover { color: #007bff; }
#qrPanel { display: flex; flex-direction: column; align-items: center; margin-top: .1rem; }
.qr-msg { font-size: .13rem; color: #6b7280; margin-top: .08rem; text-align: center; }
.login-cookie { font-size: .13rem; margin-top: .16rem; color: #6b7280; }
.login-cookie a { color: #007bff; text-decoration: underline; }
#cookiePanel { width: 86%; max-width: 5.2rem; margin-top: .1rem; display: flex; flex-direction: column; align-items: center; }
#cookieInput { width: 100%; height: 1rem; background: #f8f8f8; border: 1px solid #dfe3e8; border-radius: .06rem; color: #333; padding: .08rem; font-size: .13rem; }

/* ---- toast ---- */
.toast-box { position: fixed; left: 50%; bottom: 1rem; transform: translate(-50%, .2rem); background: rgba(0,0,0,.86); color: #fff; padding: .1rem .2rem; border-radius: .06rem; font-size: .14rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 9999; max-width: 80%; text-align: center; }
.toast-box.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- 领取表格：只补状态色，尺寸交给 style.css ---- */
#table-gethd tr.ended { opacity: .55; }
.rowchk { display: flex; align-items: center; gap: .05rem; }
.rowchk input { width: .15rem; height: .15rem; }
.rowchk span { color: #000; }
.res { display: block; text-align: left; word-break: break-all; }
.res.ok { color: #1a9c4f; }
.res.fail { color: #d93636; }
.res.skip { color: #b07a06; }
.res.ing { color: #2f7df6; }
.td-empty { text-align: center; font-size: .13rem; color: #6b7280; padding: .2rem .1rem !important; }

/* ---- 领取查询 ---- */
.query-nav { display: flex; gap: .1rem; margin: .1rem 0; }
.query-navtag { font-size: .13rem; padding: .06rem .16rem; border-radius: .04rem; background: #f0f2f5; color: #444; }
.query-navtag-active { background: #007bff; color: #fff; }
.rec-head td { background: #eef1f5; font-weight: bold; }

/* ---- 活动库卡片 ---- */
.act-card { background: #fff; border: 1px solid #e3e6ea; border-radius: .08rem; padding: .12rem; margin: .1rem; display: flex; flex-direction: column; gap: .08rem; box-shadow: 0 .02rem .06rem rgba(13,25,51,.06); }
.act-card.off { opacity: .62; }
.act-card-top { display: flex; align-items: center; gap: .1rem; }
.act-badge { width: .38rem; height: .38rem; border-radius: .08rem; background: linear-gradient(135deg, #ffcc33, #e0801a); color: #241a00; font-weight: bold; font-size: .18rem; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.act-card-title { display: flex; align-items: center; gap: .08rem; flex-wrap: wrap; }
.act-card-title p { font-size: .15rem; font-weight: bold; color: #1f2329; }
.act-tag { font-size: .11rem; padding: .01rem .07rem; border-radius: .03rem; background: #eef1f5; color: #666; }
.act-tag.on { background: #e6f8ee; color: #1a9c4f; }
.act-card-meta p { font-size: .12rem; color: #808690; line-height: .18rem; }
.act-card-body button { width: 100%; background: #007bff; color: #fff; border: 0; border-radius: .04rem; font-size: .13rem; padding: .07rem 0; cursor: pointer; }

/* ---- 留言 ---- */
.feedback-qq { font-size: .12rem; color: #808690; margin-top: .12rem; }

/* ---- 移动端适配（桌面不受影响）---- */
@media (max-width: 991px) {
  .container { width: 100% !important; }
  #pageDraw .tip, #pageQuery .tip, #pageActivity .tip {
    position: static !important; top: auto !important; left: auto !important;
    margin: .1rem .12rem .04rem; font-size: .14rem; line-height: 1.5; text-align: center;
  }
  .tablebox { margin-top: .08rem !important; height: auto !important; }
  .tablebox tr { min-height: .6rem !important; height: auto !important; }
  .tablebox td { vertical-align: middle !important; }
  .tablebox tbody { max-height: 5.4rem; overflow-y: auto; display: block; }
  .tablebox thead, .tablebox tbody tr { display: table; width: 100%; table-layout: fixed; }
  .tablebox td, .tablebox th { padding: .1rem .03rem !important; }
  .page { padding-bottom: 1.1rem; }
  .drawprogress, .Queryprogress { margin-top: .1rem; }
  .draw-tools { display: none !important; }
}

/* ===== 领取表格可读性修正（活动名看不清 / 行高过大）===== */
#table-gethd, #table-gethd * { color: #1f2329 !important; }
#table-gethd tr { height: auto !important; min-height: 0 !important; }
#table-gethd td { padding: .06rem .1rem !important; vertical-align: middle !important; font-size: .14rem !important; line-height: 1.5 !important; }
#table-gethd td.Drawth1 { padding-left: .14rem !important; }
#table-gethd td.Drawth3 { padding-left: .1rem !important; padding-right: .1rem !important; }
#table-gethd label, #table-gethd .rowchk { margin: 0 !important; padding: 0 !important; }
#table-gethd .rowchk { align-items: center; }
#table-gethd .rowchk input { margin-top: .03rem; }
#table-gethd .rowchk span { color: #007bff !important; font-size: .14rem !important; }
#table-gethd .actname { font-size: .145rem !important; font-weight: 400 !important; line-height: 1.5 !important; color: #007bff !important; }
#table-gethd .res { color: #ff0000 !important; font-size: .135rem !important; line-height: 1.5 !important; }
#table-gethd .res.ok { color: #ff0000 !important; }
#table-gethd .res.fail { color: #ff0000 !important; }
#table-gethd .res.skip { color: #ff0000 !important; }
#table-gethd .res.ing { color: #ff0000 !important; }
#table-gethd tr:nth-child(odd) { background: #ffffff !important; }
#table-gethd tr:nth-child(even) { background: #f2f2f2 !important; }
#table-gethd tr.ended { opacity: 1 !important; }
#table-gethd tr.ended .actname { color: #9aa0a6 !important; font-weight: 500 !important; }
#table-gethd tr.ended .rowchk span { color: #9aa0a6 !important; }
#table-gethd tr.ended .res { color: #9aa0a6 !important; }
.actended { color: #9aa0a6 !important; font-size: .12rem !important; font-weight: 400 !important; }

/* 移动端：活动名两行内换行，不再挤压 */
@media (max-width: 991px) {
  #table-gethd .actname { font-size: .16rem !important; font-weight: 600 !important; line-height: 1.45 !important; }
  #table-gethd td { padding: .1rem .06rem !important; }
  #table-gethd td.Drawth1 { padding-left: .1rem !important; }
}

/* ===== 领取表格 · 逐项对齐对标站（活动看得清、无勾选框、行高舒展）===== */
#pageDraw .tablebox .table-striped { border-collapse: collapse !important; width: 100% !important; }
#pageDraw .tablebox thead tr { background: #f0f0f0 !important; }
#pageDraw .tablebox thead th {
  background: #f0f0f0 !important;
  color: #000000 !important;
  font-size: .145rem !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  height: auto !important;
  padding: .1rem .12rem !important;
  text-align: left !important;
  border: 0 !important;
  border-right: 1px solid #ffffff !important;
  letter-spacing: 0;
}
#pageDraw .tablebox thead th:last-child { border-right: 0 !important; }
#pageDraw .tablebox tbody tr { border-bottom: 1px solid #ffffff !important; }
#pageDraw .tablebox tbody tr:nth-child(odd) { background: #ffffff !important; }
#pageDraw .tablebox tbody tr:nth-child(even) { background: #f2f2f2 !important; }
#pageDraw .tablebox tbody td {
  padding: .105rem .12rem !important;
  font-size: .142rem !important;
  line-height: 1.6 !important;
  vertical-align: middle !important;
  border: 0 !important;
  background: transparent !important;
  color: #22262c !important;
}
/* 勾选框隐藏：与对标站一致，只留序号数字（默认全部勾选，点领取即全领） */
#table-gethd .rowchk input { display: none !important; }
#table-gethd .rowchk { gap: 0 !important; }
#table-gethd .rowchk span { color: #007bff !important; font-size: .14rem !important; font-weight: 400 !important; }
#table-gethd .actname { color: #007bff !important; font-size: .142rem !important; font-weight: 400 !important; line-height: 1.6 !important; }
#table-gethd .res { color: #ff0000 !important; font-size: .138rem !important; }
#table-gethd .res.ok { color: #ff0000 !important; }
#table-gethd .res.fail { color: #ff0000 !important; }
#table-gethd .res.skip { color: #ff0000 !important; }
#table-gethd .res.ing { color: #ff0000 !important; }
#table-gethd .resdone { color: #ff0000 !important; font-weight: 700 !important; }
#table-gethd tr.ended, #table-gethd tr.ended .actname { opacity: 1 !important; }
#table-gethd tr.ended .actname { color: #9aa0a6 !important; }
@media (max-width: 991px) {
  #pageDraw .tablebox tbody td { padding: .12rem .08rem !important; }
  #table-gethd .actname { font-size: .15rem !important; }
}

/* 移动端领取按钮：文字不再贴边截断 */
@media (max-width: 991px) {
  #pageDraw .drawprogress, #pageQuery .Queryprogress { padding: 0 .1rem; box-sizing: border-box; }
  #drawbutton, #Querybutton {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 .14rem !important;
    font-size: .17rem !important;
    white-space: nowrap;
  }
  #drawbutton img, #Querybutton img { flex: 0 0 auto; }
}

/* ===== 手机端:表格列宽修正(结果列不再被挤成竖排) ===== */
@media (max-width: 991px) {
  #pageDraw th.Drawth1, #pageDraw td.Drawth1 { width: 17% !important; padding-left: .06rem !important; }
  #pageDraw th.Drawth2, #pageDraw td.Drawth2 { width: 45% !important; }
  #pageDraw th.Drawth3, #pageDraw td.Drawth3 { width: 38% !important; padding-left: .05rem !important; padding-right: .06rem !important; }
  #table-gethd td.Drawth3 .res { display: block; white-space: normal !important; word-break: break-all; line-height: 1.45 !important; }
  #table-gethd td.Drawth2 .actname { white-space: normal !important; word-break: break-all; line-height: 1.35 !important; }
  #pageDraw .tablebox { height: calc(100% - 2.6rem) !important; }
  #pageDraw .drawprogress .progress .number { left: 0 !important; right: 0 !important; width: 100% !important; text-align: center !important; transform: none !important; }
}

/* ===== 桌面端:三列宽度比例对齐 ===== */
@media (min-width: 992px) {
  #pageDraw th.Drawth1, #pageDraw td.Drawth1 { width: 20% !important; }
  #pageDraw th.Drawth2, #pageDraw td.Drawth2 { width: 57% !important; }
  #pageDraw th.Drawth3, #pageDraw td.Drawth3 { width: 23% !important; }
}

/* ===== 切换大区 / 更换账号（登录后出现，与对标站一致）===== */
.nav-acct { display: none; flex-direction: column; gap: .07rem; padding: .04rem .06rem .12rem; }
.nav-acct.is-on { display: flex; }
.nav-acct-btn {
  width: 100%; height: .36rem; line-height: .36rem;
  border: 0; border-radius: .06rem; cursor: pointer;
  background: #6d5309; color: #fff3d0;
  font-size: .14rem; text-align: center; letter-spacing: .01rem;
}
.nav-acct-btn:hover { background: #554005; color: #fff; }
.nav-acct-btn.logout { background: #8a6a10; color: #fff7e0; }
.nav-acct-btn.logout:hover { background: #6d5309; color: #fff; }

@media (min-width: 992px) {
  .mtop-btns, .mtop-btns.is-on { display: none !important; }
}
@media (max-width: 991px) {
  .nav-acct, .nav-acct.is-on { display: none !important; }
  .mtop { justify-content: space-between !important; padding: 0 .18rem !important; box-sizing: border-box; }
  .mtop p.mtitle { margin-left: 0 !important; font-size: .26rem !important; }
  .mtop-btns { display: none; gap: .1rem; align-items: center; }
  .mtop-btns.is-on { display: flex; }
  .mtop-btn {
    height: .48rem; line-height: .48rem; padding: 0 .14rem;
    border: 0; border-radius: .08rem; background: #6d5309; color: #fff3d0;
    font-size: .2rem; white-space: nowrap;
  }
}

/* ===== 手机端「切换大区」页修正(避免横向溢出、头像被压扁)===== */
@media (max-width: 991px) {
  #pageConfirm { padding-left: .12rem; padding-right: .12rem; box-sizing: border-box; overflow-x: hidden; }
  #pageConfirm .confirm-select {
    width: 100% !important; max-width: 100%; box-sizing: border-box;
    justify-content: center; flex-wrap: nowrap; gap: .06rem;
  }
  #pageConfirm .confirm-select p {
    width: auto !important; max-width: 45%; font-size: .16rem !important;
    white-space: nowrap; margin: 0;
  }
  #pageConfirm .confirm-selectbox { width: 2.3rem !important; max-width: 54%; flex: 0 0 auto; }
  #pageConfirm .confirm-selectbox span { opacity: 1 !important; }
  #pageConfirm .confirm-selectbox select { opacity: 0 !important; }
  #pageConfirm .confirm-selectbox span {
    font-size: .15rem !important; left: .14rem !important;
    transform: translateY(-50%) !important;
    max-width: calc(100% - .6rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #pageConfirm #CF_Level_img,
  #pageConfirm .confirm-face {
    width: 1.2rem !important; height: 1.2rem !important;
    flex: 0 0 auto !important;
    object-fit: cover; display: block; border-radius: 50%;
  }
  #pageConfirm .confirm-text { font-size: .17rem !important; text-align: center; line-height: 1.5; word-break: break-all; }
  #pageConfirm .bdtips { font-size: .13rem !important; line-height: 1.6; text-align: center; padding: 0 .1rem; box-sizing: border-box; }
}

/* 视口较矮的电脑(如 1366x768)下,左侧导航不再被顶部裁掉 */
@media (min-width: 992px) {
  #Navigation { max-height: 100vh; }
}

/* 屏幕高度不足 800 时,整个外壳跟着视口收缩,避免顶部头像被裁 */
@media (min-width: 992px) {
  .container { max-height: 100vh; }
}

/* 手机端:表格跟随内容高度,整页滚动(不再挤成只露 4 行) */
@media (max-width: 991px) {
  #pageDraw .tablebox { max-height: none !important; height: auto !important; overflow: visible !important; }
  #pageDraw .row.content { height: auto !important; }
  .container { min-height: 100vh; }
}

/* ===== 与小苹果对齐：领取页不显示额外工具条（活动库由服务端每 6 小时自动同步）===== */
.draw-tools { display: none !important; }

/* 用户页「领取查询」入口（导航不再单列，保持 4 项） */
.user-query-link { display: block; margin-top: .1rem; font-size: .13rem; color: #6b7280; text-decoration: none; }
.user-query-link:hover { color: #007bff; }

/* 与小苹果对齐：侧栏顶部不再额外放「切换大区/游戏」「更换账号」两个按钮
   （同功能按钮保留在用户页，小苹果也是放在用户页） */
#navAcct { display: none !important; }

/* 军衔徽章：贴在头像右下角（与小苹果一致的官方徽章图） */
.user-face-rank {
  position: absolute;
  right: .04rem;
  bottom: .04rem;
  width: .34rem;
  height: .34rem;
  border-radius: .04rem;
  box-shadow: 0 0 0 .02rem rgba(255, 255, 255, .8);
  z-index: 2;
}

/* 绑定大区页头像：与小苹果一致（圆角方框 + 顶部 Lv 蓝条 + 右下角军衔徽章） */
/* 绑定大区页头像：方形蓝框，图片单层铺满（容器只做纯色兜底，绝不叠背景图，避免重影） */
.confirm-facebox {
  position: relative;
  width: 1.6rem !important;
  height: 1.6rem !important;
  border: .04rem solid #7c94d6 !important;
  border-radius: .08rem !important;
  overflow: hidden;
  box-sizing: border-box;
  background: #f2f4f7;
  background-image: none !important;
}
.confirm-facebox .confirm-face {
  position: absolute;
  /* style.css 的媒体查询里给 .confirm-face 设了 margin-top:.45rem/1rem，
     绝对定位下会把图往下推、顶部露出容器底色，这里必须强制归零 */
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: center center;
  display: block;
}
.confirm-level {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: .28rem;
  line-height: .28rem;
  text-align: center;
  background: rgba(0, 123, 255, .55);
}
.confirm-level p { margin: 0; }
.confirm-level p span {
  font-weight: bold;
  color: #FFEB3B;
  font-size: .1rem;
  letter-spacing: -.02rem;
}
.confirm-rank {
  position: absolute;
  right: .04rem;
  bottom: .04rem;
  width: .3rem;
  height: .3rem;
  border-radius: .04rem;
  box-shadow: 0 0 0 .02rem rgba(255, 255, 255, .85);
  z-index: 2;
}

/* 绑定页「角色等级」输入：官方接口不返回等级时的小兜底 */
.lv-set {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .08rem;
  margin-top: .12rem;
}
.lv-set-label { font-size: .13rem; color: #4b5563; }
.lv-set-input {
  width: 1.1rem;
  height: .32rem;
  padding: 0 .1rem;
  font-size: .14rem;
  border: .01rem solid #cbd5e1;
  border-radius: .04rem;
  outline: none;
}
.lv-set-input:focus { border-color: #007bff; }
.lv-set-btn {
  height: .32rem;
  padding: 0 .16rem;
  font-size: .13rem;
  color: #fff;
  background: #007bff;
  border: 0;
  border-radius: .04rem;
  cursor: pointer;
}
.lv-set-tip { font-size: .12rem; color: #9aa3af; text-align: center; margin-top: .06rem; }

/* 绑定成功页底部：领取查询入口（小字，不占按钮区） */
.user-foot-links {
  margin-top: .1rem;
  text-align: center;
  font-size: .13rem;
}
.user-foot-links a {
  color: #6b7280;
  text-decoration: none;
}
.user-foot-links a:hover { color: #007bff; }

/* 快速领取条：与小苹果一致（灰底整宽 + 绿色开关 + 文案） */
.quick-claim-box {
  background: #6b6b6b !important;
  border-color: #6b6b6b !important;
}

/* 品牌行内的领取查询链接 */
.webverson a { color: #6b7280; text-decoration: none; }
.webverson a:hover { color: #007bff; }
