:root {
  --gold: #ffab2e;
  --gold-bright: #ffc861;
  --gold-deep: #a85a08;
  --ink: #f6eee4;
  --muted: #9d8f80;
  --line: rgba(255, 174, 65, 0.16);
  --panel-top: #211a15;
  --panel-bottom: #14100e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 50% at 50% -8%, rgba(255, 138, 20, 0.20), transparent 70%),
    radial-gradient(ellipse 60% 30% at 100% 12%, rgba(255, 90, 0, 0.08), transparent 70%),
    #0a0807;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 22px) 16px calc(env(safe-area-inset-bottom) + 24px);
  overflow: hidden;
}

.streaks {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 360px;
  pointer-events: none;
  opacity: .85;
  background:
    repeating-linear-gradient(90deg, rgba(255, 178, 60, .11) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, rgba(255, 120, 0, .055) 0 2px, transparent 2px 23px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
}

.hero { position: relative; padding: 6px 2px 0; }
.hero-label {
  margin: 0 0 18px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 3px;
  color: #c8b8a4;
}
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-title h1 {
  margin: 0;
  font-family: Impact, "Arial Black", "Helvetica Neue", sans-serif;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 1.2px;
  color: #fff8ec;
  text-shadow: 0 2px 0 #7a3c05, 0 8px 22px rgba(255, 140, 20, .28);
}
.hero-title p {
  margin: 8px 0 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--gold);
  text-shadow: 0 2px 14px rgba(255, 140, 20, .35);
}
.emblem {
  width: 132px;
  height: 104px;
  flex: 0 0 132px;
  filter: drop-shadow(0 8px 14px rgba(255, 130, 10, .38));
}
.hero-divider {
  display: flex;
  align-items: center;
  gap: 0;
  height: 12px;
  margin-top: 6px;
  border-bottom: 1px solid rgba(255, 190, 100, .25);
}
.hero-divider i { width: 2px; height: 9px; background: var(--gold); opacity: .8; }
.hero-divider i:nth-child(1) { margin-left: 14%; }
.hero-divider i:nth-child(2) { margin-left: 30%; }
.hero-divider i:nth-child(3) { margin-left: auto; margin-right: 8%; }

main { position: relative; margin-top: 20px; }

.panel {
  position: relative;
  padding: 18px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 222, 160, .07);
}
.panel::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 190, 90, .45), transparent);
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-bright);
}
.bar { width: 3px; height: 15px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 10px rgba(255, 171, 46, .6); }
.field-label { display: block; margin-bottom: 9px; font-size: 12px; color: #b5a697; }
.query-row { display: flex; gap: 9px; }
.input-shell {
  flex: 1;
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 174, 65, .28);
  border-radius: 10px;
  background: #0d0b09;
  transition: border-color .15s, box-shadow .15s;
}
.input-shell:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 171, 46, .13);
}
.prefix { padding-right: 10px; margin-right: 10px; border-right: 1px solid rgba(255, 174, 65, .22); color: var(--gold-bright); font-size: 13px; font-weight: 700; }
.input-shell input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff6e9;
  font-size: 15px;
  letter-spacing: 1px;
  caret-color: var(--gold);
}
.input-shell input::placeholder { color: #6f6459; letter-spacing: 0; }
.gold-btn {
  flex: 0 0 76px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffc457, #ff8a00);
  color: #2a1500;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(255, 138, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.gold-btn:active { transform: translateY(1px); }
.gold-btn:disabled { opacity: .6; cursor: default; }
.hint { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.hint.error { color: #ff9a76; }

.member { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.avatar {
  width: 48px; height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid rgba(255, 183, 70, .75);
  background: radial-gradient(circle at 50% 30%, #3c6b8a, #12202d 70%);
  box-shadow: 0 0 14px rgba(255, 160, 40, .22);
}
.avatar svg { width: 27px; height: 27px; fill: none; stroke: #ffd9a0; stroke-width: 1.7; stroke-linecap: round; }
.member-info { min-width: 0; }
.member-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #fff6e9; }
.tag {
  padding: 1px 7px;
  border: 1px solid rgba(255, 171, 46, .5);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-bright);
}
.member-sub { display: flex; align-items: center; gap: 9px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.id-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffc457, #ff8a00);
  color: #2a1500;
  font-weight: 800;
  letter-spacing: 1px;
}

.assets { margin-top: 6px; }
.asset-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}
.asset-row:last-child { border-bottom: 0; }
.asset-row.featured {
  margin: 10px 0 4px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 171, 46, .24);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 138, 0, .13), rgba(255, 138, 0, .02));
  box-shadow: inset 3px 0 0 var(--gold);
}
.asset-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 171, 46, .3);
  background: rgba(255, 171, 46, .09);
  color: var(--gold-bright);
  font-size: 15px;
  font-weight: 800;
}
.asset-text { display: flex; flex-direction: column; min-width: 0; }
.asset-text strong { font-size: 14px; font-weight: 700; }
.asset-text small { margin-top: 2px; font-size: 9px; letter-spacing: .8px; color: #7f7164; }
.asset-amount {
  color: var(--gold-bright);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(255, 160, 30, .25);
}
.featured .asset-amount { font-size: 26px; color: #ffc861; }
.unit { margin-right: 2px; font-size: 14px; font-weight: 600; }
.suffix { margin-left: 2px; font-size: 13px; font-weight: 600; }
.updated { margin: 14px 0 0; text-align: right; font-size: 11px; color: #7f7164; }

.empty-state {
  padding: 46px 12px;
  text-align: center;
  color: #7f7164;
  border: 1px dashed rgba(255, 174, 65, .18);
  border-radius: 14px;
}
.empty-symbol { font-size: 32px; color: rgba(255, 171, 46, .5); }
.empty-state p { margin: 10px 0 0; font-size: 13px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 28px);
  transform: translateX(-50%);
  z-index: 10;
  max-width: calc(100% - 48px);
  padding: 10px 18px;
  border: 1px solid rgba(255, 171, 46, .4);
  border-radius: 999px;
  background: rgba(28, 21, 16, .97);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color: var(--gold-bright);
  font-size: 13px;
  white-space: nowrap;
}
.toast.error { border-color: rgba(255, 110, 80, .55); color: #ff9a76; }

footer { margin-top: 26px; text-align: center; font-size: 11px; letter-spacing: 1px; color: #5f554c; }

@media (max-width: 360px) {
  .hero-title h1 { font-size: 34px; }
  .emblem { width: 110px; height: 88px; flex-basis: 110px; }
  .gold-btn { flex-basis: 68px; }
}
