/* Raydar app. One dark brand look in every Telegram theme (the art is neon on black),
   grouped lists after the native iOS pattern, one green accent used sparingly. */
:root {
  --bg: #050807;
  --card: #111614;
  --card2: #1a211e;
  --line: rgba(255, 255, 255, .07);
  --text: #f1f6f3;
  --hint: #8b9a92;
  --green: #46e07f;
  --green-deep: #2fbf68;
  --green-soft: rgba(70, 224, 127, .12);
  --on-green: #03140a;
  --gold: #f5c451;
  --danger: #ff6464;
  --sol: linear-gradient(90deg, #b57bff 0%, #6fb8ff 50%, #2ef2a4 100%);
  --radius: 16px;
  --top: var(--tg-content-safe-area-inset-top, 0px);
  --bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.42 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-wrap: anywhere;
  padding: calc(var(--top) + 2px) 0 calc(84px + var(--bottom));
  background: radial-gradient(120% 60% at 50% -10%, rgba(70, 224, 127, .10), transparent 60%) var(--bg) no-repeat;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
b, .num, .big, .value { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 2px var(--green), 0 0 16px rgba(70, 224, 127, .45); }
.brand b { display: block; font-size: 17px; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.brand small { display: block; color: var(--hint); font-size: 12px; }
.pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid rgba(70, 224, 127, .45); color: var(--green); background: rgba(70, 224, 127, .06); font-weight: 650; font-size: 13.5px; white-space: nowrap; }

/* ---------- layout ---------- */
main { padding: 0 12px; display: grid; gap: 10px; }
.loading, .empty { color: var(--hint); text-align: center; padding: 34px 12px; margin: 0; }
.empty .art { width: 132px; height: 132px; display: block; margin: 0 auto 8px; border-radius: 50%; opacity: .9; }
.label { color: var(--hint); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 12px 6px -2px; display: flex; justify-content: space-between; gap: 8px; }
.label span { letter-spacing: 0; text-transform: none; font-weight: 500; }
section.card { background: var(--card); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; border: 1px solid var(--line); }
.card h2 { margin: 0; font-size: 19px; letter-spacing: -.015em; }
.card h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.card p { margin: 0; }
.hint { color: var(--hint); font-size: 13.5px; }
.small { font-size: 12.5px; }
.big { font-size: 34px; font-weight: 780; letter-spacing: -.025em; line-height: 1.05; }
.sol { background: var(--sol); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row > :first-child { min-width: 0; }
.stack { display: grid; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--card2); color: var(--text); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.accent { color: var(--green); background: var(--green-soft); }
.chip.warn { color: var(--danger); background: rgba(255, 100, 100, .1); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.sep { height: 1px; background: var(--line); margin: 2px 0; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 16px; min-height: 152px; display: grid; gap: 8px; align-content: end;
  background: linear-gradient(160deg, #0d1411 0%, #070a09 100%); border: 1px solid rgba(70, 224, 127, .16); isolation: isolate; }
.hero .art { position: absolute; right: -18px; top: -14px; width: 190px; height: 190px; object-fit: cover; z-index: -1; opacity: .95;
  -webkit-mask-image: radial-gradient(circle at 60% 45%, #000 45%, transparent 70%); mask-image: radial-gradient(circle at 60% 45%, #000 45%, transparent 70%); }
.hero h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; max-width: 64%; text-shadow: 0 2px 14px #000, 0 0 2px #000; }
.hero .sub { color: var(--hint); font-size: 13.5px; max-width: 62%; }
.hero .chips { max-width: 100%; }
.sweep { position: absolute; inset: auto -40px -40px auto; width: 220px; height: 220px; border-radius: 50%; z-index: -2; opacity: .55;
  background: conic-gradient(from 0deg, rgba(70, 224, 127, .28), transparent 18%), repeating-radial-gradient(circle, transparent 0 34px, rgba(70, 224, 127, .12) 34px 35px);
  animation: sweep 6s linear infinite; }
@keyframes sweep { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .sweep { animation: none; } }

/* ---------- progress ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--card2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green-deep), var(--green)); border-radius: inherit; box-shadow: 0 0 10px rgba(70, 224, 127, .5); transition: width .3s ease; }
.ring { position: relative; width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--card2); }
.ring .fill { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .3s ease; filter: drop-shadow(0 0 3px rgba(70, 224, 127, .6)); }
.ring b { font-size: 14px; font-weight: 750; line-height: 1; }
.ring small { position: absolute; bottom: -15px; font-size: 10.5px; color: var(--hint); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .bar > i, .ring .fill { transition: none; } }

/* ---------- buttons ---------- */
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { flex: 1 1 auto; min-height: 46px; border: 0; border-radius: 13px; padding: 10px 14px; background: var(--card2); color: var(--text); font-weight: 650; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-align: center; transition: transform .08s ease, filter .15s ease; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: linear-gradient(180deg, #55ea8c, var(--green-deep)); color: var(--on-green); box-shadow: 0 4px 18px rgba(70, 224, 127, .25), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.outline { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px rgba(70, 224, 127, .45); }
.btn.ghost { background: transparent; color: var(--green); padding-inline: 8px; flex: 0 0 auto; min-height: 40px; }
.btn.soft { flex: 0 0 auto; min-height: 38px; padding: 7px 13px; border-radius: 11px; font-size: 14px; }
.btn.soft.on { color: var(--green); background: var(--green-soft); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .tabs button:focus-visible, .option:focus-visible, .seg button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- forms ---------- */
label { display: grid; gap: 5px; font-size: 13px; color: var(--hint); }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #0a0e0c; color: var(--text); font: inherit; padding: 11px 12px; min-height: 46px; }
input::placeholder, textarea::placeholder { color: #56645c; }
textarea { resize: vertical; min-height: 76px; }

/* ---------- lists ---------- */
.list { display: grid; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; padding-top: 2px; }
.list .item:last-child { padding-bottom: 2px; }
.list .item .grow { flex: 1; min-width: 0; display: grid; gap: 1px; }
.list .item .grow > span:first-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .item .num { font-weight: 680; white-space: nowrap; text-align: right; display: grid; gap: 1px; }
.list .item .num small { color: var(--hint); font-weight: 500; font-size: 12px; }
.ava { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 16px; color: #04110a; overflow: hidden; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.big { width: 64px; height: 64px; flex-basis: 64px; font-size: 26px; box-shadow: 0 0 0 2px var(--green), 0 0 18px rgba(70, 224, 127, .35); }
.medal { width: 26px; text-align: center; font-size: 18px; }
.medal.n { font-size: 13px; color: var(--hint); font-weight: 700; }

/* ---------- ideas ---------- */
.idea { display: grid; gap: 10px; }
.idea .head { display: flex; gap: 12px; align-items: flex-start; }
.idea .body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.idea .name { font-weight: 720; font-size: 16.5px; letter-spacing: -.01em; }
.idea .name .pos { color: var(--hint); font-weight: 650; font-size: 13px; margin-right: 6px; }
.idea .pitch { color: #c8d3cd; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--hint); font-size: 12.5px; }
.meta .on { color: var(--green); }
.idea .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idea.trend { border-color: rgba(70, 224, 127, .3); }
.idea.lead { background: linear-gradient(180deg, rgba(70, 224, 127, .07), transparent 70%) var(--card); }

/* ---------- money and choices ---------- */
.amount { display: grid; gap: 3px; padding: 14px; border-radius: 14px; background: #0a0e0c; border: 1px dashed rgba(70, 224, 127, .3); text-align: center; }
.amount .value { font-size: 26px; font-weight: 780; letter-spacing: -.02em; }
.copy { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #0a0e0c; }
.copy .stack { flex: 1; min-width: 0; gap: 2px; }
.copy .mono { overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.option { display: grid; gap: 4px; width: 100%; text-align: left; border: 1px solid var(--line); background: #0a0e0c; color: var(--text); border-radius: 14px; padding: 13px; min-height: 52px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.option:active:not(:disabled) { border-color: rgba(70, 224, 127, .6); }
.option[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 1px var(--green) inset; }
.option.wide { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.option .ico { font-size: 24px; line-height: 1; }
.option .price { font-size: 20px; font-weight: 760; letter-spacing: -.02em; }
.option b { white-space: nowrap; }
.option:disabled { opacity: .5; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: #0a0e0c; }
.seg button { border: 0; border-radius: 10px; min-height: 40px; background: transparent; color: var(--hint); font-weight: 650; font-size: 13.5px; cursor: pointer; padding: 6px 8px; }
.seg button[aria-pressed="true"] { background: var(--card2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: #c8d3cd; }
.checks li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--green-soft) center / 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%2346e07f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.checks b { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #0a0e0c; border-radius: 13px; padding: 10px; display: grid; gap: 1px; }
.stat b { font-size: 18px; font-weight: 760; letter-spacing: -.01em; }
.stat span { color: var(--hint); font-size: 11.5px; }
.safe { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--hint); padding: 12px 14px; margin: 4px 0 0; border-radius: 14px; background: rgba(255, 255, 255, .025); }
.safe svg { flex: 0 0 18px; margin-top: 1px; }

/* ---------- tab bar ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 10px calc(8px + var(--bottom));
  background: rgba(8, 12, 10, .86); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--line); z-index: 4; }
.tabs button { border: 0; background: none; display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 650; color: var(--hint); padding: 6px 0 4px; min-height: 52px; cursor: pointer; border-radius: 12px; }
.tabs svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--green); }
.tabs button[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(70, 224, 127, .55)); }

.toast { position: fixed; left: 12px; right: 12px; bottom: calc(80px + var(--bottom)); background: rgba(22, 30, 26, .97); color: var(--text); border: 1px solid rgba(70, 224, 127, .3); border-radius: 14px;
  padding: 12px 14px; font-size: 14px; white-space: pre-line; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); z-index: 5; }

a.btn { text-decoration: none; }
a { color: var(--green); }
@media (max-width: 360px) {
  .top { padding-inline: 12px; }
  .pill { padding: 5px 9px; font-size: 12px; }
  .brand b { font-size: 15px; }
  .brand small { display: none; }
  .brand img { width: 32px; height: 32px; }
  .hero .art { width: 150px; height: 150px; right: -26px; top: -8px; opacity: .8; }
  .hero .sub { max-width: 66%; }
  .big { font-size: 30px; }
}

/* ---------- wallet page ---------- */
.wallet-page { padding-bottom: calc(24px + var(--bottom)); }
.signbox { white-space: pre-wrap; padding: 12px; border-radius: 12px; background: #0a0e0c; border: 1px solid var(--line); font-size: 12.5px; }
.wallets { display: grid; gap: 8px; }
.wallets .option img { width: 28px; height: 28px; border-radius: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: s; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--hint); }
.steps li::before { counter-increment: s; content: counter(s); flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--card2); color: var(--hint); }
.steps li.now { color: var(--text); }
.steps li.now::before { background: var(--green-soft); color: var(--green); }
.steps li.done::before { content: "✓"; background: var(--green); color: var(--on-green); }
