:root {
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #f7f8fb;
  background: #07100d;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(38, 199, 129, .2), transparent 34rem),
    linear-gradient(160deg, #07100d 0%, #0b1713 55%, #07100d 100%);
}

.shell { width: min(620px, calc(100% - 20px)); margin: 0 auto; padding: 22px 0 24px; }
.hero { margin-bottom: 26px; }
.hero h1 { margin: 12px 0 8px; font-size: clamp(30px, 6vw, 52px); letter-spacing: -.04em; }
.hero p, .card p { color: #a9b7b0; line-height: 1.7; }
.badge { display: inline-block; padding: 6px 10px; border: 1px solid #2d8c66; border-radius: 999px; color: #75e8b5; font-size: 12px; font-weight: 800; letter-spacing: .1em; }

.wallet-picker, .order-window {
  min-height: calc(100vh - 46px);
  display: grid;
  align-content: center;
}
.wallet-picker[hidden], .order-window[hidden] { display: none; }
.wallet-picker h1, .order-window h1 { margin: 8px 0 4px; font-size: clamp(26px, 7vw, 40px); letter-spacing: -.04em; }
.wallet-picker > p, .order-window > p { margin: 0 0 12px; color: #a9b7b0; line-height: 1.4; }
.wallet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wallet-choice {
  min-height: 114px; padding: 18px; display: grid; justify-items: center; align-content: center; gap: 10px;
  border: 1px solid rgba(135, 234, 187, .18); border-radius: 18px; background: rgba(10, 25, 19, .82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .22); color: #f7f8fb; text-decoration: none; font-weight: 800;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.wallet-choice:hover { transform: translateY(-2px); border-color: rgba(117, 232, 181, .72); background: #10251c; }
.wallet-choice img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: #fff; }
.order-card, .warning, .card {
  border: 1px solid rgba(135, 234, 187, .18);
  background: rgba(10, 25, 19, .82);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}

.warning { padding: 22px; border-radius: 18px; margin-bottom: 18px; }
.order-card { padding: 14px; border-radius: 16px; }
.warning strong { color: #f3c969; }
dl { margin: 6px 0 0; }
dl div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 15px; }
dt { color: #7f9188; }
dd { margin: 0; overflow-wrap: anywhere; }
.wallet-facts { display: grid; gap: 7px; margin-top: 10px; padding: 10px; border: 1px solid rgba(117, 232, 181, .22); border-radius: 12px; background: rgba(4, 12, 9, .42); font-size: 14px; }
.wallet-facts div { display: grid; gap: 4px; }
.wallet-facts span { color: #7f9188; font-size: 13px; }
.wallet-facts strong { overflow-wrap: anywhere; color: #75e8b5; font-family: ui-monospace, monospace; }

.card { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; padding: 24px; border-radius: 20px; margin-top: 18px; }
.step { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #143f2e; color: #7cf0b9; font-weight: 900; }
.content h2 { margin: 4px 0 6px; font-size: 21px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wallet-launcher { margin-top: 18px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(4, 12, 9, .42); }
.wallet-launcher p { margin: 6px 0 12px; font-size: 14px; }
button, .button { min-height: 44px; border: 0; border-radius: 12px; padding: 0 16px; font: inherit; font-weight: 800; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.button { display: inline-flex; align-items: center; text-decoration: none; }
button:hover:not(:disabled), .button:hover { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .42; }
.primary { background: #59d99f; color: #062015; }
.secondary { background: #20362d; color: #d8e8e0; }
.danger { background: #f3c969; color: #2b1d02; }
.order-card .danger { width: 100%; margin-top: 9px; min-height: 48px; font-size: 16px; }
.order-card .secondary { width: 100%; margin-top: 10px; }

.status { margin-top: 8px; padding: 9px 10px; border-radius: 10px; line-height: 1.35; overflow-wrap: anywhere; font-size: 14px; }
.status[hidden] { display: none; }
.neutral { color: #b6c4bd; background: #111e19; }
.pending { color: #f6daa0; background: #302713; }
.success { color: #9af0c9; background: #103527; }
.error { color: #ffb6b6; background: #3a1717; }
.wallet-waiting {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 10, 7, .78);
  backdrop-filter: blur(5px);
}
.wallet-waiting[hidden] { display: none; }
.wallet-waiting-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 26px 22px;
  border: 1px solid rgba(117, 232, 181, .36);
  border-radius: 18px;
  background: #10251c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .52);
  color: #dff8eb;
  text-align: center;
  line-height: 1.55;
}
.wallet-waiting-card strong { font-size: 18px; }
.wallet-waiting-card span:last-child { color: #a9b7b0; font-size: 14px; }
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(117, 232, 181, .2);
  border-top-color: #75e8b5;
  border-radius: 50%;
  animation: wallet-spin .8s linear infinite;
}
@keyframes wallet-spin { to { transform: rotate(360deg); } }
.facts { margin-top: 14px; }
.proof { margin: 14px 0 0; padding: 14px; max-height: 280px; overflow: auto; border-radius: 12px; background: #050a08; color: #bde8d3; white-space: pre-wrap; word-break: break-word; }
.tx-link { display: inline-block; margin-top: 12px; color: #75e8b5; }
.tx-link[hidden] { display: none; }
footer { margin-top: 28px; color: #718078; text-align: center; font-size: 13px; }

@media (max-width: 640px) {
  .shell { padding-top: 28px; }
  .wallet-picker, .order-window { min-height: calc(100vh - 42px); }
  .card { grid-template-columns: 1fr; }
  dl div { grid-template-columns: 1fr; gap: 3px; }
  .wallet-launcher .button { flex: 1 1 calc(50% - 10px); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.8s; }
}
