:root {
  --bg: #10161F;
  --card: #1D2633;
  --card-tint: #2E3847;
  --sep: rgba(255, 255, 255, 0.06);
  --text: #FFFFFF;
  --text-2: #8994A3;
  --text-3: #556170;
  --icon: #D7DDE4;
  --accent: #45AEF5;
  --accent-press: #3A9BDC;
  --green: #39CC83;
  --red: #FF4766;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: .38s;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); overflow: hidden; }
body {
  color: var(--text);
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
.ti { line-height: 1; }

/* ---------- слои и переходы ---------- */
#app { position: fixed; inset: 0; overflow: hidden; }
.layer { position: absolute; inset: 0; }
.layer.screen {
  background: var(--bg);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), filter var(--dur) var(--ease);
  will-change: transform;
}
.layer.screen.enter-push, .layer.screen.leave-pop { transform: translateX(100%); }
.layer.screen.under { transform: translateX(-24%); filter: brightness(.55); pointer-events: none; }
.layer.screen.enter-fade { opacity: 0; transform: scale(.97); }
.layer.screen.leave-fade { opacity: 0; transform: scale(1.02); pointer-events: none; }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.wrap { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 16px; }
.foot { width: 100%; max-width: 430px; margin: 0 auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

/* ---------- шапки ---------- */
.nav { height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; width: 100%; max-width: 454px; margin: 0 auto; }
.nav-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--icon); transition: transform .15s; }
.nav-btn:active { transform: scale(.92); }
.nav-title { font-size: 18px; line-height: 24px; font-weight: 700; }
.nav-gap { width: 40px; }

.top { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--icon); font-size: 26px; transition: transform .15s, background .2s; }
.icon-btn:active { transform: scale(.9); background: var(--card); }
.top-right { display: flex; gap: 8px; }
.pill { height: 40px; padding: 0 14px 0 12px; border-radius: 20px; background: var(--card); display: flex; align-items: center; gap: 8px; font-weight: 600; transition: transform .15s; }
.pill:active { transform: scale(.96); }
.pill svg { width: 20px; height: 20px; }
.pill .ti { font-size: 16px; color: var(--icon); }

.page-title { font-size: 24px; line-height: 32px; font-weight: 700; }
.h1 { font-size: 28px; line-height: 36px; font-weight: 700; margin: 12px 0 8px; }
.lead { color: var(--text-2); font-size: 16px; line-height: 24px; margin-bottom: 24px; }
.center { text-align: center; }
.muted { color: var(--text-2); }

/* ---------- кнопки ---------- */
.btn { width: 100%; height: 56px; border-radius: 16px; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, background .2s, opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn .ti { font-size: 22px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active:not(:disabled) { background: var(--accent-press); }
.btn-primary:disabled { opacity: .45; }
.btn-secondary { background: var(--card); }
.btn-secondary:active:not(:disabled) { background: var(--card-tint); }
.btn-danger { background: rgba(255, 71, 102, .14); color: var(--red); }
.btn-ghost { height: 48px; color: var(--accent); }
.btn-row { display: flex; gap: 8px; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .8s linear infinite; flex-shrink: 0; }
.spin.dark { border-color: rgba(137, 148, 163, .3); border-top-color: var(--text-2); }

/* ---------- поля ---------- */
.field { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 16px; min-height: 56px; padding: 0 16px; border: 1.5px solid transparent; transition: border-color .2s, background .2s; }
.field:focus-within { border-color: var(--accent); }
.field.err { border-color: var(--red); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; font-weight: 500; }
.field input::placeholder { color: var(--text-3); }
.field .plus { font-weight: 600; color: var(--text-2); }
.field-btn { color: var(--accent); font-weight: 600; font-size: 15px; padding: 6px 0 6px 8px; flex-shrink: 0; }
.field-err { min-height: 20px; margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--red); }

/* ---------- приветствие ---------- */
.welcome { text-align: center; padding-top: 24px; }
.logo-anim { position: relative; width: 168px; height: 168px; margin: 24px auto 20px; }
.logo-anim .ring { position: absolute; inset: 30px; border-radius: 50%; border: 2px solid rgba(69, 174, 245, .55); animation: ripple 3.6s var(--ease) infinite; }
.logo-anim .ring:nth-child(2) { animation-delay: 1.2s; }
.logo-anim .ring:nth-child(3) { animation-delay: 2.4s; }
.logo-anim svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: float 5s ease-in-out infinite; }
.welcome-title { font-size: 32px; line-height: 40px; font-weight: 700; }
.welcome-sub { color: var(--text-2); margin: 8px 0 28px; }
.feat { text-align: left; }

/* ---------- баланс и действия ---------- */
.balance { text-align: center; margin-top: 32px; min-height: 82px; }
.balance-num { font-size: 44px; line-height: 52px; font-weight: 600; letter-spacing: -0.5px; display: inline-flex; gap: 10px; justify-content: center; align-items: baseline; cursor: pointer; }
.balance-num .cur { color: var(--text-2); }
.balance-num.small { font-size: 36px; }
.addr { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 15px; line-height: 20px; padding: 2px 6px; border-radius: 8px; transition: background .2s; }
.addr:active { background: var(--card); }
.addr .ti { font-size: 16px; }
.test-chip { margin: 0 auto; width: fit-content; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; background: rgba(245, 165, 36, .14); color: #F5A524; font-size: 13px; line-height: 16px; font-weight: 600; }

.actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.action { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; line-height: 16px; }
.action i { width: 48px; height: 48px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--text); transition: transform .15s, background .2s; }
.action:active i { transform: scale(.9); background: var(--card-tint); }

/* ---------- баннер ---------- */
.banner { position: relative; overflow: hidden; margin-top: 28px; min-height: 104px; border-radius: 20px; border: 1px solid #2A3545; background: linear-gradient(100deg, #121A24 45%, #16304D 100%); padding: 16px 128px 16px 16px; transition: opacity .3s, transform .3s, max-height .35s, margin .35s, padding .35s; max-height: 200px; }
.banner.gone { opacity: 0; transform: scale(.96); max-height: 0; min-height: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
.banner h3 { font-size: 16px; line-height: 22px; font-weight: 600; }
.banner p { margin-top: 6px; color: var(--text-2); font-size: 14px; line-height: 20px; display: flex; align-items: center; gap: 2px; }
.banner .pearl { position: absolute; right: -6px; top: -4px; width: 132px; height: 132px; animation: float 6s ease-in-out infinite; }
.banner .close { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(46, 56, 71, .85); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--icon); }

.link-card { margin-top: 16px; height: 60px; border-radius: 16px; background: var(--card); display: flex; align-items: center; gap: 14px; padding: 0 16px; font-weight: 600; width: 100%; transition: background .2s; }
.link-card:active { background: var(--card-tint); }
.link-card .lead-ic { font-size: 26px; color: var(--accent); }
.link-card .ti-chevron-right { margin-left: auto; color: var(--text-3); font-size: 20px; }

/* ---------- промо в «Обзоре» ---------- */
.promo { position: relative; overflow: hidden; margin-top: 8px; min-height: 156px; border-radius: 20px; padding: 20px; background: linear-gradient(135deg, #1F4F86 0%, #2E86D4 100%); }
.promo h3 { font-size: 22px; line-height: 28px; font-weight: 700; position: relative; z-index: 1; }
.promo p { margin-top: 4px; font-size: 15px; line-height: 22px; color: rgba(255, 255, 255, .8); position: relative; z-index: 1; }
.promo-btn { position: relative; z-index: 1; margin-top: 18px; height: 40px; padding: 0 18px; border-radius: 12px; background: rgba(255, 255, 255, .2); font-weight: 600; font-size: 14px; transition: transform .15s, background .2s; }
.promo-btn:active { transform: scale(.95); background: rgba(255, 255, 255, .3); }
.promo svg { position: absolute; right: -18px; bottom: -26px; width: 160px; height: 160px; animation: float 6s ease-in-out infinite; }

/* ---------- секции и списки ---------- */
.sec { margin: 32px 0 12px; display: flex; align-items: center; justify-content: space-between; }
.sec h2 { font-size: 20px; line-height: 28px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.sec h2 .ti { color: var(--text-2); font-size: 20px; }
.sec .more { color: var(--text-2); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.sec.small { margin: 28px 0 8px; }
.sec.small h2 { font-size: 16px; line-height: 24px; color: var(--text-2); font-weight: 600; }

.list { background: var(--card); border-radius: 20px; overflow: hidden; }
.list + .list { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; position: relative; width: 100%; text-align: left; transition: background .15s; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
button.row:active, .row.tap:active { background: rgba(255, 255, 255, .03); }
.ava { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; color: #fff; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--text-2); font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { text-align: right; flex-shrink: 0; }
.row-end .v { font-weight: 600; }
.row-end .v.in { color: var(--green); }
.row .chev { color: var(--text-3); font-size: 20px; }
.check { width: 18px; height: 18px; flex-shrink: 0; }
.tag { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-2); background: var(--card-tint); border-radius: 6px; padding: 2px 6px; }

/* настройки */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; font-weight: 600; width: 100%; text-align: left; position: relative; transition: background .15s; }
.set-row + .set-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.set-row:active { background: rgba(255, 255, 255, .03); }
.set-row .ti { font-size: 24px; color: var(--accent); }
.set-row .val { color: var(--accent); font-weight: 600; }
.set-row.danger { color: var(--red); }
.set-row.danger .ti { color: var(--red); }
.switch { width: 52px; height: 32px; border-radius: 16px; background: var(--card-tint); position: relative; flex-shrink: 0; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }

/* ---------- пустые состояния ---------- */
.empty { text-align: center; padding: 40px 24px; }
.empty-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--card); margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--text-2); }
.empty h3 { font-size: 18px; line-height: 24px; font-weight: 700; }
.empty p { margin-top: 6px; color: var(--text-2); font-size: 15px; line-height: 22px; }
.empty > .btn { margin-top: 20px; }
.empty-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.empty-card { background: var(--card); border-radius: 20px; padding: 24px 20px; display: flex; align-items: center; gap: 16px; }
.empty-card .empty-ic { width: 52px; height: 52px; font-size: 24px; margin: 0; background: var(--card-tint); flex-shrink: 0; }
.empty-card h3 { font-size: 16px; line-height: 22px; font-weight: 600; }
.empty-card p { color: var(--text-2); font-size: 14px; line-height: 20px; margin-top: 2px; }

/* ---------- сегменты ---------- */
.seg { position: relative; margin-top: 8px; background: var(--card); border-radius: 20px; padding: 4px; display: flex; }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); background: var(--card-tint); border-radius: 16px; transition: transform .35s var(--ease); }
.seg button { position: relative; flex: 1; height: 36px; border-radius: 16px; font-weight: 600; font-size: 14px; color: var(--text-2); transition: color .25s; }
.seg button.on { color: var(--text); }
.seg-body { transition: opacity .2s, transform .2s; }
.seg-body.swap { opacity: 0; transform: translateY(6px); }

/* ---------- табы ---------- */
.main { padding-top: 0 !important; }
.tab-views { position: relative; flex: 1; }
.tab-view { position: absolute; inset: 0; padding-top: env(safe-area-inset-top); padding-bottom: 96px; opacity: 0; transform: translateY(10px); pointer-events: none; visibility: hidden; transition: opacity .28s var(--ease), transform .28s var(--ease), visibility 0s .28s; }
.tab-view.on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.tabs { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg); padding: 8px 0 calc(12px + env(safe-area-inset-bottom)); }
.tabs::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.tabs-in { max-width: 430px; margin: 0 auto; display: flex; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--text-2); transition: color .2s; }
.tab svg { width: 28px; height: 28px; }
.tab.on { color: var(--accent); }
.tab.on svg { animation: tabPop .35s var(--ease); }

/* ---------- код и PIN ---------- */
.code { position: relative; display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.code span { width: 54px; height: 64px; border-radius: 14px; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 600; border: 1.5px solid transparent; transition: border-color .15s; }
.code span.cur { border-color: var(--accent); }
.code span.filled { animation: pop .2s var(--ease); }
.code.bad span { border-color: var(--red); }
.code input { position: absolute; inset: 0; opacity: 0; font-size: 16px; caret-color: transparent; color: transparent; border: 0; outline: 0; background: none; }
.code-status { min-height: 24px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.code-status.err { color: var(--red); }
.resend { margin-top: 8px; text-align: center; color: var(--text-2); font-size: 14px; }
.resend button { color: var(--accent); font-weight: 600; font-size: 15px; }
.hint { margin-top: 24px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 18px; }

.pin { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pin-head { transition: opacity .2s, transform .2s; }
.pin-head.swap { opacity: 0; transform: translateX(-16px); }
.pin-title { font-size: 22px; line-height: 30px; font-weight: 700; }
.pin-sub { color: var(--text-2); font-size: 15px; line-height: 22px; margin-top: 6px; min-height: 22px; }
.dots { display: flex; gap: 18px; margin: 32px 0 12px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--card-tint); transition: background .15s; }
.dots i.on { background: var(--accent); animation: pop .22s var(--ease); }
.dots.ok i { background: var(--green); }
.dots.bad i { background: var(--red); }
.pin-msg { min-height: 20px; font-size: 14px; line-height: 20px; color: var(--text-2); padding: 0 16px; }
.pin-msg.err { color: var(--red); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 24px; width: 100%; max-width: 320px; margin-top: 20px; }
.key { height: 64px; border-radius: 32px; font-size: 28px; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .1s; }
.key:active { background: var(--card); transform: scale(.94); }
.key .ti { font-size: 28px; color: var(--text-2); }
.pin-screen { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 16px; }

/* ---------- шторки ---------- */
.sheet-wrap { display: flex; align-items: flex-end; z-index: 10; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity var(--dur) var(--ease); }
.sheet { position: relative; width: 100%; max-width: 480px; margin: 0 auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 92%; overflow-y: auto; transform: translateY(100%); transition: transform var(--dur) var(--ease); scrollbar-width: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--card-tint); margin: 0 auto 8px; }
.sheet-head { position: relative; text-align: center; padding: 8px 48px 20px; }
.sheet-head h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.sheet-head p { color: var(--text-2); font-size: 15px; line-height: 22px; margin-top: 2px; }
.sheet-x { position: absolute; right: 0; top: 4px; width: 36px; height: 36px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--icon); }

.qr-card { background: var(--card); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; align-items: center; }
.qr { width: 220px; height: 220px; background: #fff; border-radius: 16px; padding: 14px; display: flex; align-items: center; justify-content: center; animation: pop .4s var(--ease); }
.qr svg { width: 100%; height: 100%; }
.qr-user { margin-top: 16px; font-size: 20px; line-height: 28px; font-weight: 700; }
.qr-sub { color: var(--text-2); font-size: 14px; }
.qr-addr { margin-top: 12px; max-width: 280px; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 20px; color: var(--text-2); word-break: break-all; }

/* домен .ocean */
.domain-card { background: var(--card); border-radius: 20px; padding: 16px; margin-bottom: 24px; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
.domain-card .domain-name { font-size: 20px; line-height: 28px; font-weight: 700; word-break: break-all; }
.domain-card .row-sub { grid-column: 1; }
.domain-card .field-btn { grid-column: 2; grid-row: 1 / span 2; }
.domain-suffix { color: var(--text-2); font-weight: 600; font-size: 16px; flex-shrink: 0; }
.domain-res { min-height: 48px; margin-bottom: 8px; }
.domain-ok { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 15px; font-weight: 600; line-height: 20px; padding: 12px 4px; }
.domain-ok .ti { font-size: 20px; }

/* ---------- отправка ---------- */
.resolve { min-height: 76px; margin-top: 12px; }
.found { background: var(--card); border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; animation: fadeUp .3s var(--ease) both; }
.found .ti-circle-check { color: var(--green); font-size: 24px; margin-left: auto; }
.resolving { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; padding: 12px 4px; }
.to-chip { margin: 8px auto 0; width: fit-content; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 20px; background: var(--card); font-size: 14px; font-weight: 600; }
.amount-box { text-align: center; padding: 40px 0 8px; }
.amount-line { display: flex; align-items: baseline; justify-content: center; gap: 10px; font-size: 44px; line-height: 52px; font-weight: 600; transition: font-size .2s; }
.amount-line input { background: none; border: 0; outline: 0; font-weight: 600; font-size: inherit; text-align: right; min-width: 1ch; caret-color: var(--accent); padding: 0; }
.amount-line input::placeholder { color: var(--text-3); }
.amount-line .amount-cur { color: var(--text-2); }
.amount-line.bad, .amount-line.bad input { color: var(--red); }
.asset-switch { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 20px; background: var(--card); font-weight: 600; font-size: 14px; transition: transform .15s; }
.asset-switch:active { transform: scale(.95); }
.asset-switch .ava { width: 24px; height: 24px; font-size: 14px; }
.asset-switch .ti-selector { color: var(--text-2); font-size: 16px; }
.avail { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-2); font-size: 14px; }
.max { color: var(--accent); font-weight: 600; font-size: 14px; padding: 4px 10px; border-radius: 10px; background: rgba(69, 174, 245, .12); }
.confirm { text-align: center; padding-top: 16px; }
.confirm-ava { position: relative; width: 80px; margin: 0 auto 16px; }
.confirm-ava .badge { position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--bg); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.confirm-amount { font-size: 32px; line-height: 40px; font-weight: 700; margin: 4px 0 24px; }
.kv { text-align: left; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; position: relative; }
.kv-row + .kv-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.kv-row > span:first-child { color: var(--text-2); }
.kv-row > span:last-child { text-align: right; font-weight: 600; word-break: break-word; }
.kv-row small { display: block; color: var(--text-2); font-size: 14px; font-weight: 500; }
.kv-row .ok { color: var(--green); }
.done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: 40px; }
.done-ic { width: 112px; height: 112px; margin-bottom: 24px; }
.done-ic .c { stroke-dasharray: 302; stroke-dashoffset: 302; animation: draw .6s var(--ease) forwards; }
.done-ic .k { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .4s .45s var(--ease) forwards; }
.done-ic .bg { transform-origin: center; animation: pop .5s .1s var(--ease) both; }

/* ---------- подарки ---------- */
.gifts { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.gifts::-webkit-scrollbar { display: none; }
.gifts .gift { flex: 0 0 120px; }
.gift { display: block; background: var(--card); border-radius: 16px; overflow: hidden; text-align: left; width: 100%; transition: transform .15s; }
.gift:active { transform: scale(.97); }
.gift-art { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 60px; line-height: 1; }
.gift-art.big { border-radius: 24px; font-size: 120px; }
.gift-info { padding: 10px 12px 12px; }
.gift-name { font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-num { font-size: 13px; line-height: 16px; color: var(--text-2); }
.gift-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gift-grid .gift-art { font-size: 72px; }
.gift-grid .gift-name { font-size: 15px; }
.gift-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; flex-shrink: 0; }
.gift-mini { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 10px; margin-top: 4px; }
.gift-mini .gift-art { width: 52px; border-radius: 12px; font-size: 30px; }
.bd-green  { background: radial-gradient(circle at 50% 42%, #86C989 0%, #3C7F52 72%); }
.bd-violet { background: radial-gradient(circle at 50% 42%, #B48CEB 0%, #5A3E9E 72%); }
.bd-orange { background: radial-gradient(circle at 50% 42%, #F4B27A 0%, #A65330 72%); }
.bd-blue   { background: radial-gradient(circle at 50% 42%, #86CBF5 0%, #2C6AA8 72%); }
.bd-pink   { background: radial-gradient(circle at 50% 42%, #F3A3C6 0%, #A3466F 72%); }
.bd-gold   { background: radial-gradient(circle at 50% 42%, #F2D483 0%, #A07A23 72%); }
.gift-art { position: relative; overflow: hidden; }
.gift-art .lottie { width: 80%; height: 80%; position: relative; z-index: 1; }
.gift-pattern { position: absolute; inset: 0; pointer-events: none; }
.gift-pattern i { position: absolute; transform: translate(-50%, -50%); background: var(--pc);
  -webkit-mask: var(--pm) center / contain no-repeat; mask: var(--pm) center / contain no-repeat; }
.nft-title { font-size: 26px; line-height: 34px; font-weight: 700; margin-top: 14px; word-break: break-all; }
.nft-link { color: var(--accent); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-row > span:first-child { flex-shrink: 0; }

/* маркет */
.mk-search { margin-top: 12px; min-height: 48px; }
.mk-search .ti { color: var(--text-3); font-size: 20px; }
.chips { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.center-chips { justify-content: center; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--card); color: var(--text-2); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.chip.on { background: var(--accent); color: #fff; }
.chip-end { margin-left: auto; }
.mk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mk-stats > div { background: var(--card); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.mk-stats span { font-weight: 700; font-size: 17px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-stats small { color: var(--text-2); font-size: 12px; line-height: 16px; }
.mk-sell { position: sticky; bottom: 12px; margin-top: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.mini-btn { height: 32px; min-width: 32px; padding: 0 12px; border-radius: 16px; background: var(--card-tint); font-weight: 600; font-size: 13px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.mini-btn.ok { background: var(--green); color: #fff; }
.mini-btn + .mini-btn { margin-left: -8px; }
.sheet-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.mk-art { flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.in-profile { color: var(--accent); }
.mk-art .gift-art { width: 100%; height: 100%; font-size: 24px; }
.mk-badge { margin-top: 12px; width: 100%; display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 12px 14px; font-weight: 600; color: var(--accent); }
.mk-badge .ti-chevron-right { margin-left: auto; color: var(--text-3); }

/* обмен и стейкинг */
.earn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.earn-card { background: var(--card); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; transition: background .2s; }
.earn-card:active { background: var(--card-tint); }
.earn-card .ti { font-size: 26px; color: var(--accent); margin-bottom: 6px; }
.earn-card b { font-size: 16px; line-height: 22px; }
.earn-card span { color: var(--text-2); font-size: 13px; line-height: 18px; }
.ex-card { position: relative; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ex-side { background: var(--card); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; min-height: 126px; justify-content: center; }
.ex-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ex-line input, .ex-out { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 32px; line-height: 40px; font-weight: 600; caret-color: var(--accent); }
.ex-line.bad input { color: var(--red); }
.ex-flip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: var(--card-tint); border: 4px solid var(--bg); font-size: 20px; display: flex; align-items: center; justify-content: center; z-index: 1; }
.asset-switch.static { pointer-events: none; }
.stake-hero { margin-top: 8px; background: linear-gradient(135deg, #1F4F86 0%, #2E86D4 100%); border-radius: 20px; padding: 20px; text-align: center; }
.stake-hero .muted { color: rgba(255, 255, 255, .75); }
.stake-sum { font-size: 32px; line-height: 40px; font-weight: 700; margin: 4px 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.plan { background: var(--card); border-radius: 16px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: background .2s, transform .15s; }
.plan:active { transform: scale(.97); background: var(--card-tint); }
.plan-pct { font-size: 22px; line-height: 28px; font-weight: 700; color: var(--green); }
.plan-days { color: var(--text-2); font-size: 13px; }
.ava span { pointer-events: none; }

.gift-hero { position: relative; padding-top: 4px; }
.gift-hero .gift-art.big { width: 100%; max-width: 280px; margin: 0 auto; }
.gift-hero .sheet-x { position: absolute; right: 0; top: 4px; }
.gift-title { font-size: 24px; line-height: 32px; font-weight: 700; margin: 16px 0 14px; text-align: center; }
.gift-table { border: 1px solid #333E4C; border-radius: 16px; overflow: hidden; background: #171E28; }
.gt-row { display: grid; grid-template-columns: 38% 1fr; }
.gt-row + .gt-row { border-top: 1px solid #333E4C; }
.gt-row > * { padding: 12px 14px; display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 15px; line-height: 22px; }
.gt-row > :first-child { background: #232C38; border-right: 1px solid #333E4C; }
.gt-addr { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 500 !important; color: var(--text-2); text-align: left; word-break: break-all; }
.gt-user { color: var(--accent); }
.gt-user .ava { font-size: 11px; }
.rar { font-style: normal; font-size: 13px; line-height: 18px; font-weight: 600; color: #A9C4DF; background: #33404F; border-radius: 8px; padding: 1px 8px; }

.wd-gift { width: 200px; margin: 8px auto 0; }
.wd-gift .gift-art.big { font-size: 110px; }
.route-arrow { display: flex; justify-content: center; color: var(--text-2); font-size: 20px; height: 8px; align-items: center; position: relative; z-index: 1; }
.wd-pearl { background: #16304D; overflow: hidden; }
.wd-pearl svg { width: 64px; height: 64px; }
.note { color: var(--text-2); font-size: 14px; line-height: 20px; margin-top: 16px; text-align: center; }

/* ---------- сканер ---------- */
.scanner { background: #000 !important; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 50%; top: 45%; width: 248px; height: 248px; transform: translate(-50%, -50%); border-radius: 28px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); }
.scan-line { position: absolute; left: 16px; right: 16px; height: 2px; background: var(--accent); border-radius: 1px; box-shadow: 0 0 12px var(--accent); animation: scan 2.2s ease-in-out infinite; }
.scan-top { position: relative; z-index: 1; }
.scan-text { position: absolute; left: 0; right: 0; top: calc(45% + 150px); text-align: center; font-weight: 600; padding: 0 24px; }
.scan-fallback { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* ---------- тосты ---------- */
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; pointer-events: none; padding: 0 16px; }
.toast { background: var(--card-tint); padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 20px; font-weight: 600; display: flex; gap: 8px; align-items: center; animation: toastIn .35s var(--ease) both; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); max-width: 398px; }
.toast .ti { font-size: 20px; color: var(--green); }
.toast.err .ti { color: var(--red); }
.toast.out { animation: toastOut .25s ease-in both; }

/* ---------- скелетоны и появление ---------- */
.sk { background: linear-gradient(90deg, var(--card) 25%, #26303E 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 10px; }
.sk-circle { border-radius: 50%; }
.stagger > * { animation: fadeUp .5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .2s; }
.stagger > *:nth-child(6) { animation-delay: .25s; }
.stagger > *:nth-child(7) { animation-delay: .3s; }
.stagger > *:nth-child(n+8) { animation-delay: .35s; }
.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes ripple { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes tabPop { 0% { transform: scale(1); } 40% { transform: scale(.82); } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px) scale(.96); } }
@keyframes scan { 0%, 100% { top: 16px; } 50% { top: calc(100% - 18px); } }

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

/* ---------- аналитика маркета ---------- */
.mk-analytics { margin: 0 0 12px; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.an-grid > div { background: var(--card); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.an-grid span { font-weight: 700; font-size: 18px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-grid small { color: var(--text-2); font-size: 12px; line-height: 16px; }
.an-card { background: var(--card); border-radius: 20px; padding: 16px; }
.an-chart { width: 100%; height: 110px; display: block; }
.an-chart rect { fill: var(--accent); }
.an-chart.an-line { height: 100px; }
.an-chart polyline { stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.an-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.an-empty { text-align: center; font-size: 14px; padding: 16px 0; }
.chg.up { color: var(--green); }
.chg.down { color: var(--red); }
.sec .more { background: none; }

/* ---------- фильтры подарков ---------- */
.gf-chips { margin-top: -4px; }
.gf-chips .chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-chips .chip .ti { font-size: 16px; }
.fo-list .row { padding-right: 44px; }
.fo-on { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 22px; }
.tag.rare { color: #F5A524; background: rgba(245, 165, 36, .14); }

/* ---------- стоимость коллекции ---------- */
.pf-card { margin-top: 16px; width: 100%; border-radius: 16px; background: var(--card); display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; transition: background .2s; }
.pf-card:active { background: var(--card-tint); }
.pf-card .lead-ic { font-size: 26px; color: var(--accent); }
.pf-card > .ti-chevron-right { margin-left: auto; color: var(--text-3); font-size: 20px; }
.pf-main { min-width: 0; }
.pf-label { color: var(--text-2); font-size: 13px; line-height: 18px; }
.pf-value { font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pf-value .chg { font-size: 14px; font-weight: 600; }
.pf-sub { color: var(--text-3); font-size: 13px; line-height: 18px; }

/* ---------- публичная витрина ---------- */
.sc-wrap { padding-top: 32px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.sc-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sc-head .h1 { margin: 16px 0 0; }
.sc-stats { display: flex; gap: 8px; margin-top: 16px; width: 100%; }
.sc-stats > div { flex: 1; background: var(--card); border-radius: 16px; padding: 10px 8px; display: flex; flex-direction: column; min-width: 0; }
.sc-stats span { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-stats small { color: var(--text-2); font-size: 12px; line-height: 16px; }
.sc-cta { margin-top: 32px; text-decoration: none; }
.sc-url { max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-card[hidden], .gf-chips[hidden] { display: none; }
.link-card[hidden], .set-row[hidden] { display: none; }

/* кошелёк в профиле и обычные подарки */
.wc-preview { margin-top: 20px; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--card); font-weight: 600; transition: opacity .25s; }
.wc-preview.off { opacity: .45; }
.wc-gem { font-size: 22px; line-height: 1; }
.wc-line { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-row { gap: 12px; }
.pg-art { width: 48px; height: 48px; flex-shrink: 0; }
.pg-art .lottie, .pg-confirm-art .lottie { width: 100%; height: 100%; }
.pg-del { width: auto; height: 36px; padding: 0 12px; border-radius: 12px; font-size: 14px; flex-shrink: 0; }
.pg-keep { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.pg-confirm { text-align: center; padding-top: 8px; }
.pg-confirm-art { width: 120px; height: 120px; margin: 0 auto; }
.pg-title { font-size: 22px; line-height: 28px; font-weight: 700; margin-top: 12px; }
.pg-confirm .muted { margin-top: 6px; }
