/* UI components: header, footer, buttons, cards, chips, avatars, Telegram bubbles, fields, toasts, modal. */

.ic {
  width: 1em;
  height: 1em;
  flex: none;
}

/* ---------------------------------------------------------------- header */

.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.hdr.scrolled {
  background: rgba(9, 8, 30, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}
.hdr-in {
  height: var(--hdr-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 20px/1 var(--font-body);
  letter-spacing: -0.035em;
  flex: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transition: transform 0.5s var(--spring);
}
.brand:hover .brand-mark {
  transform: translateY(-1px);
}
.brand-mark .mark {
  width: 34px;
  height: 34px;
}
.brand-name b {
  font-weight: inherit;
  color: inherit;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  font: 500 14.5px/1 var(--font-display);
  color: var(--ink-2);
  transition:
    color 0.2s,
    background 0.2s;
}
.nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.nav a.active {
  color: #fff;
  background: rgba(42, 171, 238, 0.14);
  box-shadow: inset 0 0 0 1px rgba(42, 171, 238, 0.28);
}
.hdr-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pill-preview {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font: 600 11.5px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--warn-ink);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.28);
  white-space: nowrap;
  cursor: help;
}
.pill-preview i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 10px var(--warn);
  animation: pulse 2s ease-in-out infinite;
}
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition:
    transform 0.3s var(--ease),
    top 0.3s var(--ease);
}
.burger span:first-child {
  top: 15px;
}
.burger span:last-child {
  top: 24px;
}
.burger[aria-expanded='true'] span:first-child {
  top: 20px;
  transform: rotate(45deg);
}
.burger[aria-expanded='true'] span:last-child {
  top: 20px;
  transform: rotate(-45deg);
}
.mnav {
  display: grid;
  gap: 4px;
  padding: 10px var(--gutter) 18px;
  background: rgba(9, 8, 30, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  animation: viewIn 0.3s var(--ease);
}
.mnav a {
  padding: 14px 14px;
  border-radius: 14px;
  font: 600 17px/1 var(--font-display);
  color: var(--ink-2);
}
.mnav a.active,
.mnav a:hover {
  background: rgba(42, 171, 238, 0.12);
  color: #fff;
}

/* wallet button */
.wbtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  font: 600 14px/1 var(--font-display);
  white-space: nowrap;
}
.wbtn .ic {
  width: 18px;
  height: 18px;
}
.wbtn.addr {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  padding: 0 12px 0 6px;
}
.wbtn.addr:hover {
  background: rgba(255, 255, 255, 0.1);
}
.wbtn.addr .ic {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}
.wbtn.wrong {
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.4);
  color: #ffc2cc;
}
.jazz {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(from var(--h1, 0deg), var(--c1), var(--c2), var(--c3), var(--c1));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
}
.wmenu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 230px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(20, 18, 54, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 2px;
  animation: viewIn 0.25s var(--ease);
  z-index: 70;
}
.wmenu .who {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  font: 500 12px/1.4 var(--font-mono);
  color: var(--ink-3);
}
.wmenu .who b {
  display: block;
  color: var(--ink);
  font-size: 13px;
}
.wmenu button,
.wmenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  font: 500 14px/1 var(--font-body);
  color: var(--ink-2);
  text-align: left;
}
.wmenu button:hover,
.wmenu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}
.wslot {
  position: relative;
}

/* ---------------------------------------------------------------- buttons */
.wbtn.btn {
  --h: 42px;
  padding: 0 18px 0 15px;
  font-size: 14px;
}

.btn {
  --h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 22px;
  border-radius: 999px;
  font: 600 15px/1 var(--font-display);
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s,
    border-color 0.25s,
    opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn .ic {
  width: 18px;
  height: 18px;
}
.btn:active {
  transform: translateY(1px) scale(0.985);
}
.btn[disabled],
.btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn-primary {
  color: #fff;
  background: var(--grad-brand);
  box-shadow:
    0 10px 32px -10px rgba(42, 171, 238, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.38) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 44px -12px rgba(42, 171, 238, 0.95),
    0 0 0 4px rgba(42, 171, 238, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover::after {
  transform: translateX(120%);
}
.btn-glass {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--ink-2);
  padding: 0 12px;
}
.btn-ghost:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.btn-danger {
  color: #ffd1d8;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.35);
}
.btn-sm {
  --h: 36px;
  padding: 0 14px;
  font-size: 13px;
  gap: 7px;
}
.btn-sm .ic {
  width: 15px;
  height: 15px;
}
.btn-lg {
  --h: 58px;
  padding: 0 30px;
  font-size: 16.5px;
}
.btn-block {
  width: 100%;
}
.btn .spin,
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: rotate 0.8s linear infinite;
}
.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}
.iconbtn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-2);
}
.iconbtn .ic {
  width: 16px;
  height: 16px;
}
.iconbtn.done {
  color: var(--ok);
}

/* ---------------------------------------------------------------- cards */

.card {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--grad-card);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 40px 80px -40px rgba(0, 0, 0, 0.65);
}
.card.pad {
  padding: 28px;
}
.card.spot {
  --mx: 50%;
  --my: 0%;
}
.card.spot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(98, 160, 255, 0.11), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
}
.card.spot:hover::after {
  opacity: 1;
}
/* rotating prism border */
.glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--spin), rgba(42, 171, 238, 0) 0deg, rgba(42, 171, 238, 0.95) 70deg, rgba(138, 146, 255, 0.9) 130deg, rgba(240, 168, 255, 0.85) 180deg, rgba(94, 234, 212, 0) 250deg, rgba(42, 171, 238, 0) 360deg);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 7s linear infinite;
  opacity: 0.55;
  transition: opacity 0.4s;
  pointer-events: none;
}
.glow:hover::before,
.glow.on::before {
  opacity: 1;
}
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}

/* ---------------------------------------------------------------- chips + badges */

.tchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font: 500 12.5px/1 var(--font-mono);
  color: var(--tg-ink);
  background: rgba(42, 171, 238, 0.1);
  border: 1px solid rgba(42, 171, 238, 0.24);
  white-space: nowrap;
  transition:
    background 0.2s,
    border-color 0.2s;
}
a.tchip:hover {
  background: rgba(42, 171, 238, 0.18);
  border-color: rgba(42, 171, 238, 0.45);
}
.tchip .ic {
  width: 12px;
  height: 12px;
}
.hlink {
  color: var(--tg-ink);
  font-weight: 600;
}
.hlink:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font: 600 12px/1 var(--font-display);
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge .ic {
  width: 14px;
  height: 14px;
}
.badge.ok {
  color: #a8f5c4;
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.3);
}
.badge.ok .ic {
  color: var(--tg);
}
.badge.warn {
  color: var(--warn-ink);
  background: rgba(251, 191, 36, 0.09);
  border-color: rgba(251, 191, 36, 0.28);
}
.badge.pend {
  color: #c7cbff;
  background: rgba(138, 146, 255, 0.12);
  border-color: rgba(138, 146, 255, 0.35);
}
.badge.muted {
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}
.badge.blue {
  color: var(--tg-ink);
  background: rgba(42, 171, 238, 0.1);
  border-color: rgba(42, 171, 238, 0.3);
}
.dot-live {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  flex: none;
}
.dot-live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ---------------------------------------------------------------- avatars + logos */

.ava,
.coin-logo {
  --s: 40px;
  position: relative;
  width: var(--s);
  height: var(--s);
  min-width: var(--s);
  max-width: var(--s);
  flex: none !important;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(140deg, var(--a1), var(--a2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
}
.ava b {
  font: 600 calc(var(--s) * 0.38) / 1 var(--font-display);
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.ava img,
.coin-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coin-logo i {
  font-style: normal;
  font-size: calc(var(--s) * 0.5);
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
.coin-logo b {
  font: 700 calc(var(--s) * 0.42) / 1 var(--font-display);
}
.ava.ring {
  box-shadow:
    0 0 0 3px var(--bg-1),
    0 0 0 5px rgba(42, 171, 238, 0.9),
    0 0 30px rgba(42, 171, 238, 0.5);
}
.ava.ring-warn {
  box-shadow:
    0 0 0 3px var(--bg-1),
    0 0 0 5px rgba(251, 191, 36, 0.65),
    0 0 26px rgba(251, 191, 36, 0.25);
}

/* ---------------------------------------------------------------- amounts */

.amt {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.amt b {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.amt small {
  font-size: 0.72em;
  color: var(--ink-3);
  font-weight: 500;
}
.amt.big b {
  font-size: 1.15em;
}

/* ---------------------------------------------------------------- Telegram bubbles */

.tg-bubble {
  --bub: #1b2442;
  position: relative;
  background: var(--bub);
  border-radius: 18px 18px 18px 0;
  padding: 8px 12px 7px;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.6);
  max-width: 100%;
}
/* Telegram-style tail: a curved hook outside the bubble's bottom corner */
.tg-bubble::before {
  content: '';
  position: absolute;
  left: -9px;
  bottom: 0;
  width: 10px;
  height: 17px;
  background: var(--bub);
  clip-path: path('M10 0 C10 9 6 14.5 0 17 L10 17 Z');
}
.tg-bubble.out {
  --bub: #2b5a8f;
  border-radius: 18px 18px 0 18px;
}
.tg-bubble.out::before {
  left: auto;
  right: -9px;
  clip-path: path('M0 0 C0 9 4 14.5 10 17 L0 17 Z');
}
.tg-name {
  font: 600 13.5px/1.3 var(--font-display);
  margin-bottom: 2px;
}
.tg-text {
  font: 400 14.5px/1.42 var(--font-body);
  color: #eef1ff;
  overflow-wrap: anywhere;
}
.tg-text b {
  font-weight: 650;
}
.tg-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font: 400 11.5px/1 var(--font-body);
  color: rgba(214, 222, 255, 0.55);
}
.tg-meta .checks {
  width: 17px;
  height: 11px;
  color: #4fc3ff;
}
.tg-bubble.out .tg-meta {
  color: rgba(214, 232, 255, 0.7);
}
.tg-bubble.out .tg-meta .checks {
  color: #8fd8ff;
}

/* ---------------------------------------------------------------- forms */

.field-wrap {
  display: grid;
  gap: 8px;
}
.label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font: 600 13px/1.2 var(--font-display);
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.label small {
  font: 500 12px/1 var(--font-mono);
  color: var(--ink-4);
}
.field {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(7, 6, 26, 0.55);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font: 500 15.5px/1 var(--font-body);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
textarea.field {
  height: auto;
  min-height: 96px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}
.field::placeholder {
  color: var(--ink-4);
}
.field:hover {
  border-color: var(--line-3);
}
.field:focus {
  border-color: rgba(42, 171, 238, 0.75);
  box-shadow: 0 0 0 4px rgba(42, 171, 238, 0.14);
  background: rgba(7, 6, 26, 0.75);
}
.field.bad {
  border-color: rgba(251, 113, 133, 0.7);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.1);
}
.field.mono {
  font-family: var(--font-mono);
  font-size: 14.5px;
}
.affix {
  position: relative;
  display: flex;
  align-items: center;
}
.affix > .pre {
  position: absolute;
  left: 15px;
  font: 600 16px/1 var(--font-mono);
  color: var(--tg-ink);
  pointer-events: none;
}
.affix > .field.has-pre {
  padding-left: 34px;
}
.affix > .post {
  position: absolute;
  right: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}
.hint.bad {
  color: #ffadb9;
}
.hint.ok {
  color: var(--ok-ink);
}
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  background: rgba(7, 6, 26, 0.55);
  border: 1px solid var(--line-2);
  position: relative;
}
.seg button {
  position: relative;
  z-index: 1;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font: 600 13.5px/1 var(--font-display);
  color: var(--ink-3);
  transition: color 0.25s;
  white-space: nowrap;
}
.seg button.on {
  color: #fff;
}
.seg .seg-ink {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: var(--grad-brand);
  box-shadow: 0 6px 20px -6px rgba(42, 171, 238, 0.8);
  transition:
    left 0.45s var(--spring),
    width 0.45s var(--spring);
}
.switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line-2);
  transition: background 0.25s;
  flex: none;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s var(--spring);
}
.switch[aria-checked='true'] {
  background: var(--tg);
  border-color: transparent;
}
.switch[aria-checked='true']::after {
  transform: translateX(20px);
}

.note {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}
.note .ic {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--tg-ink);
}
.note.warn {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.22);
}
.note.warn .ic {
  color: var(--warn);
}
.note.ok .ic {
  color: var(--ok);
}
.note b {
  color: var(--ink);
}

/* ---------------------------------------------------------------- tables / lists */

.rows {
  display: grid;
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  transition: background 0.2s;
}
.row:first-child {
  border-top: 0;
}
a.row:hover,
.row.hover:hover {
  background: rgba(255, 255, 255, 0.035);
}
.row-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}
.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 15px/1.25 var(--font-display);
  min-width: 0;
}
.row-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  min-width: 0;
  flex-wrap: wrap;
}
.row-end {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-3);
  display: grid;
  gap: 10px;
  justify-items: center;
}

/* ---------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(400px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  background: rgba(22, 20, 58, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: 14px;
  line-height: 1.45;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.35s var(--spring),
    opacity 0.25s;
}
.toast.in {
  transform: none;
  opacity: 1;
}
.toast-ic .ic {
  width: 20px;
  height: 20px;
}
.toast.ok .toast-ic {
  color: var(--ok);
}
.toast.err .toast-ic {
  color: var(--bad);
}
.toast.wait .toast-ic,
.toast.info .toast-ic {
  color: var(--tg);
}
.toast-msg {
  flex: 1;
}
.toast a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tg-ink);
  font-weight: 600;
  white-space: nowrap;
}
.toast-x {
  color: var(--ink-4);
  display: grid;
  place-items: center;
}
.toast-x .ic {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------- modal */

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 3, 16, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s;
}
.modal-wrap.in {
  opacity: 1;
}
.modal {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 27, 78, 0.98), rgba(17, 15, 48, 0.98));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  padding: 28px;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.4s var(--spring);
}
.modal.wide {
  width: min(620px, 100%);
}
.modal-wrap.in .modal {
  transform: none;
}
.modal-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.05);
}
.modal-x:hover {
  color: var(--ink);
}
.modal-x .ic {
  width: 16px;
  height: 16px;
}
.modal h3 {
  font: 700 22px/1.2 var(--font-display);
  margin-bottom: 6px;
  padding-right: 36px;
}
.wallet-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.wallet-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font: 600 15px/1 var(--font-display);
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.wallet-opt:hover {
  background: rgba(42, 171, 238, 0.1);
  border-color: rgba(42, 171, 238, 0.4);
  transform: translateX(3px);
}
.wallet-opt img,
.wallet-opt .wi {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.wallet-opt .wi {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
}
.kv {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  font-size: 13.5px;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.kv > div > span:first-child {
  color: var(--ink-3);
}
.kv > div > span:last-child {
  font-family: var(--font-mono);
  text-align: right;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- footer */

.ftr {
  position: relative;
  margin-top: 40px;
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 9, 32, 0), rgba(10, 9, 32, 0.8));
}
.ftr-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.ftr-tag {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 14px;
}
.ftr-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 480px;
  margin-top: 18px;
}
.ftr-social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--glass);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}
.ftr-social a:hover {
  border-color: var(--tg);
  background: rgba(42, 171, 238, 0.09);
  color: var(--ink);
}
.ftr-cols {
  display: flex;
  gap: 64px;
}
.ftr-cols h4 {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.ftr-cols a {
  display: block;
  font-size: 14.5px;
  color: var(--ink-2);
  padding: 5px 0;
}
.ftr-cols a:hover {
  color: #fff;
}
.ftr-legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-4);
  max-width: 900px;
}
.ftr-legal strong {
  color: var(--ink-3);
}
.ftr-copy {
  margin-top: 6px;
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .burger {
    display: block;
  }
}
@media (max-width: 720px) {
  .brand {
    font-size: 18px;
  }
  .brand-mark,
  .brand-mark .mark {
    width: 30px;
    height: 30px;
  }
  .hdr-in {
    gap: 10px;
  }
  .hdr-right {
    gap: 8px;
  }
  .pill-preview {
    height: 26px;
    padding: 0 9px;
    font-size: 10.5px;
  }
  .wbtn {
    height: 40px;
    padding: 0 13px;
    font-size: 13px;
  }
  .wbtn .lbl-long {
    display: none;
  }
  .burger {
    width: 40px;
    height: 40px;
  }
  .burger span:first-child {
    top: 14px;
  }
  .burger span:last-child {
    top: 23px;
  }
  .burger[aria-expanded='true'] span:first-child,
  .burger[aria-expanded='true'] span:last-child {
    top: 19px;
  }
  .card.pad {
    padding: 20px;
  }
  .ftr-cols {
    gap: 40px;
  }
  .toasts {
    right: 16px;
    bottom: 16px;
  }
  .modal {
    padding: 22px;
  }
}
@media (max-width: 460px) {
  .wbtn:not(.addr) {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .wbtn:not(.addr) .lbl,
  .wbtn.addr .lbl {
    display: none;
  }
  .wbtn.addr {
    padding: 0 8px 0 5px;
    gap: 6px;
  }
}
@media (max-width: 340px) {
  .pill-preview {
    display: none;
  }
}

/* live t.me photos fade in over the initials fallback */
.ava img.fade {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ava img.fade.ok {
  opacity: 1;
}
/* "sample" marker on preview amounts of real channels */
.sample-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 6px;
  vertical-align: middle;
  font: 700 9.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warn-ink);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.32);
  -webkit-text-fill-color: var(--warn-ink);
  white-space: nowrap;
}
.row-end > .sample-tag {
  margin: 1px 0 0;
}

/* ---------------------------------------------------------------- pinned platform-token CA */

.cabar {
  position: relative;
  z-index: 61;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(42, 171, 238, 0.16), rgba(94, 234, 212, 0.1) 55%, rgba(138, 146, 255, 0.14));
  font-size: 13px;
}
.cabar[hidden] {
  display: none;
}
.cabar-in {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
  padding-bottom: 4px;
}
.cabar-tag {
  font-weight: 700;
  color: var(--tg-ink);
}
.cabar-lbl {
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.cabar-addr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: 500 12.5px/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cabar-addr:hover,
.cabar-addr:focus-visible {
  border-color: rgba(42, 171, 238, 0.7);
  background: rgba(42, 171, 238, 0.12);
  outline: none;
}
.cabar-ic {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--tg-ink);
}
.cabar-ic svg {
  width: 14px;
  height: 14px;
}
.cabar-short {
  display: none;
}
.cabar-link {
  color: var(--tg-ink);
  text-decoration: none;
  font-weight: 600;
}
.cabar-link:hover {
  color: var(--ink);
  text-decoration: underline;
}
@media (max-width: 720px) {
  .cabar-in {
    gap: 8px;
  }
  .cabar-full,
  .cabar-scan {
    display: none;
  }
  .cabar-short {
    display: inline;
  }
}
