:root {
  --blue: #1f72ff;
  --blue-deep: #0b55d9;
  --blue-soft: #eaf4ff;
  --ink: #0b1636;
  --muted: #737b8d;
  --line: #dce3ef;
  --bg: #f4f8fd;
  --orange: #ff6d14;
  --shadow: 0 10px 32px rgba(27, 70, 130, .12);
}

* {
  box-sizing: border-box;
}

html {
  background: #f3f5f8;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #f3f5f8;
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 14px 0;
}

.mobile-card {
  position: relative;
  width: min(100%, 470px);
  min-height: 100vh;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(228, 243, 255, .2), rgba(255, 255, 255, .55) 210px),
    var(--bg);
  box-shadow: 0 18px 48px rgba(20, 42, 73, .18);
}

.hero {
  position: relative;
  aspect-ratio: 941 / 455;
  min-height: 244px;
  height: auto;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #d9efff;
}

.hero img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 56%;
  min-width: 230px;
  height: 100%;
  padding: 26px 14px 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(234, 246, 255, .98), rgba(234, 246, 255, .88));
  backdrop-filter: blur(2px);
}

.hero-brand,
.hero-subtitle,
.hero-trust {
  margin: 0;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #1656a5;
  font-size: 13px;
  font-weight: 700;
}

.hero-brand span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #1376d8;
  font-size: 11px;
}

.hero h1 {
  margin: 17px 0 6px;
  color: #0758bd;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-subtitle {
  color: #376c9f;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 11em;
}

.hero-trust {
  position: absolute;
  bottom: 24px;
  left: 24px;
  padding: 7px 12px;
  border: 1px solid #9bc9ef;
  border-radius: 999px;
  color: #165b98;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 18px rgba(24, 59, 108, .10);
  font-size: 11px;
}

.content {
  position: relative;
  z-index: 2;
  margin-top: -32px;
  padding: 0 15px 164px;
}

.panel {
  margin-bottom: 12px;
  padding: 18px 18px 19px;
  border: 1px solid rgba(226, 233, 243, .88);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.info-panel {
  padding-top: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-head.compact {
  margin-bottom: 13px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.title-row h2 {
  margin: 0;
  color: #050b20;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: normal;
}

.title-row em {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #dcecff;
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.title-row p {
  margin: 2px 0 0 8px;
  color: #687386;
  font-size: 13px;
  line-height: 1.35;
}

.secure-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #8c94a4;
  font-size: 12px;
  white-space: normal;
  line-height: 1.4;
}

.icon {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: var(--blue);
}

.person::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2b80ff, #0e61e8);
}

.person::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 20px;
  height: 12px;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, #2b80ff, #0e61e8);
}

.wallet::before {
  content: "";
  position: absolute;
  inset: 2px 1px 4px 1px;
  border: 2px solid var(--blue);
  border-radius: 3px;
}

.wallet::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 10px;
  width: 11px;
  height: 9px;
  border-radius: 3px 0 0 3px;
  background: var(--blue);
}

.mini-shield,
.lock {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 1.8px solid currentColor;
  border-radius: 8px 8px 10px 10px;
}

.field {
  position: relative;
  display: block;
  margin-bottom: 13px;
}

.field > span {
  display: block;
  margin-bottom: 9px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.field b {
  color: #ff2a21;
  font-weight: 900;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.field input::placeholder {
  color: #9aa3b5;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 114, 255, .12);
}

.field.is-invalid input {
  border-color: #ff6b55;
}

.error {
  display: block;
  min-height: 14px;
  padding-top: 3px;
  color: #f04438;
  font-size: 11px;
}

.address-field input {
  padding-right: 48px;
}

.address-field i {
  position: absolute;
  right: 17px;
  top: 45px;
  width: 18px;
  height: 18px;
  border: 2px solid #7b8497;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
}

.address-field i::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 6px;
  height: 6px;
  border: 1.5px solid #7b8497;
  border-radius: 50%;
}

.amount-option {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.amount-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-dot {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 16px;
  height: 16px;
  border: 1.5px solid #c2cad7;
  border-radius: 50%;
  background: #fff;
}

.is-active .radio-dot {
  border: 5px solid var(--blue);
}

.amount-option.is-active {
  border-color: var(--blue);
  background: linear-gradient(145deg, #eef7ff, #fff);
  box-shadow: inset 0 0 0 1px rgba(31, 114, 255, .12);
}

.amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.amount-option {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.amount-option .radio-dot {
  left: 22px;
  top: 13px;
}

.amount-option strong {
  color: #06123a;
  font-size: 20px;
  font-weight: 800;
}

.amount-option.is-active strong {
  color: var(--blue-deep);
}

.help {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.5px solid #8c95a5;
  border-radius: 50%;
  color: #6c7484;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.pay-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  min-height: 102px;
  display: grid;
  grid-template-columns: 1.05fr 1.45fr;
  grid-template-rows: auto auto;
  gap: 9px 16px;
  align-items: center;
  padding: 15px 22px 15px;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -8px 28px rgba(17, 44, 91, .12);
}

.pay-bar p {
  margin: 0;
}

.pay-bar > div p {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #111827;
  font-size: 16px;
  white-space: nowrap;
}

.pay-bar strong {
  color: var(--orange);
  font-size: 30px;
  line-height: 1;
}

.pay-bar small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #99a1af;
  font-size: 12px;
  white-space: nowrap;
}

.pay-bar button {
  height: 56px;
  border: none;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #257eff, #1265e9);
  box-shadow: 0 12px 24px rgba(31, 114, 255, .25);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.pay-types {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #545d6d;
  font-size: 13px;
}

.pay-types i {
  width: 1px;
  height: 15px;
  background: #c5cad3;
}

.alipay {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.alipay {
  border-radius: 5px;
  background: #1976f3;
}

.only-alipay {
  justify-content: flex-start;
  padding-left: 4px;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.sheet.is-open {
  display: block;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 31, .45);
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: min(420px, calc(100vw - 24px));
  padding: 22px 22px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(7, 23, 52, .22);
  transform: translateX(-50%);
}

.sheet-panel > p {
  margin: 0 0 6px;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 800;
}

.sheet-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
  letter-spacing: 0;
}

.close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  color: #111827;
  background: #eef3f8;
  font-size: 26px;
  cursor: pointer;
}

.qr {
  position: relative;
  width: 178px;
  height: 178px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 9px solid #fff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 42, 83, .12);
}

.qr-grid {
  width: 126px;
  height: 126px;
  background:
    linear-gradient(90deg, #101b20 10px, transparent 10px) 0 0/24px 24px,
    linear-gradient(#101b20 10px, transparent 10px) 0 0/24px 24px,
    linear-gradient(90deg, transparent 12px, #101b20 12px 18px, transparent 18px) 0 0/32px 32px,
    #fff;
}

.qr-grid[hidden] {
  display: none;
}

.qr-image {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: contain;
}

.qr-image[hidden] {
  display: none;
}

.qr span {
  position: absolute;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: #ff724f;
  font-size: 12px;
  font-weight: 900;
}

.qr span[hidden] {
  display: none;
}

.order {
  margin: 0 0 16px;
}

.order div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border-bottom: 1px solid #e3e8f1;
  gap: 14px;
}

.order dt {
  color: #737b8d;
  font-size: 13px;
}

.order dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.done {
  width: 100%;
  height: 50px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.browser-guide {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

.browser-guide[hidden] {
  display: none;
}

.browser-guide-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  left: 14px;
  max-width: 420px;
  margin: 0 auto;
  padding: 15px 16px;
  border-radius: 14px;
  color: #0f1d36;
  background: #fff;
  box-shadow: 0 18px 48px rgba(7, 23, 52, .22);
}

.browser-guide-panel::after {
  content: "";
  position: absolute;
  top: -8px;
  right: 24px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
}

.browser-guide-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-deep);
  font-size: 18px;
  font-weight: 900;
}

.browser-guide-panel p {
  margin: 0;
  color: #536079;
  font-size: 14px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 15px;
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 15, 31, .9);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 520px) {
  .page {
    display: block;
    padding: 0;
  }

  .mobile-card {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    min-height: 212px;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 18px 16px 16px;
    display: block;
    justify-content: initial;
    background: linear-gradient(92deg, rgba(234, 246, 255, .96) 0 39%, rgba(234, 246, 255, .78) 58%, rgba(234, 246, 255, .12) 100%);
  }

  .hero-brand {
    font-size: 12px;
  }

  .hero h1 {
    margin: 34px 0 7px;
    max-width: 6.5em;
    font-size: 21px;
  }

  .hero-subtitle {
    font-size: 12px;
    max-width: 12em;
  }

  .hero-trust {
    display: none;
  }

  .content {
    margin-top: -14px;
    padding: 0 12px 150px;
  }

  .panel {
    border-radius: 17px;
  }

  .panel-head {
    display: grid;
    gap: 12px;
  }

  .info-panel .panel-head {
    margin-bottom: 14px;
  }

  .info-panel .title-row {
    align-items: center;
  }

  .info-panel .secure-note {
    padding: 10px 12px;
    border: 1px solid #e5edf7;
    border-radius: 10px;
    background: #f7faff;
    color: #7c8798;
    font-size: 11px;
  }

  .title-row {
    gap: 8px;
  }

  .title-row h2 {
    font-size: 18px;
  }

  .panel-head.compact .title-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
  }

  .panel-head.compact .title-row p {
    grid-column: 2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
  }

  .panel-head.compact .title-row .icon {
    grid-row: 1 / span 2;
  }

  .secure-note {
    line-height: 1.35;
  }

  .pay-bar {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 13px 14px 14px;
    gap: 10px;
  }

  .pay-bar > div p {
    font-size: 15px;
  }

  .pay-bar strong {
    font-size: 28px;
  }

  .pay-bar small {
    margin-top: 8px;
    white-space: normal;
    line-height: 1.35;
  }

  .pay-bar button {
    grid-column: 1;
    height: 52px;
    border-radius: 14px;
    font-size: 18px;
  }

  .pay-types {
    grid-column: 1;
    justify-content: flex-start;
    padding-left: 0;
  }
}

@media (max-width: 390px) {
  .hero {
    min-height: 196px;
  }

  .hero h1 {
    margin-top: 30px;
    font-size: 20px;
  }

  .hero-subtitle {
    max-width: 11em;
  }

  .content {
    margin-top: -12px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .title-row h2 {
    font-size: 17px;
  }

  .panel-head.compact .title-row p {
    font-size: 11px;
  }

  .pay-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mini-shield {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
  }

  .pay-bar button {
    font-size: 20px;
  }
}
