* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #17191c;
  --muted: #7c838c;
  --line: #e9edf1;
  --blue: #1677ff;
  --blue-hover: #0f69e8;
  --warning: #d48806;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(22, 119, 255, 0.08), transparent 34%),
    var(--bg);
}

button {
  font: inherit;
}

.checkout-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.checkout-card {
  width: min(100%, 480px);
  background: var(--card);
  border: 1px solid rgba(23, 25, 28, 0.05);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(23, 25, 28, 0.11);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  flex: 0 0 auto;
}

.brand h1 {
  margin: 0 0 6px;
  font-size: 23px;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.order-info {
  padding: 24px 28px 6px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  font-size: 14px;
}

.info-row span {
  color: var(--muted);
  flex: 0 0 auto;
}

.info-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #faad14;
}

.status.waiting {
  color: var(--warning);
}

.amount-panel {
  margin: 18px 28px 24px;
  padding: 24px;
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc, #f5f7f9);
  border: 1px solid var(--line);
}

.amount-panel > span {
  color: var(--muted);
  font-size: 14px;
}

.amount {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 5px;
}

.amount small {
  font-size: 20px;
  font-weight: 700;
}

.amount strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -1.5px;
}

.payment-area {
  padding: 0 28px 26px;
}

.pay-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}

.pay-button {
  color: #fff;
  background: var(--blue);
}

.pay-button:hover {
  background: var(--blue-hover);
}

.secondary-button {
  margin-top: 12px;
  color: var(--text);
  background: #f1f4f7;
}

.pay-button:active,
.secondary-button:active {
  transform: scale(.99);
}

.notice {
  margin: 15px 0 0;
  text-align: center;
  color: #a0a6ad;
  font-size: 12px;
}

.qr-panel {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed #cfd6dd;
  text-align: center;
}

.qr-placeholder {
  width: 190px;
  height: 190px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background:
    linear-gradient(45deg, #111 25%, transparent 25%) 0 0/20px 20px,
    linear-gradient(-45deg, #111 25%, transparent 25%) 0 10px/20px 20px,
    linear-gradient(45deg, transparent 75%, #111 75%) 10px -10px/20px 20px,
    linear-gradient(-45deg, transparent 75%, #111 75%) -10px 0/20px 20px,
    #fff;
  border: 10px solid #fff;
  box-shadow: 0 0 0 1px #e0e5ea;
}

.qr-placeholder span {
  width: 132px;
  padding: 10px;
  background: rgba(255, 255, 255, .94);
  font-size: 13px;
  font-weight: 700;
}

.qr-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.hidden {
  display: none;
}

footer {
  padding: 18px 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: #a0a6ad;
  font-size: 12px;
}

.text-button {
  border: 0;
  background: transparent;
  color: #747b84;
  cursor: pointer;
  padding: 0;
}

dialog {
  width: min(90%, 420px);
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .2);
}

dialog::backdrop {
  background: rgba(0, 0, 0, .38);
}

.dialog-content {
  padding: 26px;
}

.dialog-content h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.dialog-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-line;
}

.dialog-content button {
  width: 100%;
  margin-top: 22px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--blue);
  cursor: pointer;
}

@media (max-width: 560px) {
  .checkout-shell {
    padding: 0;
    display: block;
  }

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

  .brand,
  .order-info,
  .payment-area {
    padding-left: 22px;
    padding-right: 22px;
  }

  .amount-panel {
    margin-left: 22px;
    margin-right: 22px;
  }
}
