/* ============================================================
   STACKLY — дизайн-система, светлая тема
   ------------------------------------------------------------
   Полный редизайн: белый/светло-серый фон, мягкие тени вместо
   hairline-обводок, крупные скругления (16-22px), один яркий
   акцент (индиго) для кнопок/ссылок/цен. Шрифт интерфейса —
   Onest, JetBrains Mono — для мелких "eyebrow"-подписей и
   табличных чисел.
   ============================================================ */

:root {
  --bg: #f5f5f8;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --panel-3: #f0f0f5;
  --line: rgba(20, 20, 30, 0.08);
  --line-2: rgba(20, 20, 30, 0.12);

  --text: #16161d;
  --text-2: #5b5b68;
  --muted: #9a9aa6;

  --accent: #5b4bf5;
  --accent-2: #7a6dff;
  --accent-soft: rgba(91, 75, 245, 0.1);
  --accent-line: rgba(91, 75, 245, 0.35);

  --ton: #1f8ae0;
  --ton-soft: rgba(31, 138, 224, 0.1);
  --usdt: #1fa878;
  --usdt-soft: rgba(31, 168, 120, 0.1);
  --ok: #1fa878;
  --ok-soft: rgba(31, 168, 120, 0.1);
  --warn: #d98a1b;
  --warn-soft: rgba(217, 138, 27, 0.12);
  --bad: #e14b4b;
  --bad-soft: rgba(225, 75, 75, 0.1);

  --r-lg: 22px;
  --r: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t: 0.18s var(--ease);

  --gutter: 18px;
  --nav-h: 60px;
  --bottom-h: 82px;

  /* Основная кнопка в шторках (style="background: var(--btn-primary-bg)") */
  --btn-primary-bg: var(--accent);
  --btn-primary-text: #ffffff;

  --shadow-card: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 20px -12px rgba(20, 20, 30, 0.12);
  --shadow-card-hover: 0 2px 6px rgba(20, 20, 30, 0.06), 0 14px 28px -14px rgba(20, 20, 30, 0.18);
  --shadow-toast: 0 18px 50px -12px rgba(20, 20, 30, 0.28);
  --shadow-sheet: 0 -18px 50px -16px rgba(20, 20, 30, 0.22);

  /* Токены редизайна экрана "Профиль" (ТЗ от 2026-09-21) — отдельные
     переменные, а не переопределение --text/--accent/--muted и т.д.:
     те используются по всему сайту, а этот набор — только внутри разметки
     профиля (см. ниже), чтобы не менять вид остальных экранов. */
  --profile-ink: #15122b;
  --profile-indigo: #4f3ff0;
  --profile-surface: #ffffff;
  --profile-muted: #7a7797;
  --profile-line: #eceaf5;
  --profile-usdt: #4ade9a;
  --profile-ton: #6cc4ff;
  --profile-hold: #ffc44d;
  --profile-plus: #1e9e6a;
}

/* ============================================================
   БАЗА
   ============================================================ */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: rgba(91, 75, 245, 0.22); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  transition: background var(--t), border-color var(--t), color var(--t), opacity var(--t), transform var(--t), box-shadow var(--t);
}

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

input, textarea, select {
  font-family: inherit;
}

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

/* ============================================================
   АНИМАЦИИ
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

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

@keyframes pulse {
  50% { box-shadow: 0 0 0 6px rgba(31, 168, 120, 0); }
}

.spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  color: var(--muted);
  animation: spin 0.7s linear infinite;
}

.loading-text {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 24px 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  height: calc(var(--nav-h) + var(--tg-content-safe-top, env(safe-area-inset-top, 0px)));
  padding: var(--tg-content-safe-top, env(safe-area-inset-top, 0px)) var(--gutter) 0;
  background: rgba(245, 245, 248, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar__logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid var(--line-2);
}

.topbar__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================================
   ЭКРАНЫ
   ============================================================ */
.screen {
  max-width: 620px;
  margin: 0 auto;
  padding: 18px var(--gutter) calc(var(--bottom-h) + 28px + env(safe-area-inset-bottom, 0px));
  animation: rise 0.22s var(--ease) both;
}

.screen--hidden {
  display: none !important;
}

.screen-title {
  margin: 2px 0 18px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin: 0 0 16px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.back-btn svg {
  width: 15px;
  height: 15px;
}

.back-btn:hover {
  background: var(--panel-3);
  color: var(--text);
}

/* ============================================================
   НИЖНЯЯ НАВИГАЦИЯ
   ============================================================ */
.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 400;
  display: flex;
  gap: 4px;
  padding: 7px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card-hover);
}

.chat-open .bottom-nav,
.chat-open .topbar {
  display: none;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 54px;
  border-radius: var(--r);
  color: var(--muted);
  transition: background var(--t), color var(--t);
}

.bottom-nav__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 26px;
  border-radius: var(--r-pill);
  transition: background var(--t), transform var(--t);
}

.bottom-nav__item svg {
  width: 21px;
  height: 21px;
}

.bottom-nav__label {
  font-size: 10.5px;
  font-weight: 600;
}

.bottom-nav__item--active {
  color: var(--text);
}

.bottom-nav__item--active .bottom-nav__icon {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -6px var(--accent-line);
}

.bottom-nav__item--active .bottom-nav__icon svg {
  color: #fff;
}

.bottom-nav__dot {
  position: absolute;
  top: -1px;
  right: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 0 2px var(--panel);
}

.bottom-nav__dot--hidden {
  display: none;
}

/* Логотип в меню — только в боковом меню на ПК (см. "АДАПТИВ — ПК") */
.bottom-nav__brand {
  display: none;
}

/* Вкладка "Апелляции" — видна только модераторам (см. initModeration) */
.bottom-nav__item--hidden {
  display: none;
}

/* Swap и Апелляции на телефоне открываются из профиля — в нижней панели
   им нет места (см. "АДАПТИВ — ПК": там они вернутся в боковое меню) */
.bottom-nav__item--desktop {
  display: none;
}

/* Вкладки разделов каталога скрыты в Market и NFT — у них свои кнопки
   в навигации (см. selectCategory в app.js) */
.category-tabs.category-tabs--hidden {
  display: none;
}

/* ============================================================
   ВКЛАДКИ КАТЕГОРИЙ
   ============================================================ */
.category-tabs,
.subcategory-tabs,
.purchases-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1) 14px;
  padding: 2px var(--gutter) 4px;
}

.category-tabs::-webkit-scrollbar,
.subcategory-tabs::-webkit-scrollbar,
.purchases-tabs::-webkit-scrollbar {
  display: none;
}

.category-tabs {
  position: sticky;
  top: calc(var(--nav-h) + var(--tg-content-safe-top, env(safe-area-inset-top, 0px)));
  z-index: 40;
  margin-top: -4px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: rgba(245, 245, 248, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.subcategory-tabs,
.purchases-tabs {
  margin-bottom: 18px;
}

.subcategory-tabs--hidden {
  display: none;
}

/* Вкладки разделов — по умолчанию только иконка (компактная пилюля),
   подпись разворачивается из-под иконки с анимацией при выборе вкладки. */
.tab-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition: gap var(--t), padding var(--t), background var(--t), border-color var(--t), box-shadow var(--t), color var(--t), transform 0.35s var(--spring);
}

.tab-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
}

.tab-btn__label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.42s var(--spring), opacity 0.24s var(--ease);
}

.tab-btn:hover {
  color: var(--text);
  border-color: rgba(20, 20, 30, 0.2);
}

.tab-btn--active {
  gap: 7px;
  padding: 0 14px;
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 4px 14px -4px var(--accent-line);
  transform: scale(1.04);
}

.tab-btn--active svg {
  color: #fff;
}

.tab-btn--active .tab-btn__label {
  max-width: 140px;
  opacity: 1;
  color: #fff;
}

/* Подвкладки (внутри выбранного раздела) — квадратные, как и сами вкладки
   разделов; активная — сплошная акцентная заливка с белым текстом вместо
   прежней еле заметной "подкладки" (inset-обводка почти того же цвета,
   что и фон), чтобы выбранная подвкладка было видно с первого взгляда. */
.subtab-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t);
}

.subtab-btn:hover {
  color: var(--text);
  border-color: rgba(20, 20, 30, 0.2);
}

.subtab-btn--active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 3px 10px -4px var(--accent-line);
}

/* ============================================================
   КАТАЛОГ
   ============================================================ */
@keyframes catalogSpringIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.catalog {
  display: grid;
  /* minmax(0, …) — длинный ник продавца не распирает карточки за край экрана */
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  animation: catalogSpringIn 0.45s var(--spring) both;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.card__info {
  flex: 1;
  min-width: 0;
}

.card__title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Название + флажок спамблока в одну строку: длинное название
   обрезается, флажок всегда виден. */
.card__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.card__title-row .card__title {
  min-width: 0;
  white-space: nowrap;
}

.spam-flag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.spam-flag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.spam-flag--clean {
  background: var(--ok-soft);
  color: var(--ok);
}

.spam-flag--limited {
  background: var(--bad-soft);
  color: var(--bad);
}

.spam-flag--unknown {
  background: var(--panel-3);
  color: var(--muted);
}

/* Почему товар попал в «Для вас» */
.card__rec {
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
}

/* Заголовки секций каталога: «Для вас» / «Все товары» */
.catalog-section {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.catalog-section:first-child {
  margin-top: 0;
}

/* Панель «Фильтры / Сортировка» над обычным каталогом */
.catalog-bar__btn {
  flex: 1;
  min-width: 0;
}

.catalog-bar__btn .nft-filter-btn__label {
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-filter-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card__seller {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Ник продавца + галочка в одну строку: длинный ник обрезается
   многоточием, галочка всегда остаётся рядом с ним. */
.card__seller--user {
  display: flex;
  align-items: center;
}

.card__seller-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__stock {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

.card__price-block {
  flex-shrink: 0;
  text-align: right;
}

.card__price {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.card__price-ton {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ton);
  font-variant-numeric: tabular-nums;
}

/* Telegram-аккаунт: строки названия, страны и продавца плотнее — карточка
   не выше остальных в каталоге */
.card--compact {
  gap: 12px;
  padding: 10px 14px;
}

.card--compact .card__icon {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.card--compact .card__seller {
  margin-top: 1px;
  line-height: 1.35;
}

.card--compact .card__price {
  padding: 3px 9px;
  font-size: 13.5px;
}

.card--compact .card__price-ton {
  margin-top: 2px;
  font-size: 11.5px;
}

.card__chevron {
  display: flex;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* ============================================================
   КАТАЛОГ NFT
   ============================================================ */
.catalog--nft-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.nft-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 8px 11px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: box-shadow var(--t), transform var(--t);
}

.nft-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.nft-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--panel-3);
}

.nft-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-card__image--placeholder {
  width: 100%;
  height: 100%;
  background: var(--panel-3);
}

.nft-card__price {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: rgba(22, 22, 29, 0.72);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.nft-card__info {
  padding: 0 3px;
}

.nft-card__title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-card__collection {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Значок над NFT: ончейн (NFT в TON) / офчейн (подарок в Telegram) */
.nft-chain-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  box-shadow: 0 2px 6px rgba(20, 20, 30, 0.18);
}

.nft-chain-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.nft-chain-badge--onchain {
  background: var(--ton);
}

.nft-chain-badge--offchain {
  background: var(--accent);
}

.nft-chain-badge--inline {
  position: static;
  box-shadow: none;
}

.nft-chain-badge--inline.nft-chain-badge--onchain {
  background: var(--ton-soft);
  color: var(--ton);
}

.nft-chain-badge--inline.nft-chain-badge--offchain {
  background: var(--accent-soft);
  color: var(--accent);
}

#topup-modal-content > .nft-chain-badge--inline {
  margin-bottom: 8px;
}

/* «Продать свой NFT» / «Мои лоты» в панели раздела */
.nft-sell-row {
  display: flex;
  gap: 8px;
}

.nft-sell-row .nft-sell-row__sell {
  flex: 1;
  min-width: 0;
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.nft-sell-row .nft-sell-row__sell:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.modal__options--row.nft-sell-chains .nft-sell-chain {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.nft-sell-chain:disabled {
  opacity: 0.5;
}

.nft-sell-chain__title {
  font-size: 13.5px;
  font-weight: 700;
}

.nft-sell-chain__hint {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

/* Инструкция по переводу подарка */
.nft-deposit__steps {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
}

.nft-deposit__field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px 10px 10px 14px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
}

.nft-deposit__field-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nft-deposit__field-label {
  font-size: 11.5px;
  color: var(--muted);
}

.nft-deposit__field-value,
.nft-deposit__mono {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.nft-deposit__warn {
  margin: 0 0 14px;
  color: var(--warn);
}

/* Основная кнопка в шторках NFT */
.modal__option.nft-primary-btn {
  border-color: transparent;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  text-align: center;
}

.modal__option.nft-primary-btn:hover {
  border-color: transparent;
  background: var(--accent-2);
}

/* NFT-инвентарь: карточка предмета */
.nft-inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.nft-inv-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 8px 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  color: var(--text);
  text-align: left;
}

.nft-inv-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--panel-3);
}

.nft-inv-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-inv-card__status {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: rgba(22, 22, 29, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-inv-card__status--listed {
  background: var(--ok);
}

.nft-inv-card__status--awaiting_deposit,
.nft-inv-card__status--withdrawing {
  background: var(--warn);
}

.nft-inv-card__status--error {
  background: var(--bad);
}

.nft-inv-card__title {
  padding: 0 3px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Мини-лента в профиле: горизонтальная прокрутка */
.profile-inventory {
  margin-bottom: 14px;
}

.profile-inventory:empty {
  display: none;
}

.profile-inventory__strip {
  display: flex;
  gap: 8px;
  padding: 2px 0 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.profile-inventory__strip::-webkit-scrollbar {
  display: none;
}

.nft-inv-card--mini {
  flex: 0 0 112px;
  gap: 6px;
  padding: 6px 6px 8px;
  scroll-snap-align: start;
}

.nft-inv-card--mini .nft-chain-badge {
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  font-size: 9.5px;
}

.nft-inv-card--mini .nft-inv-card__status {
  left: 4px;
  bottom: 4px;
  font-size: 10px;
}

.nft-inv-card--mini .nft-inv-card__title {
  font-size: 12px;
}

.profile-inventory__empty {
  width: 100%;
  padding: 16px;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

/* Экран «Инвентарь» */
/* Пустая вкладка: подсказка над сеткой, карточки-действия и пустые слоты.
   На телефоне видно 2 ряда, на ПК — сколько влезает; низ растворяется. */
.inventory-empty__hint {
  max-width: 560px;
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.inventory-empty__hint b {
  color: var(--text);
}

.nft-inv-grid--empty {
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}

.nft-inv-grid--empty > :nth-child(n + 5) {
  display: none;
}

.nft-inv-slot {
  cursor: pointer;
}

.nft-inv-slot:hover {
  box-shadow: var(--shadow-card-hover);
}

.nft-inv-slot__media {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--accent-line);
  background: var(--accent-soft);
}

.nft-inv-slot__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 8px 18px -10px var(--accent-line);
  transition: transform 0.3s var(--spring);
}

.nft-inv-slot:hover .nft-inv-slot__icon {
  transform: scale(1.08);
}

.nft-inv-slot__icon svg {
  width: 22px;
  height: 22px;
}

.nft-inv-ghost {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 8px 12px;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
}

.nft-inv-ghost__media {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  background: var(--panel-3);
}

.nft-inv-ghost__line {
  width: 70%;
  height: 9px;
  margin-left: 3px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
}

.nft-inv-ghost__line--short {
  width: 40%;
  margin-top: -2px;
}

.inventory-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.nft-inv-card__meta {
  margin-top: -4px;
  padding: 0 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-inv-card--expired {
  opacity: 0.55;
  cursor: default;
}

.nft-inv-card__status--rent-completed {
  background: rgba(31, 168, 120, 0.9);
}

.nft-inv-card__status--rent-failed {
  background: rgba(225, 75, 75, 0.9);
}

.inventory-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.inventory-summary__stat {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
}

.inventory-summary__stat span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.inventory-summary__add {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 16px;
}

/* Шапка шторки предмета */
.nft-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.nft-item-head__image {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  object-fit: cover;
}

.nft-item-head__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.nft-item-head__title {
  max-width: 100%;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.nft-item-head__sub {
  font-size: 13px;
  color: var(--text-2);
}

.nft-item-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.nft-item-section__title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.nft-item-section .modal__hint {
  margin: -4px 0 10px;
}

/* ============================================================
   NFT: КОЛЛЕКЦИОННЫЕ USERNAME И НОМЕРА +888
   ============================================================ */
.collectible-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.collectible-row__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  background: var(--accent-soft);
}

.collectible-row__icon--number {
  font-size: 11px;
  color: var(--ton);
  background: var(--ton-soft);
}

.collectible-row__title {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collectible-row__price {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--ton-soft);
  color: var(--ton);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.collectible-modal__title {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.collectible-quote {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  font-size: 13px;
}

.collectible-quote__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.collectible-quote__row--total {
  padding-top: 6px;
  border-top: 1px solid var(--line-2);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

/* Аренда NFT (openRentModal / loadRentedInventory в app.js) */
.rent-kinds {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.rent-more {
  grid-column: 1 / -1;
}

/* Цена карточки аренды: цена дня — на картинке, ниже газ, срок и итог за
   минимальный срок вместе с газом, чтобы цена не была «скрытой». Строки
   переносятся, а не обрезаются: сумма в тенге не должна теряться за «…» */
.rent-card__line,
.rent-card__total {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.rent-card__total {
  margin-top: 4px;
  font-weight: 700;
  color: var(--text);
}

.rent-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.rent-modal__image {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--panel-3);
}

.rent-attach__about {
  margin: 4px 0 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.rent-attach__about b {
  color: var(--text);
}

.rent-attach__about p {
  margin: 6px 0 0;
}

/* ============================================================
   ФИЛЬТРЫ NFT
   ============================================================ */
.nft-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.nft-filters--hidden {
  display: none;
}

/* Ряд типов во вкладке NFT → «Купить» — ближе к панели поиска под ним */
.nft-kinds {
  margin-bottom: 10px;
}

/* Строка поиска: инпут — свой отдельный "квадратик", иконки фильтров и
   сортировки стоят за его пределами, прижаты к правому краю экрана. */
.nft-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nft-search-row .nft-filters__input {
  flex: 1;
  min-width: 0;
}

.nft-filter-icons {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  margin-left: auto;
}

.nft-filter-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.nft-filter-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nft-filter-btn:hover {
  color: var(--text);
  border-color: rgba(20, 20, 30, 0.2);
}

.nft-filter-btn--icon {
  flex: 0 0 auto;
  width: 40px;
  padding: 0;
}

/* Кнопка коллекции — свободной строкой, рядом с кнопкой фона/символа;
   текст гифта показывается целиком (без обрезки многоточием). */
.nft-filter-row2 {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.nft-filter-btn--collection {
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}

.nft-filter-btn__label {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  text-align: left;
}

.nft-filter-btn__chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.nft-filter-btn--active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 4px 14px -4px var(--accent-line);
}

.nft-filter-btn--active .nft-filter-btn__chevron {
  color: rgba(255, 255, 255, 0.8);
}

.nft-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nft-filters__select,
.nft-filters__input {
  flex: 1 1 140px;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--t);
}

.nft-filters__input::placeholder {
  color: var(--muted);
}

.nft-filters__input:focus,
.nft-filters__select:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.nft-filters__price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nft-filters__price-row .nft-filters__input {
  flex: 1 1 0;
}

.nft-filters__price-sep {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13px;
}

.nft-filters__chip-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nft-filters__chip-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.nft-filters__chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nft-filters__chip {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12.5px;
}

.nft-filters__chip--active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.nft-filters__advanced {
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.nft-filters__advanced summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.nft-filters__advanced[open] summary {
  margin-bottom: 10px;
}

.nft-filters__advanced-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.nft-filters__actions {
  display: flex;
  gap: 8px;
}

.nft-filters__btn {
  flex: 1;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
}

.nft-filters__btn:hover {
  background: var(--line-2);
}

.nft-filters__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.nft-filters__btn--primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.nft-filters__btn--reset {
  flex: 0 0 auto;
  padding: 0 14px;
  background: transparent;
  color: var(--text-2);
}

/* ============================================================
   КАСТОМНЫЙ СЕЛЕКТ
   ============================================================ */
.custom-select {
  position: relative;
  flex: 1 1 140px;
  min-width: 0;
}

.custom-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.custom-select__trigger--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.custom-select__chevron {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.custom-select__overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 20, 30, 0.32);
  transition: opacity var(--t), visibility var(--t);
}

.custom-select__overlay--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.custom-select__overlay--hidden .custom-select__sheet {
  transform: translateY(16px);
}

.custom-select__sheet {
  width: 100%;
  max-width: 480px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 14px 12px calc(14px + max(env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px)));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border: 1px solid var(--line-2);
  border-bottom: none;
  background: var(--panel);
  box-shadow: var(--shadow-sheet);
  transition: transform 0.22s var(--ease);
}

.custom-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 12px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.custom-select__option--active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.custom-select__option-check {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--accent);
  opacity: 0;
}

.custom-select__option--active .custom-select__option-check {
  opacity: 1;
}

/* ============================================================
   ЦЕНА
   ============================================================ */
.price-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  font-size: 13.5px;
  font-weight: 500;
}

.price-tag strong {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.price-tag--loading {
  color: var(--muted);
}

/* ============================================================
   ПОЛУЧАТЕЛЬ
   ============================================================ */
.recipient-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
  background: var(--panel-3);
  font-size: 13.5px;
  color: var(--muted);
}

.recipient-preview--found {
  border-style: solid;
  border-color: rgba(31, 168, 120, 0.35);
  background: var(--ok-soft);
  color: var(--text);
}

.recipient-preview--error {
  border-style: solid;
  border-color: rgba(225, 75, 75, 0.35);
  background: var(--bad-soft);
  color: #c23a3a;
}

.recipient-preview__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}

.recipient-preview__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.recipient-preview__body {
  flex: 1;
  min-width: 0;
}

.recipient-preview__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-preview__username {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-preview__status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   ПРОФИЛЬ
   ============================================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 2px 0 18px;
}

.profile-header__avatar {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 8px 18px -8px var(--accent-line);
}

.profile-header__avatar .user-avatar {
  width: 100%;
  height: 100%;
}

/* Значок камеры — подсказка, что фото можно поменять */
.profile-header__avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--accent);
  color: #fff;
}

.profile-header__avatar-edit svg {
  width: 12px;
  height: 12px;
}

/* Пока фото сжимается и загружается — затемняем и крутим спиннер */
.profile-header__avatar--loading {
  pointer-events: none;
}

.profile-header__avatar--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(20, 20, 30, 0.45)
    no-repeat center / 22px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}

.avatar-modal__preview {
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}

.avatar-modal__preview .user-avatar {
  width: 96px;
  height: 96px;
  box-shadow: 0 10px 24px -10px var(--accent-line);
}

.profile-header__body {
  min-width: 0;
}

.profile-header__name {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-header__username {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* ============================================================
   БАЛАНС — без фиолетовой рамки/градиента, обычная белая карточка:
   TON/USDT/SKY по отдельности сверху, потом общая сумма в USD, потом
   заполненная на 100% полоска с долей каждой валюты, потом кнопки.
   ============================================================ */
.total-balance {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--profile-line);
  background: var(--profile-surface);
  box-shadow: var(--shadow-card);
  color: var(--profile-ink);
}

.total-balance__currencies {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--profile-line);
}

.total-balance__currency {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--profile-ink);
}

.total-balance__currency-name {
  color: var(--profile-muted);
  font-weight: 600;
}

.total-balance__currency-amount {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--profile-ink);
  font-weight: 700;
}

.total-balance__total {
  padding: 14px 0;
}

/* Верхний ряд карточки: подпись "Баланс" слева, выбор валюты в правом углу */
.total-balance__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.total-balance__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--profile-muted);
}

.total-balance__amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--profile-ink);
  font-variant-numeric: tabular-nums;
}

.total-balance__bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--profile-line);
}

.total-balance__bar-seg {
  height: 100%;
}

.total-balance__bar-seg--ton {
  background: var(--profile-ton);
}

.total-balance__bar-seg--usdt {
  background: var(--profile-usdt);
}

.total-balance__bar-seg--sky {
  background: var(--profile-hold);
}

.total-balance__bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--profile-muted);
}

.total-balance__bar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.total-balance__dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.total-balance__dot--ton {
  background: var(--profile-ton);
}

.total-balance__dot--usdt {
  background: var(--profile-usdt);
}

.total-balance__dot--sky {
  background: var(--profile-hold);
}

.total-balance__sub {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--profile-muted);
  font-variant-numeric: tabular-nums;
}

/* Валюта отображения баланса и цен: $ / ₸ / ₽ — только вид, на сервере всё в USD.
   Маленькая пилюля в углу карточки, по нажатию — выпадающий список. */
.currency-picker {
  position: relative;
  flex-shrink: 0;
}

.currency-picker__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px 0 4px;
  border-radius: var(--r-pill);
  background: var(--profile-line);
  color: var(--profile-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.currency-picker__btn:hover,
.currency-picker__btn[aria-expanded="true"] {
  background: rgba(79, 63, 240, 0.12);
  color: var(--profile-indigo);
}

.currency-picker__symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--profile-surface);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(20, 20, 30, 0.08);
}

.currency-picker__caret {
  width: 12px;
  height: 12px;
  transition: transform var(--t);
}

.currency-picker__btn[aria-expanded="true"] .currency-picker__caret {
  transform: rotate(180deg);
}

.currency-picker__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 5px;
  border-radius: var(--r);
  border: 1px solid var(--profile-line);
  background: var(--profile-surface);
  box-shadow: var(--shadow-toast);
  transform-origin: top right;
  animation: currencyMenuIn 0.16s var(--ease);
}

.currency-picker__menu[hidden] {
  display: none;
}

@keyframes currencyMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
  }
}

.currency-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px 0 6px;
  border-radius: var(--r-sm);
  color: var(--profile-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}

.currency-picker__option:hover {
  background: rgba(79, 63, 240, 0.06);
}

.currency-picker__option-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--profile-line);
  font-weight: 700;
}

.currency-picker__option-label {
  flex: 1;
}

.currency-picker__option-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--profile-muted);
}

.currency-picker__option--active {
  background: rgba(79, 63, 240, 0.08);
  color: var(--profile-indigo);
}

.currency-picker__option--active .currency-picker__option-symbol {
  background: var(--profile-indigo);
  color: #fff;
}

.currency-picker__option--active .currency-picker__option-code {
  color: var(--profile-indigo);
}

/* Холд — плашка с часами, а не голая строка текста */
.total-balance__hold-note {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 196, 77, 0.18);
  color: #8a5a00;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.total-balance__hold-note svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.balance-actions__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 46px;
  border-radius: var(--r);
  border: 1px solid var(--profile-line);
  background: var(--profile-surface);
  color: var(--profile-ink);
  font-size: 14px;
  font-weight: 650;
}

.balance-actions__btn svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
}

.balance-actions__btn:hover {
  background: rgba(79, 63, 240, 0.06);
}

.balance-actions__btn--primary {
  background: var(--profile-indigo);
  border-color: var(--profile-indigo);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(79, 63, 240, 0.7);
}

.balance-actions__btn--primary:hover {
  background: var(--profile-indigo);
  opacity: 0.92;
}

.balance-actions__btn--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.balance-actions__btn--icon svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   ПОКУПКИ / ТОВАРЫ / СЧЕТА / ВЫВОДЫ — сетка плиток 2×2:
   короче списка из четырёх строк, всё видно без прокрутки.
   ============================================================ */
.profile-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--profile-line);
  background: var(--profile-surface);
  box-shadow: var(--shadow-card);
  color: var(--profile-ink);
  text-align: left;
}

.profile-tile:hover {
  box-shadow: var(--shadow-card-hover);
}

.profile-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: var(--r-sm);
  background: rgba(79, 63, 240, 0.1);
  color: var(--profile-indigo);
}

.profile-tile__icon svg {
  width: 18px;
  height: 18px;
}

.profile-tile__label {
  max-width: 100%;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-tile__sub {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--profile-muted);
}

/* ============================================================
   МОИ ПОКУПКИ / МОИ ТОВАРЫ — две строки в одной белой карточке
   (вместо четырёх пунктов, стоящих друг под другом).
   ============================================================ */
.profile-list-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  border-radius: var(--r);
  border: 1px solid var(--profile-line);
  background: var(--profile-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.profile-list-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 16px;
  color: var(--profile-ink);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  transition: background var(--t);
}

.profile-list-card__row + .profile-list-card__row {
  border-top: 1px solid var(--profile-line);
}

.profile-list-card__row:hover {
  background: rgba(79, 63, 240, 0.05);
}

.profile-list-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: rgba(79, 63, 240, 0.1);
  color: var(--profile-indigo);
}

.profile-list-card__icon svg {
  width: 19px;
  height: 19px;
}

.profile-list-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.profile-list-card__label {
  color: var(--profile-ink);
}

.profile-list-card__sub {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--profile-muted);
}

.profile-list-card__chevron {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: var(--profile-muted);
}

/* ============================================================
   ВЫСТАВИТЬ ТОВАР — полноширинная тёмная кнопка, плюс в indigo-круге.
   ============================================================ */
.profile-sell-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  margin-bottom: 16px;
  border-radius: var(--r);
  background: var(--profile-ink);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  transition: transform var(--t), opacity var(--t);
}

.profile-sell-btn:hover {
  opacity: 0.92;
}

.profile-sell-btn:active {
  transform: scale(0.98);
}

.profile-sell-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--profile-indigo);
  color: #fff;
}

.profile-sell-btn__icon svg {
  width: 15px;
  height: 15px;
}

/* ============================================================
   ПОСЛЕДНИЕ ОПЕРАЦИИ — заменяет отдельные пункты "Мои счета"/"Мои выводы".
   ============================================================ */
.recent-ops {
  margin-bottom: 16px;
}

.recent-ops__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.recent-ops__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--profile-ink);
}

.recent-ops__all {
  font-size: 13px;
  font-weight: 600;
  color: var(--profile-indigo);
}

.recent-ops__list {
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  border: 1px solid var(--profile-line);
  background: var(--profile-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.recent-ops__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 16px;
  text-align: left;
  cursor: pointer;
  transition: background var(--t);
}

.recent-ops__item + .recent-ops__item {
  border-top: 1px solid var(--profile-line);
}

.recent-ops__item:hover {
  background: rgba(79, 63, 240, 0.05);
}

.recent-ops__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.recent-ops__icon svg {
  width: 16px;
  height: 16px;
}

.recent-ops__icon--in {
  background: rgba(30, 158, 106, 0.12);
  color: var(--profile-plus);
}

.recent-ops__icon--out {
  background: rgba(21, 18, 43, 0.08);
  color: var(--profile-ink);
}

.recent-ops__body {
  flex: 1;
  min-width: 0;
}

.recent-ops__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--profile-ink);
}

.recent-ops__meta {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--profile-muted);
}

.recent-ops__amount {
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.recent-ops__amount--in {
  color: var(--profile-plus);
}

.recent-ops__amount--out {
  color: var(--profile-ink);
}

.sell-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.topup-btn,
.app-alert__ok-btn {
  width: 100%;
  height: 46px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px -8px var(--accent-line);
}

.topup-btn {
  margin-bottom: 10px;
}

.topup-btn:hover,
.app-alert__ok-btn:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.secondary-btn {
  width: 100%;
  height: 46px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
}

.secondary-btn:hover {
  background: var(--panel-3);
}

.purchase-code-btn,
.purchase-chat-btn,
.listing-edit-btn,
.listing-reclaim-btn,
.invoice-check-btn,
.invoice-refresh-btn {
  flex: 1;
  width: 100%;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.purchase-code-btn:hover,
.purchase-chat-btn:hover,
.listing-edit-btn:hover,
.listing-reclaim-btn:hover,
.invoice-check-btn:hover,
.invoice-refresh-btn:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

/* «Оплатить счёт» — главное действие карточки, над «Проверить»/«Отменить» */
.invoice-pay-btn {
  display: block;
  width: 100%;
  height: 44px;
  margin-bottom: 8px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}

.invoice-pay-btn:hover {
  background: var(--accent-2);
}

.invoice-pay-btn ~ .invoice-card__actions .invoice-check-btn {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.invoice-pay-btn ~ .invoice-card__actions .invoice-check-btn:hover {
  background: var(--accent-line);
}

.listing-delist-btn,
.invoice-cancel-btn {
  flex: 1;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.listing-delist-btn:hover,
.invoice-cancel-btn:hover {
  background: var(--panel-3);
}

.listing-delete-btn,
.listing-delete-all-btn {
  flex: 1;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--bad);
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 13px;
  font-weight: 600;
}

.listing-delete-all-btn {
  width: 100%;
  margin-bottom: 12px;
}

.listing-delete-btn:disabled,
.listing-delete-all-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.purchase-code-btn:disabled,
.purchase-chat-btn:disabled,
.listing-edit-btn:disabled,
.listing-delist-btn:disabled,
.listing-reclaim-btn:disabled,
.invoice-check-btn:disabled,
.invoice-cancel-btn:disabled,
.invoice-refresh-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.purchase-delivered-content {
  margin-top: 4px;
  padding: 12px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--panel-3);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================
   ПОКУПКА NFT-ПОДАРКА (nftBuySheetHtml в app.js): картинка с ценой,
   название, цена в TON, общая редкость, карточки характеристик,
   инфо-блок, сеть/коллекция и широкая кнопка «Купить»
   ============================================================ */
.nft-buy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nft-buy__media {
  position: relative;
  aspect-ratio: 16 / 10;
  margin-top: 6px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #1f8a5c, #0f5c3c);
}

.nft-buy__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-buy__badge {
  position: absolute;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(10, 20, 16, 0.6);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nft-buy__badge--price {
  top: 12px;
  left: 12px;
  font-size: 15px;
  font-weight: 800;
}

.nft-buy__badge--collection {
  bottom: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-buy__price .nft-chain-badge {
  margin-left: auto;
}

.nft-buy__title {
  margin: 16px 0 6px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.nft-buy__price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.nft-buy__ton-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.nft-buy__ton-icon svg {
  width: 16px;
  height: 16px;
}

.nft-buy__ton {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.nft-buy__fiat {
  font-size: 18px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nft-buy__seller {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-2);
}

.nft-buy__rarity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--panel-3);
}

.nft-buy__rarity--loading {
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}

.nft-buy__rarity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.nft-buy__rarity-icon svg {
  width: 18px;
  height: 18px;
}

.nft-buy__rarity-label {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.nft-buy__rarity-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.nft-buy__rarity-value b {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.nft-buy__rarity-value small {
  font-size: 12px;
  color: var(--muted);
}

.nft-buy__section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  font-size: 16px;
  font-weight: 750;
}

.nft-buy__section-title svg {
  width: 20px;
  height: 20px;
  color: var(--text-2);
}

.nft-buy__attrs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nft-buy__attr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel-3);
}

.nft-buy__attr-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.nft-buy__attr-icon svg {
  width: 17px;
  height: 17px;
}

.nft-buy__attr-label {
  font-size: 12px;
  color: var(--muted);
}

.nft-buy__attr-value {
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.nft-buy__attr-pill {
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nft-buy__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel-3);
}

.nft-buy__info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.nft-buy__info-row svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-2);
}

.nft-buy__info-row--muted {
  color: var(--muted);
}

.nft-buy__link {
  padding: 0;
  color: var(--accent);
  font-weight: 650;
}

.nft-buy__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.nft-buy__meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
}

.nft-buy__meta-item + .nft-buy__meta-item {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.nft-buy__meta-item > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-buy__meta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  color: var(--text-2);
}

.nft-buy__meta-icon svg {
  width: 17px;
  height: 17px;
}

.nft-buy__meta-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.nft-buy__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  box-shadow: 0 14px 28px -14px rgba(91, 75, 245, 0.8);
}

.nft-buy__btn:disabled {
  opacity: 0.7;
}

.nft-buy__btn-label {
  flex: 1;
  text-align: center;
}

.nft-buy__btn-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

/* ============================================================
   СЧЕТА
   ============================================================ */
.invoice-card {
  margin-bottom: 10px;
  padding: 15px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.invoice-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.invoice-card__id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.invoice-card__title {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoice-card__status {
  flex-shrink: 0;
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.invoice-card__status--active,
.invoice-card__status--swapping,
.invoice-card__status--review,
.invoice-card__status--processing {
  background: var(--warn-soft);
  color: var(--warn);
}

.invoice-card__status--paid,
.invoice-card__status--completed {
  background: var(--ok-soft);
  color: var(--ok);
}

.invoice-card__status--cancelled,
.invoice-card__status--expired,
.invoice-card__status--failed {
  background: var(--bad-soft);
  color: var(--bad);
}

.invoice-card__timer {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.invoice-card__timer--expired {
  border-color: rgba(225, 75, 75, 0.35);
  color: var(--bad);
}

.invoice-card__amount {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.invoice-card__meta {
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.invoice-card__actions {
  display: flex;
  gap: 8px;
}

/* ============================================================
   МОДАЛЬНАЯ ШТОРКА
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 20, 30, 0.32);
  transition: opacity var(--t), visibility var(--t);
}

.modal-overlay--hidden {
  opacity: 0;
  visibility: hidden;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 18px calc(20px + max(env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px)));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border: 1px solid var(--line-2);
  border-bottom: none;
  background: var(--panel);
  box-shadow: var(--shadow-sheet);
  transition: transform 0.24s var(--ease);
}

.modal-overlay--hidden .modal {
  transform: translateY(24px);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  /* Выше содержимого шторки: блоки с анимацией (transform) иначе ложатся
     поверх крестика, и он перестаёт нажиматься — например на «Товар выставлен» */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text-2);
}

.modal__close:hover {
  background: var(--line-2);
  color: var(--text);
}

.modal__close svg {
  width: 15px;
  height: 15px;
}

.modal__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 40px 6px 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.modal__title-icon {
  display: flex;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.modal__title-icon svg,
.modal__option-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.modal__subtitle {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.modal__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.modal__option {
  padding: 13px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
}

.modal__option:hover {
  border-color: rgba(20, 20, 30, 0.22);
  background: var(--panel-3);
}

.modal__option--active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.modal__options--row {
  flex-direction: row;
}

.modal__options--row .modal__option {
  flex: 1;
  padding: 11px 8px;
  font-size: 13.5px;
  text-align: center;
}

.modal__options--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.modal__option--grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 9px;
  font-size: 12.5px;
  text-align: center;
}

.modal__option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--text-2);
}

.modal__option--active .modal__option-icon {
  color: var(--accent);
}

.modal__hint {
  margin: -6px 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.modal__input {
  width: 100%;
  height: 48px;
  margin-bottom: 10px;
  padding: 0 15px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

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

.modal__input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal__textarea {
  height: auto;
  min-height: 92px;
  padding: 13px 15px;
  resize: vertical;
  line-height: 1.5;
}

.modal__back {
  width: 100%;
  padding: 14px 0 2px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

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

.modal__addr-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.modal__addr-item {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.modal__addr-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 11px 13px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.modal__addr-item-label {
  font-size: 14px;
  font-weight: 600;
}

.modal__addr-item-address {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.modal__addr-item-delete {
  flex: 0 0 auto;
  width: 40px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--bad);
  font-size: 12px;
  font-weight: 600;
}

.modal__addr-item-delete:hover {
  background: var(--bad-soft);
}

.modal__checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}

.modal__checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Основная кнопка старых диалогов — .modal__option с инлайновым фоном */
.modal__option[style*="btn-primary-bg"] {
  border-color: transparent;
  text-align: center;
}

/* "Ручка" шторки на телефоне */
@media (max-width: 899px) {
  .modal::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: var(--r-pill);
    background: var(--line-2);
  }
}

/* ============================================================
   ШТОРКА-МАСТЕР — пополнение, вывод, выставление товара
   (разметку собирают renderSheet / sheetRow в webapp/js/app.js)
   ============================================================ */
.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: -2px 44px 14px 0;
}

.sheet-head__back {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text-2);
}

.sheet-head__back:hover {
  background: var(--line-2);
  color: var(--text);
}

.sheet-head__back svg {
  width: 16px;
  height: 16px;
}

.sheet-head__text {
  min-width: 0;
}

.sheet-head__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.sheet-head__sub {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-steps {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.sheet-steps__seg {
  flex: 1;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
}

.sheet-steps__seg--done {
  background: var(--accent);
}

.sheet-body {
  animation: rise 0.22s var(--ease) both;
}

.sheet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-label {
  margin: 0 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.sheet-list + .sheet-label {
  margin-top: 16px;
}

/* Строка выбора: иконка, название с подписью, значение, стрелка */
.sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 11px 12px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.sheet-row:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.sheet-row:disabled {
  opacity: 0.5;
  cursor: default;
  border-color: var(--line);
  background: var(--panel);
}

.sheet-row__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sheet-row__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sheet-row__sub {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-2);
}

.sheet-row__value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sheet-row__value small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.sheet-row__chev {
  display: flex;
  flex: 0 0 16px;
  color: var(--muted);
}

.sheet-row__chev svg {
  width: 16px;
  height: 16px;
}

.sheet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 19px;
  line-height: 1;
}

.sheet-icon svg {
  width: 20px;
  height: 20px;
}

.sheet-icon--usdt {
  background: none;
}

.sheet-icon--usdt svg {
  width: 40px;
  height: 40px;
}

.sheet-icon--ton {
  background: var(--ton);
  color: #fff;
}

.sheet-icon--ton svg {
  width: 30px;
  height: 30px;
}

.sheet-icon--kzt {
  background: var(--warn-soft);
  color: var(--warn);
}

.sheet-icon--kzt svg {
  width: 22px;
  height: 22px;
}

.sheet-icon--cryptobot,
.sheet-icon--wallet {
  background: var(--ton-soft);
  color: var(--ton);
}

/* Плитки категорий / разделов */
.sheet-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sheet-tiles--text {
  grid-template-columns: repeat(2, 1fr);
}

.sheet-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 92px;
  padding: 12px 8px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.sheet-tiles--text .sheet-tile {
  min-height: 52px;
  font-size: 14px;
}

.sheet-tile:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.sheet-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.sheet-tile__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Крупное поле суммы */
.sheet-amount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  cursor: text;
  transition: border-color var(--t), box-shadow var(--t);
}

.sheet-amount:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sheet-amount__input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.sheet-amount__input::placeholder {
  color: var(--muted);
}

.sheet-amount__cur {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}

.sheet-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 9px 2px 0;
  font-size: 12.5px;
  color: var(--text-2);
}

.sheet-meta b {
  font-weight: 600;
  color: var(--text);
}

.sheet-chips {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.sheet-chip {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sheet-chip:hover {
  background: var(--panel-3);
}

.sheet-chip--active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Поля с подписью */
.sheet-field {
  display: block;
  margin-bottom: 12px;
}

.sheet-field[hidden] {
  display: none;
}

.sheet-field__label {
  display: flex;
  justify-content: space-between;
  margin: 0 2px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.sheet-field__label i {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.sheet-field .modal__input {
  margin-bottom: 0;
}

.sheet-affix {
  position: relative;
  display: block;
}

/* «Вы получите» и «Цена на маркете» — рядом, пересчитываются друг в друга */
.price-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.price-pair .sheet-field {
  min-width: 0;
}

.price-pair .sheet-affix .modal__input {
  padding-right: 36px;
}

.sheet-affix .modal__input {
  padding-right: 64px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sheet-affix__unit {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.sheet-mono {
  font-family: var(--mono);
  font-size: 13.5px;
}

.sheet-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-align: center;
}

/* Переключатель из двух вариантов */
.sheet-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r);
  background: var(--panel-3);
}

.sheet-seg__btn {
  flex: 1;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.sheet-seg__btn--active {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.sheet-note {
  margin: 12px 2px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.sheet-note--top {
  margin-bottom: 14px;
}

.sheet-callout {
  margin: 0 0 4px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--warn-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
}

.sheet-error {
  margin: 12px 0 0;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  animation: rise 0.18s var(--ease) both;
}

.sheet-error[hidden] {
  display: none;
}

.sheet-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  padding: 0 16px;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.sheet-btn:hover {
  background: var(--accent-2);
}

.sheet-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.sheet-btn--ghost {
  margin-top: 8px;
  background: var(--panel-3);
  color: var(--text);
}

.sheet-btn--ghost:hover {
  background: var(--line-2);
}

.sheet-actions .sheet-btn:first-child {
  margin-top: 20px;
}

/* Итог перед подтверждением */
.sheet-summary {
  padding: 4px 14px;
  border-radius: var(--r);
  background: var(--panel-3);
}

.sheet-summary--compact {
  margin-bottom: 12px;
}

.sheet-summary__amount {
  padding: 16px 0 14px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.sheet-summary__amount span {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-2);
}

.sheet-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.sheet-summary__row + .sheet-summary__row,
.sheet-summary__amount + .sheet-summary__row {
  border-top: 1px solid var(--line);
}

.sheet-summary__row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-summary__row b {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.sheet-summary__row--stack {
  flex-direction: column;
  gap: 4px;
}

.sheet-summary__row--stack b {
  flex-shrink: 1;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  word-break: break-all;
}

/* Нумерованная инструкция */
.sheet-guide {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.sheet-guide li {
  position: relative;
  padding: 0 0 14px 38px;
  font-size: 14px;
  line-height: 1.5;
  counter-increment: guide;
}

.sheet-guide li::before {
  content: counter(guide);
  position: absolute;
  top: -2px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.sheet-addr {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.sheet-addr .sheet-row {
  flex: 1;
  min-width: 0;
}

/* Кнопки у адреса в книге: переименовать / удалить (в два касания) */
.sheet-addr__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  transition: background var(--t), color var(--t), flex-basis var(--t);
}

.sheet-addr__btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.sheet-addr__btn svg {
  width: 18px;
  height: 18px;
}

.sheet-addr__btn--delete {
  color: var(--bad);
}

.sheet-addr__btn--delete:hover {
  background: var(--bad-soft);
  color: var(--bad);
}

.sheet-addr__btn--confirm,
.sheet-addr__btn--confirm:hover {
  flex-basis: 92px;
  border-color: var(--bad);
  background: var(--bad);
  color: #fff;
}

.sheet-addr__btn--confirm svg {
  display: none;
}

.sheet-addr__btn--confirm::after {
  content: "Удалить?";
}

.sheet-empty {
  margin: 0;
  padding: 14px;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

/* Поле адреса с кнопкой «Вставить» */
.sheet-addr-input {
  position: relative;
  display: block;
}

.sheet-addr-input__field {
  display: block;
  height: auto;
  min-height: 68px;
  padding: 12px 92px 12px 15px;
  line-height: 1.45;
  word-break: break-all;
  resize: none;
}

.sheet-addr-input__paste {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.sheet-addr-input__paste:hover {
  background: var(--accent-line);
}

.sheet-addr-hint {
  display: block;
  min-height: 18px;
  margin: 6px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.sheet-addr-hint--ok {
  color: var(--ok);
}

.sheet-addr-hint--bad {
  color: var(--warn);
}

.sheet-chips--wrap {
  flex-wrap: wrap;
  margin: -4px 0 12px;
}

.sheet-chips--wrap .sheet-chip {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
}

/* Экран статуса: загрузка, успех, ошибка */
.sheet-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px 2px;
  text-align: center;
  animation: rise 0.22s var(--ease) both;
}

.sheet-status__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  animation: pop 0.3s var(--spring) both;
}

.sheet-status__icon svg {
  width: 28px;
  height: 28px;
}

.sheet-status__icon--success {
  background: var(--ok-soft);
  color: var(--ok);
}

.sheet-status__icon--error {
  background: var(--bad-soft);
  color: var(--bad);
}

.sheet-status__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sheet-status__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.sheet-status__spinner {
  width: 34px;
  height: 34px;
  margin: 14px 0 16px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@media (max-width: 360px) {
  .sheet-amount__input,
  .sheet-summary__amount {
    font-size: 26px;
  }

  .sheet-chip {
    font-size: 12.5px;
  }
}

/* ============================================================
   СВОЁ УВЕДОМЛЕНИЕ
   ============================================================ */
.app-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 30, 0.32);
  transition: opacity var(--t), visibility var(--t);
}

.app-alert-overlay--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-alert {
  width: 100%;
  max-width: 320px;
  padding: 22px 20px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow-toast);
  text-align: center;
  animation: pop 0.2s var(--ease);
}

.app-alert__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--panel-3);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.app-alert__icon--success {
  background: var(--ok-soft);
  color: var(--ok);
}

.app-alert__icon--error {
  background: var(--bad-soft);
  color: var(--bad);
}

.app-alert__message {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================
   ЧАТЫ — общие элементы
   ============================================================ */
.user-avatar {
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
}

.chat-avatar {
  width: 46px;
  height: 46px;
}

.chat-avatar--sm {
  width: 38px;
  height: 38px;
}

.chat-role-tag {
  display: inline-block;
  flex-shrink: 0;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 24px;
  text-align: center;
}

.chat-empty--inline {
  margin: auto 0;
  padding: 24px;
}

.chat-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 8px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}

.chat-empty__icon svg {
  width: 28px;
  height: 28px;
}

.chat-empty__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chat-empty__text {
  max-width: 280px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* ============================================================
   СПИСОК ЧАТОВ
   ============================================================ */
.chat-list {
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.chat-list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 12px 14px;
  cursor: pointer;
}

.chat-list-item + .chat-list-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 72px;
  right: 0;
  border-top: 1px solid var(--line);
}

.chat-list-item:hover {
  background: var(--panel-3);
}

.chat-list-item__body {
  flex: 1;
  min-width: 0;
}

.chat-list-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-list-item__name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item__time {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.chat-list-item__product {
  display: flex;
  align-items: center;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item__preview {
  min-width: 0;
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item__you {
  color: var(--muted);
}

.chat-list-item--unread .chat-list-item__name,
.chat-list-item--unread .chat-list-item__preview {
  color: var(--text);
  font-weight: 650;
}

.chat-list-item--unread .chat-list-item__time {
  color: var(--accent);
}

.chat-list-item__unread-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ============================================================
   ЭКРАН ЧАТА
   ============================================================ */
.screen--chat {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  height: var(--tg-vh, 100dvh);
  padding: calc(10px + var(--tg-content-safe-top, env(safe-area-inset-top, 0px))) var(--gutter) max(12px, env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px));
  animation: none;
}

.chat-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-bottom: 12px;
}

.back-btn--icon {
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
}

.back-btn--icon svg {
  width: 18px;
  height: 18px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.chat-header__body {
  min-width: 0;
}

.chat-header__name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header__product {
  display: flex;
  align-items: center;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Карточка заказа над перепиской ---------- */
.chat-order-banner {
  flex-shrink: 0;
  margin-bottom: 10px;
  /* Если внутри коды входа — не даём карточке съесть всю переписку */
  max-height: 46vh;
  overflow-y: auto;
}

.chat-order-banner--hidden {
  display: none;
}

.order-card {
  --state: var(--warn);
  --state-soft: var(--warn-soft);
  padding: 13px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.order-card--done {
  --state: var(--ok);
  --state-soft: var(--ok-soft);
}

/* Открытая апелляция / возврат оплаты по решению модератора */
.order-card--dispute {
  --state: var(--bad);
  --state-soft: var(--bad-soft);
}

.order-card--dispute .order-card__dot {
  animation: orderDotPulse 1.6s ease-in-out infinite;
}

.order-card--refund {
  --state: var(--text-2);
  --state-soft: var(--panel-3);
}

.order-card__text--muted {
  margin-top: 5px;
  color: var(--muted);
}

.order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 8px;
  border-radius: var(--r-pill);
  background: var(--state-soft);
  color: var(--state);
  font-size: 12px;
  font-weight: 650;
}

.order-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.order-card--hold .order-card__dot {
  animation: orderDotPulse 1.6s ease-in-out infinite;
}

@keyframes orderDotPulse {
  50% { opacity: 0.35; }
}

.order-card__amount {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.order-card__text {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}

.order-card__codes {
  display: grid;
  gap: 6px;
  margin-top: 11px;
}

.order-card__hint {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-2);
}

.order-card__older {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 0 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.order-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.order-card__btn--ghost {
  flex: 0 0 auto;
  background: var(--accent-soft);
  color: var(--accent);
}

.order-card__btn--danger {
  background: var(--bad-soft);
  color: var(--bad);
}

.order-card__btn svg {
  width: 15px;
  height: 15px;
}

.order-card__btn .spinner {
  color: currentColor;
  width: 13px;
  height: 13px;
  margin: 0;
}

.order-card__btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Поле со значением и кнопкой копирования ---------- */
.chat-field {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 8px 12px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
}

.chat-field__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.chat-field__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-field__value {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  white-space: pre-wrap;
  user-select: all;
  -webkit-user-select: all;
}

.chat-field--big .chat-field__value {
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

/* Пароль скрыт до нажатия на "глаз" (копируется и без раскрытия) */
.chat-field--secret .chat-field__value {
  filter: blur(5px);
  transition: filter var(--t);
}

.chat-field--secret.chat-field--revealed .chat-field__value {
  filter: none;
}

.chat-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--text-2);
}

.chat-copy-btn:hover {
  background: var(--line);
  color: var(--text);
}

.chat-copy-btn svg {
  width: 17px;
  height: 17px;
}

.chat-copy-btn--done {
  color: var(--ok);
}

/* ---------- Лента сообщений ---------- */
.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 10px;
  overscroll-behavior: contain;
}

.chat-day {
  align-self: center;
  margin: 12px 0 8px;
}

.chat-day span {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.chat-bubble {
  max-width: 80%;
  padding: 8px 12px 7px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
  animation: rise 0.16s var(--ease) both;
}

.chat-bubble--tail {
  margin-bottom: 6px;
}

.chat-bubble--in {
  align-self: flex-start;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(20, 20, 30, 0.06);
}

.chat-bubble--in.chat-bubble--tail {
  border-bottom-left-radius: 6px;
}

.chat-bubble--out {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

.chat-bubble--out.chat-bubble--tail {
  border-bottom-right-radius: 6px;
}

/* Время — в правом нижнем углу, обтекается текстом как в Telegram */
.chat-bubble__time {
  float: right;
  position: relative;
  top: 6px;
  margin-left: 10px;
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.6;
  white-space: nowrap;
}

/* ---------- Карточка с выданными данными аккаунта ---------- */
.chat-cred {
  align-self: flex-start;
  width: min(100%, 340px);
  margin: 4px 0 8px;
  padding: 12px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  border: 1px solid var(--accent-line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  animation: rise 0.16s var(--ease) both;
}

.chat-cred--out {
  align-self: flex-end;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
}

.chat-cred__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.chat-cred__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.chat-cred__icon svg {
  width: 19px;
  height: 19px;
}

.chat-cred__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chat-cred__product {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.chat-cred__fields {
  display: grid;
  gap: 6px;
}

.chat-cred__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.chat-cred__copy-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 650;
}

.chat-cred__copy-all svg {
  width: 14px;
  height: 14px;
}

.chat-cred__copy-all.chat-copy-btn--done {
  background: var(--ok-soft);
  color: var(--ok);
}

.chat-cred__time {
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------- Поле ввода ---------- */
.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 4px;
  padding: 5px 5px 5px 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  transition: border-color var(--t);
}

.chat-form:focus-within {
  border-color: var(--accent-line);
}

.chat-form__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

.chat-form__input::placeholder {
  color: var(--muted);
}

.chat-form__send {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.chat-form__send:hover {
  background: var(--accent-2);
}

.chat-form__send svg {
  width: 19px;
  height: 19px;
}

.chat-form__send:disabled {
  background: var(--panel-3);
  color: var(--muted);
  pointer-events: none;
}

/* ============================================================
   СТАТИСТИКА МАРКЕТА (админ, app.js: renderAdminStats)
   ============================================================ */
#admin-stats-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.2s ease;
}

#admin-stats-content.adm--loading {
  opacity: 0.55;
  pointer-events: none;
}

.adm-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.adm-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--text-2);
  font: 600 13px/1 var(--font);
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}

.adm-chip--active {
  background: var(--text);
  border-color: var(--text);
  color: var(--panel);
}

.adm-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.adm-card__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.adm-metrics {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
}

.adm-metric {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  font: 600 13px/1 var(--font);
  cursor: pointer;
}

.adm-metric--active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(20, 20, 30, 0.1);
}

.adm-hero {
  margin: 14px 0 6px;
}

.adm-hero__value {
  font-size: clamp(30px, 8vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.adm-delta {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}

.adm-delta span {
  font-weight: 500;
  color: var(--muted);
}

.adm-delta--up { color: var(--ok); }
.adm-delta--down { color: var(--bad); }
.adm-delta--flat { color: var(--muted); font-weight: 500; }

.adm-chart {
  position: relative;
  margin: 8px -4px 0;
  touch-action: pan-y;
}

.adm-svg {
  display: block;
  overflow: visible;
}

.adm-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.adm-axis {
  fill: var(--muted);
  font: 500 11px var(--font);
  font-variant-numeric: tabular-nums;
}

.adm-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.adm-dot {
  fill: var(--accent);
  stroke: var(--panel);
  stroke-width: 2;
}

.adm-tag rect {
  fill: var(--accent);
}

.adm-tag text {
  fill: #fff;
  font: 700 11px var(--font);
  font-variant-numeric: tabular-nums;
}

.adm-cross line {
  stroke: var(--text-2);
  stroke-width: 1;
  opacity: 0.45;
}

.adm-hit {
  cursor: crosshair;
}

.adm-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 150px;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel);
  box-shadow: var(--shadow-card-hover);
  pointer-events: none;
}

.adm-tooltip__time {
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.adm-tooltip__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.adm-tooltip__row span {
  color: var(--text-2);
}

.adm-tooltip__row b {
  order: 2;
  font-weight: 600;
}

/* Строка выбранной метрики — с ключом-штрихом цвета линии */
.adm-tooltip__row--main span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 2px;
  margin: 0 6px 3px 0;
  border-radius: 1px;
  background: var(--accent);
  vertical-align: middle;
}

.adm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}

.adm-toggle input {
  accent-color: var(--accent);
}

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

@media (min-width: 720px) {
  .adm-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.adm-tile {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.adm-tile__label {
  font-size: 12.5px;
  color: var(--text-2);
}

.adm-tile__value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.adm-table-wrap {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.adm-table th {
  padding: 0 8px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.adm-table td {
  padding: 9px 8px;
  border-top: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.adm-table th:first-child,
.adm-table td:first-child {
  padding-left: 0;
  text-align: left;
  white-space: normal;
}

.adm-table th:last-child,
.adm-table td:last-child {
  padding-right: 0;
}

.adm-table tfoot td {
  font-weight: 700;
  border-top: 1px solid var(--line-2);
}

.adm-table__rule {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

/* На узком экране количество и сумма — подстрочником под источником */
.adm-table__rule--narrow {
  display: none;
}

@media (max-width: 599px) {
  .adm-col-extra {
    display: none;
  }

  .adm-table__rule--narrow {
    display: block;
  }
}

.adm-empty,
.adm-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.adm-note {
  margin-top: 12px;
}

.adm-pool--debt {
  border-color: var(--bad);
}

.adm-pool__label {
  font-size: 12.5px;
  color: var(--text-2);
}

.adm-pool__amount {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.adm-pool--debt .adm-hero__value {
  color: var(--bad);
}

.adm-pool__sub {
  margin: 2px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.adm-pool__copy,
.adm-pool__field {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.adm-pool__copy {
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.adm-pool__warn {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--warn);
  font-size: 13px;
  font-weight: 600;
}

.adm-pool__warn--bad {
  background: color-mix(in srgb, var(--bad) 14%, transparent);
  color: var(--bad);
}

.adm-pool__how {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.adm-pool__field {
  padding: 9px 12px;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.adm-pool__history {
  margin-top: 12px;
}

.adm-details summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.adm-details[open] summary {
  margin-bottom: 12px;
}

/* ============================================================
   СТАРТОВЫЙ ЭКРАН
   Плиты из логотипа падают друг на друга и пружинят, потом «проезжает»
   надпись STACKLY. Когда каталог загрузился (splash-screen--leaving в
   app.js), башня улетает вверх, надпись — вниз, фон гаснет.
   ============================================================ */
.splash-screen {
  --splash-tilt: 14deg;
  position: fixed;
  inset: 0;
  z-index: 5000;
  overflow: hidden;
}

/* Фон отдельным слоем: градиент нельзя плавно погасить через background */
.splash-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(145deg, #5546ea 0%, #6c5df2 50%, #8a7cf7 100%);
  transition: opacity 0.3s ease 0.3s;
}

.splash-screen--leaving {
  pointer-events: none;
}

.splash-screen--leaving::before {
  opacity: 0;
}

.splash-screen--hidden {
  visibility: hidden;
}

.splash-defs {
  position: absolute;
  width: 0;
  height: 0;
}

/* ---- Сетка-«вирус» (только ПК, рисует app.js:startSplashGrid) ---- */
.splash-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.splash-screen--leaving .splash-grid {
  opacity: 0;
  transition: opacity 0.35s ease 0.1s;
}

/* ---- Башня из 4 плит ---- */
.splash-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(var(--splash-tilt));
}

.splash-tower {
  position: relative;
  /* 200×408 — 4 плиты высотой 144 с шагом 88 (см. symbol в index.html) */
  height: min(94vh, 132vw);
  aspect-ratio: 200 / 408;
  animation: towerFloat 2.6s ease-in-out 2.1s infinite;
}

.splash-slab {
  position: absolute;
  left: 0;
  bottom: calc(var(--i) * 88 / 408 * 100%);
  width: 100%;
  height: calc(144 / 408 * 100%);
  overflow: visible;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 1.2vh 2vh rgba(28, 12, 120, 0.25));
  animation: slabDrop 1.5s calc(0.05s + var(--i) * 0.26s) both;
}

/* Падение с ускорением, приземление со сплющиванием и затухающая пружина */
@keyframes slabDrop {
  0% {
    transform: translateY(-130vh);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  32% {
    transform: translateY(0) scale(1.04, 0.9);
    animation-timing-function: ease-out;
  }
  44% {
    transform: translateY(-4.5vh) scale(0.98, 1.03);
    animation-timing-function: ease-in-out;
  }
  58% {
    transform: translateY(0) scale(1.015, 0.97);
    animation-timing-function: ease-in-out;
  }
  71% {
    transform: translateY(-1.6vh) scale(1, 1);
    animation-timing-function: ease-in-out;
  }
  85% {
    transform: translateY(0);
    animation-timing-function: ease-in-out;
  }
  93% {
    transform: translateY(-0.4vh);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes towerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.4vh); }
}

/* Жёлтая точка из логотипа — у правого угла верхней плиты */
.splash-coin {
  position: absolute;
  left: 100%;
  top: calc(50 / 408 * 100%);
  width: 13%;
  aspect-ratio: 1;
  margin: -6.5% 0 0 -6.5%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #ffc23d 60%, #f0a91c);
  box-shadow: 0 0.6vh 1.6vh rgba(120, 70, 0, 0.3);
  animation: coinPop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 1.4s both;
}

@keyframes coinPop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ---- Надпись STACKLY: «проезжает» по наклонной дороге ---- */
.splash-road {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(18deg);
}

.splash-word {
  font-size: min(22vw, 20vh);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  white-space: nowrap;
  /* Мягкая тень в цвет фона — чтобы белые буквы не сливались с плитами */
  text-shadow: 0 0.03em 0.18em rgba(30, 12, 120, 0.5);
  transform: skewX(-16deg);
  animation:
    wordDriveIn 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) 1s both,
    wordFloat 2.6s ease-in-out 1.8s infinite;
}

/* Влетает на скорости со шлейфом и размытием движения, «тормозит» с
   наклоном вперёд и выравнивается. Шлейф — полупрозрачные копии текста
   позади (отрицательный сдвиг по X), к центру они стягиваются в ноль. */
@keyframes wordDriveIn {
  0% {
    transform: translateX(-150vw) skewX(-34deg);
    filter: blur(3px);
    text-shadow:
      0 0.03em 0.18em rgba(30, 12, 120, 0.5),
      -0.3em 0 0.12em rgba(255, 255, 255, 0.4),
      -0.7em 0 0.2em rgba(255, 255, 255, 0.18);
  }
  45% {
    filter: blur(1.5px);
    text-shadow:
      0 0.03em 0.18em rgba(30, 12, 120, 0.5),
      -0.15em 0 0.08em rgba(255, 255, 255, 0.3),
      -0.35em 0 0.14em rgba(255, 255, 255, 0.12);
  }
  62% {
    transform: translateX(4vw) skewX(-4deg);
    filter: blur(0);
    text-shadow:
      0 0.03em 0.18em rgba(30, 12, 120, 0.5),
      0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(255, 255, 255, 0);
  }
  82% { transform: translateX(-1vw) skewX(-20deg); }
  100% {
    transform: translateX(0) skewX(-16deg);
    filter: none;
    text-shadow:
      0 0.03em 0.18em rgba(30, 12, 120, 0.5),
      0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes wordFloat {
  0%, 100% { transform: translate(0, 0) skewX(-16deg); }
  50% { transform: translate(1.4vw, -0.8vh) skewX(-16deg); }
}

/* ---- Выход: башня резко вверх, надпись резко вниз ---- */
.splash-screen--leaving .splash-tower {
  animation: towerLaunch 0.55s cubic-bezier(0.7, 0, 0.85, 0.25) forwards;
}

@keyframes towerLaunch {
  0% { transform: translateY(0); }
  18% { transform: translateY(2.5vh); }
  100% { transform: translateY(-160vh); }
}

.splash-screen--leaving .splash-word {
  animation: wordExit 0.5s cubic-bezier(0.7, 0, 0.85, 0.25) 0.06s both;
}

@keyframes wordExit {
  0% { transform: translateY(0) skewX(-16deg); }
  18% { transform: translateY(-3vh) skewX(-16deg); }
  100% { transform: translateY(150vh) skewX(-16deg); }
}

@media (prefers-reduced-motion: reduce) {
  .splash-tower,
  .splash-slab,
  .splash-coin,
  .splash-word,
  .splash-screen--leaving .splash-tower,
  .splash-screen--leaving .splash-word {
    animation: none;
  }
  .splash-screen--leaving .splash-scene,
  .splash-screen--leaving .splash-road {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
}

/* ============================================================
   АДАПТИВ — широкий экран
   ============================================================ */
@media (min-width: 720px) {
  :root { --gutter: 26px; }

  .catalog--nft-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ============================================================
   АДАПТИВ — ПК (Telegram Desktop / браузер)
   ------------------------------------------------------------
   На широком экране интерфейс не телефонный, а свой:
   - слева постоянное боковое меню (это та же .bottom-nav, только
     вертикальная) вместо нижней панели и шапки;
   - каталог — сеткой в 2–3 колонки;
   - чаты и апелляции — в две панели: список слева, открытый диалог /
     дело справа (какие экраны показывать вместе, CSS узнаёт по
     body[data-screen], см. showScreen в app.js).
   Режим включается по ширине окна; на телефоне ничего из этого нет.
   ============================================================ */
@media (min-width: 900px) {
  :root {
    --wide: 1120px;
    --side-w: 236px;
    --list-w: 372px;
    /* шапки и нижней панели на ПК нет — место под них не резервируем */
    --nav-h: 0px;
    --bottom-h: 0px;
    /* В полноэкранном режиме Telegram поверх контента сверху плавает его
       плашка (закрыть/меню). На телефоне этот отступ съедала шапка — на ПК
       её нет, поэтому отступаем сами: и обычные экраны (через body), и
       каждую закреплённую панель. Иначе липкие вкладки каталога, которые
       прилипают как раз на этой высоте, съезжали вниз на подвкладки. */
    --top-inset: var(--tg-content-safe-top, env(safe-area-inset-top, 0px));
  }

  body {
    padding-left: var(--side-w);
    padding-top: var(--top-inset);
  }

  /* Полоса под плашкой Telegram — чтобы прокручиваемые товары не
     просвечивали над прилипшими вкладками */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: var(--side-w);
    right: 0;
    height: var(--top-inset);
    z-index: 45;
    background: var(--bg);
  }

  .topbar {
    display: none;
  }

  .screen {
    padding-top: 26px;
  }

  /* С боковым меню кнопка "Назад" в каталог не нужна, как и "Назад" в
     профиль у Swap/Апелляций — на ПК они открываются из меню, а не из профиля */
  .back-btn[data-target="catalog-screen"],
  .back-btn--mobile,
  .profile-list-card--mobile {
    display: none;
  }

  .bottom-nav__item--desktop:not(.bottom-nav__item--hidden) {
    display: flex;
  }

  #catalog-screen {
    max-width: var(--wide);
    padding-top: 22px;
  }

  /* Инвентарь — во всю рабочую ширину, как витрина NFT, а не колонкой
     в 620px: карточкам не тесно */
  #inventory-screen {
    max-width: var(--wide);
  }

  #inventory-screen .nft-inv-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
  }

  #inventory-screen .nft-inv-card {
    padding: 10px 10px 12px;
    gap: 10px;
  }

  #inventory-screen .nft-inv-card__title {
    font-size: 14px;
  }

  .nft-inv-grid--empty > :nth-child(n + 5) {
    display: flex;
  }

  .nft-inv-grid--empty > :nth-child(n + 9) {
    display: none;
  }

  /* Карточки товаров — сеткой; :has, чтобы не задеть формы Stars/Premium
     и списки username/номеров, которые рисуются в этот же контейнер */
  .catalog:has(> .card) {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px;
  }

  .catalog:not(.catalog--nft-grid):not(:has(> .card)) {
    max-width: 620px;
  }

  .catalog--nft-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
  }

  /* В плитке шириной ~340px строка "иконка | текст | цена" сжимала
     название в 3–4 строки — на ПК карточка двухэтажная: сверху иконка
     и название с продавцом, снизу во всю ширину — цена. */
  .card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-items: start;
    gap: 0 14px;
    padding: 18px 18px 14px;
  }

  .card__icon {
    width: 46px;
    height: 46px;
    font-size: 16px;
  }

  .card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 15px;
    line-height: 1.35;
  }

  .card__price-block {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .card__price {
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
  }

  .card__price-ton {
    margin-top: 0;
    font-size: 12.5px;
  }

  .card__chevron {
    display: none;
  }

  /* ---------- Боковое меню ---------- */
  .bottom-nav,
  .chat-open .bottom-nav {
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--side-w);
    gap: 4px;
    padding: calc(18px + var(--top-inset)) 12px 18px;
    border-radius: 0;
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--panel);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .bottom-nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 20px;
  }

  .bottom-nav__brand-logo {
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-2);
    object-fit: cover;
  }

  .bottom-nav__brand-title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.03em;
  }

  .bottom-nav__item {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    height: 46px;
    padding: 0 10px;
    border-radius: var(--r-sm);
  }

  .bottom-nav__item:hover {
    background: var(--panel-3);
    color: var(--text);
  }

  .bottom-nav__item--active,
  .bottom-nav__item--active:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .bottom-nav__item--active .bottom-nav__icon {
    transform: none;
    box-shadow: none;
  }

  .bottom-nav__label {
    font-size: 14.5px;
  }

  /* ---------- Две панели: чаты и апелляции ---------- */
  /* Вместе со списком показываем открытый диалог (и наоборот), хотя
     showScreen пометил второй экран скрытым */
  body[data-screen="chat-screen"] #chats-screen.screen--hidden,
  body[data-screen="moderation-appeal-screen"] #moderation-screen.screen--hidden {
    display: block !important;
  }

  body[data-screen="chats-screen"] #chat-screen.screen--hidden,
  body[data-screen="moderation-screen"] #moderation-appeal-screen.screen--hidden {
    display: flex !important;
  }

  /* Левая панель — список */
  #chats-screen,
  #moderation-screen {
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--side-w);
    width: var(--list-w);
    max-width: none;
    margin: 0;
    padding: calc(24px + var(--top-inset)) 16px 24px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    animation: none;
  }

  /* Правая панель — диалог / дело */
  #chat-screen,
  #moderation-appeal-screen {
    position: fixed;
    top: 0;
    bottom: 0;
    left: calc(var(--side-w) + var(--list-w));
    right: 0;
    height: auto;
    max-width: none;
    margin: 0;
    padding: calc(16px + var(--top-inset)) 28px 18px;
  }

  /* В двух панелях "назад к списку" не нужна — список и так слева */
  #chat-screen .back-btn,
  #moderation-appeal-screen .back-btn {
    display: none;
  }

  .chat-topbar {
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .chat-bubble {
    max-width: min(70%, 560px);
  }

  /* Пока ничего не выбрано — заглушка вместо пустого чата */
  .pane--empty > * {
    display: none !important;
  }

  .pane--empty::after {
    margin: auto;
    padding: 9px 16px;
    border-radius: var(--r-pill);
    background: var(--panel-3);
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
  }

  #chat-screen.pane--empty::after {
    content: "Выберите чат слева";
  }

  #moderation-appeal-screen.pane--empty::after {
    content: "Выберите апелляцию слева";
  }

  .chat-list-item--active,
  .chat-list-item--active:hover {
    background: var(--accent-soft);
  }

  .appeal-item--active {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  /* Шторка покупки/пополнения — окном по центру, а не от нижнего края */
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    border-radius: var(--r-lg);
    padding-bottom: 24px;
  }
}

/* Небольшое окно на ПК — панели уже, чтобы диалогу хватало места */
@media (min-width: 900px) and (max-width: 1139px) {
  :root {
    --side-w: 196px;
    --list-w: 300px;
  }
}

/* ============================================================
   АНИМАЦИИ ПЕРЕКЛЮЧЕНИЯ / НАЖАТИЯ / УДАЛЕНИЯ ЧАТА
   ============================================================ */

/* Ряды подвкладок и игр/серверов появляются с лёгким "выездом" */
@keyframes subtabsIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes subtabPop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.subcategory-tabs:not(.subcategory-tabs--hidden) {
  animation: subtabsIn 0.28s var(--ease) both;
}

.subtab-btn {
  transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t), transform 0.3s var(--spring);
}

.subtab-btn--active {
  animation: subtabPop 0.35s var(--spring);
}

/* Нажатие: единая "пружинка" для всего кликабельного. Быстрое сжатие,
   при отпускании — упругий возврат (за счёт transition с --spring). */
button,
.card,
.nft-card,
.collectible-row,
.chat-list-item,
.recent-ops__item,
.bottom-nav__item,
.modal__option,
.nft-filters__advanced summary {
  -webkit-tap-highlight-color: transparent;
  transition-property: background, border-color, color, opacity, box-shadow, transform;
  transition-duration: 0.18s, 0.18s, 0.18s, 0.18s, 0.18s, 0.3s;
  transition-timing-function: var(--ease), var(--ease), var(--ease), var(--ease), var(--ease), var(--spring);
}

button:not(:disabled):active,
.card:active,
.nft-card:active,
.collectible-row:active,
.chat-list-item:active,
.recent-ops__item:active,
.bottom-nav__item:active,
.modal__option:active,
.nft-filters__advanced summary:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
}

.tab-btn--active:not(:disabled):active {
  transform: scale(0.98);
}

/* Кнопка удаления чата */
.chat-list-item__delete {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  color: var(--text-2);
}

.chat-list-item__delete svg {
  width: 17px;
  height: 17px;
}

.chat-list-item__delete:hover,
.chat-list-item__delete:active {
  color: #e5484d;
  background: rgba(229, 72, 77, 0.1);
}

/* Схлопывание карточки чата при удалении */
.chat-list-item {
  overflow: hidden;
}

.chat-list-item--removing {
  height: 0 !important;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  transform: translateX(40px);
  transition: height 0.3s var(--ease), margin 0.3s var(--ease), padding 0.3s var(--ease),
    opacity 0.25s var(--ease), transform 0.3s var(--ease);
}

/* ============================================================
   MARKET (Stars / Premium)
   ============================================================ */
.mk {
  display: grid;
  gap: 16px;
  animation: rise 0.25s var(--ease) both;
}

.mk-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r);
  color: #fff;
  background: linear-gradient(135deg, #6d5bf7 0%, #4b3ae0 100%);
  box-shadow: 0 10px 24px -12px var(--accent-line);
}

.mk-hero--premium {
  background: linear-gradient(135deg, #8a5cf6 0%, #d15bd6 100%);
}

.mk-hero__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
}

.mk-hero__icon svg { width: 24px; height: 24px; }
.mk-hero__title { font-size: 17px; font-weight: 700; }
.mk-hero__sub { margin-top: 2px; font-size: 12.5px; opacity: 0.85; }

.mk-section { display: grid; gap: 8px; }

.mk-section__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.mk-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

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

.mk-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mk-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mk-chip svg { width: 14px; height: 14px; color: #f5a623; }

.mk-chip--active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  animation: subtabPop 0.3s var(--spring);
}

.mk-pay {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mk-pay__opt {
  display: grid;
  gap: 3px;
  padding: 10px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  text-align: center;
}

.mk-pay__name { font-size: 13px; font-weight: 700; }

.mk-pay__price {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mk-pay__opt--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mk-pay__opt--active .mk-pay__name,
.mk-pay__opt--active .mk-pay__price { color: var(--accent); }

.mk-plans { display: grid; gap: 8px; }

.mk-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "term price" "per price";
  align-items: center;
  column-gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r);
  border: 1.5px solid var(--line-2);
  background: var(--panel);
  text-align: left;
}

.mk-plan__term { grid-area: term; font-size: 15px; font-weight: 700; }
.mk-plan__per { grid-area: per; font-size: 12px; color: var(--muted); }
.mk-plan__price { grid-area: price; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

.mk-plan--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mk-plan--active .mk-plan__price,
.mk-plan--active .mk-plan__term { color: var(--accent); }

.mk-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel-3);
}

.mk-summary__label { font-size: 13px; color: var(--text-2); }

.mk-summary__value {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.mk-summary--loading .mk-summary__value { opacity: 0.45; }

.mk-buy {
  height: 50px;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px -8px var(--accent-line);
}

.mk-buy:disabled { opacity: 0.6; }

/* ============================================================
   ЭКРАН ОБМЕНА TON ⇄ USDT (TON)
   Два столбика: слева — что отдаём, справа — что получаем.
   ============================================================ */
.exchange-columns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
  margin-bottom: 14px;
}

.exchange-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.exchange-column__title {
  min-height: 34px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-2);
}

.exchange-asset {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon label"
    "icon sub"
    "bal  bal";
  column-gap: 9px;
  row-gap: 1px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  background: var(--panel);
  box-shadow: var(--shadow-card);
  text-align: left;
  color: var(--text);
  transition: border-color var(--t), background var(--t), transform var(--t);
}

.exchange-asset:active {
  transform: scale(0.98);
}

.exchange-asset__icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.exchange-asset--ton .exchange-asset__icon { background: var(--ton); }
.exchange-asset--usdt .exchange-asset__icon { background: var(--usdt); }

.exchange-asset__label {
  grid-area: label;
  font-size: 15px;
  font-weight: 700;
}

.exchange-asset__sub {
  grid-area: sub;
  font-size: 11.5px;
  color: var(--muted);
}

.exchange-asset__balance {
  grid-area: bal;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exchange-asset--selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.exchange-flip {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--accent);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--spring);
}

.exchange-flip:active {
  transform: rotate(180deg);
}

.exchange-flip svg {
  width: 17px;
  height: 17px;
}

.exchange-amount,
.exchange-receive {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.exchange-amount__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.exchange-amount__head b {
  color: var(--text-2);
  font-weight: 600;
}

.exchange-amount__row,
.exchange-receive__value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exchange-amount__input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.exchange-amount__input::placeholder {
  color: var(--muted);
}

.exchange-amount__unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.exchange-amount__max {
  padding: 6px 11px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}

.exchange-receive__value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.exchange-receive__value > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exchange-receive__note {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}

.exchange-receive__note--error {
  color: var(--bad);
}

.exchange-pool-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--text);
  text-align: left;
  transition: transform var(--t);
}

.exchange-pool-btn:active {
  transform: scale(0.98);
}

.exchange-pool-btn__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #26a17b;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.exchange-pool-btn__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.exchange-pool-btn__text span {
  font-size: 12px;
  color: var(--muted);
}

.exchange-pool-btn__arrow {
  flex: none;
  font-size: 22px;
  color: var(--accent);
}

.exchange-hint {
  margin: 4px 2px 16px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.exchange-action {
  position: sticky;
  bottom: calc(var(--bottom-h) + 14px + env(safe-area-inset-bottom, 0px));
}

.exchange-action__btn {
  width: 100%;
  height: 52px;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 24px -12px var(--accent);
  transition: opacity var(--t), transform var(--t);
}

.exchange-action__btn:active:not(:disabled) {
  transform: scale(0.98);
}

.exchange-action__btn:disabled {
  opacity: 0.4;
  box-shadow: none;
}

.exchange-asset__icon svg {
  width: 100%;
  height: 100%;
}

.exchange-asset--usdt .exchange-asset__icon {
  font-size: 23px;
}

/* Кружок автообновления курса: убывает за --exchange-refresh-ms, затем
   подтягивается новый курс (см. scheduleExchangeRefresh в app.js). */
.exchange-timer {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.exchange-timer--hidden {
  visibility: hidden;
}

.exchange-timer svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.exchange-timer circle {
  fill: none;
  stroke-width: 2.5;
}

.exchange-timer__track {
  stroke: var(--line-2);
}

.exchange-timer__bar {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 50.27;
  stroke-dashoffset: 0;
}

.exchange-timer--running .exchange-timer__bar {
  animation: exchange-timer-drain var(--exchange-refresh-ms, 5s) linear forwards;
}

@keyframes exchange-timer-drain {
  to { stroke-dashoffset: 50.27; }
}

/* Низ бесконечной ленты NFT: сюда смотрит IntersectionObserver, здесь же
   "Загружаем ещё..." / "Больше лотов нет" / кнопка повтора. */
.nft-feed-sentinel {
  grid-column: 1 / -1;
  min-height: 1px;
  padding: 6px 0 2px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.nft-feed-sentinel:empty {
  padding: 0;
}

.nft-feed-sentinel__retry {
  margin-left: 6px;
  color: var(--accent);
  font-weight: 600;
}

/* Строки списка чатов теперь внутри общей карточки — вместо "пружинки"
   с уменьшением даём просто подсветку строки при нажатии. */
.chat-list-item:active {
  transform: none;
  background: var(--panel-3);
}

.modal__option--danger {
  color: var(--bad);
}

/* ============================================================
   SWAP — USDT (CryptoBot) -> USDT (TON), таймер до выплаты
   ============================================================ */
.swap-head {
  margin-bottom: 14px;
}

.swap-head__title {
  margin-bottom: 2px;
}

.swap-head__sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}

/* --- Таймер: без карточки, просто строка цифр и тонкая полоса --- */
.swap-countdown {
  margin: 4px 2px 16px;
}

.swap-countdown__label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.swap-countdown__when {
  font-weight: 500;
  color: var(--text-2);
}

.swap-countdown__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.swap-countdown__digits {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.swap-countdown__unit {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.swap-countdown__unit b {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.swap-countdown__unit small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.swap-countdown__sep {
  font-size: 22px;
  font-weight: 600;
  color: var(--line-2);
}

.swap-countdown__progress {
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--panel-3);
}

.swap-countdown__progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 1s linear;
}

.swap-countdown--paying .swap-countdown__dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  animation: swap-blink 1.2s ease-in-out infinite;
}

.swap-countdown--paying .swap-countdown__progress span {
  background: var(--ok);
}

@keyframes swap-blink {
  50% { opacity: 0.35; }
}

/* --- Предупреждение о сроках выплаты --- */
.swap-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--r);
  background: var(--warn-soft);
  color: #8a560c;
}

.swap-notice p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.swap-notice__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--warn);
  color: #fff;
}

.swap-notice__icon svg {
  width: 16px;
  height: 16px;
}

/* --- Блок обмена: две панели и кнопка-стрелка между ними --- */
.swap-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.swap-panel {
  display: block;
  padding: 14px 16px 16px;
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  border: 1.5px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}

.swap-panel--from:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-card);
}

.swap-panel--to {
  background: var(--panel-3);
  box-shadow: none;
}

.swap-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
  margin-bottom: 8px;
}

.swap-panel__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.swap-panel__hint {
  font-size: 12px;
  color: var(--muted);
}

.swap-panel__balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.swap-panel__balance span {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.swap-panel__main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swap-panel__input,
.swap-panel__output {
  flex: 1;
  min-width: 0;
  font-family: var(--font);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.swap-panel__input {
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  -moz-appearance: textfield;
}

.swap-panel__input::-webkit-outer-spin-button,
.swap-panel__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.swap-panel__input::placeholder {
  color: var(--line-2);
}

.swap-panel__output {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--usdt);
}

.swap-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r-pill);
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}

.swap-panel--from .swap-chip {
  background: var(--panel-3);
  box-shadow: none;
}

.swap-chip__icon {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
}

.swap-chip__icon > svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Бейдж сети в углу иконки USDT */
.swap-chip__net {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 0 0 2px var(--panel);
}

.swap-chip__net svg {
  width: 11px;
  height: 11px;
}

.swap-chip__net--cryptobot {
  background: #2aa3e6;
}

.swap-chip__net--cryptobot svg {
  width: 10px;
  height: 10px;
}

.swap-chip__net--ton {
  background: var(--ton);
}

.swap-panel--from .swap-chip__net {
  box-shadow: 0 0 0 2px var(--panel-3);
}

.swap-chip__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.swap-chip__text b {
  font-size: 15px;
  font-weight: 700;
}

.swap-chip__text small {
  font-size: 11px;
  color: var(--muted);
}

.swap-box__switch {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 5px var(--bg), 0 8px 18px -8px var(--accent);
}

.swap-box__switch svg {
  width: 18px;
  height: 18px;
}

/* --- Детали: комиссия, удержание, минимум --- */
.swap-details {
  margin: 0 0 12px;
  padding: 6px 16px;
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.swap-details__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 13.5px;
}

.swap-details__row + .swap-details__row {
  border-top: 1px solid var(--line);
}

.swap-details dt {
  color: var(--text-2);
}

.swap-details dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.swap-details__fee {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.swap-error {
  margin: 0 2px 10px;
  font-size: 13px;
  color: var(--bad);
}

.swap-error--hidden {
  display: none;
}

.swap-action {
  margin-bottom: 24px;
}

.swap-history__title {
  margin: 0 2px 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.swap-history__empty {
  margin: 0;
  padding: 18px;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 360px) {
  .swap-panel__input,
  .swap-panel__output {
    font-size: 25px;
  }

  .swap-chip__text small {
    display: none;
  }
}

/* ============================================================
   АПЕЛЛЯЦИИ И МОДЕРАЦИЯ
   ============================================================ */
/* Системное сообщение в ленте чата: апелляция открыта / решение модератора */
.chat-system {
  align-self: center;
  max-width: 88%;
  margin: 8px 0;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  background: var(--bad-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Подпись автора над репликами — только в разборе апелляции */
.chat-sender {
  align-self: flex-start;
  margin: 6px 4px 2px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}

.chat-sender--out {
  align-self: flex-end;
}

.chat-sender--buyer {
  color: var(--ton);
}

.chat-sender--seller {
  color: var(--usdt);
}

.chat-sender--moderator {
  color: var(--warn);
}

/* Сообщение модератора в чате сторон — входящее, но заметно другого цвета */
.chat-bubble--mod {
  background: #fff6e8;
  box-shadow: inset 0 0 0 1px rgba(217, 138, 27, 0.28);
}

.modal__submit {
  width: 100%;
  height: 50px;
  margin-top: 4px;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
}

.modal__submit:disabled {
  opacity: 0.55;
}

/* ---------- Очередь апелляций ---------- */
.appeal-queue-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.appeal-queue-hint svg {
  width: 14px;
  height: 14px;
}

.appeal-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.appeal-item {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--t);
}

.appeal-item:active {
  transform: scale(0.985);
}

.appeal-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--bad-soft);
  color: var(--bad);
}

.appeal-item__icon svg {
  width: 20px;
  height: 20px;
}

.appeal-item__body {
  flex: 1;
  min-width: 0;
}

.appeal-item__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.appeal-item__title {
  min-width: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appeal-item__amount {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.appeal-item__parties {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appeal-item__reason {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
  word-break: break-word;
}

.appeal-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.appeal-item__meta .chat-role-tag {
  margin-right: 0;
}

.appeal-wait {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-2);
}

.appeal-wait svg {
  width: 14px;
  height: 14px;
}

.appeal-wait--long {
  color: var(--warn);
}

.appeal-wait--late {
  color: var(--bad);
}

/* ---------- Разбор апелляции ---------- */
.mod-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
}

.mod-party {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
}

.mod-party > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mod-party .chat-avatar--sm {
  width: 30px;
  height: 30px;
}

.mod-party__role {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.mod-party__name {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 6px;
}

.mod-actions__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  height: 48px;
  padding: 0 10px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
}

.mod-actions__btn svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
}

.mod-actions__btn--refund {
  background: var(--bad-soft);
  color: var(--bad);
}

.mod-actions__btn--release {
  background: var(--ok);
  color: #fff;
}

.mod-verdict {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 13px 14px;
  border-radius: var(--r);
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.mod-verdict svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
}

/* ============================================================
   ЗНАЧОК ДОВЕРЕННОГО ПРОДАВЦА
   ============================================================ */
/* Галочка в "печати" сразу после ника — размер от шрифта строки, поэтому
   одинаково смотрится в карточке товара, списке чатов и шапке чата. */
.verified-badge {
  display: inline-block;
  flex-shrink: 0;
  width: 1.18em;
  height: 1.18em;
  margin-left: 0.28em;
  vertical-align: -0.24em;
  color: var(--accent);
  filter: drop-shadow(0 1px 2px var(--accent-line));
}

.profile-header__verified {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 650;
}

/* ============================================================
   ФОТО И ВИДЕО В ЧАТЕ
   ============================================================ */
.chat-form--hidden {
  display: none;
}

.chat-form__attach {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--muted);
}

.chat-form__attach:hover {
  color: var(--accent);
}

.chat-form__attach svg {
  width: 21px;
  height: 21px;
}

.chat-form__attach:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* С кнопкой-скрепкой слева отступ у текста уже не нужен */
.chat-form__attach + input + .chat-form__input {
  padding-left: 4px;
}

/* Полоса загрузки вложения над полем ввода */
.chat-upload {
  flex-shrink: 0;
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 9px 13px 10px;
  border-radius: var(--r-sm);
  background: var(--panel);
  border: 1px solid var(--line);
}

.chat-upload--hidden {
  display: none;
}

.chat-upload__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.chat-upload__label .spinner {
  width: 13px;
  height: 13px;
}

.chat-upload__bar {
  display: block;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--panel-3);
  overflow: hidden;
}

.chat-upload__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.2s linear;
}

/* Сообщение с вложением — сторону и цвет берёт у .chat-bubble--in/--out */
.chat-media {
  flex-shrink: 0;
  width: min(78%, 300px);
  padding: 4px;
  border-radius: 18px;
  animation: rise 0.16s var(--ease) both;
}

.chat-media__item {
  display: block;
  width: 100%;
  max-height: 340px;
  min-height: 90px;
  border-radius: 14px;
  background: rgba(20, 20, 30, 0.08);
  object-fit: cover;
}

video.chat-media__item {
  object-fit: contain;
  background: #000;
}

img.chat-media__item {
  cursor: zoom-in;
}

.chat-media__caption {
  padding: 6px 8px 0;
  font-size: 14.5px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-media__time {
  display: block;
  padding: 3px 8px 2px;
  font-size: 10.5px;
  font-weight: 500;
  text-align: right;
  opacity: 0.6;
}

/* ---------- Просмотр фото на весь экран ---------- */
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 16, 0.94);
  cursor: zoom-out;
}

.image-viewer--hidden {
  display: none;
}

.image-viewer__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-viewer__close {
  position: absolute;
  top: calc(14px + var(--tg-content-safe-top, env(safe-area-inset-top, 0px)));
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.image-viewer__close svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   АПЕЛЛЯЦИИ: КТО ВЕДЁТ ДЕЛО
   ============================================================ */
.appeal-tag {
  flex-shrink: 0;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appeal-tag--free {
  background: var(--ok-soft);
  color: var(--ok);
}

.appeal-tag--mine {
  background: var(--accent-soft);
  color: var(--accent);
}

.appeal-tag--taken {
  background: var(--panel-3);
  color: var(--text-2);
}

.appeal-tag .verified-badge {
  display: none;
}

.mod-link {
  padding: 0;
  color: var(--accent);
  font-size: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mod-actions__btn--claim {
  background: var(--accent);
  color: #fff;
}

.mod-actions__btn:disabled {
  opacity: 0.55;
}

.mod-verdict--muted {
  background: var(--panel-3);
  color: var(--text-2);
}

/* В разборе апелляции под кнопками решения ещё и поле ввода */
.mod-actions + .chat-upload,
.mod-actions + .chat-upload + .chat-form {
  margin-top: 8px;
}

/* Заглушка поверх всего приложения, пока маркетплейс закрыт админом */
.market-closed {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: var(--bg);
  text-align: center;
}

.market-closed__icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 6px;
}

.market-closed__title {
  font-size: 18px;
  font-weight: 700;
}

.market-closed__text {
  color: var(--muted);
  font-size: 14px;
}

/* Документы маркетплейса (showDocuments) — открываются поверх
   шторки покупки, но ниже app-alert */
.terms-doc {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(12px + var(--tg-content-safe-top, env(safe-area-inset-top, 0px)))
    16px
    max(12px, env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px));
  background: rgba(20, 20, 30, 0.45);
}

.terms-doc__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow-toast);
  overflow: hidden;
  animation: pop 0.2s var(--ease);
}

.terms-doc__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.terms-doc__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.terms-doc__title {
  font-size: 17px;
  font-weight: 700;
}

.terms-doc__subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.terms-doc__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 20px 10px;
}

.terms-doc__section {
  padding: 10px 0;
}

.terms-doc__section-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.terms-doc__text {
  margin: 0;
  white-space: pre-line; /* пункты списков в documents.js — через \n */
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.terms-doc__foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}

.terms-doc__foot--row {
  flex-direction: row;
}

.terms-doc__foot--row > * {
  flex: 1;
}

.terms-doc__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
}

.terms-doc__back svg {
  width: 18px;
  height: 18px;
}

.terms-doc__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 4px;
}

.terms-doc__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  transition: background var(--t), border-color var(--t);
}

.terms-doc__item:hover,
.terms-doc__item:active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.terms-doc__item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.terms-doc__item-icon svg {
  width: 20px;
  height: 20px;
}

.terms-doc__item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.terms-doc__item-title {
  font-size: 14.5px;
  font-weight: 600;
}

.terms-doc__item-sub {
  color: var(--muted);
  font-size: 12.5px;
}

.terms-doc__item-chevron {
  display: flex;
  flex-shrink: 0;
  color: var(--muted);
}

.terms-doc__item-chevron svg {
  width: 16px;
  height: 16px;
}

/* Галочка согласия перед кнопкой покупки (termsCheckHtml) */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 10px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.terms-check__box {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.terms-check__link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.terms-check__error {
  margin: 8px 0 0;
  color: var(--bad);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  animation: pop 0.2s var(--ease);
}

.profile-terms-link {
  display: block;
  margin: 18px auto 4px;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
}

/* Номер аккаунта с кнопкой "Получить код" в одной строке (renderAccountCodes) */
.account-line {
  padding-right: 4px;
}

.account-line__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 36px;
  margin-left: 2px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.account-line__btn:hover {
  background: var(--accent-2);
}

.account-line__btn:disabled {
  opacity: 0.7;
}

.account-line__btn .spinner {
  width: 13px;
  height: 13px;
  margin: 0;
  color: #fff;
}

.purchase-account {
  margin-top: 10px;
}

/* ============================================================
   КАРТОЧКА-ОПИСАНИЕ TELEGRAM-АККАУНТА (openAccountDetail)
   ============================================================ */
.acc-detail__country {
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.acc-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.acc-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
}

.acc-stat__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.acc-stat__value {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.acc-stat__value--ok { color: var(--ok); }
.acc-stat__value--bad { color: var(--bad); }
.acc-stat__value--muted { color: var(--muted); }

.acc-detail__updated {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--muted);
}

.acc-detail__warn {
  margin-bottom: 14px;
}

.acc-detail__pending {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 18px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--panel-3);
  font-size: 13.5px;
  color: var(--text-2);
}

/* ============================================================
   СТРАНИЦА ТОВАРА (openProductPage) — почти на весь экран,
   сверху остаётся видна полоска каталога
   ============================================================ */
.product-page {
  position: fixed;
  inset: 0;
  z-index: 900; /* ниже .modal-overlay — шторки покупки открываются поверх */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 20, 30, 0.38);
  transition: opacity 0.26s var(--ease), visibility 0.26s var(--ease);
}

.product-page--hidden {
  opacity: 0;
  visibility: hidden;
}

html.product-page-open,
html.product-page-open body {
  overflow: hidden;
}

.product-page__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: calc(100% - 40px - var(--tg-content-safe-top, env(safe-area-inset-top, 0px)));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--bg);
  box-shadow: var(--shadow-sheet);
  overflow: hidden;
  /* Полоска под «ручкой» — прокручиваемый контент под неё не заезжает */
  padding-top: 18px;
  transition: transform 0.32s var(--ease);
}

.product-page--hidden .product-page__panel {
  transform: translateY(100%);
}

.product-page__grip {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 38px;
  height: 4px;
  margin-left: -19px;
  border-radius: var(--r-pill);
  background: var(--line-2);
}

.product-page__panel > .modal__close {
  z-index: 2;
}

.product-page__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px var(--gutter) 20px;
}

.product-page__footer {
  padding: 4px var(--gutter) calc(14px + max(env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px)));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.product-page__footer .sheet-btn {
  margin-top: 10px;
}

.pp-head {
  padding: 18px;
  margin-bottom: 10px;
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.pp-tags {
  display: flex;
  margin-top: 8px;
}

.pp-title {
  margin: 0 36px 0 0;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.pp-meta {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.pp-meta--strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.pp-price {
  margin-top: 14px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pp-seller {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.pp-seller__label {
  font-size: 13px;
  color: var(--muted);
}

.pp-seller__name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.pp-section {
  margin: 22px 2px 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pp-description {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--panel);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --- Рейтинг продавца --- */
.pp-quality__note {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--panel);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.pp-quality__note--ok {
  color: var(--text);
}

.pp-rating {
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: var(--r);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.pp-rating__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pp-rating__value span {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.pp-rating__value small {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.pp-rating__meter {
  height: 6px;
  margin: 10px 0 12px;
  border-radius: var(--r-pill);
  overflow: hidden;
}

.pp-rating__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.pp-rating__meter--ok { background: var(--ok-soft); }
.pp-rating__meter--ok span { background: var(--ok); }
.pp-rating__meter--warn { background: var(--warn-soft); }
.pp-rating__meter--warn span { background: var(--warn); }
.pp-rating__meter--bad { background: var(--bad-soft); }
.pp-rating__meter--bad span { background: var(--bad); }

.pp-rating__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* --- График поломок по дням --- */
.pp-chart {
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: var(--r);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.pp-chart__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pp-chart__title {
  font-size: 14px;
  font-weight: 650;
}

.pp-chart__sub {
  font-size: 12.5px;
  color: var(--muted);
}

.pp-chart__plot {
  position: relative;
  padding-left: 18px;
}

.pp-chart__plot svg {
  display: block;
  width: 100%;
  height: 96px;
  overflow: visible;
}

.pp-chart__ymax {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 12px;
  color: var(--muted);
}

.pp-chart__grid,
.pp-chart__axis {
  stroke: var(--line-2);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.pp-chart__bar {
  fill: var(--bad);
}

.pp-chart__hit {
  fill: transparent;
  cursor: pointer;
}

.pp-chart__hit--active {
  fill: rgba(20, 20, 30, 0.05);
}

.pp-chart__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-toast);
}

.pp-chart__x {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 0 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.pp-chart__caption {
  margin: 16px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.pp-chart__checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pp-chart__checks--4 {
  grid-template-columns: repeat(2, 1fr);
}

.pp-check {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
}

.pp-check__value {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.pp-check--hit .pp-check__value {
  color: var(--text);
}

.pp-check__label {
  font-size: 11.5px;
  color: var(--muted);
}

/* ============================================================
   ОРДЕРА НА ПОКУПКУ И «БЫСТРАЯ ПРОДАЖА»
   ============================================================ */

/* «Быстрая продажа» в Telegram → Аккаунты */
.fast-sell-bar {
  margin-bottom: 14px;
}

.fast-sell-bar--hidden {
  display: none;
}

.fast-sell-bar__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  text-align: left;
  box-shadow: var(--shadow-card);
}

.fast-sell-bar__btn:hover {
  background: var(--accent-2);
}

.fast-sell-bar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.fast-sell-bar__icon svg {
  width: 18px;
  height: 18px;
}

.fast-sell-bar__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fast-sell-bar__title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.fast-sell-bar__sub {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.8);
}

.fast-sell-bar__demand {
  align-self: flex-start;
  max-width: 100%;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Карточка «Быстрая продажа» — первая в сетке подарков NFT, того же
   размера, что и карточки лотов (.nft-card) */
.nft-sell-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 8px 11px;
  border-radius: var(--r);
  border: 1px solid var(--accent-line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow var(--t), transform 0.3s var(--spring);
}

.nft-sell-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.nft-sell-card:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
}

.nft-sell-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
}

.nft-sell-card__media svg {
  width: 42%;
  height: 42%;
}

.nft-sell-card__btn {
  display: block;
  margin: 0 3px;
  padding: 8px 0;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 650;
  text-align: center;
}

.catalog--nft-grid > .loading-text {
  grid-column: 1 / -1;
}

/* Строка ордера в стакане — только информация, не кнопка */
.sheet-row--static,
.sheet-row--static:hover {
  border-color: var(--line);
  background: var(--panel-3);
  cursor: default;
}

.fs-label-gap {
  margin-top: 18px;
}

.fs-btn-top {
  margin-top: 0;
}

/* Поля формы ордера по два в ряд */
.fs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.fs-grid .sheet-field__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-nft-thumb {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  object-fit: cover;
}
