/* Токены. Единственное место, где заданы цвета, радиусы и шрифты.
   Тёмный монохром: фон 111111, текст F6F6F4, вторичный 777777,
   линии 2A2A2A, акцент белый. Других цветов нет. */
:root {
  --bg: #111111;
  --bg-soft: #171717;
  --card: #1a1a1a;
  --card-2: #222222;
  --fill: #262626;
  --fill-2: #2f2f2f;
  --knob: #2f2f2f;
  --tint: #f6f6f4;
  --tint-dark: #ffffff;
  --tint-soft: #1f1f1f;
  --tint-line: #2a2a2a;
  --tint-softer: #1f1f1f;
  --on-tint: #111111;  /* текст поверх белого акцента */

  /* тени запрещены: вместо них линия 1px */
  --shadow-knob: none;
  --shadow-raised: none;
  --shadow-tint: none;
  --shadow-indicator: none;
  --rim: inset 0 0 0 1px #2a2a2a;
  --rim-red: inset 0 0 0 1px #2a2a2a;

  --txt: #f6f6f4;
  --muted: #8a8a86;
  --dim: #8a8a86;
  --icon-muted: #8a8a86;
  --separator: #2a2a2a;
  --green: #f6f6f4;

  /* скругления в духе iOS 26: щедрые, непрерывные.
     Интерактивное — капсулы, контейнеры — крупный радиус. */
  --radius: 22px;
  --radius-btn: 999px;
  --radius-cell: 18px;
  --radius-sheet: 32px;
  --radius-pill: 999px;
  --radius-xs: 10px;
  --gutter: 16px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .3, 1);
  --dur-tap: .12s;
  --dur-quick: .2s;
  --dur-enter: .18s;
  --dur-screen: .2s;

  --font: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --t-large-title: 600 30px/36px var(--font);
  --t-title2: 600 22px/28px var(--font);
  --t-title3: 600 19px/25px var(--font);
  --t-headline: 500 17px/22px var(--font);
  --t-body: 400 16px/22px var(--font);
  --t-subhead: 400 15px/20px var(--font);
  --t-footnote: 400 13px/18px var(--font);
  --t-caption: 400 12px/16px var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  padding: env(safe-area-inset-top, 0px) var(--gutter)
           calc(88px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- фон: ровный, без градиентов ---------- */
.aurora { display: none; }
main, header, #tabbar { position: relative; z-index: 1; }

/* ---------- keyframes ---------- */
@keyframes listIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes viewInRight { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes viewInLeft { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes titleIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes chipPop { 0% { transform: scale(.93); } 60% { transform: scale(1.03); } 100% { transform: none; } }
@keyframes navPop { 0% { transform: scale(.9); } 100% { transform: none; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { from { transform: none; } to { transform: translateY(100%); } }
@keyframes backdropIn { from { background-color: #00000000; } to { background-color: #00000099; } }
@keyframes shimmer { 0% { background-position: -140% 0; } 100% { background-position: 240% 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes burstRing { 0% { opacity: .45; transform: scale(.65); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes drawCheck { from { stroke-dashoffset: 36; } to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
/* «пружина» для значения суммы при пополнении */
@keyframes valueBump { 0% { transform: scale(1); } 30% { transform: scale(1.12); } 100% { transform: scale(1); } }
/* цифра меняется: короткий подъём вверх */
@keyframes digitUp { 0% { opacity: 0; transform: translateY(7px); } 100% { opacity: 1; transform: none; } }
@keyframes digitDown { 0% { opacity: 0; transform: translateY(-7px); } 100% { opacity: 1; transform: none; } }
@keyframes toastIn { 0% { opacity: 0; transform: translateY(-14px) scale(.96); } 100% { opacity: 1; transform: none; } }
@keyframes toastOut { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-14px) scale(.96); } }
/* белая обводка снизу у пилюли: мягко проявляется вместе со сдвигом */
@keyframes pillGlide { 0% { opacity: .35; } 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
      transition-duration: .01ms !important; }
}

/* ---------- вход вне Telegram ---------- */
.gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 0 40px;
}
.gate p { color: var(--muted); font: var(--t-body); text-align: center; }

/* экран обязательной подписки: карточка вместо витрины */
.gate-sub { padding: 0 18px; }
.gate-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; width: 100%; max-width: 380px; padding: 26px 20px;
}
.gate-card .btn { margin-top: 6px; text-decoration: none; }
.gate-card b { font: var(--t-title3); }

/* ---------- иконки ---------- */
.ic { width: 18px; height: 18px; display: inline-flex; flex-shrink: 0; }
.ic svg { width: 100%; height: 100%; stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* «.red» осталась в разметке — теперь это просто вторичный текст */
.red { color: var(--muted); }

/* ---------- header ---------- */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0 6px;
}
.logo { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; }
.balance-pill {
  background: var(--card); border: none; color: var(--txt);
  border-radius: var(--radius-btn); padding: 10px 14px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); box-shadow: var(--rim);
  transition: transform var(--dur-tap) var(--ease-out), background var(--dur-tap);
}
.balance-pill:active { transform: scale(.98); background: var(--card-2); }
.balance-pill .ic { color: var(--muted); }
.balance-pill #hdr-cur { color: var(--muted); font-size: 15px; }

h1 { font: var(--t-large-title); letter-spacing: -.3px; margin: 14px 0 16px;
  animation: titleIn .32s var(--ease-out) both; }
/* мелкий капс с разрядкой запрещён — обычный вторичный текст */
.label { color: var(--muted); font: var(--t-footnote); margin: 20px 0 8px; }

/* ---------- поиск ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius-btn); padding: 13px 16px;
  margin-bottom: 14px; box-shadow: var(--rim); transition: box-shadow .16s;
}
.search:focus-within { box-shadow: inset 0 0 0 1px var(--txt); }
.search input { flex: 1; background: none; border: none; outline: none; color: var(--txt); font-size: 15px; font-family: var(--font); }
.search .clear { background: none; border: none; color: var(--muted); cursor: pointer; display: none; padding: 2px; }
.search .clear.show { display: block; }

/* ---------- сегмент-контрол ---------- */
.seg {
  position: relative; display: flex; background: var(--card);
  border-radius: var(--radius-btn); padding: 4px; margin-bottom: 12px;
  box-shadow: var(--rim);
}
.seg-btn {
  flex: 1; position: relative; z-index: 1; border: none; background: none;
  color: var(--muted); padding: 9px 4px; font: var(--t-subhead); font-weight: 400;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: color var(--dur-quick) var(--ease-out);
  font-family: var(--font); white-space: nowrap;
}
.seg-btn .ic { width: 14px; height: 14px; }
.seg-btn.active { color: var(--txt); font-weight: 500; }
.seg-pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; z-index: 0;
  border-radius: var(--radius-pill); background: var(--fill);
  /* белая обводка чуть внизу: сверху почти нет, снизу тонкая светлая линия */
  box-shadow:
    inset 0 -1.5px 0 0 rgba(255, 255, 255, .34),
    inset 0 -6px 10px -8px rgba(255, 255, 255, .22),
    inset 0 1px 0 0 rgba(255, 255, 255, .05);
  transition: transform .34s var(--ease-out), width .34s var(--ease-out), box-shadow .2s;
  pointer-events: none;
}

/* ---------- чипсы категорий ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; background: var(--card); color: var(--muted);
  border: none; border-radius: var(--radius-btn); padding: 9px 14px; min-height: 36px;
  font-size: 14px; font-weight: 400; cursor: pointer; box-shadow: var(--rim);
  display: flex; align-items: center; gap: 7px; font-family: var(--font);
  transition: transform var(--dur-tap) var(--ease-out), background .16s, color .16s;
}
.chip:active { transform: scale(.94); }
.chip.pop { animation: chipPop .3s var(--ease-out); }
.chip.active { background: var(--tint); color: var(--on-tint); font-weight: 500; box-shadow: none; }
.chip.active .cnt { background: none; color: var(--on-tint); }
.chip .cnt { background: var(--fill); border-radius: var(--radius-pill); padding: 1px 8px; font-size: 12px; font-family: var(--font-mono); }

/* ---------- список товаров (list-rows в карточке) ---------- */
.list-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--rim);
  animation: listIn .28s var(--ease-out) both;
}
.row-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 12px var(--gutter); min-height: 44px; cursor: pointer; border: none;
  background: none; color: var(--txt); font-family: var(--font);
  text-align: left; position: relative;
  transition: background var(--dur-tap) var(--ease-out), transform .18s var(--ease-out);
  /* каскад: каждая строка появляется с задержкой (--i задаёт JS) */
  animation: listIn .34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 38ms);
}
.row-item:active { background: var(--card-2); transform: scale(.985); }
.row-item .pd-icon { transition: transform .2s var(--ease-out); }
.row-item:active .pd-icon { transform: scale(.94); }
.row-item .chev { transition: transform .2s var(--ease-out); }
.row-item:active .chev { transform: translateX(3px); }
.row-item:after {
  content: ""; position: absolute; bottom: 0; left: var(--gutter); right: 0;
  height: 1px; background: var(--separator); pointer-events: none;
}
.row-item:last-child:after { display: none; }

.pd-icon {
  width: 64px; height: 64px; border-radius: var(--radius);
  background: var(--tint-softer); color: var(--tint);
  box-shadow: var(--rim);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pd-icon .ic { width: 26px; height: 26px; }
.pd-icon img.acc-flag { width: 52px; }
.pd-hero .pd-icon img.acc-flag { width: 64px; }
.row-item .name { flex: 1; font-size: 15px; font-weight: 500; }
.row-item .stock { color: var(--muted); font-size: 12px; font-weight: 400; display: block; margin-top: 2px; }
.row-item .price { font-weight: 500; font-size: 15px; font-family: var(--font-mono); }
.row-item .chev { color: var(--muted); }

/* ---------- скелетоны: бегущий блик ---------- */
.skel {
  height: 76px; border-radius: var(--radius-cell); background: var(--card);
  margin-bottom: 8px; box-shadow: var(--rim); position: relative; overflow: hidden;
}
.skel:after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    #ffffff00 0%, #ffffff0a 42%, #ffffff14 50%, #ffffff0a 58%, #ffffff00 100%);
  background-size: 220% 100%;
  animation: shimmer 1.25s linear infinite;
}

/* ---------- empty state ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 56px 20px; text-align: center; color: var(--muted);
  animation: pop .34s var(--ease-out) both;
}
.empty-state-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--card);
  box-shadow: var(--rim);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  animation: breathe 3.2s var(--ease-io) infinite;
}
.empty-state-icon .ic { width: 28px; height: 28px; }
.empty-state b { color: var(--txt); font-size: 16px; font-weight: 500; }
.empty-state span { font-size: 13px; }

/* ---------- кнопки ---------- */
.btn {
  border: none; border-radius: var(--radius-btn); cursor: pointer;
  min-height: 48px; padding: 0 20px; font-size: 15px; font-weight: 500;
  font-family: var(--font); display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform var(--dur-tap) var(--ease-out), background .2s, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; }
.btn .ic { transition: transform .22s var(--ease-out); }
.btn:active .ic { transform: scale(.9); }
.btn-tinted { background: var(--tint); color: var(--on-tint); }
.btn-tinted:active { background: var(--tint-dark); }
.btn-soft { background: var(--card); color: var(--txt); box-shadow: var(--rim); }
.btn-ghost { background: var(--card); color: var(--muted); box-shadow: var(--rim); }
.btn.wide { width: 100%; }

/* ---------- товар ---------- */
.back {
  color: var(--muted); font-size: 14px; margin: 12px 0 4px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; border: none; background: none;
  transition: color .2s, transform var(--dur-tap);
}
.back:active { color: var(--txt); transform: translateX(-3px); }

.pd-hero { text-align: center; padding: 18px 0 6px; }
.pd-hero .pd-icon { width: 80px; height: 80px; border-radius: var(--radius); margin: 0 auto 14px;
  animation: pop .38s var(--ease-out) both; }
.pd-hero .pd-icon .ic { width: 36px; height: 36px; }
.pd-name { font-size: 22px; font-weight: 600; animation: titleIn .34s var(--ease-out) .04s both; }
.pd-tag { color: var(--muted); font-size: 13px; margin-top: 4px;
  animation: titleIn .34s var(--ease-out) .08s both; }
.pd-meta { display: flex; justify-content: center; gap: 34px; margin: 18px 0; }
.pd-meta > div { animation: listIn .34s var(--ease-out) both; }
.pd-meta > div:nth-child(1) { animation-delay: .10s; }
.pd-meta > div:nth-child(2) { animation-delay: .15s; }
.pd-meta > div:nth-child(3) { animation-delay: .20s; }
.pd-meta b { display: block; font-size: 17px; font-weight: 500; font-family: var(--font-mono); }
.pd-meta span { color: var(--muted); font-size: 12px; }
.pd-desc {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--rim);
  color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 14px;
  text-align: left;
  animation: listIn .34s var(--ease-out) .24s both;
}
.pd-actions { display: flex; flex-direction: column; gap: 8px;
  animation: listIn .34s var(--ease-out) .28s both; }

/* ---------- профиль ---------- */
.user-row { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background-color: var(--card); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 500; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--separator);
  animation: pop .38s var(--ease-out) both;
}
.user-name { font-weight: 600; font-size: 16px; }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; box-shadow: var(--rim); }
.balance-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.big { font-size: 26px; font-weight: 600; font-family: var(--font-mono); }
.muted { color: var(--muted); } .small { font-size: 13px; }

.stat-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px;
  font-size: 15px; position: relative;
}
.stat-row:after { content: ""; position: absolute; bottom: 0; left: 46px; right: 0; height: 1px; background: var(--separator); }
.stat-row:last-child:after { display: none; }
.stat-row b { margin-left: auto; font-weight: 500; font-family: var(--font-mono); }
.stat-row.clickable { cursor: pointer; border: none; background: none; width: 100%; color: var(--txt); font-family: var(--font); text-align: left;
  transition: opacity .16s, transform .18s var(--ease-out); }
.stat-row.clickable:active { opacity: .6; transform: scale(.99); }
.stat-row.clickable .chev { transition: transform .2s var(--ease-out); }
.stat-row.clickable:active .chev { transform: translateX(4px); }
.stat-ico {
  width: 32px; height: 32px; border-radius: var(--radius-xs); flex-shrink: 0;
  background: var(--tint-soft); color: var(--tint);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s var(--ease-out);
}
.stat-row:active .stat-ico { transform: scale(.92); }
.chev { color: var(--muted); margin-left: 8px; }

/* ---------- транзакции ---------- */
.tx-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: var(--radius-cell); padding: 13px 14px; margin-bottom: 8px;
  box-shadow: var(--rim);
  animation: listIn .34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.tx-row .amt { margin-left: auto; font-weight: 500; font-family: var(--font-mono); }
.tx-row .amt.in { color: var(--txt); } .tx-row .amt.out { color: var(--muted); }
.tx-row .note { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- аккаунт / успех ---------- */
.acc-card { padding: 20px; text-align: center; }
/* галочка успеха: капля + расходящееся кольцо + прорисовка штриха */
.success-burst {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--tint); color: var(--on-tint); position: relative;
  display: flex; align-items: center; justify-content: center;
  animation: pop .4s var(--ease-out) both;
}
.success-burst:before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--tint); animation: burstRing .7s var(--ease-out) .1s both;
}
.success-burst:after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid var(--tint); animation: burstRing .9s var(--ease-out) .22s both;
}
.success-burst svg { width: 28px; height: 28px; }
.success-burst polyline {
  stroke: var(--on-tint); stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 36; animation: drawCheck .42s var(--ease-out) .18s both;
}
.acc-line {
  background: var(--bg-soft); border-radius: var(--radius-cell); padding: 13px 14px;
  box-shadow: var(--rim);
  margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; text-align: left;
  animation: listIn .3s var(--ease-out) both;
}

/* ---------- три окна карточки аккаунта ---------- */
.field { text-align: left; margin-bottom: 14px; }
.field:last-of-type { margin-bottom: 4px; }
.field-label {
  display: flex; align-items: center; gap: 7px;
  color: var(--muted); font: var(--t-footnote); margin-bottom: 6px;
}
.field-label .ic { width: 15px; height: 15px; }
.field .acc-line { margin-bottom: 0; min-height: 48px; }
/* пустое окно: приглушённый текст, без кнопки копирования */
.acc-line.empty code { color: var(--muted); }
/* окно, куда только что пришёл код */
.acc-line.filled { animation: pop .34s var(--ease-out); }
.acc-line.filled code { color: var(--txt); }
.acc-line .spinner { margin-right: 6px; }

.acc-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 16px;
}
.acc-hint { margin-top: 12px; line-height: 1.5; text-align: left; }
.acc-line code { font-size: 14px; word-break: break-all; font-family: var(--font-mono); }
.copy {
  background: var(--card); border: none; color: var(--muted);
  box-shadow: var(--rim);
  border-radius: var(--radius-xs); padding: 8px; cursor: pointer; display: flex;
  transition: transform var(--dur-tap), color .16s;
}
.copy:active { transform: scale(.96); color: var(--txt); }

/* ---------- шторка ---------- */
.sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; }
.sheet.hidden { display: none; }
.sheet-back { position: absolute; inset: 0; animation: backdropIn .22s var(--ease-out) both; }
.sheet-box {
  position: relative; width: 100%;
  background: var(--card); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  border-top: 1px solid var(--separator);
  padding: 12px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .34s var(--ease-out) both;
}
/* закрытие: шторка уезжает вниз, фон гаснет */
.sheet.closing .sheet-box { animation: sheetDown .24s var(--ease-io) both; }
.sheet.closing .sheet-back { animation: backdropIn .24s var(--ease-io) reverse both; }
.sheet-grab { width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--fill); margin: 0 auto 18px; }
.sheet-box h2 { margin-bottom: 16px; font-size: 19px; font-weight: 600;
  animation: titleIn .3s var(--ease-out) .06s both; }
/* содержимое шторки заезжает каскадом */
.sheet-box > *:not(.sheet-grab) { animation: listIn .34s var(--ease-out) both; }
.sheet-box > *:nth-child(2) { animation-delay: .04s; }
.sheet-box > *:nth-child(3) { animation-delay: .08s; }
.sheet-box > *:nth-child(4) { animation-delay: .12s; }
.sheet-box > *:nth-child(5) { animation-delay: .16s; }
.sheet-box > *:nth-child(6) { animation-delay: .20s; }
.sheet-box > *:nth-child(7) { animation-delay: .24s; }

.stepper {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-soft); border-radius: var(--radius-pill); padding: 8px; margin-bottom: 12px; box-shadow: var(--rim);
}
.stepper button {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--card); color: var(--txt); font-size: 20px; cursor: pointer;
  box-shadow: var(--rim);
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s var(--ease-out), background .2s;
}
.stepper button:active { transform: scale(.88); background: var(--card-2); }
.stepper button:disabled { opacity: .35; }
.stepper .val { flex: 1; text-align: center; font-size: 22px; font-weight: 600; font-family: var(--font-mono); }
.stepper .val small { font-size: 15px; color: var(--muted); font-weight: 400; }
/* сумма «пружинит» при каждом изменении */
.stepper .val.bump { animation: valueBump .3s var(--ease-out); }
/* цифры уезжают в сторону изменения */
.stepper .val #topup-val { display: inline-block; }
.stepper .val.up #topup-val { animation: digitUp .26s var(--ease-out); }
.stepper .val.down #topup-val { animation: digitDown .26s var(--ease-out); }
/* курс в USDT под степпером */
.rate-hint { text-align: center; font-size: 12px; color: var(--muted); margin: -4px 0 12px;
  transition: opacity .2s; }
.rate-hint.flash { animation: pop .26s var(--ease-out); }

#topup-status { margin-top: 12px; text-align: center; font-size: 13px; min-height: 18px;
  transition: opacity .2s; }
#topup-status.show { animation: listIn .28s var(--ease-out) both; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--fill); border-top-color: var(--tint); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }

/* ---------- тост ---------- */
#toast-wrap {
  position: fixed; top: calc(10px + env(safe-area-inset-top, 0px));
  left: var(--gutter); right: var(--gutter); z-index: 40;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--card-2); color: var(--txt); box-shadow: var(--rim);
  border-radius: var(--radius-pill); padding: 11px 16px; font-size: 14px;
  animation: toastIn .3s var(--ease-out) both;
}
.toast.out { animation: toastOut .24s var(--ease-io) both; }
.toast .ic { color: var(--txt); }

/* ---------- таб-бар: плавающий док в духе iOS 26 ---------- */
#tabbar {
  position: fixed; left: var(--gutter); right: var(--gutter);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--card); border-radius: var(--radius-pill);
  box-shadow: var(--rim);
  display: flex; padding: 5px; z-index: 5;
}
#tabbar .tab {
  flex: 1; position: relative; z-index: 1; border: none; background: none;
  color: var(--muted); padding: 12px; border-radius: var(--radius-pill);
  font: var(--t-subhead); font-weight: 400; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: color var(--dur-quick) var(--ease-out);
}
#tabbar .tab.active { color: var(--txt); font-weight: 500; }
#tabbar .tab.active .ic { color: var(--txt); animation: navPop .3s var(--ease-out); }
#tabbar .tab .ic { transition: transform .2s var(--ease-out); }
#tabbar .tab:active .ic { transform: scale(.88); }
/* бегунок: скользящая капсула под активной вкладкой */
#tabbar .seg-pill {
  display: block; top: 5px; bottom: 5px;
  border-radius: var(--radius-pill); background: var(--fill);
  box-shadow:
    inset 0 -1.5px 0 0 rgba(255, 255, 255, .34),
    inset 0 -7px 11px -8px rgba(255, 255, 255, .22),
    inset 0 1px 0 0 rgba(255, 255, 255, .05);
}

/* ---------- вью и переходы ---------- */
.view { display: none; }
.view.active { display: block; }
.view.in-right { animation: viewInRight var(--dur-screen) var(--ease-out) both; }
.view.in-left { animation: viewInLeft var(--dur-screen) var(--ease-out) both; }

/* ---------- профиль: новые блоки ---------- */
.empty-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; }
.duo { display: flex; justify-content: space-between; gap: 12px; }
.duo .big { font-size: 22px; }
.footnote { margin-top: 12px; line-height: 1.5; }
.faq-body p { margin-bottom: 12px; line-height: 1.55; }
.ref-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ref-ico {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: var(--tint-softer); color: var(--tint);
  box-shadow: var(--rim);
  display: flex; align-items: center; justify-content: center;
}
.ref-ico .ic { width: 26px; height: 26px; }
.ref-pct { font-size: 19px; font-weight: 600; }
.ref-desc { line-height: 1.55; margin-bottom: 14px; }
.txt-b { color: var(--txt); }
.link-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius-cell);
  padding: 13px 14px; margin-bottom: 12px; box-shadow: var(--rim);
}
.link-box code { flex: 1; font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
