@font-face {
  font-family: Inter;
  src: url("./inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("./inter-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", sans-serif;
  color: #f3f6ed;
  background: #171a18;
  --lime: #b7ef58;
  --muted: #a6aea3;
  --line: #383e36;
  --panel: #222622;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100dvh;
  margin: 0;
  background: radial-gradient(ellipse at 50% 0%, #242a21, transparent 560px), #171a18;
}
h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .52; cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.shell {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 850; line-height: 1; letter-spacing: .11em; }
.brand small { display: block; margin-top: 5px; color: #a9b1a3; font-size: 8px; font-weight: 650; letter-spacing: .26em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: var(--lime);
  color: #1a2114;
  font-size: 24px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.09em;
  padding-right: 4px;
}
.network {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid #525f42;
  border-radius: 24px;
  color: #dce7cd;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 650;
  white-space: nowrap;
}
.network span { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px #b7ef5880; }
.onboarding { padding: 24px 2px 12px; }
.art {
  height: clamp(210px, 61vw, 290px);
  margin: 0 -14px 13px;
  background:
    url("./scorpius.webp") center / contain no-repeat,
    radial-gradient(ellipse at 50% 55%, #afed441c, transparent 58%),
    radial-gradient(circle, #a1ac8e30 1px, transparent 1px) 50% 50% / 21px 21px;
  mask-image: radial-gradient(ellipse 72% 75% at 50% 50%, #000 55%, transparent 100%);
}
.onboarding h1 { font-size: clamp(34px, 9.8vw, 54px); font-weight: 750; line-height: .99; letter-spacing: -.07em; }
.onboarding h1 span { color: var(--lime); }
.onboarding p { max-width: 325px; margin: 16px 0 25px; }
.onboarding p, .migration p, dialog p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.primary, .secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 730;
  transition: background .16s, border-color .16s;
}
.primary { background: var(--lime); color: #1b2511; }
.primary:not(:disabled):hover { background: #c9f97c; }
.secondary { background: #252925; color: #f1f5ec; border-color: #41483e; }
.secondary:not(:disabled):hover { background: #31372e; }
.primary span, .secondary span { font-size: 20px; line-height: 1; }
.onboarding button, form > button, #copy { width: 100%; justify-content: space-between; }
.status { margin: 18px 0; padding: 13px 14px; border: 1px solid #4e5b3c; border-radius: 12px; background: #303a25; font-size: 13px; line-height: 1.5; }
.status:empty, .form-error:empty { display: none; }
.dashboard { margin-top: 24px; }
.balance {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid #576842;
  border-radius: 22px;
  background:
    repeating-radial-gradient(ellipse at 98% 3%, #b7ef5813 0 1px, transparent 1px 13px),
    linear-gradient(125deg, #252f20, #303b25 83%);
}
.balance-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #e1ead8; font-size: 12px; font-weight: 550; }
.icon-button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #626e56;
  border-radius: 12px;
  background: #171c18;
  color: #eaf4de;
  font-size: 22px;
  line-height: 1;
}
.icon-button:hover { border-color: var(--lime); }
.balance h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 11px 0 19px;
  font-size: clamp(29px, 10vw, 53px);
  font-weight: 740;
  line-height: 1.08;
  letter-spacing: -.075em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.balance h1 small { font-size: 16px; letter-spacing: -.02em; color: #dce7cf; }
.chain-label { display: inline-block; padding: 5px 8px; border: 1px solid #8ca26e; border-radius: 7px; color: #dfecd0; font-size: 10px; font-weight: 640; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
h2 { font-size: 19px; font-weight: 720; letter-spacing: -.035em; }
.assets, .activity { margin-top: 26px; }
.assets h2, .activity h2 { margin-bottom: 10px; }
.asset { display: grid; grid-template-columns: 42px 1fr minmax(0, auto); gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.coin, .dialog-icon, .empty span, .entry-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; font-size: 21px; }
.coin.usdt { color: #d3f7cd; background: #355346; }
.coin.tron { color: #f7c3bd; background: #553a38; }
.asset strong, .entry-label strong { display: block; font-size: 13px; }
.asset small, .entry-label small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.asset b, .entry-amount { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.empty { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 14px; padding: 12px; }
.empty span, .entry-icon { color: #b6c1ad; background: #282d27; flex: 0 0 40px; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: grid; grid-template-columns: auto 1fr minmax(0, auto); align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.history a { text-decoration-color: #a3b68e; text-underline-offset: 4px; color: inherit; }
.entry-amount.incoming { color: var(--lime); }
dialog, .panel {
  padding: 18px;
  border: 1px solid #586653;
  border-radius: 21px;
  background: var(--panel);
  color: inherit;
}
dialog { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
dialog::backdrop { background: #101310ce; backdrop-filter: blur(5px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dialog-icon { color: var(--lime); background: #38462c; font-size: 24px; }
dialog h2, .migration h1 { margin-bottom: 9px; font-size: 24px; letter-spacing: -.04em; }
form { display: grid; gap: 14px; margin-top: 16px; }
.qr { display: block; margin: 16px auto; border-radius: 12px; }
label { display: grid; gap: 7px; color: #c6cec2; font-size: 12px; font-weight: 570; }
input { width: 100%; min-width: 0; padding: 12px; border: 1px solid #4a5545; border-radius: 10px; background: #181c19; color: #f3f6ed; font-size: 16px; }
#address, .receipt code { font-family: Consolas, monospace; font-size: clamp(10px, 3.1vw, 15px); }
#address { margin-bottom: 12px; }
.form-error { color: #ffbfb5; }
.receipt {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 13px;
  margin: 13px 0;
  border-radius: 10px;
  background: #191f19;
}
.receipt span { color: var(--muted); font-size: 11px; }
.receipt strong { margin-bottom: 8px; }
.receipt code { overflow-wrap: anywhere; }
.migration { margin-top: 24px; }
@media (max-width: 340px) {
  .shell { padding-inline: 14px; }
  .actions button { font-size: 12px; padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
