/* ==========================================================================
   Кошелёк — стили
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-outer: #eceef2;
  --bg2: #f2f2f5;
  --card: #f2f2f4;
  --text: #111113;
  --text2: #2b2b2f;
  --hint: #8e8e93;
  --hint2: #b2b2b7;
  --sep: #e8e8ec;
  --link: #3c9be0;
  --accent: #46a2df;
  --accent-dark: #2d88d4;
  --accent-soft: #e1eff9;
  --accent-soft2: #d4e7f6;
  --green: #31a24c;
  --green-soft: #e4f3e7;
  --red: #e5534b;
  --red-soft: #fdeceb;
  --orange: #f59300;
  --input-border: #dcdce1;
  --field-bg: #ffffff;
  --round-btn: #f0f0f2;
  --tabbar-bg: rgba(255, 255, 255, .82);
  --tab-on: rgba(20, 20, 30, .055);
  --tab-text: #2a2a2e;
  --cut: #ffffff;
  --overlay: rgba(0, 0, 0, .38);
  --sheet-bg: #ffffff;
  --shadow: 0 6px 30px rgba(20, 30, 50, .10);
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #18222d;
  --bg-outer: #0e141b;
  --bg2: #111a23;
  --card: #212d3b;
  --text: #f4f6f8;
  --text2: #dfe5ea;
  --hint: #7f91a4;
  --hint2: #5d6e80;
  --sep: #243140;
  --link: #62b1ef;
  --accent: #4c9ee0;
  --accent-dark: #3585cf;
  --accent-soft: #1f3348;
  --accent-soft2: #29425c;
  --green: #4cc26a;
  --green-soft: #1d3a2a;
  --red: #f0645c;
  --red-soft: #3f2327;
  --input-border: #2f3f50;
  --field-bg: #1c2733;
  --round-btn: #243241;
  --tabbar-bg: rgba(29, 40, 52, .85);
  --tab-on: rgba(255, 255, 255, .07);
  --tab-text: #d3dbe3;
  --cut: #1d2834;
  --overlay: rgba(0, 0, 0, .55);
  --sheet-bg: #1c2733;
  --shadow: 0 6px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.3;
  color: var(--text);
  background: var(--bg-outer);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
b { font-weight: 600; }

.ic { display: inline-flex; width: 24px; height: 24px; flex: none; align-items: center; justify-content: center; }
.ic svg { width: 100%; height: 100%; display: block; }

.muted { color: var(--hint); }
.small { font-size: 13.5px; }
.up { color: var(--green); }
.down { color: var(--red); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: -.01em; }
.pad-h { padding: 0 16px; }
.link { color: var(--link); font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.link .ic { width: 20px; height: 20px; }

/* ---------- Каркас ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
}
@media (min-width: 520px) {
  #app { box-shadow: 0 0 0 1px rgba(0, 0, 0, .03), 0 10px 60px rgba(0, 0, 0, .06); }
}
.view.has-tabbar .page { padding-bottom: 120px; }
.view.has-topbar .page { padding-bottom: 32px; }
.page.enter { animation: pageIn .22s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Верхняя панель подстраниц ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  height: 54px; padding: 0 4px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sep);
}
.tb-back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--link); border-radius: 50%; }
.tb-back .ic { width: 28px; height: 28px; }
.tb-title { text-align: center; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { display: flex; justify-content: flex-end; }

/* ---------- Нижнее меню ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  padding: 0 24px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.tabbar[hidden] { display: none; }
.tabbar::before {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 96px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 78%);
  pointer-events: none;
}
.tabbar-inner {
  position: relative;
  pointer-events: auto;
  width: 100%; max-width: 300px; height: 66px;
  display: flex; align-items: stretch; padding: 5px;
  border-radius: 34px;
  background: var(--tabbar-bg);
  backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 2px 24px rgba(0, 0, 0, .09), 0 0 0 .5px rgba(0, 0, 0, .04);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 29px; color: var(--tab-text);
  font-size: 12px; font-weight: 500; letter-spacing: -.01em;
  transition: background .2s, color .2s;
}
.tab .ic { width: 24px; height: 24px; }
.tab.on { background: var(--tab-on); color: var(--link); }
.tab:active { transform: scale(.96); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 13px;
  font-weight: 600; font-size: 16.5px; letter-spacing: -.01em;
  transition: transform .1s, filter .15s, opacity .15s;
  user-select: none;
}
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn .ic { width: 22px; height: 22px; }
.btn-lg { height: 48px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-light { background: var(--accent-soft); color: var(--link); }

/* ==========================================================================
   Кошелёк
   ========================================================================== */
.w-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 16px 0;
}
.round-btn {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--round-btn); color: #8a8a90;
}
.round-btn .ic { width: 21px; height: 21px; }
.w-user { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 16px; }
.w-user b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.w-balance { text-align: center; padding: 26px 16px 0; }
.w-bal-row { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.w-cur { font-size: 32px; color: #505056; }
:root[data-theme="dark"] .w-cur { color: #9fb0c1; }
.w-amt { font-size: 33px; color: var(--text); font-variant-numeric: tabular-nums; }
.w-eye { color: #8e8e93; margin-left: 2px; }
.w-eye .ic { width: 22px; height: 22px; }
.w-bal-sub { margin-top: 8px; font-size: 16px; color: var(--hint); }
.w-bal-sub .link { font-weight: 400; }

.w-actions { display: grid; grid-template-columns: repeat(3, 1fr); padding: 26px 16px 0; }
.w-act { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--link); font-size: 14.5px; font-weight: 500; }
.w-act-ic {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #56b2ea 0%, #2c85d0 100%);
  box-shadow: 0 2px 6px rgba(45, 133, 208, .25);
}
.w-act-ic .ic { width: 22px; height: 22px; }
.w-act:active .w-act-ic { transform: scale(.94); }

/* Строка актива */
.asset-list { padding: 0 16px; }
.asset-row { display: flex; align-items: center; gap: 12px; height: 65px; }
.asset-row .coin-ic { flex: none; }
.asset-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-bottom: 1px solid var(--sep); }
.asset-row:last-child .asset-main { border-bottom-color: transparent; }
.asset-top, .asset-bot { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.asset-name { font-size: 16.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.asset-amt { font-size: 16.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.asset-price, .asset-fiat { font-size: 14.5px; color: var(--hint); font-variant-numeric: tabular-nums; }
.asset-price b { font-weight: 500; }
.fixed-tag { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--link); vertical-align: 1px; }
.asset-row:active { opacity: .7; }

.coin-ic { display: inline-flex; flex: none; border-radius: 50%; }
.coin-ic svg { width: 100%; height: 100%; display: block; }

/* ==========================================================================
   Общие блоки
   ========================================================================== */
.section-title { padding: 22px 16px 8px; font-size: 14px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .02em; }
.section-title.between { display: flex; justify-content: space-between; align-items: center; }

.card { margin: 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); }
.card + .card { margin-top: 10px; }

.list { margin: 0 16px; border-radius: var(--radius); background: var(--card); overflow: hidden; }
.cell {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 14px; text-align: left; position: relative; cursor: pointer;
}
.cell + .cell::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--sep); }
.cell:active { background: color-mix(in srgb, var(--text) 5%, transparent); }
.cell-ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; overflow: hidden; }
.cell-ic .ic { width: 20px; height: 20px; }
.cell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cell-title { font-size: 16px; font-weight: 500; }
.cell-sub { font-size: 13.5px; color: var(--hint); overflow: hidden; text-overflow: ellipsis; }
.cell-right { color: var(--hint); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.cell-right .ic { width: 20px; height: 20px; }
.cell-chev { color: var(--hint2); display: flex; }
.cell-chev .ic { width: 20px; height: 20px; }

.kv-list { display: flex; flex-direction: column; }
.kv { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 11px 0; font-size: 15px; }
.kv + .kv { border-top: 1px solid var(--sep); }
.kv > span { color: var(--hint); flex: none; }
.kv > b { font-weight: 500; text-align: right; word-break: break-word; }
.kv .copyable { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.kv-list.compact .kv { padding: 8px 0; font-size: 14.5px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 0; }
.stats-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.stats-grid b { font-size: 20px; font-weight: 700; }
.stats-grid span { font-size: 13px; color: var(--hint); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 24px; gap: 6px; }
.empty .sticker { margin-bottom: 6px; }
.empty-title { font-size: 17px; font-weight: 600; }
.empty-text { font-size: 14.5px; color: var(--hint); max-width: 300px; line-height: 1.4; }

.sticker { flex: none; cursor: pointer; }
.sticker svg { display: block; }

.switch { position: relative; display: inline-flex; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: #d7d7dc; transition: background .2s; }
:root[data-theme="dark"] .switch span { background: #3a4a5b; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

.chips-row { display: flex; gap: 8px; padding: 12px 16px 0; }
.chips-row.scroll { overflow-x: auto; scrollbar-width: none; }
.chips-row.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px 0 14px; border-radius: 14px;
  border: 1px solid var(--input-border); background: var(--field-bg);
  font-size: 15.5px; color: var(--hint); white-space: nowrap;
}
.chip .ic { width: 18px; height: 18px; color: var(--hint); }
.chip.on { border-color: var(--accent); color: var(--link); background: var(--accent-soft); }
.chip.on .ic { color: var(--link); }
.chip .coin-ic { width: 18px !important; height: 18px !important; }
a.chip, button.chip:not([data-chip]):not([data-coin]) { padding: 0 14px; }

.avatar { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Выбор из списка */
.pick-list { display: flex; flex-direction: column; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-radius: 12px; text-align: left; width: 100%; }
.pick-row:active { background: var(--bg2); }
.pick-row.sel { background: var(--accent-soft); }
.pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-main b { font-size: 16px; font-weight: 600; }
.pick-main span { font-size: 14px; color: var(--hint); }
.pick-right { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.pick-right b { font-size: 15.5px; font-weight: 500; }
.pick-right span { font-size: 13.5px; color: var(--hint); }
.pick-check { color: var(--link); }
.fiat-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; flex: none; }

/* ==========================================================================
   Шторки и тосты
   ========================================================================== */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .25s; }
.sheet {
  position: relative; width: 100%; max-width: 480px; max-height: 92vh;
  background: var(--sheet-bg); border-radius: 18px 18px 0 0;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--hint2); opacity: .6; margin: 8px auto 0; flex: none; cursor: grab; }
.sheet-head { display: flex; align-items: center; justify-content: center; position: relative; min-height: 44px; padding: 4px 52px; flex: none; touch-action: none; }
.sheet-head h3 { font-size: 17px; font-weight: 600; text-align: center; }
.sheet-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--bg2); color: var(--hint); display: flex; align-items: center; justify-content: center; }
.sheet-x .ic { width: 18px; height: 18px; }
.sheet-body { overflow-y: auto; padding: 4px 16px 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.sheet-body > .section-title { padding: 6px 0 0; }
.sheet-body .kv-list { background: var(--card); border-radius: 14px; padding: 2px 14px; }

.toasts { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  max-width: 440px; width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: rgba(32, 34, 40, .94); color: #fff; font-size: 14.5px; line-height: 1.35;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  transform: translateY(-20px); opacity: 0; transition: transform .25s, opacity .25s;
}
.toast.show { transform: none; opacity: 1; }
.toast .ic { width: 22px; height: 22px; color: #7cc4f7; }
.toast-success .ic { color: #6ee08a; }
.toast-error .ic { color: #ff8a80; }

/* ==========================================================================
   Страница валюты
   ========================================================================== */
.coin-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px 0; }
.coin-bal { font-size: 28px; font-weight: 700; margin-top: 6px; text-align: center; }
.coin-chart-card { margin-top: 22px; padding: 14px 0 10px; }
.coin-price-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; }
.coin-price { font-size: 22px; font-weight: 700; margin-top: 2px; }
.coin-change { font-weight: 600; font-size: 15px; }
.coin-chart { height: 170px; margin-top: 8px; }
.coin-rate-card { margin-top: 22px; }
.coin-rate-card .kv-list { margin-top: 4px; }
.line-chart { width: 100%; height: 100%; display: block; }
.frames { display: flex; justify-content: space-around; padding: 6px 12px 0; }
.frames button { height: 32px; min-width: 44px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--hint); }
.frames button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .frames button.on { background: var(--bg2); }
.about { font-size: 15px; line-height: 1.45; color: var(--text2); }
.about .kv-list { margin-top: 10px; }

/* История */
.hist-list { padding: 0 16px; }
.list-day { font-size: 14px; font-weight: 600; color: var(--hint); padding: 16px 0 4px; }
.hist-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 64px; text-align: left; }
.hist-ic { position: relative; flex: none; display: inline-flex; }
.hist-badge { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg); color: #fff; display: flex; align-items: center; justify-content: center; }
.hist-badge .ic { width: 12px; height: 12px; }
.hist-ic.big .hist-badge { width: 26px; height: 26px; right: -2px; bottom: -2px; }
.hist-ic.big .hist-badge .ic { width: 15px; height: 15px; }
.hist-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-bottom: 1px solid var(--sep); }
.hist-top, .hist-bot { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.hist-title { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.hist-amt { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hist-bot { font-size: 14px; color: var(--hint); }
.hist-bot span:first-child { overflow: hidden; text-overflow: ellipsis; }
.tx-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 6px; }
.tx-amt { font-size: 26px; font-weight: 700; margin-top: 6px; text-align: center; }
.tx-fiat { color: var(--hint); }


/* ==========================================================================
   Пополнение и вывод
   ========================================================================== */
.tr { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 0; }
.tr-coin { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--card); text-align: left; }
.tr-coin:active { filter: brightness(.97); }
.tr-coin > .ic { width: 22px; height: 22px; color: var(--hint); }
.tr-coin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-coin-main b { font-size: 17px; }
.tr-coin-main span { font-size: 14px; color: var(--hint); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-label { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .02em; }
.tr-label .link { font-size: 15px; text-transform: none; letter-spacing: 0; }
.tr-field {
  display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border-radius: 16px;
  background: var(--field-bg); border: 1px solid var(--input-border); transition: border-color .15s, box-shadow .15s;
}
.tr-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.tr-field.err { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 15%, transparent); }
.tr-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; color: var(--text); }
.tr-field input::placeholder { color: var(--hint2); }
.tr-field > span { color: var(--hint); font-weight: 600; font-size: 16px; flex: none; }
.tr-amount { height: 64px; }
.tr-amount input { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tr-user > span { font-size: 18px; }
.tr-hint { font-size: 13.5px; color: var(--hint); padding: 0 4px; margin-top: -4px; }
.tr-hint.err { color: var(--red); }
.tr-sub { display: flex; justify-content: space-between; gap: 10px; padding: 0 4px; font-size: 14px; color: var(--hint); font-variant-numeric: tabular-nums; }
.tr-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tr-quick button { height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--link); font-weight: 700; font-size: 14px; white-space: nowrap; }
.tr-quick button:active { transform: scale(.95); }
.tr-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; line-height: 1.4; color: var(--text2); }
.tr-note .ic { width: 20px; height: 20px; color: var(--link); }
.tr .btn-lg { height: 54px; margin-top: 14px; border-radius: 16px; }

.seg { display: flex; padding: 3px; border-radius: 13px; background: var(--bg2); }
.seg button { flex: 1; height: 38px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--hint); transition: background .2s, color .2s; }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
:root[data-theme="dark"] .seg button.on { background: var(--card); }

.btn[disabled] { opacity: .75; pointer-events: none; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 16px 18px; }
.success h2 { font-size: 23px; font-weight: 700; margin-top: 8px; }
.success-amt { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kv-list.card { padding: 4px 16px; }
.btn-row { display: flex; gap: 10px; padding: 18px 16px 0; }
.btn-row > * { flex: 1; min-width: 0; }

/* ==========================================================================
   Вход по номеру телефона
   ========================================================================== */
.view.bare .page { padding-bottom: 32px; }
.login { display: flex; flex-direction: column; gap: 14px; padding: 9vh 16px 24px; max-width: 440px; margin: 0 auto; }
.login-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.login-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.login-head p { font-size: 15.5px; line-height: 1.45; max-width: 340px; }
.login-head p b { color: var(--text); white-space: nowrap; }
.login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.login-field { height: 58px; }
.login-field > .ic { width: 22px; height: 22px; color: var(--hint); }
.login-field input { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.login-code input { text-align: center; font-size: 30px; letter-spacing: .5em; padding-left: .5em; }
.login .btn-lg { height: 54px; border-radius: 16px; }
.login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 4px 4px 0; font-size: 15px; }
.login-links .link[disabled] { color: var(--hint); pointer-events: none; }
.pad-v { padding: 12px 0; }
.spin.dark { border-color: color-mix(in srgb, var(--hint) 35%, transparent); border-top-color: var(--accent); width: 26px; height: 26px; }
button.w-user { text-align: left; }
.crash-btn.pending { opacity: .8; pointer-events: none; }
.mtile.pressing { transform: scale(.94); }

/* ---------- Обмен ---------- */
.swap-coin { cursor: pointer; }
.swap-mid { display: flex; justify-content: center; margin: 2px 0 -6px; }
.swap-flip { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--link); transition: transform .25s; }
.swap-flip:active { transform: rotate(180deg) scale(.94); }
.swap-flip .ic { width: 22px; height: 22px; }
.swap-out { background: var(--card); border-color: transparent; }
.swap-out b { flex: 1; min-width: 0; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.swap-pair { display: flex; align-items: center; gap: 10px; color: var(--hint); }
