/* 设计稿宽 750，1rem = 100 设计像素 */
html { font-size: calc(100vw / 7.5); -webkit-text-size-adjust: 100%; }
@media (min-width: 750px) { html { font-size: 100px; } }

:root {
  --bg: #fcf7e9;
  --paper: #fffaf0;
  --navy: #1d3557;
  --navy-soft: #4a5b74;
  --red: #c8322e;
  --red-dark: #9e1f1c;
  --gold: #c9a063;
  --gold-light: #e8d3a6;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body {
  background: #efe6cf;
  color: var(--navy);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: .26rem;
}
body.locked { position: fixed; left: 0; right: 0; overflow: hidden; }
img { display: block; max-width: 100%; -webkit-touch-callout: none; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }

.page {
  max-width: 7.5rem;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: .6rem;
  padding-bottom: calc(.6rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 0 30%, rgba(233, 214, 175, .35), transparent 40%),
    radial-gradient(ellipse at 100% 60%, rgba(233, 214, 175, .3), transparent 40%),
    var(--bg);
  overflow-x: hidden;
}

.hero img { width: 100%; height: auto; }

/* 公告框 */
.notice {
  position: relative;
  margin: .1rem .3rem 0;
  padding: .26rem .2rem .24rem;
  text-align: center;
  background: linear-gradient(180deg, #fffaf0, #fbf2df);
  border: .02rem solid var(--gold-light);
  outline: .02rem solid rgba(201, 160, 99, .55);
  outline-offset: -.1rem;
  font-family: var(--serif);
}
.notice::before, .notice::after {
  content: ""; position: absolute; width: .26rem; height: .26rem;
  border: .03rem solid var(--gold); top: -.04rem;
}
.notice::before { left: -.04rem; border-right: 0; border-bottom: 0; }
.notice::after { right: -.04rem; border-left: 0; border-bottom: 0; }
.notice-sub { font-size: .3rem; font-weight: 700; letter-spacing: .04rem; }
.notice-main { margin-top: .06rem; font-size: .36rem; font-weight: 700; letter-spacing: .04rem; }
.notice-desc { margin-top: .08rem; font-size: .24rem; color: var(--navy-soft); letter-spacing: .02rem; }

/* 区块标题 */
.block { padding: 0 .36rem; margin-top: .5rem; }
.sec-title {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: .42rem; font-weight: 900; letter-spacing: .06rem;
}
.sec-title::before, .sec-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.sec-title::after { background: linear-gradient(270deg, transparent, var(--gold)); }
.sec-title span { display: flex; align-items: center; padding: 0 .1rem; }
.sec-title span::before, .sec-title span::after {
  content: ""; width: .1rem; height: .1rem; margin: 0 .2rem;
  border: .025rem solid var(--gold); transform: rotate(45deg);
}
.sec-sub { margin-top: .06rem; text-align: center; font-size: .22rem; color: var(--navy-soft); }

/* 礼包 */
.gifts { display: flex; justify-content: space-between; margin-top: .3rem; text-align: center; }
.gifts li { width: 2.1rem; }
.gifts img { width: 1.56rem; margin: 0 auto; }
.gift-name { margin-top: .06rem; font-size: .26rem; font-weight: 600; }
.gift-num { font-size: .44rem; font-weight: 800; color: var(--red); line-height: 1.2; }

/* 按钮 */
.btns { display: flex; justify-content: space-between; margin-top: .26rem; }
.btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 3.24rem; height: .84rem;
  font-family: var(--serif); font-size: .38rem; font-weight: 900; letter-spacing: .06rem;
  border-radius: .04rem;
  transition: transform .1s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn::after {
  content: ""; position: absolute; top: .06rem; right: .06rem; bottom: .06rem; left: .06rem; border-radius: .02rem; pointer-events: none;
}
.btn-red {
  color: #fff8e8;
  background: linear-gradient(180deg, #db4a41 0%, var(--red) 55%, #ad2622 100%);
  border: .03rem solid var(--red-dark);
  box-shadow: 0 .04rem .1rem rgba(158, 31, 28, .28);
  text-shadow: 0 .02rem .02rem rgba(110, 10, 10, .4);
}
.btn-red::after { border: 1px solid rgba(246, 210, 150, .75); }
.btn-red:disabled { filter: grayscale(.4) brightness(.92); cursor: default; }
.btn-light {
  color: var(--navy);
  background: linear-gradient(180deg, #fffaf0, #f6e7c8);
  border: .03rem solid var(--gold);
}
.btn-light::after { border: 1px solid rgba(201, 160, 99, .5); }

/* 礼包码 */
.code-bar {
  display: flex; align-items: center; margin-top: .22rem; padding: .14rem .18rem;
  background: var(--paper); border: 1px dashed var(--gold); border-radius: .04rem;
}
.code-label { flex: none; font-size: .24rem; color: var(--navy-soft); }
.code-value {
  flex: 1; min-width: 0; margin: 0 .16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: .34rem; font-weight: 700;
  color: var(--red); letter-spacing: .03rem; user-select: all; -webkit-user-select: all;
}
.code-copy, .btn-join {
  flex: none; padding: .08rem .26rem; font-size: .24rem; color: var(--red-dark);
  border: 1px solid var(--gold); border-radius: .4rem;
  background: linear-gradient(180deg, #fffaf0, #f6e7c8);
}
.tip { margin-top: .18rem; text-align: center; font-size: .22rem; color: var(--navy-soft); }

/* 福利活动 */
.welfare { margin-top: .26rem; }
.welfare li { display: flex; align-items: center; padding: .2rem 0; }
.welfare li + li { border-top: 1px solid rgba(201, 160, 99, .3); }
.welfare img { width: .86rem; height: .86rem; border-radius: .16rem; }
.welfare-info { flex: 1; min-width: 0; margin-left: .3rem; }
.welfare-name { font-size: .28rem; font-weight: 700; }
.welfare-desc { margin-top: .04rem; font-size: .24rem; font-weight: 600; color: var(--red); }
.btn-join { padding: .12rem .28rem; color: var(--navy-soft); font-weight: 600; }

/* 说明 */
.rules { margin-top: .26rem; }
.rules li { display: flex; align-items: flex-start; padding: .1rem 0; font-size: .25rem; line-height: 1.6; }
.rules b {
  flex: none; width: .82rem; margin-right: .26rem; padding-right: .24rem;
  font-size: .28rem; color: #c08a3e; border-right: 1px solid var(--gold);
}

/* 弹窗 */
.mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 24, 36, .62);
  animation: fade .2s ease;
}
.modal {
  position: relative; width: 6.3rem; max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: .56rem .44rem .5rem;
  background:
    radial-gradient(ellipse at 100% 0, rgba(233, 214, 175, .55), transparent 45%),
    radial-gradient(ellipse at 0 100%, rgba(233, 214, 175, .45), transparent 45%),
    var(--paper);
  border: .03rem solid var(--gold);
  outline: 1px solid rgba(201, 160, 99, .55); outline-offset: -.12rem;
  border-radius: .06rem;
  box-shadow: 0 .2rem .6rem rgba(0, 0, 0, .3);
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.modal::before {
  content: ""; position: absolute; left: 50%; top: -.03rem; transform: translateX(-50%);
  width: 2.4rem; height: .06rem; background: var(--red);
}
.modal-close {
  position: absolute; right: .2rem; top: .16rem; width: .56rem; height: .56rem;
  font-size: .48rem; line-height: .56rem; color: var(--navy-soft);
}
.modal-title { font-family: var(--serif); font-size: .44rem; font-weight: 900; letter-spacing: .08rem; text-align: center; color: var(--red); }
.modal-title span { display: inline-flex; align-items: center; }
.modal-title span::before, .modal-title span::after {
  content: ""; width: .09rem; height: .09rem; margin: 0 .18rem;
  border: .025rem solid var(--gold); transform: rotate(45deg);
}
.modal-desc { margin: .12rem 0 .34rem; text-align: center; font-size: .24rem; color: var(--navy-soft); }

.field {
  display: flex; align-items: center; height: .88rem; margin-bottom: .22rem; padding: 0 .24rem;
  background: #fff; border: 1px solid var(--gold-light); border-radius: .04rem;
}
.field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 .04rem rgba(201, 160, 99, .18); }
.field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none;
  font-size: 16px; color: var(--navy); /* 不小于16px，避免iOS聚焦时页面放大 */
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.field input::placeholder { color: #a8a39a; }
.btn-sms {
  flex: none; padding-left: .24rem; border-left: 1px solid var(--gold-light);
  font-size: .26rem; font-weight: 600; color: var(--red);
}
.btn-sms:disabled { color: #a8a39a; cursor: default; }
.form-err { min-height: .36rem; font-size: .22rem; color: var(--red); }
.btn-submit { width: 100%; margin-top: .08rem; }

.success-code {
  margin: 0 auto .32rem; padding: .26rem .1rem; text-align: center;
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: .44rem; font-weight: 800;
  letter-spacing: .04rem; color: var(--red); word-break: break-all;
  background: #fff; border: 1px dashed var(--gold); border-radius: .04rem;
  user-select: all; -webkit-user-select: all;
}
.success-tip { margin-top: .22rem; text-align: center; font-size: .22rem; color: var(--navy-soft); }

.toast {
  position: fixed; left: 50%; top: 50%; z-index: 200; transform: translate(-50%, -50%);
  max-width: 5.6rem; padding: .2rem .36rem; border-radius: .08rem;
  background: rgba(20, 24, 36, .85); color: #fff; font-size: .26rem; text-align: center;
}

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
