:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-deep: #060608;
  --surface: #141417;
  --surface-2: #1b1b20;
  --surface-3: #222229;
  --border: #2d2d35;
  --border-bright: #3b3b45;
  --text: #f7f7fa;
  --text-2: #aaaab5;
  --muted: #71717d;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-deep: #5b21b6;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.13);
  --warning: #f5c451;
  --warning-soft: rgba(245, 196, 81, 0.13);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.13);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.13);
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 22px;
  --radius-xl: 28px;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.36);
  --safe-top: max(0px, var(--tg-safe-area-inset-top, 0px));
  --safe-bottom: max(0px, var(--tg-safe-area-inset-bottom, 0px));
  --content-safe-bottom: max(0px, var(--tg-content-safe-area-inset-bottom, 0px));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% -8%, rgba(139, 92, 246, 0.18), transparent 31rem),
    radial-gradient(circle at -20% 24%, rgba(91, 33, 182, 0.12), transparent 25rem),
    var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 1.35em;
  height: 1.35em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.noscript {
  margin: 20px;
  padding: 16px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-m);
  background: var(--danger-soft);
}

.app-shell {
  width: 100%;
  max-width: 620px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

.app-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 50%;
  display: flex;
  width: min(100%, 620px);
  min-height: calc(68px + var(--safe-top));
  padding: calc(12px + var(--safe-top)) 18px 10px;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(24px) saturate(150%);
}

.brand {
  display: inline-flex;
  min-width: 0;
  padding: 0;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.24), rgba(91, 33, 182, 0.1));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  color: #b69afc;
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand-copy strong {
  overflow: hidden;
  max-width: 220px;
  font-size: 17px;
  line-height: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 15px;
  text-transform: uppercase;
}

.header-avatar,
.avatar {
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: white;
  font-weight: 750;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.header-avatar {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 5px 20px rgba(91, 33, 182, 0.24);
  cursor: pointer;
}

.header-avatar img,
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.view {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(86px + var(--safe-top)) 18px calc(108px + var(--safe-bottom));
  outline: 0;
}

.bottom-nav {
  position: fixed;
  z-index: 35;
  bottom: calc(10px + var(--content-safe-bottom));
  left: 50%;
  display: grid;
  width: calc(min(100%, 620px) - 28px);
  max-width: 560px;
  min-height: 72px;
  padding: 6px;
  grid-template-columns: repeat(4, 1fr);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 23px;
  background: rgba(25, 25, 30, 0.91);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(24px) saturate(150%);
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 58px;
  padding: 7px 3px 5px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item svg {
  width: 23px;
  height: 23px;
}

.nav-item.is-active {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.17), rgba(139, 92, 246, 0.06));
  color: #c4b5fd;
}

.nav-item:active {
  transform: scale(0.96);
}

.eyebrow {
  margin: 0 0 4px;
  color: #b9a5fa;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(27px, 8vw, 34px);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

h2 {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h3 {
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.25;
}

.page-intro {
  margin-bottom: 20px;
}

.page-intro p:last-child,
.muted {
  color: var(--text-2);
}

.page-intro p:last-child {
  max-width: 38rem;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.5;
}

.wallet-card {
  position: relative;
  overflow: hidden;
  min-height: 236px;
  padding: 22px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 4%, rgba(196, 181, 253, 0.18), transparent 45%),
    linear-gradient(145deg, rgba(91, 33, 182, 0.34), rgba(27, 27, 32, 0.98) 55%, rgba(19, 19, 22, 0.98));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.08);
}

.wallet-card::before {
  position: absolute;
  top: -100px;
  right: -65px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  content: "";
}

.wallet-label {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  gap: 7px;
  color: #c9c3d8;
  font-size: 14px;
  font-weight: 600;
}

.wallet-label svg {
  width: 18px;
}

.balance-value {
  position: relative;
  margin-bottom: 14px;
  font-size: clamp(38px, 12vw, 52px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1;
}

.balance-value span {
  color: #c4b5fd;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.deposit-chip {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.11);
  color: #cabafd;
  font-size: 13px;
  font-weight: 650;
}

.deposit-chip svg {
  width: 17px;
}

.wallet-actions {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-button {
  display: flex;
  min-height: 52px;
  padding: 9px 13px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.quick-button.primary {
  border-color: rgba(196, 181, 253, 0.18);
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  box-shadow: 0 8px 24px rgba(91, 33, 182, 0.27);
}

.quick-button:disabled,
.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: saturate(0.5);
}

.quick-button svg {
  width: 19px;
}

.announcement {
  position: relative;
  display: grid;
  margin: 14px 0;
  padding: 15px 16px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-m);
  background: rgba(20, 20, 23, 0.88);
  cursor: pointer;
}

.announcement-icon,
.icon-box {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: #bba5fc;
}

.announcement-icon {
  width: 40px;
  height: 40px;
}

.announcement strong,
.announcement small {
  display: block;
}

.announcement strong {
  margin-bottom: 2px;
  font-size: 14px;
}

.announcement small {
  overflow: hidden;
  color: var(--text-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement > svg {
  color: var(--muted);
}

.button {
  display: inline-flex;
  min-height: 52px;
  padding: 12px 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 720;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.button:active {
  transform: scale(0.985);
}

.button-primary {
  border-color: rgba(196, 181, 253, 0.15);
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  box-shadow: 0 10px 30px rgba(91, 33, 182, 0.3), inset 0 1px rgba(255, 255, 255, 0.14);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.045);
}

.button-danger {
  border-color: rgba(239, 68, 68, 0.2);
  background: var(--danger-soft);
  color: #fca5a5;
}

.button-ghost {
  min-height: 44px;
  padding: 8px 10px;
  border-color: transparent;
  background: transparent;
  color: #bda9fc;
}

.button-small {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 13px;
  font-size: 13px;
}

.button-wide {
  width: 100%;
}

.create-deal-cta {
  width: 100%;
  margin: 2px 0 24px;
}

.section-heading {
  display: flex;
  min-height: 36px;
  margin: 0 2px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
}

.text-button {
  min-height: 36px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: #bda9fc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: rgba(20, 20, 23, 0.92);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.panel {
  padding: 18px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.list-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 84px;
  padding: 15px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(20, 20, 23, 0.9);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.list-card:active {
  border-color: var(--border-bright);
  background: var(--surface-2);
}

.icon-box {
  width: 44px;
  height: 44px;
}

.icon-box.success {
  background: var(--success-soft);
  color: var(--success);
}

.icon-box.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.icon-box.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.list-main {
  min-width: 0;
}

.list-title,
.list-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-title {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 700;
}

.list-subtitle {
  color: var(--text-2);
  font-size: 12px;
}

.list-aside {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
}

.list-amount {
  font-size: 14px;
  font-weight: 720;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  min-height: 24px;
  padding: 4px 8px;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.status.success {
  background: var(--success-soft);
  color: #72dc98;
}

.status.warning {
  background: var(--warning-soft);
  color: #f3cf70;
}

.status.danger {
  background: var(--danger-soft);
  color: #fb8a8a;
}

.status.info {
  background: var(--info-soft);
  color: #8fc1fb;
}

.status.muted {
  background: rgba(255, 255, 255, 0.065);
  color: var(--text-2);
}

.empty-state {
  display: flex;
  min-height: 200px;
  padding: 28px 22px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--border);
  border-radius: var(--radius-l);
  background: rgba(20, 20, 23, 0.55);
  text-align: center;
}

.empty-state .icon-box {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
}

.empty-state h3 {
  margin-bottom: 7px;
  font-size: 17px;
}

.empty-state p {
  max-width: 300px;
  margin-bottom: 16px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

.segmented {
  display: flex;
  margin: 0 -18px 18px;
  padding: 0 18px 3px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
  display: none;
}

.segment {
  min-height: 39px;
  padding: 8px 14px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.segment.is-active {
  border-color: rgba(167, 139, 250, 0.25);
  background: var(--accent-soft);
  color: #d4c8fd;
}

.profile-hero {
  padding: 22px 18px;
  text-align: center;
}

.avatar-large {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border: 4px solid var(--surface);
  outline: 2px solid var(--accent);
  font-size: 27px;
  box-shadow: 0 12px 36px rgba(91, 33, 182, 0.22);
}

.profile-hero h1 {
  margin-bottom: 3px;
  font-size: 24px;
}

.profile-handle {
  margin-bottom: 12px;
  color: var(--text-2);
}

.rating-pill {
  display: inline-flex;
  padding: 7px 11px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(245, 196, 81, 0.2);
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 13px;
  font-weight: 700;
}

.rating-pill svg {
  width: 16px;
  height: 16px;
}

.stats-grid {
  display: grid;
  margin: 12px 0;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.stat-card svg {
  margin-bottom: 12px;
  color: #bda9fc;
}

.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card strong {
  margin-bottom: 4px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.stat-card span {
  color: var(--text-2);
  font-size: 12px;
}

.menu-list {
  display: grid;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--surface);
}

.menu-row {
  display: grid;
  width: 100%;
  min-height: 60px;
  padding: 12px 15px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.menu-row:last-child {
  border-bottom: 0;
}

.menu-row > svg:first-child {
  color: #bda9fc;
}

.menu-row > svg:last-child {
  color: var(--muted);
}

.menu-row strong,
.menu-row small {
  display: block;
}

.menu-row strong {
  font-size: 14px;
}

.menu-row small {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 11px;
}

.faq-intro {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--radius-l);
  background: linear-gradient(145deg, rgba(91, 33, 182, 0.2), rgba(20, 20, 23, 0.9));
}

.faq-intro .icon-box {
  margin-bottom: 14px;
}

.faq-intro p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.faq-list {
  display: grid;
  margin-top: 14px;
  gap: 9px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}

.faq-item summary {
  position: relative;
  min-height: 60px;
  padding: 17px 48px 17px 17px;
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  transform: translateY(-65%) rotate(45deg);
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  content: "";
  transition: transform 180ms ease;
}

.faq-item[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.faq-answer {
  padding: 0 17px 17px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.loading-screen {
  display: grid;
  gap: 14px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--surface);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  content: "";
  animation: shimmer 1.4s infinite;
}

.skeleton-profile {
  width: 48%;
  height: 24px;
}

.skeleton-balance {
  height: 236px;
}

.skeleton-actions {
  height: 56px;
}

.skeleton-card {
  height: 160px;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

/* Контейнер модалки.
 *
 * Затемнение и само окно лежат в разметке соседями, а не вложенно:
 * так клик по окну не всплывает на backdrop и не закрывает диалог.
 * Значит, раскладывать их обязан этот контейнер — без него окно уезжало
 * в обычный поток под затемнение, и любая модалка была невидимой. */
#modal-root {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
}

#modal-root.is-open {
  display: flex;
  padding: max(18px, var(--safe-top)) 0 0;
  align-items: flex-end;
  justify-content: center;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(6px);
  animation: fade-in 180ms ease-out;
}

.modal-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 620px);
  max-height: calc(100dvh - max(18px, var(--safe-top)));
  padding-bottom: max(18px, var(--safe-bottom));
  flex-direction: column;
  border: 1px solid var(--border-bright);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: #111114;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
  animation: sheet-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-sheet.full {
  height: calc(100dvh - max(18px, var(--safe-top)));
}

.modal-grabber {
  width: 42px;
  height: 4px;
  margin: 9px auto 2px;
  border-radius: 999px;
  background: #3b3b43;
}

/* Шапка намеренно низкая. Раньше она занимала 62px ради одного заголовка
 * и крестика, съедая верх и без того короткой шторки. Заголовок прижат
 * влево, крестик — компактный: на его колонку хватает 34px. */
.modal-header {
  display: grid;
  min-height: 44px;
  padding: 2px 8px 2px 16px;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-header .icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
}

.icon-button.ghost {
  border-color: transparent;
  background: transparent;
}

.modal-body {
  overflow: auto;
  padding: 16px 16px 22px;
  overscroll-behavior: contain;
}

.modal-body.has-footer {
  padding-bottom: 12px;
}

.modal-footer {
  display: flex;
  padding: 12px 18px max(12px, var(--safe-bottom));
  gap: 10px;
  border-top: 1px solid var(--border);
  background: rgba(17, 17, 20, 0.96);
}

.modal-footer .button {
  flex: 1;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes sheet-in {
  from { transform: translateY(30px); opacity: 0.6; }
}

.form {
  display: grid;
  gap: 18px;
}

/* Содержимое модалок: поля, выбор способа оплаты, карточка сделки.
 * Вся эта разметка существовала в app.js, но стилей для неё не было —
 * формы показывались браузерными дефолтами поверх тёмной темы. */

.form-field {
  display: grid;
  gap: 8px;
}

.form-label {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.form-input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  /* 16px, а не меньше: на iOS поле с меньшим шрифтом зумит всю страницу. */
  font-family: inherit;
  font-size: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.form-input::placeholder {
  color: var(--muted);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

textarea.form-input {
  min-height: 92px;
  line-height: 1.45;
  resize: vertical;
}

.empty-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.method-row {
  position: relative;
  display: grid;
  min-height: 66px;
  padding: 12px 14px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.method-row input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.method-row:has(input[type="radio"]:checked),
.method-row.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.method-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-3);
  color: #bba5fc;
}

/* Логотип вместо рисованной иконки. Официальный аватар взят через Bot API
 * и вшит как data:URI — CSP запрещает ходить за картинками наружу. */
.method-icon.is-logo {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.method-icon.is-cryptobot {
  background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEEgASAAAD/4gHbSUNDX1BST0ZJTEUAAQEAAAHLAAAAAAJAAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLVF0BQ8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlyWFlaAAAA8AAAABRnWFlaAAABBAAAABRiWFlaAAABGAAAABR3dHB0AAABLAAAABRjcHJ0AAABQAAAAAxyVFJDAAABTAAAACBnVFJDAAABTAAAACBiVFJDAAABTAAAACBkZXNjAAABbAAAAF9YWVogAAAAAAAAb58AADj0AAADkVhZWiAAAAAAAABilgAAt4cAABjcWFlaIAAAAAAAACShAAAPhQAAttNYWVogAAAAAAAA808AAQAAAAEWwnRleHQAAAAATi9BAHBhcmEAAAAAAAMAAAACZmYAAPKnAAANWQAAE9AAAApbZGVzYwAAAAAAAAAFc1JHQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/2wBDAAICAgICAQICAgIDAgIDAwYEAwMDAwcFBQQGCAcJCAgHCAgJCg0LCQoMCggICw8LDA0ODg8OCQsQERAOEQ0ODg7/2wBDAQIDAwMDAwcEBAcOCQg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y7XlMXdaBVF+qYrFrFbmNU+bohi813TZ+6FNgRRNQqydFTnPJSzoRgTuAqqSw00VmZRJ1TwSmYFVk12UMmuyvTVCXEUmzVeQV2ThuuynUJ0YijZhIN4VrRqqwaFSzBNJKds1eDorM3RCZ0+dNTsCKzdE2Y1Q2fuE4fqhGBEhysBQgdqrmnqhQuYh3v1Qzn0qpxCRVCPJShZwarPE9qbxQhiVGpTrJbIvxQl4oQtTylU8pUYUV4oS8QIWp5SqeUlkYUT4g5T+IOfwQlSnqeUWRhRPiDkp/EHP4IWp5SqeUIworxAl4oQtTymqUWRhRfihLxQhanlKp5SoworxQnETXRCVPKdpSWRhRzX8olj1x7SaIqGappTS1f//Z");
}

.method-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

/* Без nowrap/ellipsis: названия способов длинные («Банковская карта»),
 * и на узких экранах их обрезало в середине слова. */
.method-title {
  color: var(--text);
  font-weight: 650;
  line-height: 1.3;
}

.method-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

/* --- Экран счёта на пополнение --- */

.pay-amount {
  display: grid;
  padding: 18px 16px;
  justify-items: center;
  gap: 4px;
  border: 1px solid var(--accent);
  border-radius: 18px;
  background: var(--accent-soft);
  text-align: center;
}

.pay-amount span {
  color: var(--text-2);
  font-size: 13px;
}

.pay-amount b {
  font-size: 27px;
  font-weight: 760;
  letter-spacing: -0.01em;
  line-height: 1.15;
  word-break: break-all;
}

/* Адрес кошелька — целиком, моноширинно и с переносом.
 * Обрезать его нельзя: по обрезанному адресу перевод не сделать. */
.copy-field {
  display: grid;
  width: 100%;
  padding: 13px 15px;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.copy-field .copy-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
}

.copy-field .copy-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pay-status {
  display: flex;
  padding: 13px 15px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}

.pay-status.is-paid {
  border-color: var(--success);
  background: var(--success-soft);
  color: #86efac;
}

.deal-detail {
  display: grid;
  padding: 2px 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.deal-detail-row {
  display: flex;
  padding: 12px 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.deal-detail-row:last-child {
  border-bottom: 0;
}

.deal-detail-row span {
  color: var(--text-2);
  font-size: 13px;
}

.deal-detail-row b {
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.deal-desc {
  margin: 14px 0 0;
  padding: 14px 15px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.modal-actions {
  display: grid;
  margin-top: 18px;
  gap: 10px;
}

/* Карточка-строка без действия: те же рамки, но курсор не обманывает. */
.list-card.static {
  cursor: default;
}

.field {
  display: grid;
  gap: 8px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field label,
.field-label {
  color: #ededf2;
  font-size: 14px;
  font-weight: 680;
}

.input-wrap {
  position: relative;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  caret-color: var(--accent);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.input::placeholder,
.textarea::placeholder {
  color: #62626d;
}

.input.with-suffix {
  padding-right: 62px;
}

.input-suffix {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-2);
  font-weight: 650;
}

.textarea {
  min-height: 106px;
  resize: vertical;
  line-height: 1.45;
}

.select {
  appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, #888892 50%), linear-gradient(135deg, #888892 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.hint,
.field-error {
  font-size: 12px;
  line-height: 1.45;
}

.hint {
  color: var(--text-2);
}

.field-error {
  color: #fb8a8a;
}

.method-list,
.choice-grid {
  display: grid;
  gap: 9px;
}

.method-option,
.choice-card {
  position: relative;
  display: grid;
  min-height: 68px;
  padding: 13px 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid.two .choice-card {
  min-height: 118px;
  padding: 15px;
  grid-template-columns: 1fr;
  align-content: start;
}

.method-option input,
.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-option:has(input:checked),
.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.15);
}

.method-copy strong,
.method-copy small,
.choice-card strong,
.choice-card small {
  display: block;
}

.method-copy strong,
.choice-card strong {
  font-size: 14px;
}

.method-copy small,
.choice-card small {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.35;
}

.radio-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-bright);
  border-radius: 50%;
}

.method-option:has(input:checked) .radio-mark,
.choice-card:has(input:checked) .radio-mark {
  border: 6px solid var(--accent);
}

.notice {
  display: grid;
  padding: 13px 14px;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 14px;
  background: var(--info-soft);
  color: #bedbfe;
  font-size: 12px;
  line-height: 1.5;
}

.notice.warning {
  border-color: rgba(245, 196, 81, 0.16);
  background: var(--warning-soft);
  color: #f6da8a;
}

.notice.danger {
  border-color: rgba(239, 68, 68, 0.18);
  background: var(--danger-soft);
  color: #fca5a5;
}

.notice.success {
  border-color: rgba(34, 197, 94, 0.18);
  background: var(--success-soft);
  color: #8ae2a9;
}

.summary-card {
  display: grid;
  padding: 5px 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.summary-row {
  display: flex;
  min-height: 48px;
  padding: 10px 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row span {
  color: var(--text-2);
}

.summary-row strong {
  max-width: 60%;
  text-align: right;
  overflow-wrap: anywhere;
}

.requisite-box {
  padding: 18px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--accent-soft), rgba(20, 20, 23, 0.9));
}

.requisite-box small,
.requisite-box code {
  display: block;
}

.requisite-box small {
  margin-bottom: 8px;
  color: var(--text-2);
}

.requisite-box code {
  margin-bottom: 13px;
  color: #e4ddff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.copy-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-line code {
  min-width: 0;
  margin: 0;
  flex: 1;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  min-height: 68px;
  padding-bottom: 12px;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.timeline-item:not(:last-child)::after {
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 15px;
  width: 2px;
  background: var(--border);
  content: "";
}

.timeline-dot {
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}

.timeline-item.done .timeline-dot {
  border-color: rgba(34, 197, 94, 0.25);
  background: var(--success-soft);
  color: var(--success);
}

.timeline-item.current .timeline-dot {
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--accent-soft);
  color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.07);
}

.timeline-copy {
  padding-top: 4px;
}

.timeline-copy strong,
.timeline-copy small {
  display: block;
}

.timeline-copy strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.timeline-copy small {
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.4;
}

.search-results {
  display: grid;
  margin-top: 10px;
  gap: 8px;
}

.user-result {
  display: grid;
  width: 100%;
  min-height: 62px;
  padding: 10px 12px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.user-result .avatar {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.user-result strong,
.user-result small {
  display: block;
}

.user-result small {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 11px;
}

.selected-user {
  display: grid;
  padding: 12px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--accent);
  border-radius: 15px;
  background: var(--accent-soft);
}

.selected-user .avatar {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.selected-user strong,
.selected-user small {
  display: block;
}

.selected-user small {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 11px;
}

.toast-region {
  position: fixed;
  z-index: 200;
  top: calc(76px + var(--safe-top));
  right: 14px;
  left: 14px;
  display: grid;
  max-width: 480px;
  margin: 0 auto;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  padding: 13px 14px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-bright);
  border-radius: 15px;
  background: rgba(28, 28, 33, 0.96);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
  animation: toast-in 220ms ease-out;
}

.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }
.toast.info svg { color: var(--info); }

@keyframes toast-in {
  from { transform: translateY(-8px); opacity: 0; }
}

.network-indicator {
  position: fixed;
  z-index: 90;
  right: 14px;
  bottom: calc(92px + var(--safe-bottom));
  left: 14px;
  max-width: 520px;
  min-height: 42px;
  margin: 0 auto;
  padding: 10px 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 196, 81, 0.24);
  border-radius: 14px;
  background: rgba(57, 45, 19, 0.96);
  color: #f4d779;
  font-size: 12px;
  box-shadow: var(--shadow);
}

.network-indicator:not([hidden]) {
  display: flex;
}

.error-screen {
  display: flex;
  min-height: calc(100dvh - 210px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.error-screen .icon-box {
  width: 58px;
  height: 58px;
  margin-bottom: 15px;
}

.error-screen h1 {
  font-size: 23px;
}

.error-screen p {
  max-width: 330px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.detail-hero {
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--radius-l);
  background: linear-gradient(145deg, rgba(91, 33, 182, 0.2), rgba(20, 20, 23, 0.96));
}

.detail-hero .status {
  margin-bottom: 14px;
}

.detail-hero h2 {
  margin-bottom: 4px;
  font-size: 28px;
}

.detail-hero p {
  margin-bottom: 0;
  color: var(--text-2);
  font-size: 13px;
}

.admin-banner {
  display: grid;
  margin: 12px 0;
  padding: 16px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(245, 196, 81, 0.18);
  border-radius: 18px;
  background: var(--warning-soft);
  cursor: pointer;
}

.admin-banner .icon-box {
  background: rgba(245, 196, 81, 0.14);
  color: var(--warning);
}

.admin-banner strong,
.admin-banner small {
  display: block;
}

.admin-banner small {
  margin-top: 2px;
  color: #d2bc82;
  font-size: 11px;
}

.queue-section {
  margin-bottom: 22px;
}

.queue-actions {
  display: flex;
  margin-top: 12px;
  gap: 8px;
}

.queue-actions .button {
  min-width: 0;
  flex: 1;
}

.admin-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.admin-card + .admin-card {
  margin-top: 9px;
}

.admin-card-head {
  display: flex;
  margin-bottom: 11px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-card-head strong,
.admin-card-head small {
  display: block;
}

.admin-card-head small {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 11px;
}

.admin-card p {
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.divider {
  height: 1px;
  margin: 18px 0;
  background: var(--border);
}

/* flex: 0 0 auto — обязательно. Спиннер живёт внутри флекс-строк
 * (.pay-status, кнопки), и без запрета на сжатие его плющит по ширине:
 * вместо круга получается овал, который при вращении дёргается. */
.spinner {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (hover: hover) {
  .button:hover,
  .quick-button:hover,
  .icon-button:hover {
    border-color: rgba(167, 139, 250, 0.38);
  }

  .nav-item:hover,
  .text-button:hover {
    color: #d4c8fd;
  }

  .menu-row:hover,
  .list-card:hover,
  .user-result:hover {
    background: var(--surface-2);
  }
}

@media (min-width: 700px) {
  body {
    padding: 16px 0;
  }

  .app-shell {
    overflow: hidden;
    min-height: calc(100dvh - 32px);
    border: 1px solid var(--border);
    border-radius: 34px;
    background: rgba(9, 9, 11, 0.86);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5);
  }

  .app-header {
    top: 16px;
    width: 618px;
    border-radius: 34px 34px 0 0;
  }

  .bottom-nav {
    bottom: 28px;
  }
}

@media (max-width: 360px) {
  .view {
    padding-right: 14px;
    padding-left: 14px;
  }

  .app-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .wallet-card {
    padding: 18px;
  }

  .wallet-actions {
    right: 14px;
    left: 14px;
  }

  .quick-button {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 13px;
  }

  .choice-grid.two,
  .field-row {
    grid-template-columns: 1fr;
  }
}

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

/* ------------------------------------------------------------------ */
/* FAQ: раскрывающиеся вопросы. Карточка та же, что у списков, плюс
   поворот шеврона и раскрытие ответа. */
/* ------------------------------------------------------------------ */

.faq-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(20, 20, 23, 0.9);
  overflow: hidden;
}

.faq-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 15px;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.faq-chevron {
  display: flex;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.faq-chevron svg {
  width: 20px;
  height: 20px;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-item[open] summary {
  padding-bottom: 8px;
}

.faq-answer {
  padding: 0 15px 16px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

.faq-item:active {
  border-color: var(--border-bright);
}

/* ------------------------------------------------------------------ */
/* Android: догоняем насыщенность iOS.
 *
 * Интерфейс нарисован под Inter с дробными весами (650, 720, 780), но
 * Inter нет ни на одной системе. iOS подставляет SF Pro и держит эти
 * веса честно, Android — Roboto, у которого те же цифры выглядят заметно
 * тоньше. Поэтому на Android каждую ступень поднимаем, сохраняя разницу
 * между заголовком, подзаголовком и подписью. */
/* ------------------------------------------------------------------ */

:root[data-platform="android"] .brand-copy small,
:root[data-platform="android"] .wallet-label,
:root[data-platform="android"] .nav-item,
:root[data-platform="android"] .deposit-chip,
:root[data-platform="android"] .text-button,
:root[data-platform="android"] .segment,
:root[data-platform="android"] .form-label,
:root[data-platform="android"] .method-title,
:root[data-platform="android"] .copy-field .copy-label,
:root[data-platform="android"] .input-suffix,
:root[data-platform="android"] .requisite-box code,
:root[data-platform="android"] .field label,
:root[data-platform="android"] .field-label {
  font-weight: 700;
}

:root[data-platform="android"] .list-title,
:root[data-platform="android"] .quick-button,
:root[data-platform="android"] .rating-pill,
:root[data-platform="android"] .deal-detail-row b,
:root[data-platform="android"] .balance-value span,
:root[data-platform="android"] .faq-item summary,
:root[data-platform="android"] .faq-question,
:root[data-platform="android"] .button,
:root[data-platform="android"] .list-amount,
:root[data-platform="android"] .status,
:root[data-platform="android"] .eyebrow,
:root[data-platform="android"] h2,
:root[data-platform="android"] .header-avatar,
:root[data-platform="android"] .avatar,
:root[data-platform="android"] .pay-amount b {
  font-weight: 800;
}

:root[data-platform="android"] h1,
:root[data-platform="android"] .balance-value {
  font-weight: 900;
}
