:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #07111f;
  --muted: #657591;
  --line: #dfe6f1;
  --primary: #18c98b;
  --primary-strong: #008e61;
  --danger: #ff3f46;
  --shadow: 0 16px 38px rgba(36, 48, 77, .08);
}

* { box-sizing: border-box; }
html, body { min-height: 100dvh; overscroll-behavior: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
}
button, input { font: inherit; }
button { touch-action: manipulation; cursor: pointer; }

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 12px calc(86px + env(safe-area-inset-bottom));
}

.top-ad {
  width: 100%;
  min-height: 59px;
  border: 0;
  background: linear-gradient(100deg, #020617 0%, #1c43ce 58%, #0b7d75 100%);
  color: #fff;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 950;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.top-ad .ad-ico { font-size: 21px; line-height: 1; color: #ff8a2b; }
.top-ad span:nth-child(2) { min-width: 0; font-size: 15px; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-ad b { flex: 0 0 auto; border: 1px solid #ffffff70; border-radius: 999px; padding: 8px 12px; background: #ffffff1f; font-size: 14px; }

.title { margin: 0 0 13px; font-size: 25px; line-height: 1.15; font-weight: 950; color: #050b16; }
.dash, .paygrid, .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.card, .metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card { margin: 9px 0; padding: 12px; }
.metric { min-width: 0; min-height: 92px; padding: 13px; position: relative; }
.metric span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.metric b { display: block; margin-top: 9px; color: #050b16; font-size: 26px; line-height: 1; font-weight: 950; }
.metric em { display: block; margin-top: 13px; color: var(--muted); font-size: 13px; font-style: normal; line-height: 1.35; }
.metric.trx { padding-right: 64px; }
.metric.trx button {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 950;
}

.label { display: block; margin: 9px 0 7px; color: #485b78; font-size: 14px; font-weight: 900; }
.field { position: relative; margin-bottom: 8px; }
.input {
  width: 100%;
  height: 36px;
  border: 1px solid #d4deeb;
  border-radius: 14px;
  background: #fff;
  color: #07111f;
  padding: 8px 45px 8px 10px;
  font-size: 14px;
  outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #18c98b1d; }
.mono-input { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; letter-spacing: 0; }
.copy {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 26px;
  border: 0;
  border-left: 1px solid #d4deeb;
  border-radius: 0 14px 14px 0;
  background: #f7f9fc;
  color: #657591;
  font-size: 12px;
  font-weight: 950;
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 1px;
  align-items: center;
  justify-content: center;
}

.check-row { display: grid; grid-template-columns: 1fr 78px; align-items: center; gap: 9px; margin-top: 9px; }
.check-row p { min-width: 0; margin: 0; color: var(--danger); font-size: 14px; line-height: 1.35; font-weight: 500; }
.check-row p.ok { color: var(--primary-strong); }

.btn {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  padding: 10px 12px;
  font-weight: 950;
}
.btn.secondary { border: 1px solid #c9ecdc; background: #eefbf5; color: #006c4d; font-size: 16px; }
.btn.big { width: 100%; min-height: 47px; margin-top: 12px; font-size: 18px; border-radius: 14px; }
.btn:disabled { opacity: 1; cursor: not-allowed; background: #d0d0d0; color: #fff; }

.pay, .chip {
  border: 1px solid #dfe6f0;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 10px;
}
.pay.active, .chip.active { border-color: var(--primary); background: #effdf6; }
.pay b { display: block; color: #050b16; font-size: 18px; line-height: 1.15; font-weight: 950; }
.pay span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.38; }
.price-line { margin: 10px 0 0; color: var(--danger); font-size: 14px; font-weight: 950; }
.chips { margin-top: 8px; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.chip { text-align: center; min-height: 36px; padding: 7px 4px; font-size: 14px; font-weight: 950; white-space: nowrap; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (min-width: 700px) {
  body::before {
    content: "请使用手机浏览器或手机 Telegram 打开本网站";
    position: fixed;
    inset: 0;
    z-index: 99;
    display: grid;
    place-items: center;
    background: #070a12;
    color: #fff;
    padding: 24px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
  }
  .top-ad, .app, .nav, .modal, .toast { display: none; }
}
