:root {
    --color-text-main: #e44514;
    --color-text-light: #fff8eb;
    --color-focus: #712600;
    --font-main: "Microsoft YaHei", "PingFang SC", sans-serif;
    --size-touch-target-min: 44px;
}

html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu {margin:0;padding:0;box-sizing:border-box}
html,body,fieldset,img,iframe,abbr {border:0}
li {list-style:none}
textarea {overflow:auto;resize:none}
a,button {cursor:pointer}
h1,h2,h3,h4,h5,h6,em,strong,b {font-weight:700}
a,a:hover {text-decoration:none}
input {-webkit-appearance:none;appearance:none}
* {-webkit-tap-highlight-color:transparent}
button {border:0;background:none;font:inherit;color:inherit}
button:focus-visible,a:focus-visible {outline:3px solid var(--color-focus);outline-offset:2px}
img {display:block;width:100%;user-select:none;-webkit-user-drag:none}
[hidden] {display:none}

body {
    min-width: 320px;
    background: #fff2c5;
    font-family: var(--font-main);
}

.app {
    position: relative;
    width: 7.5rem;
    max-width: 100%;
    min-height: 16rem;
    margin: 0 auto;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    overflow: hidden;
    background: #fff0be url('../imgs/page-background2.png') top center / 7.5rem 16rem no-repeat;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.head {
    position: relative;
    height: 6.68rem;
}

.logo {
    position: absolute;
    top: .28rem;
    left: .27rem;
    width: 1.96rem;
    height: .65rem;
}

.login-btn {
    position: absolute;
    top: .22rem;
    right: .36rem;
    width: 1.31rem;
    height: max(.43rem, var(--size-touch-target-min));
    background: url('../imgs/login-button.png') center / 1.31rem .43rem no-repeat;
}

.user {
    position: absolute;
    top: .42rem;
    right: .36rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: .43rem;
    padding: 0 .12rem;
    border-radius: .22rem;
    background: rgba(255, 246, 222, .88);
    color: #7f2107;
    font-size: .18rem;
    line-height: .43rem;
}

.user[hidden] {display:none}
.user-name {white-space:nowrap}
.logout-btn {position:relative;width:.48rem;height:.43rem;margin-left:.06rem;color:#b3310c;line-height:.43rem}
.logout-btn::after {content:"";position:absolute;top:50%;left:50%;width:var(--size-touch-target-min);height:var(--size-touch-target-min);transform:translate(-50%,-50%)}

.quick-nav {
    position: absolute;
    top: 1.4rem;
    right: -.06rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: .05rem;
}

.nav-btn {
    position: relative;
    width: .88rem;
    height: max(.88rem, var(--size-touch-target-min));
}

.nav-btn::before {
    content: "";
    position: absolute;
    top: .07rem;
    left: .06rem;
    width: .76rem;
    height: .74rem;
    background-image: url('../imgs/nav-sprite.png');
    background-size: .76rem 2.30rem;
    background-repeat: no-repeat;
}

.nav-recharge::before {background-position:0 0}
.nav-rule::before {background-position:0 -.78rem}
.nav-record::before {background-position:0 -1.56rem}
.nav-record {margin-top:.02rem}

.coupon-panel {
    position: relative;
    width: 6.9rem;
    height: 4.36rem;
    margin-left: .3rem;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 6.9rem 4.36rem;
}

.part1 {background-image:url('../imgs/panel-weekly.png?v=1')}
.part2 {margin-top:.3rem;background-image:url('../imgs/panel-premium.png')}


.coupon-list {
    position: absolute;
    top: 1.19rem;
    left: .2rem;
    display: flex;
    gap: .19rem;
}

.coupon-item {
    position: relative;
    flex: 0 0 2.04rem;
    width: 2.04rem;
    height: 1.85rem;
    background: url('../imgs/coupon-base.png') center / 2.04rem 1.85rem no-repeat;
}

.coupon-item p {
    position: absolute;
    top: .49rem;
    left: .08rem;
    width: 1.88rem;
    color: var(--color-text-main);
    font-size: .24rem;
    font-weight: 700;
    line-height: .3rem;
    text-align: center;
}

.buy-btn {
    position: absolute;
    top: 3.24rem;
    left: 1.95rem;
    width: 3rem;
    height: max(.8rem, var(--size-touch-target-min));
    background: url('../imgs/buy-button.png') center / 3rem .8rem no-repeat;
}

.buy-btn:disabled {filter:grayscale(.25);opacity:.75;cursor:wait}





/* 公共入口：登录 / 活动规则 */
.twpop{
  z-index: 100;
  position: relative;
}
.twpop .twpop-main{
  background: url('../imgs/pop.png') center top / 6.9rem 4.16rem no-repeat;
  color: #e44514;
  height: 4.16rem;
  width: 6.9rem;
  max-width: 6.9rem;
  font-size: .3rem;
}
.twpop-load .twpop-main{
  height: auto;
}
.twpop .twpop-cont{
    padding: 0 .2rem;
}
.twpop .twpop-diy-content{
    height: 3.4rem;
    max-height: 3.45rem;
}
.twpop .twpop-close{
  top: -.68rem;
  width: .66rem;
  height: .66rem;
  background: url('../imgs/close.png') no-repeat center / .42rem auto;
}
.twpop .twpop-title{
    border: none;
  font-style: italic;
  height: .7rem;
  line-height: .7rem;
  font-size: .36rem;
  color: #fceada;
  padding: 0;
  font-weight: bold;
  text-align: center;
}


.rule {max-height:60vh;padding:.08rem .12rem;overflow-y:auto;-webkit-overflow-scrolling:touch;color:#6f250b;font-size:.22rem;line-height:1.75;text-align:left}
.rule p + p {margin-top:.08rem}
.record-empty {padding:.36rem .2rem;color:#8d4a2d;font-size:.24rem;text-align:center}
.record-list {max-height:60vh;padding:.12rem;overflow-y:auto;-webkit-overflow-scrolling:touch;color:#6f250b;font-size:.2rem;text-align:left}
.record-item {padding:.18rem;border:1px solid #ffd2a9;border-radius:.12rem;background:#fff8eb}
.record-item + .record-item {margin-top:.12rem}
.record-head {display:flex;align-items:center;justify-content:space-between}
.record-head strong {color:#d94216;font-size:.26rem}
.record-head span {color:#e95d24;font-size:.18rem}
.record-time {margin-top:.08rem;color:#9b644d;font-size:.18rem}
.record-label {margin-top:.12rem;font-weight:700}
.record-coupon {margin-top:.06rem;padding-left:.28rem}
.record-coupon li {list-style:disc;line-height:1.65}
.payment-options {display:flex;justify-content:center;gap:.9rem;padding:.8rem .3rem 0}
.payment-item {display:flex;flex:0 0 2.27rem;flex-direction:column;align-items:center}
.payment-logo {width:2.27rem;height:.8rem;object-fit:contain}
.payment-btn {width:2.07rem;height:.57rem;margin-top:.18rem;background-position:center;background-size:2.07rem .57rem;background-repeat:no-repeat}
.payment-wx {background-image:url('../imgs/pay_wx.png')}
.payment-zfb {background-image:url('../imgs/pay_zfb.png')}
.payment-btn:active {transform:translateY(.02rem);filter:brightness(.96)}

@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after {scroll-behavior:auto;animation-duration:.01ms;animation-iteration-count:1;transition-duration:.01ms}
}

/* 销售日期由接口驱动，宣传金额由背景图片展示。 */
.activity-time{position:absolute;bottom:.04rem;width:100%;text-align:center;font-size:.22rem;color:#8b320d}
/* 领取、售罄等状态保留动态文字；立即购买恢复原设计切图和原有尺寸位置。 */
.buy-btn{background:linear-gradient(#ffb329,#f04416);border:.03rem solid #ffad38;border-radius:.5rem;color:#fff9dd;font-size:.32rem;font-weight:700;box-shadow:0 .04rem .06rem #d64f2633}
/* 原切图自带购买文字，透明文本避免重复叠字，并保留按钮的读屏名称。 */
.buy-btn.is-buy{background:url('../imgs/buy-button.png') center / 3rem .8rem no-repeat;border:0;border-radius:0;box-shadow:none;color:transparent}
.user{max-width:4.7rem;min-width:0}.user-name{overflow:hidden;text-overflow:ellipsis;max-width:3.7rem}
.refresh-btn{display:block;margin:.16rem auto;padding:.1rem .2rem;color:#9d3511;font-size:.22rem;text-decoration:underline;min-height:44px}
.app{padding-bottom:.2rem}.modal-open{overflow:hidden}
/* 规则和分页购买记录允许滚动；对话框高度按视口限制，避免小屏按钮被固定背景裁切。 */
.zk-modal{position:fixed;inset:0;z-index:10000;background:#0009;display:flex;align-items:center;justify-content:center;padding:.3rem}
.zk-modal[hidden]{display:none}.zk-dialog{position:relative;width:6.7rem;max-width:95vw;max-height:85vh;overflow:auto;border:.04rem solid #ffad55;border-radius:.22rem;background:#fff1d6;padding:.3rem .2rem;color:#79320d;box-shadow:0 .1rem .4rem #431d0755}
.zk-dialog h2{text-align:center;color:#d74818;font-size:.34rem;margin-bottom:.15rem;padding:0 .5rem}
.zk-close{position:absolute;right:.05rem;top:.05rem;width:44px;height:44px;font-size:.42rem;color:#b63b13}
.zk-dialog .rule,.zk-dialog .record-list{max-height:none}.zk-dialog .record-head{gap:.1rem;align-items:flex-start}.record-head span{max-width:2.6rem}
.zk-dialog .payment-options{padding:.2rem;gap:.5rem}.pay-choice{width:2.3rem;padding:.1rem;background:#fff;border-radius:.12rem;border:1px solid #ffb879;min-height:44px}
.payment-summary,.payment-hint{font-size:.23rem;text-align:center;line-height:1.65;margin:.12rem .08rem;overflow-wrap:anywhere}
.action-btn{display:block;margin:.2rem auto;padding:.13rem .3rem;border-radius:.3rem;background:#f06427;color:white;font-size:.24rem;min-height:44px}
.action-btn:disabled,.pay-choice:disabled{opacity:.55;cursor:wait}.pay-qr{width:220px;max-width:100%;margin:.2rem auto}.pay-qr img,.pay-qr canvas{max-width:100%;height:auto}
.zk-toast{position:fixed;z-index:20000;left:50%;bottom:12vh;transform:translateX(-50%);max-width:90vw;width:max-content;background:#3e2415ee;color:white;border-radius:.1rem;padding:.18rem .24rem;font-size:.23rem;line-height:1.5;text-align:center}
