:root {
  --ink: #eaf2ff;
  --muted: #9db0cc;
  --gold: #ffd15c;
  --blue: #2f7bff;
  --danger: #ff8b96;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background-color: #020610;
  background-image:
    radial-gradient(circle, rgba(150, 186, 230, 0.22) 1px, transparent 1.2px),
    radial-gradient(ellipse at 50% 0%, #123567 0%, #061428 46%, #020610 72%);
  background-size: 22px 22px, 100% 100%;
}
button, input { font: inherit; }
button { cursor: pointer; }
.stage {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 12px 28px;
  background: linear-gradient(180deg, #0c2d66 0%, #082044 210px, #07152e 100%);
  box-shadow: 0 0 0 1px rgba(86, 150, 230, 0.2);
}
.top, .top-actions, .sheet-head, .subhead, .auth-foot {
  display: flex;
  align-items: center;
}
.top { justify-content: space-between; gap: 10px; }
a.brand-link,
a.brand-link:link,
a.brand-link:visited,
a.brand-link:hover,
a.brand-link strong {
  color: #eaf2ff;
  text-decoration: none;
}
.brand strong, .brand small { display: block; }
.auth-page { margin-top: 96px; }
.auth-page .dialog {
  width: 100%;
  box-shadow:
    inset 0 0 0 1px rgba(150, 210, 255, 0.35),
    0 0 0 1px rgba(62, 196, 255, 0.9);
}
.support-note { margin: 8px 0 0; color: #b7c8e2; font-size: 13px; }
.brand strong { font-size: 18px; letter-spacing: 0.02em; color: #eaf2ff; }
.brand small { margin-top: 1px; color: #b7c8e4; font-size: 12px; }
.top-actions { gap: 8px; min-width: 0; flex: 1; justify-content: flex-end; }
.brand { flex: none; }
.pill { flex: none; white-space: nowrap; }
a.pill,
a.pill:visited,
a.pill:hover,
.pill {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: #e7f0ff;
  background: rgba(8, 24, 58, 0.72);
  box-shadow: inset 0 0 0 1px rgba(130, 176, 230, 0.35);
  text-decoration: none;
}
.account {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 128px;
  max-width: 128px;
  min-width: 0;
  overflow: hidden;
  color: var(--gold);
  flex: 0 0 128px;
  white-space: nowrap;
}
#accountName {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-out { flex: none; }
.account-out::before { content: "·"; margin-right: 4px; }
body.signed-in #openLogin { display: none !important; }
.hero {
  position: relative;
  overflow: hidden;
  margin: 12px 0 10px;
  min-height: 214px;
  padding: 12px 14px 16px;
  border-radius: 18px;
  background:
    radial-gradient(120px 80px at 18% 78%, rgba(255, 196, 64, 0.18), transparent 70%),
    radial-gradient(160px 120px at 78% 28%, rgba(64, 156, 255, 0.28), transparent 70%),
    linear-gradient(180deg, #123f86 0%, #0a2860 58%, #071c44 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 190, 255, 0.28), 0 10px 24px rgba(0, 0, 0, 0.18);
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: rgba(6, 24, 58, 0.35);
  color: #e9fff8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.battery {
  width: 30px;
  height: 16px;
  display: block;
  filter: drop-shadow(0 0 4px rgba(46, 242, 210, 0.45));
}
.orbit {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 16px, rgba(90, 190, 255, 0.15) 17px 18px, transparent 19px),
    linear-gradient(145deg, #7ae7ff, #2f6dff 55%, #123a86);
  box-shadow: 0 0 18px rgba(70, 170, 255, 0.65);
  position: relative;
}
.orbit::after {
  content: "";
  position: absolute;
  inset: 16px;
  background: #e9f7ff;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.hero-scene { height: 78px; position: relative; }
.coin {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff1b0, #f0b423 42%, #a86a09 78%);
  box-shadow: inset 0 0 0 3px rgba(255, 236, 170, 0.7), 0 6px 10px rgba(0, 0, 0, 0.25);
}
.coin::after {
  content: "T";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8a4d08;
  font-weight: 800;
  font-size: 14px;
}
.coin.a { left: 8px; top: 34px; transform: rotate(-18deg); }
.coin.b { left: 42px; top: 8px; width: 28px; height: 28px; }
.coin.c { right: 18px; bottom: 0; width: 26px; height: 26px; }
.bolt {
  position: absolute;
  width: 86px;
  height: 112px;
  left: 50%;
  top: -28px;
  transform: translateX(-18%);
  filter: drop-shadow(0 0 12px rgba(80, 190, 255, 0.85));
}
.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(#fff1a6, #ffc83a 46%, #e39412);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #6d3d09) drop-shadow(0 0 10px rgba(255, 196, 64, 0.35));
}
.tagline {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  text-align: center;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.notice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  text-align: left;
  color: #d7e6fb;
  background: rgba(8, 28, 64, 0.72);
  box-shadow: inset 0 0 0 1px rgba(120, 170, 230, 0.22);
}
.horn {
  flex: none;
  width: 26px;
  height: 26px;
  display: block;
}
.notice .tag {
  flex: none;
  padding: 3px 6px;
  border-radius: 7px;
  background: #e23b4a;
  color: white;
  font-size: 12px;
}
.marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: ticker 16s linear infinite;
}
.marquee-track span {
  padding-right: 56px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.notice:hover .marquee-track { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
.chev { color: #8fb0d8; font-size: 18px; }
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 12px 0 10px;
  overflow: hidden;
  border-radius: 14px;
  background: #0b2248;
  box-shadow: inset 0 0 0 1px rgba(120, 170, 230, 0.2);
}
.tab {
  border: 0;
  padding: 13px 8px;
  background: transparent;
  color: #c5d5ec;
}
.tab.active {
  color: white;
  background: linear-gradient(180deg, #3c86f0, #1d5ed8);
  box-shadow: inset 0 -3px 0 #8fd0ff;
}
.sheet {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(12, 42, 92, 0.96), rgba(8, 28, 64, 0.96));
  box-shadow: inset 0 0 0 1px rgba(90, 160, 240, 0.28);
}
.sheet-head { justify-content: space-between; }
.sheet-head h2, .subhead h2 { margin: 0; color: var(--gold); font-size: 16px; }
.sheet-head span, .rule, .lead, .foot, .prose { color: var(--muted); }
.sheet-head span { font-size: 12px; }
.callout {
  margin: 12px 0;
  padding: 14px 10px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, #ffe7a8, #f3c453);
  color: #1c2744;
}
.callout p { margin: 0; font-weight: 800; }
.callout b { color: #e10600; font-size: 18px; }
.paybox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #f7f9fc;
  color: #17233a;
}
.paybox.stack { display: grid; }
.paybox small { display: block; color: #66758c; font-size: 12px; }
.paybox strong { display: block; margin-top: 2px; word-break: break-all; font-size: 13px; }
.trx-mark {
  flex: none;
  width: 38px;
  height: 38px;
  display: block;
}
.copy, .wide, .quiet, .text-action {
  border: 0;
  border-radius: 12px;
}
.copy {
  flex: none;
  padding: 8px 12px;
  color: white;
  background: linear-gradient(180deg, #4b93ff, #1d64e6);
}
.tiers, .packs { display: grid; gap: 10px; }
.tiers { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.tier, .pack { border: 0; border-radius: 16px; }
.tier {
  min-height: 132px;
  padding: 16px 8px;
  text-align: center;
  color: white;
}
.tier b, .tier span { display: block; }
.tier b { font-size: 22px; margin-bottom: 8px; }
.tier span { margin-top: 3px; font-size: 13px; color: rgba(255, 255, 255, 0.92); }
.tier:nth-child(odd) { background: linear-gradient(180deg, #1f8f49, #0c5b2e); }
.tier:nth-child(even) { background: linear-gradient(180deg, #1d4f9f, #12356d); }
.tier.selected { box-shadow: inset 0 0 0 2px #ffe08a; }
.text-action {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  color: #3a2500;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffe38a, #f5b400);
  box-shadow: 0 8px 18px rgba(245, 180, 0, 0.28);
}
.packs-sheet { margin-top: 12px; }
.rule { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.packs { grid-template-columns: 1fr 1fr 1fr; margin-top: 10px; }
.pack {
  min-height: 74px;
  padding: 10px 6px;
  text-align: center;
  color: #16325c;
  background: linear-gradient(180deg, #f5f9ff, #d9e8fb);
}
.pack b, .pack span { display: block; }
.pack b { font-size: 16px; }
.pack span { margin-top: 4px; color: #1d5ed8; font-weight: 800; }
.foot { font-size: 12px; line-height: 1.5; text-align: center; }
.subhead { gap: 10px; margin: 8px 0 12px; }
.order-list { display: grid; gap: 10px; }
.order {
  padding: 12px;
  border-radius: 14px;
  background: rgba(10, 32, 70, 0.9);
  box-shadow: inset 0 0 0 1px rgba(90, 160, 240, 0.28);
}
.order header { display: flex; justify-content: space-between; gap: 8px; }
.order p { margin: 8px 0 0; color: var(--muted); font-size: 13px; word-break: break-all; }
.badge { color: var(--gold); font-size: 12px; }
.mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 8, 20, 0.62);
}
.mask.upper { z-index: 30; }
.mask[hidden] { display: none !important; }
.dialog {
  width: min(390px, 100%);
  position: relative;
  padding: 26px 16px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, #0d3474, #071c45);
  box-shadow:
    0 0 0 2px #3ec4ff,
    0 0 28px rgba(40, 160, 255, 0.72),
    inset 0 0 0 1px rgba(150, 210, 255, 0.35);
}
.dialog h2 {
  margin: 0 0 14px;
  text-align: center;
  color: var(--gold);
  font-size: 22px;
  text-shadow: 0 0 12px rgba(255, 200, 70, 0.28);
}
.close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #d5e4f8;
  font-size: 22px;
}
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.switch button {
  border: 0;
  border-radius: 12px;
  padding: 12px 8px;
  color: #d7e6f8;
  background: #0c2758;
  box-shadow: inset 0 0 0 1px rgba(120, 170, 230, 0.28);
}
.switch button.active {
  color: white;
  background: linear-gradient(180deg, #3d86f6, #1d4ed8);
  box-shadow: none;
}
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha {
  flex: none;
  display: block;
  width: 104px;
  height: 46px;
  border-radius: 12px;
  background: #f4f7fb;
  cursor: pointer;
}
input {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 12px;
  background: #f4f7fb;
  color: #1b2838;
}
input::placeholder { color: #9aa8ba; }
.wide, .quiet {
  width: 100%;
  padding: 13px 14px;
  color: white;
  font-weight: 800;
  font-size: 16px;
  background: linear-gradient(180deg, #4b97ff, #1d64e8);
}
.quiet { font-weight: 600; background: #14386d; }
.field { display: grid; gap: 6px; color: #d5e4f6; font-size: 13px; }
.form-error { min-height: 1.2em; margin: 8px 0 0; color: #ffb4bc; font-size: 13px; text-align: center; }
.auth-foot { justify-content: space-between; margin-top: 4px; color: #b7c8e2; font-size: 13px; }
.auth-foot button { border: 0; background: transparent; color: #49d6ff; padding: 0; }
.prose { white-space: pre-wrap; line-height: 1.6; }
.lead { font-size: 13px; line-height: 1.55; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: #e8fff8;
  color: #083028;
}
.toast[hidden], [hidden] { display: none !important; }
