html {
  font-size: 16px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html,
body {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.tp-pay-body {
  background: #eceff3;
  color: #1f2937;
}

.tp-native-hidden {
  display: none !important;
}

main[role="main"].h-100 > .tp-pay-shell {
  width: min(520px, calc(100vw - 32px));
  margin: 18px auto;
  padding: 30px 24px 26px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  text-align: center;
}

@media (min-width: 768px) {
  main[role="main"].h-100 > .tp-pay-shell {
    margin: 28px auto;
    padding: 34px 30px 30px;
  }
}

.tp-pay-shell * {
  box-sizing: border-box;
}

.tp-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.tp-logo-circle {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(180deg, #38c25d 0%, #27a745 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(47, 168, 79, 0.22);
  overflow: hidden;
}

.tp-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 9px;
}

.tp-logo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
}

.tp-logo-circle.has-image .tp-logo-fallback {
  display: none;
}

.tp-logo-circle.has-image {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.tp-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  color: #1f2937;
}

.tp-subtitle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

.tp-subtitle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31b255;
  flex: 0 0 auto;
}

.tp-summary-card {
  margin: 0 0 16px;
  padding: 10px 16px;
  background: #f6f7f9;
  border: 1px solid #eef0f4;
  border-radius: 14px;
}

.tp-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  text-align: left;
}

.tp-summary-row + .tp-summary-row {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.tp-summary-label {
  font-size: 13px;
  color: #4b5563;
  font-weight: 600;
}

.tp-summary-value {
  max-width: 68%;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  text-align: right;
  word-break: break-all;
}

.tp-summary-value.is-accent {
  color: #ff6666;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.tp-countdown-card {
  margin: 0 0 16px !important;
  padding: 14px 12px 16px;
  border-radius: 14px;
  background: #ff6b6b;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(255, 107, 107, 0.18);
}

.tp-countdown-card.is-expired {
  background: #e85c5c;
}

.tp-time-original {
  display: none !important;
}

.tp-count-label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.96;
}

.tp-count-main {
  font-family: "SF Mono", Consolas, Menlo, Courier, monospace;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
}

.tp-count-units {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 48px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.92;
}

.tp-qr-panel {
  margin: 0 0 16px !important;
  padding: 16px 14px 18px;
  background: #fafafa;
  border: 2px dashed #d9d9d9;
  border-radius: 14px;
}

.tp-chain-chip {
  position: static !important;
  bottom: auto !important;
  height: auto !important;
  margin: 0 auto 14px !important;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.08);
  color: #e25151 !important;
  font-size: 12px;
  font-weight: 700;
}

.tp-qr-panel > img,
.tp-qr-panel img.border,
.tp-qr-panel img[alt="收款地址"],
.tp-qr-panel img[alt="address"] {
  display: block;
  width: min(174px, 52vw);
  height: auto;
  margin: 0 auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #dddddd !important;
  border-radius: 8px;
  box-shadow: none !important;
}

.tp-qr-caption {
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
}

.tp-address-card {
  margin-bottom: 16px;
  padding: 12px 14px;
  text-align: left;
  background: #f6f7f9;
  border: 1px solid #dedede;
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.tp-address-card:hover,
.tp-address-card:focus-visible {
  border-color: #cfd5de;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
  outline: none;
}

.tp-address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tp-address-label {
  font-size: 12px;
  color: #6b7280;
}

.tp-address-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d6d9df;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tp-address-copy:hover {
  border-color: #b9c0ca;
}

.tp-address-copy.is-copied {
  background: #2fa84f;
  border-color: #2fa84f;
  color: #ffffff;
}

.tp-address-copy-icon {
  font-size: 12px;
  line-height: 1;
}

.tp-address-value {
  font-size: 13px;
  line-height: 1.7;
  color: #1f2937;
  word-break: break-all;
  font-family: "SF Mono", Consolas, Menlo, monospace;
}

.tp-detail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 12px;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: #2fa84f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 168, 79, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.tp-detail-btn:hover {
  opacity: 0.96;
}

.tp-detail-btn:active {
  transform: translateY(1px);
}

.tp-detail-btn.is-open .tp-detail-arrow {
  transform: rotate(180deg);
}

.tp-detail-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.tp-extra-panel {
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  transition: max-height 0.25s ease, padding 0.25s ease, margin 0.25s ease, border-color 0.25s ease;
}

.tp-extra-panel.is-open {
  max-height: 360px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-color: #e5e7eb;
}

.tp-extra-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
}

.tp-extra-row + .tp-extra-row {
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}

.tp-extra-label {
  font-size: 12px;
  color: #6b7280;
  flex: 0 0 auto;
}

.tp-extra-value {
  font-size: 13px;
  color: #1f2937;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.tp-extra-value.break-anywhere {
  word-break: break-all;
}

.tp-tips-panel {
  margin-top: 0;
  padding: 12px 14px 14px;
  background: #f8edc7;
  border: 1px solid #efdf9d;
  border-radius: 10px;
  text-align: left;
}

.tp-tips-title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #8a6d1d;
}

.tp-tips-list {
  margin: 0;
  padding-left: 18px;
}

.tp-tips-list li {
  font-size: 12px;
  line-height: 1.75;
  color: #7b651d;
}

.tp-tips-panel a {
  color: #2563eb;
  text-decoration: none;
}

.tp-tips-panel a:hover {
  text-decoration: underline;
}

.tp-pay-shell .address[style*="top"] {
  display: none !important;
}

@media (max-width: 480px) {
  main[role="main"].h-100 > .tp-pay-shell {
    width: calc(100vw - 20px);
    padding: 24px 16px 22px;
    border-radius: 16px;
  }

  .tp-logo-circle {
    width: 58px;
    height: 58px;
  }

  .tp-summary-card {
    padding: 8px 12px;
  }

  .tp-summary-value {
    max-width: 62%;
    font-size: 13px;
  }

  .tp-summary-value.is-accent {
    font-size: 16px;
  }

  .tp-count-units {
    gap: 34px;
  }

  .tp-address-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tp-address-copy {
    align-self: flex-end;
  }
}
