/* ZORION Mini App prototype. Colour literals live in :root only (the member area's tokens). */
:root {
  --bg: #05070C;
  --panel: #0D121C;
  --panel-2: #141B29;
  --glass: rgba(13, 18, 28, .78);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --hl: rgba(255, 255, 255, .04);
  --ink: #F2F5FA;
  --ink-2: #C5CDDA;
  --mute: #8C96A8;
  --hot: #FF6A2B;
  --hot-2: #FF9A3D;
  --hot-ink: #FF8E57;
  --hot-soft: rgba(255, 106, 43, .1);
  --hot-line: rgba(255, 122, 61, .38);
  --hot-glow: rgba(255, 106, 43, .35);
  --cy: #3BE0FF;
  --cy-soft: rgba(59, 224, 255, .08);
  --cy-line: rgba(59, 224, 255, .4);
  --up: #2EE6A0;
  --up-soft: rgba(46, 230, 160, .12);
  --gold: #FFC24B;
  --gold-soft: rgba(255, 194, 75, .1);
  --gold-line: rgba(255, 194, 75, .45);
  --bad: #FF5468;
  --white: #FFFFFF;
  --shade: rgba(0, 0, 0, .55);
  --font: "Exo 2", "Arial Narrow", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* Telegram's safe areas when inside it, the browser's otherwise */
  --safe-b: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: max(env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; overflow-x: clip; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 100% 0%, var(--hot-soft), transparent 70%), radial-gradient(50% 40% at 0% 30%, var(--cy-soft), transparent 70%); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sprite { display: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cy); outline-offset: 2px; }

.app { max-width: 520px; margin: 0 auto; padding: calc(14px + var(--safe-t)) 16px calc(104px + var(--safe-b)); }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.me { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, var(--hot), var(--hot-2)); color: var(--white); font: italic 900 16px/1 var(--font); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hello { display: grid; min-width: 0; line-height: 1.2; }
.hello small { color: var(--mute); font-size: 12.5px; }
.hello b { overflow: hidden; font: italic 900 19px/1.2 var(--font); text-overflow: ellipsis; white-space: nowrap; }
.demo { padding: 6px 10px; border: 1px solid var(--gold-line); border-radius: 999px; background: var(--gold-soft); color: var(--gold); font: italic 900 11.5px/1 var(--font); letter-spacing: .14em; }

/* type */
.title { margin: 2px 0 6px; font: italic 900 30px/1.1 var(--font); letter-spacing: .01em; text-transform: uppercase; }
.title em { color: var(--hot-ink); font-style: inherit; }
.sub { margin: 0 0 16px; color: var(--mute); }
.head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.head h2 { margin: 0; font: italic 900 17px/1.2 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.label { margin: 0 0 8px; color: var(--mute); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.c { text-align: center; }
.tag { margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: var(--gold-soft); color: var(--gold); font-style: normal; font-size: 10.5px; letter-spacing: .06em; }
.hint { margin: 8px 0 0; color: var(--mute); font-size: 13px; }
.note { margin: 18px 4px 0; color: var(--mute); font-size: 12.5px; }
.mono { font-family: var(--mono); }
.err { margin: 10px 0 0; color: var(--bad); font-size: 13.5px; font-weight: 600; }

/* surfaces */
.card { padding: 16px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--glass); backdrop-filter: blur(10px); }
.card.hot { border-color: var(--hot-line); background: linear-gradient(160deg, rgba(255, 106, 43, .16), var(--glass) 55%); box-shadow: 0 18px 40px -20px var(--hot-glow); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 1px solid transparent; border-radius: 14px; font: 800 14.5px/1.2 var(--font); letter-spacing: .02em; transition: transform .15s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.primary { background: linear-gradient(135deg, var(--hot), var(--hot-2)); color: var(--white); box-shadow: 0 10px 24px -12px var(--hot-glow); }
.ghost { border-color: var(--line-2); background: var(--hl); color: var(--ink); }
.wide { width: 100%; margin-top: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--hot-ink); font-weight: 800; }
.link svg { width: 16px; height: 16px; }

/* home */
.balance .big { margin: 0; font: italic 900 38px/1.1 var(--font); letter-spacing: .01em; }
.wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.wallets div { display: grid; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--hl); }
.wallets small { color: var(--mute); font-size: 12px; }
.wallets b { font-size: 17px; font-weight: 800; }
.bots { display: grid; gap: 10px; }
.bot { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--glass); }
.bot img { width: 56px; height: 56px; }
.bot .t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bot .t b { font: italic 900 17px/1.2 var(--font); }
.bot .t span { color: var(--up); font-weight: 800; }
.bot .m { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; color: var(--mute); font-size: 12.5px; }
.bar { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: var(--hl); }
.bar i { display: block; width: var(--p, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hot), var(--cy)); transition: width .6s; }
.done .bar i { background: var(--up); }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; }
.empty p { margin: 0 0 6px; color: var(--mute); }
.feed { margin: 0; padding: 6px 16px; list-style: none; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .dot { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 11px; background: var(--up-soft); color: var(--up); }
.feed .dot.out { background: var(--hot-soft); color: var(--hot-ink); }
.feed .dot svg { width: 16px; height: 16px; }
.feed span { flex: 1; min-width: 0; }
.feed span b { display: block; font-size: 14px; }
.feed span small { color: var(--mute); font-size: 12px; }
.feed em { font-style: normal; font-weight: 800; }
.feed em.in { color: var(--up); }

/* plans */
.plans { display: grid; gap: 12px; }
.plan { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; width: 100%; padding: 16px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--glass); text-align: left; transition: border-color .2s, transform .15s; }
.plan:active { transform: scale(.98); }
.plan:hover { border-color: var(--hot-line); }
.plan img { width: 76px; height: 76px; }
.plan h3 { margin: 0; font: italic 900 21px/1.1 var(--font); }
.plan .r { margin: 2px 0 6px; color: var(--hot-ink); font: italic 900 26px/1.1 var(--font); }
.plan .r small { color: var(--mute); font: 600 13px/1 var(--font); }
.plan ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.plan li { padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--hl); color: var(--ink-2); font-size: 12px; }

/* wallet */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 6px 0 16px; padding: 4px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--hl); }
.seg button { min-height: 42px; border: 0; border-radius: 10px; background: none; color: var(--mute); font-weight: 800; }
.seg button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hot-line); }
.coins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.coin { display: grid; justify-items: center; gap: 4px; min-height: 70px; padding: 10px 4px 8px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--hl); font-size: 11.5px; font-weight: 700; }
.coin img { width: 30px; height: 30px; }
.coin[aria-pressed="true"] { border-color: var(--hot); background: var(--hot-soft); }
.pay { display: grid; justify-items: center; gap: 10px; }
.warn { display: flex; gap: 10px; width: 100%; margin: 0; padding: 10px 12px; border: 1px solid var(--gold-line); border-radius: 14px; background: var(--gold-soft); color: var(--ink-2); font-size: 13px; }
.warn svg { color: var(--gold); }
.warn b { color: var(--gold); }
.qr { display: grid; place-items: center; width: 196px; height: 196px; padding: 12px; border-radius: 18px; background: var(--white); }
.qr svg, .qr img { width: 100%; height: 100%; }
.addr { width: 100%; margin: 0; padding: 12px; overflow-wrap: anywhere; border: 1px solid var(--line-2); border-radius: 14px; background: var(--hl); font-size: 13.5px; text-align: center; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span:first-child { font-weight: 700; }
.field small { color: var(--mute); font-weight: 500; }
.inp { display: flex; align-items: center; gap: 6px; min-height: 50px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); }
.inp:focus-within { border-color: var(--hot-line); }
.inp i { color: var(--mute); font-style: normal; font-weight: 800; }
.inp input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; font-weight: 700; }

/* partners */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.lv { display: grid; justify-items: center; padding: 14px 6px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--glass); }
.lv b { color: var(--hot-ink); font: italic 900 28px/1.1 var(--font); }
.lv:nth-child(2) b { color: var(--cy); }
.lv:nth-child(3) b { color: var(--gold); }
.lv small { color: var(--mute); font-size: 12.5px; }
.ranks { display: grid; gap: 2px; margin: 0; padding: 8px 14px; list-style: none; }
.ranks li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ranks li:last-child { border-bottom: 0; }
.ranks .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--hl); color: var(--mute); font: italic 900 13px/1 var(--font); }
.ranks b { display: block; font: italic 900 16px/1.2 var(--font); }
.ranks small { color: var(--mute); font-size: 12px; }
.ranks .bonus { color: var(--up); font-weight: 800; }

/* menu */
.list { display: grid; gap: 2px; margin-bottom: 12px; padding: 6px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 10px; border: 0; border-radius: 14px; background: none; text-align: left; }
.item:hover, .item:active { background: var(--hl); }
.item img { width: 40px; height: 40px; border-radius: 50%; }
.item .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cy-soft); color: var(--cy); }
.item span:not(.ic) { flex: 1; min-width: 0; }
.item b { display: block; font-size: 15px; }
.item small { color: var(--mute); font-size: 12.5px; }
.item .go { width: 18px; height: 18px; color: var(--mute); }

/* bottom bar */
.dock { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); width: min(488px, calc(100% - 24px)); padding: 6px; transform: translateX(-50%); border: 1px solid var(--line-2); border-radius: 22px; background: rgba(8, 11, 18, .88); backdrop-filter: blur(14px); box-shadow: 0 16px 40px -10px var(--shade); }
.dock button { display: grid; justify-items: center; gap: 2px; min-height: 54px; padding: 6px 2px; border: 0; border-radius: 16px; background: none; color: var(--mute); font-size: 11.5px; font-weight: 700; }
.dock svg { width: 22px; height: 22px; }
.dock [aria-current="page"] { background: var(--hot-soft); color: var(--hot-ink); }

/* launch sheet */
.sheet { width: min(520px, 100%); max-width: 100%; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 26px 26px 0 0; background: var(--panel); color: var(--ink); }
.sheet::backdrop { background: var(--shade); backdrop-filter: blur(3px); }
.sheet form { padding: 10px 18px calc(18px + var(--safe-b)); }
.sheet[open] { animation: rise .25s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.grab { width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 9px; background: var(--line-2); }
.sh-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sh-head h3 { margin: 0; font: italic 900 24px/1.1 var(--font); }
.sh-head p { margin: 2px 0 0; color: var(--hot-ink); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; }
.chips button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--hl); font-size: 13px; font-weight: 700; }
.calc { display: grid; gap: 0; margin: 0; padding: 4px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--hl); }
.calc div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.calc div:last-child { border-bottom: 0; }
.calc dt { color: var(--mute); font-size: 13.5px; }
.calc dd { margin: 0; font-weight: 800; text-align: right; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 30; max-width: calc(100% - 32px); padding: 12px 16px; transform: translateX(-50%); border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel-2); box-shadow: 0 14px 30px -10px var(--shade); font-weight: 700; font-size: 14px; }

@media (max-width: 360px) {
  .coins { grid-template-columns: repeat(3, 1fr); }
  .title { font-size: 26px; }
  .balance .big { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
