.checkout-page {
  margin: 0 auto;
  max-width: 620px;
  padding: 0 0 24px;
}

.checkout-back {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text-soft);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 650;
  gap: 9px;
  margin: 0 0 22px;
  padding: 8px 0;
}

.checkout-back span {
  align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 1.1rem;
  height: 34px;
  justify-content: center;
  transition:
    background 0.15s var(--ease),
    border-color 0.15s var(--ease),
    transform 0.15s var(--ease);
  width: 38px;
}

.checkout-back:hover {
  color: var(--text);
}

.checkout-back:hover span {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateX(-2px);
}

.checkout-loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  min-height: 360px;
  text-align: center;
}

.checkout-loading strong {
  color: var(--text);
  font-size: 1rem;
}

.checkout-loading .notice {
  margin: 4px 0;
}

.main-content.checkout-main-content {
  padding-bottom: 40px;
  padding-top: 30px;
}

.checkout-brand {
  align-items: center;
  display: flex;
  height: 64px;
  justify-content: center;
  margin: 0 auto 16px;
  width: 100%;
}

.checkout-logo {
  display: block;
  flex: 0 0 160px;
  height: 80px;
  object-fit: contain;
  width: 160px;
}

.checkout-content {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
}

.checkout-timer {
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  margin: 10px 0 10px;
}

.checkout-qr-frame {
  aspect-ratio: 1;
  background: var(--surface-qr);
  border: 1px solid var(--border-qr);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: grid;
  max-width: 320px;
  padding: 12px;
  place-items: center;
  width: min(100%, 320px);
}

.checkout-qr {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.checkout-qr-empty {
  align-items: center;
  aspect-ratio: 1;
  color: var(--text-muted);
  display: flex;
  font-size: 0.88rem;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.checkout-qr-error {
  color: var(--red);
  font-size: 0.82rem;
  margin: 10px 0 0;
  text-align: center;
}

.payment-powered {
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 12px 0 22px;
  text-align: center;
}

.checkout-details {
  border-top: 1px solid var(--border);
  margin: 0 auto 22px;
  max-width: 420px;
  padding-top: 18px;
  width: 100%;
}

.checkout-details h2 {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 12px;
}

.checkout-details dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.checkout-details dl > div {
  align-items: baseline;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.checkout-details dt {
  color: var(--text-muted);
  flex: 0 0 auto;
  font-size: 0.84rem;
}

.checkout-details dd {
  color: var(--text);
  font-size: 0.84rem;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.checkout-actions {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 320px);
  margin-bottom: 12px;
}

.checkout-actions .button {
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.checkout-cancel {
  background: none;
  border: 0;
  color: var(--text-muted);
  padding: 6px 10px;
}

.checkout-cancel:hover {
  color: var(--red);
}

@media (max-width: 520px) {
  .main-content.checkout-main-content {
    padding-bottom: 28px;
    padding-top: 20px;
  }
}
