/* 设计稿 856×1852（含宿主顶栏 182）。页面只画顶栏以下 856×1670，逻辑宽 428 */
html {
  font-size: calc(100vw / 4.28);
  font-size: max(calc(100vw / 4.28), calc(100vh / 8.35));
  font-size: max(calc(100vw / 4.28), calc(100dvh / 8.35));
  --vh: 12px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 428px) {
  html {
    font-size: max(100px, calc(100dvh / 8.35));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  touch-action: manipulation;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #EAEAEA;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus,
[role="button"]:focus {
  outline: none;
}

img {
  background: transparent;
}

.page {
  position: relative;
  width: 100%;
  max-width: 4.28rem;
  height: 8.35rem;
  overflow: hidden;
  background: #EAEAEA;
}

.page-success {
  background: #ffd84a;
}

.artboard {
  position: relative;
  width: 4.28rem;
  height: 8.35rem;
  margin: 0 auto;
  overflow: hidden;
}

.artboard__hd {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: url("../assets/bg-verify-hd.png") no-repeat center top / 100% 100%;
  pointer-events: none;
}

.artboard__hd--success {
  background-image: url("../assets/bg-success-hd.png");
}

.form-overlay {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}

/* 白底表单从顶栏下 365/1670 起，与头图压缝 */
.form-overlay--sheet {
  top: 1.825rem;
  margin-top: 0.26rem;
}

.form-overlay__skin {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  pointer-events: none;
}

.interact-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

.interact-layer .field,
.interact-layer .btn-sms,
.interact-layer .form-label,
.interact-layer .field-error {
  pointer-events: auto;
}

.form-label {
  position: absolute;
  margin: 0;
  font-weight: 500;
  text-align: left;
  pointer-events: none;
}

.form-label--title,
.form-label--code {
  left: 0.415rem;
  width: 3.45rem;
  font-size: 0.18rem;
  line-height: 0.223rem;
  letter-spacing: -0.0054rem;
  font-weight: 600;
  color: #b67445;
  -webkit-text-fill-color: #b67445;
}

.form-label--title {
  top: 3.135rem;
}

.form-label--code {
  top: 4.46rem;
}

.field {
  display: flex;
  align-items: center;
  border: 0.01rem solid #e8e4dc;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0 0.24rem;
}

.field--abs {
  position: absolute;
  left: 0.415rem;
  width: 3.45rem;
  height: 0.55rem;
}

.field--phone-verify,
.field--phone-activate {
  top: 3.535rem;
}

.field--code-verify {
  top: 4.405rem;
  padding-right: 1.28rem;
}

.field--code-activate {
  top: 4.865rem;
}

.field:focus-within {
  border-width: 0.03rem;
  border-color: #ffe154;
}

.field.is-error,
.field.is-error:focus-within {
  background: #ffe5dd;
  border-width: 0.01rem;
  border-color: #ffc5b4;
}

.field.is-error input {
  color: #7c3100;
}

.prefix {
  flex-shrink: 0;
  font-size: 0.14rem;
  line-height: 0.18rem;
  color: #333;
  padding-right: 0.1rem;
  margin-right: 0.1rem;
  border-right: 0.01rem solid #e0dcd4;
}

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.14rem;
  line-height: 0.18rem;
  color: #333;
  user-select: text;
  -webkit-user-select: text;
}

.field input::placeholder {
  color: #999;
}

.field input:disabled {
  opacity: 1;
  -webkit-text-fill-color: currentColor;
}

.field-error {
  position: absolute;
  margin: 0;
  color: #ec7269;
  font-size: 0.14rem;
  line-height: 0.19rem;
  font-weight: 400;
  pointer-events: none;
}

.field-error--phone {
  top: 4.1rem;
  right: 0.415rem;
  width: 2.4rem;
  text-align: right;
}

.field-error--code {
  top: 5.505rem;
  left: 0.415rem;
  width: 3.45rem;
  white-space: pre-line;
}

.btn-sms {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  right: 0.05rem;
  top: 50%;
  width: 1.22rem;
  height: 0.45rem;
  margin-top: -0.225rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.btn-sms__bg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.btn-sms__label {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.14rem;
  line-height: 1;
  color: #999;
  white-space: nowrap;
  pointer-events: none;
}

.btn-sms.ready .btn-sms__label {
  color: #fff;
  font-weight: 500;
}

.btn-sms.countdown .btn-sms__label {
  font-size: 0.12rem;
  color: #999;
}

.foot-action {
  position: absolute;
  left: 50%;
  z-index: 3;
  width: 2.075rem;
  margin-left: -1.0375rem;
  pointer-events: auto;
}

.foot-action--verify,
.foot-action--activate {
  top: 6.975rem;
}

.foot-action--success {
  top: 6.975rem;
  width: 2.075rem;
  margin-left: -1.0375rem;
}

.btn-png {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
}

.btn-png--next,
.btn-png--activate,
.btn-png--again {
  width: 2.075rem;
  height: 0.535rem;
}

.btn-png__bg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.btn-png:active {
  transform: scale(0.98);
}

.btn-png:disabled {
  transform: none;
}

.lock-countdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 7.585rem;
  margin: 0;
  text-align: center;
  color: #ec7269;
  font-size: 0.14rem;
  line-height: 0.19rem;
  z-index: 4;
  pointer-events: none;
}

.foot-tips {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 0.12rem;
  line-height: 0.2rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 4;
  pointer-events: none;
  color: #999;
}

.foot-tips--verify,
.foot-tips--activate {
  top: 7.825rem;
}

.success-card {
  position: absolute;
  left: 0.345rem;
  top: 2.59rem;
  width: 3.59rem;
  height: 3.75rem;
  z-index: 2;
}

.success-card__bg {
  display: block;
  width: 3.59rem;
  height: 3.75rem;
}

.success-smile {
  position: absolute;
  left: 0.39rem;
  top: 0.316rem;
  width: 0.52rem;
  height: 0.42rem;
}

.success-title {
  position: absolute;
  left: 0.78rem;
  top: 0.36rem;
  margin: 0;
  font-family: "KeinannMaruPOP", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.24rem;
  line-height: 0.337rem;
  font-weight: 900;
  letter-spacing: -0.007rem;
  color: #fff;
  /* Figma: 白字 + 描边渐变 #FF8E1D→#FC6500；安卓 WebView 不支持 paint-order，用 8 向硬阴影 */
  text-shadow:
    -0.018rem -0.018rem 0 #fc6500, 0.018rem -0.018rem 0 #ff8e1d,
    -0.018rem 0.018rem 0 #fc6500, 0.018rem 0.018rem 0 #fc6500,
    0 -0.018rem 0 #ff8e1d, 0 0.018rem 0 #fc6500,
    -0.018rem 0 0 #fc6500, 0.018rem 0 0 #fc6500;
}

.success-pill {
  position: absolute;
  left: 0.4rem;
  width: 2.79rem;
  height: 0.55rem;
  border-radius: 0.39rem;
  display: flex;
  align-items: center;
}

.success-pill--hot {
  top: 1.125rem;
  background: #fff5db;
}

.success-pill--pkg {
  top: 1.875rem;
}

.success-pill--muted {
  top: 2.625rem;
  background: #f0f0f0;
  border: 0.01rem solid #ebebeb;
  justify-content: center;
}

.success-pill p {
  margin: 0;
  font-size: 0.16rem;
  line-height: 0.18rem;
  font-weight: 400;
  white-space: nowrap;
}

.success-pill--hot p {
  color: #b67445;
  padding-left: 0.08rem;
}

.success-pill--muted p {
  color: #666;
  text-align: center;
}

.success-check {
  position: relative;
  width: 0.43rem;
  height: 0.39rem;
  margin-left: 0.075rem;
  flex-shrink: 0;
}

.success-check__icon,
.success-check__shadow {
  position: absolute;
  display: block;
}

.success-check__icon {
  left: 0;
  top: 0;
  width: 0.4rem;
  height: 0.39rem;
}

.success-check__shadow {
  left: 0.04rem;
  top: 0.22rem;
  width: 0.42rem;
  height: 0.21rem;
}

.toast {
  position: absolute;
  left: 50%;
  top: 0.266rem;
  z-index: 100;
  display: flex;
  align-items: center;
  max-width: 3.9rem;
  min-height: 0.55rem;
  padding: 0.09rem 0.24rem 0.12rem;
  border-radius: 0.6rem;
  background: linear-gradient(105deg, #ffcbba 1%, #ffe5dd 95%);
  box-shadow: 0.02rem 0.02rem 0.01rem rgba(71, 71, 71, 0.15);
  opacity: 0;
  pointer-events: none;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
}

.toast.show {
  opacity: 1;
}

.toast__icon {
  width: 0.348rem;
  height: 0.307rem;
  flex-shrink: 0;
}

.toast-text {
  margin-left: 0.08rem;
  font-size: 0.14rem;
  line-height: 0.2rem;
  color: #7c3100;
  white-space: nowrap;
}
