:root {
  --lhs-pay-paper: #f4f1e8;
  --lhs-pay-ink: #263e3c;
  --lhs-pay-muted: #6d7b74;
  --lhs-pay-red: #a74432;
  --lhs-pay-line: #cbd2c7;
  --lhs-pay-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --lhs-pay-sans: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.lhs-pay-layer[hidden] { display: none !important; }
.lhs-pay-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background: rgba(17, 40, 42, .76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--lhs-pay-sans);
  color: var(--lhs-pay-ink);
  opacity: 0;
  transition: opacity .22s ease;
  touch-action: pan-y;
}
.lhs-pay-layer.is-visible { opacity: 1; }
.lhs-pay-dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: 32px 34px 24px;
  border: 1px solid rgba(146, 165, 151, .9);
  background:
    linear-gradient(rgba(53, 87, 73, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 87, 73, .035) 1px, transparent 1px),
    var(--lhs-pay-paper);
  background-size: 28px 28px;
  box-shadow: 0 26px 90px rgba(4, 23, 28, .38);
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
  outline: none;
  box-sizing: border-box;
  touch-action: pan-y;
}
.lhs-pay-dialog::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, .7);
  pointer-events: none;
}
.lhs-pay-layer.is-visible .lhs-pay-dialog { opacity: 1; transform: none; }
.lhs-pay-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #687a70;
  font: 30px/1 var(--lhs-pay-serif);
  cursor: pointer;
}
.lhs-pay-header { position: relative; padding: 0 62px 22px 0; border-bottom: 1px solid var(--lhs-pay-line); }
.lhs-pay-eyebrow { margin: 0 0 4px; color: var(--lhs-pay-muted); font-size: 11px; letter-spacing: 3px; }
.lhs-pay-header h2 { margin: 0; font: 500 31px/1.55 var(--lhs-pay-serif); letter-spacing: 4px; }
.lhs-pay-header > p:last-child { margin: 3px 0 0; color: var(--lhs-pay-muted); font-size: 13px; line-height: 1.7; }
.lhs-pay-seal {
  position: absolute;
  right: 3px;
  top: 14px;
  padding: 6px 5px;
  border: 1px solid var(--lhs-pay-red);
  color: var(--lhs-pay-red);
  font: 12px/1.2 var(--lhs-pay-serif);
  text-align: center;
  letter-spacing: 2px;
  transform: rotate(4deg);
}
.lhs-pay-summary { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--lhs-pay-line); }
.lhs-pay-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 7px 0; }
.lhs-pay-summary dt { flex: none; color: var(--lhs-pay-muted); font-size: 13px; }
.lhs-pay-summary dd { margin: 0; overflow-wrap: anywhere; color: var(--lhs-pay-ink); font-size: 15px; font-weight: 600; text-align: right; }
.lhs-pay-summary .lhs-pay-price { color: var(--lhs-pay-red); font: 600 21px var(--lhs-pay-serif); }
.lhs-pay-field { margin-top: 18px; }
.lhs-pay-field > label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 14px; font-weight: 600; letter-spacing: 1px; }
.lhs-pay-field > label span { color: var(--lhs-pay-muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.lhs-pay-amount-wrap { position: relative; }
.lhs-pay-amount-wrap > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--lhs-pay-red); font: 600 21px var(--lhs-pay-serif); }
.lhs-pay-amount-wrap input {
  width: 100%;
  height: 52px;
  padding: 8px 14px 8px 38px;
  border: 1px solid #9eaea0;
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, .68);
  color: var(--lhs-pay-ink);
  font: 600 22px var(--lhs-pay-serif);
  box-sizing: border-box;
  touch-action: manipulation;
}
.lhs-pay-amount-wrap input:focus { border-color: #477363; box-shadow: 0 0 0 3px rgba(71, 115, 99, .13); }
.lhs-pay-amount-wrap input[aria-invalid="true"] { border-color: var(--lhs-pay-red); box-shadow: 0 0 0 3px rgba(167, 68, 50, .1); }
.lhs-pay-conversion { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--lhs-pay-muted); font-size: 12px; }
.lhs-pay-conversion strong { color: #496b5a; font-weight: 500; }
.lhs-pay-conversion b { font-size: 14px; }
.lhs-pay-field-error { min-height: 18px; margin: 5px 0 0; color: var(--lhs-pay-red); font-size: 12px; line-height: 1.5; }
.lhs-pay-methods { min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.lhs-pay-methods legend { margin-bottom: 9px; padding: 0; font-size: 14px; font-weight: 600; letter-spacing: 1px; }
.lhs-pay-method {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 18px;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid #7394a3;
  background: rgba(229, 242, 248, .68);
  cursor: pointer;
}
.lhs-pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.lhs-pay-alipay-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #1677ff; color: white; font: 600 22px var(--lhs-pay-serif); }
.lhs-pay-method span:nth-of-type(2) { display: flex; flex-direction: column; gap: 3px; }
.lhs-pay-method strong { font-size: 14px; }
.lhs-pay-method small { color: var(--lhs-pay-muted); font-size: 12px; }
.lhs-pay-method i { width: 17px; height: 17px; border: 5px solid #1677ff; border-radius: 50%; background: white; box-sizing: border-box; }
.lhs-pay-message { min-height: 20px; margin: 11px 0 0; color: var(--lhs-pay-red); font-size: 13px; line-height: 1.55; text-align: center; }
.lhs-pay-actions { display: grid; grid-template-columns: 115px 1fr; gap: 11px; margin-top: 5px; }
.lhs-pay-actions button { min-height: 50px; border-radius: 0; font-family: var(--lhs-pay-sans); font-size: 15px; cursor: pointer; }
.lhs-pay-cancel { border: 1px solid #9eaea0; background: rgba(255, 255, 255, .42); color: var(--lhs-pay-ink); }
.lhs-pay-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; border: 1px solid var(--lhs-pay-red); background: var(--lhs-pay-red); color: #fff9eb; letter-spacing: 2px; box-shadow: inset 0 0 0 4px var(--lhs-pay-red), inset 0 0 0 5px rgba(255, 255, 255, .24); }
.lhs-pay-submit b { font-weight: 500; }
.lhs-pay-submit em { font-size: 22px; font-style: normal; }
.lhs-pay-submit:disabled { cursor: wait; opacity: .62; }
.lhs-pay-footnote { margin: 15px 0 0; color: var(--lhs-pay-muted); font-size: 12px; line-height: 1.65; text-align: center; }
.lhs-pay-close:focus-visible, .lhs-pay-actions button:focus-visible, .lhs-pay-method:focus-within { outline: 2px solid var(--lhs-pay-red); outline-offset: 3px; }

@media (max-width: 520px) {
  .lhs-pay-layer { padding: 10px; align-items: center; }
  .lhs-pay-dialog { width: 100%; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding: 27px 22px 20px; }
  .lhs-pay-header { padding-right: 54px; }
  .lhs-pay-header h2 { font-size: 27px; }
  .lhs-pay-actions { grid-template-columns: 94px 1fr; }
  .lhs-pay-conversion { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .lhs-pay-layer, .lhs-pay-dialog { transition: none; }
}
