/* Переиспользуемые компоненты. Только на токенах. Грузится на всех страницах. */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--space-4);
  box-shadow: var(--sh-card);
  margin-bottom: var(--space-3);
}

.row { display: flex; justify-content: space-between; align-items: center; padding: var(--space-2) 0; }
.row + .row { border-top: 1px solid var(--surface-alt); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--touch);
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--r-card);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary { background: var(--grad-brand-cta); color: var(--brand-text); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-cta-hover); }
.btn-primary:active { transform: translateY(0); }
.btn-success { background: var(--success-soft); color: var(--success-ink); border: 1px solid var(--success-border); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

label.muted { display: block; text-transform: uppercase; letter-spacing: .5px; font-weight: var(--fw-semibold); margin-bottom: var(--space-2); }

.input, .select {
  width: 100%;
  padding: var(--space-3);
  border: 2px solid var(--border);
  border-radius: var(--r-input);
  background: var(--surface-alt);
  color: var(--text);
  font-size: var(--fs-input);
  font-weight: var(--fw-semibold);
}
.input:focus, .select:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: var(--focus-ring); }

.amount { font-size: var(--fs-h1); font-weight: var(--fw-bold); }

.note {
  border-radius: var(--r-input);
  padding: var(--space-2) var(--space-3);
  font-weight: var(--fw-semibold);
  text-align: center;
  font-size: var(--fs-body);
  margin-top: var(--space-2);
}
.note-success { background: var(--success-soft); border: 1px solid var(--success-border); color: var(--success-ink); }
.note-warning { background: var(--warning-soft); border: 1px solid var(--warning-border); color: var(--warning-ink); }

/* List-pattern (нативный iOS-лист): row-карточка с шевроном справа. */
.option-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  padding: .875rem var(--gutter);
  text-decoration: none;
  color: inherit;
  min-height: 56px;
}
.option-icon { flex-shrink: 0; color: var(--brand); display: block; }
.option-info { flex: 1; min-width: 0; }
.option-title { font-size: 1rem; font-weight: 600; color: #1a1a1a; line-height: 1.3; }
.option-sub { font-size: .8125rem; color: #666; margin-top: 2px; line-height: 1.3; }
.option-name {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
}
.option-arrow {
  color: #999;
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Bottom-sheet (выезжает снизу). Универсальный — используется ЛК, может
   быть переиспользован для других «slide-up» модалок. */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, .45);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: sheet-fade .2s ease-out;
}
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
  position: relative;
  width: 100%;
  max-width: 480px;       /* совпадает с .container — sheet не должен быть
                             шире страницы под ним */
  background: #fff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: .75rem var(--gutter) 1.25rem;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .22s ease-out;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .15);
}
.sheet-overlay.is-open .sheet-card { transform: translateY(0); }
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #d8d8d8;
  margin: 0 auto .75rem;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.sheet-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}
.sheet-head .modal-close {
  position: static;
  background: transparent;
  border: 0;
  color: #999;
  padding: .375rem;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}
.sheet-head .modal-close:active { background: rgba(0, 0, 0, .06); }

/* Кабинет — содержимое sheet'a */
.cabinet-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cabinet-sheet__loading,
.cabinet-sheet__error {
  text-align: center;
  padding: 2rem 0;
  color: #888;
  font-size: .875rem;
}
.cabinet-sheet__error { color: #a55400; }
/* Soft-loader для второго прохода — balance-card уже виден сверху из кэша,
 * под ним «Загружаем реф-программу…» мягким серым; не «Загрузка…» в полный
 * экран. Появляется на ~100ms пока летит /api/cabinet. */
.cabinet-sheet__loading--soft {
  padding: 1rem 0 .5rem;
  color: #aaa;
  font-size: .75rem;
}

/* Мини-модалка первого входа «Больше на каждом обмене» (bonus_intro_sheet.js) —
   тизер на /bonuses/guide. Переиспользует .sheet-* + .btn. */
/* Без своего горизонтального padding: .sheet-card уже даёт gutter. Иначе тело
   уезжает на 20px правее заголовка/«×» (двойной отступ) — левый край ломается. */
.bonus-intro__body {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bonus-intro__lead {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}
/* Микро-блок выгод — фирменная brand-tint подложка (паттерн Cash App/Robinhood):
   список читается как единый «вот что вы получаете» модуль, отдельно от лида и
   CTA. Строки — пункты одного блока (hairline-разделители, как в iOS list). */
.bonus-intro__list {
  display: flex;
  flex-direction: column;
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-border);
  border-radius: var(--r-card);
  padding: .375rem .875rem;
}
.bonus-intro__row {
  display: flex;
  align-items: flex-start;   /* иконка у первой строки, не по центру 2–3 строк */
  gap: .75rem;
  padding: .5rem 0;
}
.bonus-intro__row + .bonus-intro__row {
  border-top: 1px solid var(--brand-soft-border);
}
/* Бирюза «в стиле шапки»: градиент задан stroke=url(#asiana-hero) в разметке;
   здесь только раскладка + фолбэк-цвет, если градиент не отрисуется. */
.bonus-intro__icon { flex-shrink: 0; color: var(--brand); display: block; margin-top: 1px; }
.bonus-intro__text {
  font-size: .875rem;
  color: var(--text);
  line-height: 1.35;
}
.bonus-intro__actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .25rem;
}

/* Большая «карта баланса» в шапке ЛК */
.balance-card {
  padding: .875rem var(--gutter);
  background: linear-gradient(135deg, #00b4d8 0%, #0096c7 100%);
  color: #fff;
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.balance-card__label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .85;
}
.balance-card__amount {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.1;
}
.balance-card__amount small { font-size: 1rem; font-weight: 600; opacity: .9; }
.balance-card__held {
  margin-top: .125rem;
  font-size: .75rem;
  opacity: .85;
}

/* Status chips — линейка бейджей доступных бонусов под balance-card.
   Wrap layout для нескольких рядов; data-driven по active bonus_rule. */
.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: -.5rem;   /* подтягиваем к balance-card */
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: 6px 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.status-chip.is-active {
  border-color: var(--brand);
  color: var(--brand);
}
.status-chip.is-locked {
  background: #fafafa;
  color: #999;
  border-color: var(--border);
}
.status-chip.is-open {
  transform: scale(.97);
  background: rgba(0, 150, 199, .06);
}
.status-chip__icon { font-size: .875rem; line-height: 1; }

/* Popover описания чипа — раскрывается под чипами. */
.chip-popover {
  margin-top: -.25rem;
  padding: .75rem var(--gutter);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.chip-popover__head {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.chip-popover__icon { font-size: 1.125rem; line-height: 1; }
.chip-popover__title {
  flex: 1;
  font-size: .9375rem;
  font-weight: 700;
  color: #1a1a1a;
}
.chip-popover__status {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 1px 8px;
  border-radius: 999px;
}
.chip-popover__status.is-active {
  background: rgba(0, 200, 100, .12);
  color: #1a8c5a;
}
.chip-popover__status.is-locked {
  background: rgba(150, 150, 150, .14);
  color: #555;
}
.chip-popover__body {
  font-size: .8125rem;
  color: #555;
  line-height: 1.5;
}

/* Реф-блок */
.ref-block {
  padding: .875rem var(--gutter);
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.ref-block__head {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ref-block__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
  line-height: 0;
}
.ref-block__title {
  font-size: .9375rem;
  font-weight: 700;
  color: #1a1a1a;
}
/* Мотивирующий блок реф-программы: «Друг получит X / Вы получите Y».
   Главный fokus реф-блока — без этого юзер не понимает, ради чего шарить. */
.ref-motivation {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  padding: .75rem .875rem;
  background: linear-gradient(135deg,
    rgba(0, 200, 100, .1) 0%,
    rgba(0, 150, 199, .08) 100%);
  border: 1px solid rgba(0, 200, 100, .25);
  border-radius: var(--r-input);
}
.ref-motivation__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}
.ref-motivation__label {
  font-size: .8125rem;
  color: #444;
  line-height: 1.3;
}
.ref-motivation__value {
  font-size: 1rem;
  font-weight: 800;
  color: #0f5c3a;
  white-space: nowrap;
  letter-spacing: -.3px;
}

.ref-terms {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  padding: .75rem .875rem;
  /* success-айдентика «выгоды»: бледный зелёный фон + акцент-маркер слева.
     Рифмуется с .ref-motivation; ставка (success-ink) остаётся пиком, т.к.
     фон намного бледнее её. */
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-left: 3px solid var(--success-ink);
  border-radius: var(--r-input);
}
.ref-terms__title {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--success-ink);
  margin-bottom: .125rem;
}
/* Строка правила: направление + порог-подпись слева, крупная ставка справа.
   Grid держит ставку фиксированной справа, scope любой длины уходит под
   направление и не ломает ритм на узких экранах. */
.ref-terms__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: .0625rem .75rem;
}
.ref-terms__row + .ref-terms__row {
  border-top: 1px dashed var(--success-border);
  padding-top: .375rem;
}
.ref-terms__dir {
  grid-column: 1;
  grid-row: 1;
  font-size: .875rem;
  color: var(--text);
  font-weight: 600;
}
.ref-terms__reward {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--success-ink);
  letter-spacing: -.3px;
}
/* Порог/ограничения — тихая метадата под направлением (не пилюля: пилюля
   читалась как кликабельный фильтр). Переносится словами. */
.ref-terms__from {
  grid-column: 1;
  grid-row: 2;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--muted-strong);   /* AA на бледно-зелёном фоне */
  line-height: 1.25;
}

.ref-block__link {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.ref-block__input {
  flex: 1;
  padding: .5rem .625rem;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  background: #fff;
  font-size: .75rem;
  color: #444;
  font-family: inherit;
  outline: 0;
  min-width: 0;
}
.ref-block__copy {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-input);
  border: 1px solid var(--border);
  background: #fff;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ref-block__copy:active { background: #f5f5f5; }
.ref-block__copy.is-copied {
  background: rgba(0, 200, 100, .12);
  border-color: #1a8c5a;
  color: #1a8c5a;
}
.ref-block__stats {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: .375rem;
  border-top: 1px dashed var(--border);
  font-size: .8125rem;
}
.ref-block__stat-label { color: #666; }
.ref-block__stat-value { color: #1a1a1a; font-weight: 700; font-size: 1rem; }
.ref-block__stat-value.is-positive { color: #1a8c5a; }

/* Реф-статистика инвайтера: 3 показателя в ряд
   (приглашено · срабатываний условий · заработано на баланс). */
.ref-stats {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--border);
}
.ref-stat { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.ref-stat__label { color: #666; font-size: .75rem; }
.ref-stat__value { color: #1a1a1a; font-weight: 700; font-size: .9375rem; }
.ref-stat__value small { font-weight: 600; font-size: .6875rem; color: #999; }
.ref-stat__value.is-positive { color: var(--success-ink); }

/* Ростер приглашённых — спокойный iOS-список «кто принёс бонус / ждёт сделки».
   Идентификатор — непрозрачная маска (не ПД), сумма зелёным, ожидание — warning. */
.ref-roster { margin-top: .25rem; }
.ref-roster__title { color: #666; font-size: .8125rem; margin-bottom: .375rem; }
.ref-roster__list {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
}
.ref-roster__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .625rem .75rem;
  border-top: 1px solid #f0f0f0;
}
.ref-roster__row:first-child { border-top: none; }
.ref-roster__main { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.ref-roster__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600; font-size: .875rem; color: #444;
}
.ref-roster__sub { color: #999; font-size: .75rem; }
.ref-roster__amount { color: var(--success-ink); font-weight: 700; font-size: .875rem; flex-shrink: 0; }
.ref-roster__pending { color: var(--warning-ink); font-size: .75rem; flex-shrink: 0; }
.ref-roster__hint { padding: .75rem; color: #999; font-size: .8125rem; text-align: center; }
.ref-roster__more {
  margin-top: .5rem; width: 100%;
  padding: .5rem; background: transparent;
  color: var(--brand); border: 1px solid var(--border);
  border-radius: var(--r-card); font-family: inherit;
  font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.ref-roster__more:active { background: rgba(0, 150, 199, .06); }

/* Кнопка выгрузки CSV — вторичная, под ростером в аккордеоне. */
.ref-export {
  margin-top: .625rem; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .5rem; background: transparent;
  color: var(--brand); border: 1px solid var(--border);
  border-radius: var(--r-card); font-family: inherit;
  font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.ref-export svg { flex-shrink: 0; }
.ref-export:active { background: rgba(0, 150, 199, .06); }
.ref-export:disabled { opacity: .6; cursor: default; }

/* Вывод средств (партнёрский блок). */
.ref-withdraw {
  margin-top: .75rem;
  border-top: 1px dashed var(--border);
  padding-top: .75rem;
}
.ref-withdraw__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: .5rem;
}
.ref-withdraw__label { color: #666; font-size: .8125rem; }
.ref-withdraw__amt { color: var(--success-ink); font-weight: 700; font-size: 1rem; }
.ref-withdraw__open { width: 100%; }
.ref-withdraw__note { color: #999; font-size: .8125rem; text-align: center; padding: .5rem 0; }
.ref-withdraw__form { display: flex; flex-direction: column; gap: .5rem; }
.ref-withdraw__input { width: 100%; }
.ref-withdraw__file {
  display: flex; align-items: center; justify-content: center;
  padding: .625rem; border: 1px dashed var(--border); border-radius: var(--r-card);
  color: var(--brand); font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.ref-withdraw__file:active { background: rgba(0, 150, 199, .06); }

/* Кнопка «Поделиться ссылкой» — ГЛАВНАЯ CTA реф-блока (share-first).
   Оформление берёт .btn .btn-primary; здесь только раскладка/иконка. */
.ref-block__share {
  margin-top: .625rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.ref-block__share svg { flex-shrink: 0; }

/* Герой реф-блока: «Друг получит +X VND по вашей ссылке». Зелёный — только на
   числе-выгоде (акцент, не фон), без отдельной зелёной плашки. */
.ref-block__hero {
  margin: 0 0 .75rem;
  font-size: .875rem;
  color: #444;
  line-height: 1.35;
}
.ref-block__hero-amt { color: var(--success-ink); font-weight: 700; }

/* Disclosure (статистика + ростер) — master-аккордеон, тихая summary.
   Прячет реестр на N приглашённых ниже сгиба. */
.ref-disclosure {
  margin-top: .75rem;
  border-top: 1px dashed var(--border);
  padding-top: .625rem;
}
.ref-disclosure__sum {
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
  cursor: pointer;
  font-size: .8125rem;
  color: #666;
}
.ref-disclosure__sum::-webkit-details-marker { display: none; }
.ref-disclosure__lead { color: #666; }
.ref-disclosure__lead b { color: var(--success-ink); }
.ref-disclosure__meta { margin-left: auto; color: #999; }
.ref-disclosure__chev { color: #bbb; flex-shrink: 0; transition: transform .15s ease; }
.ref-disclosure[open] .ref-disclosure__chev { transform: rotate(90deg); }
.ref-disclosure .ref-roster { margin-top: .625rem; }

/* Строка-навигация (напр. «Мои заявки») — option-card-паттерн с шевроном. */
.ref-nav-row {
  margin-top: .5rem;
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem var(--gutter);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  text-decoration: none;
  color: #1a1a1a;
  font-size: .9375rem;
  font-weight: 500;
  min-height: 52px;
}
.ref-nav-row:active { background: rgba(0, 0, 0, .02); }
.ref-nav-row__icon { color: var(--brand); flex-shrink: 0; display: flex; }
.ref-nav-row__label { flex: 1; }
.ref-nav-row__chev { color: #999; flex-shrink: 0; }
.status-chip__lock { flex-shrink: 0; }

/* Награды */
.rewards-block {
  padding: 1rem var(--gutter);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.rewards-block__head {
  font-size: .875rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: .625rem;
}
.rewards-block__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.reward-item {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  font-size: .8125rem;
  color: #444;
  line-height: 1.35;
}
.reward-item__icon {
  flex-shrink: 0;
  line-height: 0;
  margin-top: 1px;
  color: #1a8c5a;  /* зелёный — для денежных наград */
}
.reward-item--status .reward-item__icon { color: #b47b00; }  /* оранжевый — статус (VIP) */
.reward-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.reward-item__label { color: #1a1a1a; font-weight: 600; }
.reward-item__sub { font-size: .75rem; color: #888; }
.reward-item__amount {
  flex-shrink: 0;
  font-weight: 700;
  color: #1a8c5a;
  font-size: .8125rem;
  white-space: nowrap;
}
/* «Активен» — outlined-плашка, не solid (тише чем CTA-кнопка). */
.reward-item__amount--active {
  background: transparent;
  color: #b47b00;
  border: 1px solid rgba(180, 123, 0, .4);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.cabinet-sheet__cta { margin-top: .25rem; }

/* Floating-banner активных заявок (как у доставок). Bottom-fixed pill;
   pulsing dot слева как индикация «процесс идёт»; тап → /orders. */
.active-banner {
  position: fixed;
  /* env(safe-area-inset-bottom) — учёт home indicator на iPhone (~34px) и
   * системного nav-bar на Android. На устройствах без safe-area — fallback 0,
   * остаётся базовые 12px отступа от низа. На iPhone в TG WebApp без этой
   * правки banner частично уезжал под индикатор. */
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  background: #1a1a1a;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  text-decoration: none;
  max-width: 460px;
  margin: 0 auto;
  animation: active-banner-in .25s ease-out;
}
@keyframes active-banner-in {
  from { transform: translateY(40%); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.active-banner:active { background: #2a2a2a; }
/* Скутер с бегущей дорогой — «к вам едет курьер». Эмодзи `🛵` качается
   (bobbing), под ним псевдо-«дорога» из пунктира движется справа налево. */
.active-banner__scooter {
  flex-shrink: 0;
  position: relative;
  width: 42px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.active-banner__rider {
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
  animation: scooter-bob 0.6s ease-in-out infinite alternate;
}
.active-banner__rider {
  position: relative;
}
/* Эмодзи 🛵 в большинстве шрифтов смотрит влево — flip'аем по X,
   чтобы носом он смотрел вперёд (вправо), куда «бежит» дорога. */
.active-banner__rider-inner {
  display: inline-block;
  transform: scaleX(-1);
}
/* Ниндзя-водитель поверх скутера. Появляется когда заявка взята в работу
   (status=in_progress). Позиционируется так, чтобы «сидел» на сиденье. */
.active-banner__helmet {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-65%);   /* над сиденьем (чуть позади руля) */
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}
@keyframes scooter-bob {
  from { transform: translateY(0)    translateX(-1px) rotate(-1.5deg); }
  to   { transform: translateY(-2px) translateX(1px)  rotate(1.5deg); }
}
.active-banner__road {
  position: absolute;
  bottom: 0;
  left: 2px;
  right: 2px;
  height: 2px;
  border-radius: 1px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, .55) 0 4px,
    transparent 4px 8px
  );
  background-size: 8px 2px;
  animation: road-tick 0.45s linear infinite;
}
@keyframes road-tick {
  from { background-position: 0 0; }
  to   { background-position: -8px 0; }
}
/* Режим pending (заявка создана, оператор не принял) — скутер на парковке:
   ни качания, ни бегущей дороги. Дорога-пунктир тоже скрыта. */
.active-banner.is-waiting .active-banner__rider { animation: none; }
.active-banner.is-waiting .active-banner__road  {
  animation: none;
  opacity: .3;
}

@media (prefers-reduced-motion: reduce) {
  .active-banner__rider, .active-banner__road { animation: none; }
}
.active-banner__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.active-banner__title {
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
}
.active-banner__sub {
  font-size: .75rem;
  color: rgba(255, 255, 255, .65);
}
.active-banner__arrow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, .7);
  font-size: 1.375rem;
  line-height: 1;
}
/* Когда banner виден — padding-bottom на body (не на container'е), чтобы он
   отодвинул вверх и container, и footer одновременно, без «дыры» внутри.
   96px = active-banner.height (~48px) + bottom-offset (12px) + footer.height
   (~28px = padding .75rem 0 .875rem) + safe gap (~8px).
   Плюс safe-area — на iPhone footer-копирайт не должен прятаться под home indicator. */
body.has-active-banner {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

/* ─── Floating-banner временного бонуса (приз колеса, future grace и т.п.) ───
   Отличается от active-banner: brand-циан-градиент (а не чёрный), wobble-иконка
   🎡 вместо скутера. При совместном показе с active-banner — стопка снизу:
   bonus сверху, active-order под ним. */
.bonus-banner {
  position: fixed;
  /* То же что .active-banner — safe-area-inset-bottom для iPhone home indicator. */
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  z-index: 79;   /* чуть ниже active-banner, чтобы при overlap не накрывал */
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  background: var(--grad-brand-cta);
  color: var(--brand-text);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 150, 199, .35);
  text-decoration: none;
  max-width: 460px;
  margin: 0 auto;
  animation: active-banner-in .25s ease-out;
}
.bonus-banner:active { filter: brightness(.92); }
/* «Легендарный» вариант — персональный курс (win-back). Золотой градиент +
   золотое свечение + диагональный блик (shimmer), чтобы читалось как редкая
   награда, а не плоская циан-плашка. Структура/таймер — те же. */
.bonus-banner--legendary {
  background: var(--grad-legendary);
  box-shadow: 0 10px 26px var(--legendary-glow);
  overflow: hidden;   /* клип блика по скруглению */
}
/* Тёмно-золотой текст (гравировка) — читается на ярком золоте без ухода в
   горчичный, как было с белым. */
.bonus-banner--legendary .bonus-banner__title {
  color: var(--legendary-ink);
  text-shadow: none;
}
.bonus-banner--legendary .bonus-banner__sub,
.bonus-banner--legendary .bonus-banner__arrow {
  color: var(--legendary-ink-soft);
}
.bonus-banner--legendary .bonus-banner__icon {
  background: rgba(255, 255, 255, .4);   /* светлый кружок на золоте */
}
.bonus-banner--legendary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    100deg, transparent, rgba(255, 255, 255, .7), transparent
  );
  transform: skewX(-18deg);
  animation: legendary-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes legendary-shimmer {
  0%, 18%   { left: -60%; }
  38%, 100% { left: 140%; }
}
@media (prefers-reduced-motion: reduce) {
  .bonus-banner--legendary::after { display: none; }
}
.bonus-banner__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  /* Лёгкое покачивание иконки — индикация «горящего» (TTL) бонуса. */
  animation: bonus-icon-wobble 2s ease-in-out infinite;
}
@keyframes bonus-icon-wobble {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bonus-banner__icon { animation: none; }
}
.bonus-banner__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bonus-banner__title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--brand-text);
}
.bonus-banner__sub {
  font-size: .75rem;
  color: rgba(255, 255, 255, .82);
}
.bonus-banner__arrow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, .8);
  font-size: 1.375rem;
  line-height: 1;
}

body.has-bonus-banner {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
/* Если активны оба — bonus встаёт выше active-banner. Зазор между ними
   ≈ .625rem (10px) — такой же, как gap между rate-card'ами в курсах,
   чтобы стопка читалась как единая группа, не как два разорванных блока.
   170px = 12 (offset) + 48 (active) + 10 (gap) + 60 (bonus, повыше — с иконкой)
   + 28 (footer) + 12 (safe). */
body.has-active-banner.has-bonus-banner {
  padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px));
}
body.has-active-banner.has-bonus-banner .bonus-banner {
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
}

/* Welcome-toast: «Вам начислен приветственный бонус +N VND».
   Появляется сверху при первом входе (is_new=true). Авто-скрытие 6 сек. */
.welcome-toast {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  background: linear-gradient(135deg, #00b4d8 0%, #0096c7 100%);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 100, 140, .35);
  animation: welcome-toast-in .25s ease-out;
  max-width: 460px;
  margin: 0 auto;
}
.welcome-toast.is-out { animation: welcome-toast-out .2s ease-in forwards; }
@keyframes welcome-toast-in {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes welcome-toast-out {
  from { transform: translateY(0);     opacity: 1; }
  to   { transform: translateY(-100%); opacity: 0; }
}
.welcome-toast__icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
}
.welcome-toast__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.welcome-toast__text b {
  font-size: .8125rem;
  font-weight: 600;
  color: #fff;
}
.welcome-toast__amount {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.welcome-toast__close {
  flex-shrink: 0;
  background: rgba(255, 255, 255, .15);
  border: 0;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}
.welcome-toast__close:active { background: rgba(255, 255, 255, .25); }

/* Подпись-разделитель списка. Выровнена по тексту .option-card.
   Имеет «дыхание» сверху — иначе прижимается к предыдущему блоку. */
.section-label {
  font-size: .8125rem;
  color: var(--muted);
  margin: 1rem 0 .5rem;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  /* Поддержка inline-подсказки справа (см. .section-label__hint). */
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}
/* Inline-уточнение в section-label, например «общее для всех городов»
   или название города под секцией предложений. */
.section-label__hint {
  font-size: .6875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 600;
  opacity: .75;
}

/* Глобальный no-wrap утилитарный класс (раньше дублировался в screens/*). */
.nw { white-space: nowrap; }

/* Warning-callout «Важно про перевод».
   Single source: используется и в success-модалке (checkout.js), и в /orders
   для активных RUB-заявок (юзер уже видит инструкцию пока ждёт оператора).
   Имя `.success-warning` сохранено для обратной совместимости с разметкой. */
.success-warning {
  padding: .75rem var(--gutter);
  background: rgba(220, 130, 30, .08);
  border: 1px solid rgba(220, 130, 30, .25);
  border-radius: var(--r-input);
}
.success-warning__head {
  font-size: .875rem;
  font-weight: 700;
  color: #a55400;
  margin-bottom: .5rem;
}
.success-warning__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .375rem;
  font-size: .8125rem;
  color: #4a3000;
  line-height: 1.45;
}
.success-warning__list li { padding-left: 1.1rem; position: relative; }
.success-warning__list li::before {
  content: "•";
  position: absolute;
  left: .3rem;
  color: #a55400;
  font-weight: 700;
}
.success-warning__list b { color: #1a1a1a; font-weight: 700; }

/* ─────────────── In-app оповещения (колокольчик + тост + инбокс) ─────────────── */
/* Колокольчик в hero (главная) — top-right. */
.hero { position: relative; }
.notif-bell {
  position: absolute;
  top: 2px;
  right: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #0096c7;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.notif-bell:active { opacity: .6; }
.notif-bell__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e23b3b;
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

/* Тост при входе — снизу, стопкой (offset считает JS через inline bottom). */
.notif-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  z-index: 210;
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem .875rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  animation: notif-toast-in .25s ease-out;
  max-width: 460px;
  margin: 0 auto;
}
.notif-toast.is-out { animation: notif-toast-out .2s ease-in forwards; }
/* Золотой тост — выдача статуса PLATINA (выделен среди прочих). */
.notif-toast--gold {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18), 0 0 0 1px var(--gold-border),
    0 0 16px var(--gold-glow);
}
.notif-toast--gold .notif-toast__title { color: var(--gold-ink); }
@keyframes notif-toast-in {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes notif-toast-out {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(120%); opacity: 0; }
}
.notif-toast__icon { flex-shrink: 0; font-size: 1.5rem; line-height: 1; }
.notif-toast__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.notif-toast__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.notif-toast__title { min-width: 0; color: #1a1a1a; font-size: .8125rem; font-weight: 700; line-height: 1.25; }
.notif-toast__body { color: #666; font-size: .75rem; line-height: 1.3; white-space: pre-line; }
.notif-toast__amount { flex-shrink: 0; color: var(--success-ink); font-weight: 700; white-space: nowrap; }
.notif-toast__close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #aaa;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 .125rem;
  cursor: pointer;
}

/* ─────────────────────── Модалки (общие) ───────────────────────
   Базовые примитивы центрированной модалки. ГЛОБАЛЬНЫ (а не в screens/city.css):
   ими пользуется и инбокс уведомлений на ГЛАВНОЙ (колокольчик), где city.css не
   грузится — иначе модалка без позиционирования «проваливается под подвал». */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, .45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modal-fade .15s ease-out;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--r-card);
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.modal-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: transparent;
  border: 0;
  color: #999;
  padding: .5rem;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}
.modal-close:active { background: rgba(0, 0, 0, .05); }
body.modal-open { overflow: hidden; }

/* Инбокс-модалка (поверх стандартного modal-overlay/modal-card). */
.notif-modal { max-width: 480px; }
/* Шапка: колокольчик + заголовок слева, × справа — в один ряд по центру
   вертикали; hairline-разделитель отделяет шапку от списка. */
.notif-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin: 0 0 .75rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.notif-modal__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}
.notif-modal__title svg { flex-shrink: 0; color: var(--brand); }
/* × внутри шапки — обычным потоком (не absolute), выровнен с заголовком. */
.notif-modal__header .modal-close { position: static; flex-shrink: 0; margin: -.25rem -.25rem -.25rem 0; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; max-height: 60vh; overflow-y: auto; }
.notif-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .875rem;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.notif-item.is-unread { border-color: rgba(0, 150, 199, .35); box-shadow: 0 1px 3px rgba(0, 150, 199, .12); }
/* Иконка — скруглённая плитка с мягким семантическим тинтом (цвет задаёт
   категория ниже). Эмодзи по центру, фиксированный размер — ровный ритм. */
.notif-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-input);
  background: var(--surface-alt);
  font-size: 1.375rem;
  line-height: 1;
}
.notif-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* head: заголовок слева + сумма/шеврон справа в одной строке. Body — отдельной
   строкой под head на всю ширину (не делит строку с суммой → не раздувается). */
.notif-item__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.notif-item__title { min-width: 0; color: #1a1a1a; font-size: .875rem; font-weight: 600; line-height: 1.25; }
/* pre-line: явные \n в тексте оповещения становятся переносами (напр. «Оцените
   заявку и получите ↵ 🎁 …»); прочие пробелы сворачиваются как обычно. */
.notif-item__body { color: #666; font-size: .75rem; line-height: 1.3; white-space: pre-line; }
.notif-item__amount { flex-shrink: 0; color: var(--success-ink); font-weight: 700; white-space: nowrap; font-size: 1rem; }

/* Тинт плитки по категории (семантика палитры: деньги=зелёный,
   действие=циан, статус=золото, инфо=нейтраль). Карточка остаётся белой —
   цвет несёт только плитка, не «кричит» фоном всей строки. */
.notif-item--cat-money .notif-item__icon { background: var(--success-soft); }
.notif-item--cat-action .notif-item__icon { background: var(--brand-soft); }
.notif-item--cat-info .notif-item__icon { background: var(--surface-alt); }
/* CTA-отзыв: золотая плитка (рейтинговый акцент) под жёлтой ⭐. */
.notif-item--cat-review .notif-item__icon { background: var(--gold-soft); }
/* Ряд звёзд-подсказки «поставьте оценку». Между head и body. */
.notif-stars { display: flex; align-items: center; gap: 4px; margin: 3px 0 1px; color: var(--gold); }
.notif-stars svg { display: block; }
/* Золотой айтем — статусное достижение PLATINA. Выделено среди прочих:
   золотая подложка/рамка, золотой заголовок, мягкое свечение. Перебивает
   is-unread фон (правило ниже по каскаду). */
.notif-item--gold,
.notif-item--gold.is-unread {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  box-shadow: 0 0 0 1px var(--gold-border), 0 2px 10px var(--gold-glow);
}
.notif-item--gold .notif-item__title { color: var(--gold-ink); font-weight: 700; }
.notif-item--gold .notif-item__icon {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--gold-border), 0 1px 3px var(--gold-glow);
}

/* CTA-айтем (есть link, напр. «Оцените заявку») — кликабельный, с шевроном. */
.notif-item--action { cursor: pointer; align-items: center; }
.notif-item--action:active { background: var(--brand-soft, rgba(0, 180, 216, .12)); }
.notif-item__go { flex-shrink: 0; color: var(--brand, #0096c7); font-size: 1.25rem; font-weight: 700; line-height: 1; padding-left: .25rem; }
.notif-empty { color: #999; font-size: .875rem; text-align: center; padding: 1.5rem .5rem; }

/* ─────────────── Поддержка: лайв-чат (bottom-sheet) ─────────────── */
.support-sheet { display: flex; flex-direction: column; max-height: 88vh; }
.support-chat {
  flex: 1 1 auto; overflow-y: auto; padding: var(--space-3) var(--gutter);
  display: flex; flex-direction: column; gap: var(--space-2);
  min-height: 40vh;
}
.support-chat__hint {
  color: var(--muted); font-size: .85rem; text-align: center;
  padding: var(--space-3) var(--space-2); line-height: 1.4;
}
.support-msg { display: flex; }
.support-msg--me { justify-content: flex-end; }
.support-msg--op { justify-content: flex-start; }
.support-msg__bubble {
  max-width: 82%; padding: .55rem .8rem; border-radius: var(--r-input);
  white-space: pre-wrap; word-break: break-word; line-height: 1.35;
  font-size: .95rem;
}
.support-msg--me .support-msg__bubble {
  background: var(--brand); color: var(--brand-text);
  border-bottom-right-radius: 6px;
}
.support-msg--op .support-msg__bubble {
  background: var(--surface-alt); color: var(--text);
  border: 1px solid var(--border); border-bottom-left-radius: 6px;
}
.support-bar {
  flex: 0 0 auto; display: flex; align-items: flex-end; gap: var(--space-2);
  padding: var(--space-2) var(--gutter);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border); background: var(--surface);
}
.support-bar__input {
  flex: 1 1 auto; resize: none; border: 1px solid var(--border);
  border-radius: var(--r-input); padding: .55rem .75rem; font: inherit;
  background: var(--surface); color: var(--text); max-height: 120px;
}
.support-bar__send {
  flex: 0 0 auto; width: 44px; height: 44px; border: none; cursor: pointer;
  border-radius: 50%; background: var(--brand); color: var(--brand-text);
  display: grid; place-items: center;
}
.support-bar__send:active { transform: scale(.94); }

/* ─────────────── Плавающие кнопки (FAB) — глобально ─────────────── */
/* Нижний отступ FAB-стека (safe-area = home indicator iPhone). support-fab —
   самый нижний; wheel-fab складывается НАД ним. Меняя одну переменную, двигаем
   весь стек под нижними баннерами. */
body { --fab-bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); }
/* Активен любой нижний баннер (заявки z=80 ИЛИ бонус колеса z=79) → 88px (32+44+12). */
body.has-active-banner,
body.has-bonus-banner {
  --fab-bottom: calc(var(--space-6) + var(--touch) + var(--space-3) + env(safe-area-inset-bottom, 0px));
}
/* Оба баннера (стопка) → 164px (32+44+44+32+12). Специфичнее → выигрывает. */
body.has-active-banner.has-bonus-banner {
  --fab-bottom: calc(var(--space-6) + var(--touch) + var(--touch) + var(--space-6) + var(--space-3) + env(safe-area-inset-bottom, 0px));
}

/* Кнопка поддержки — ПИЛЮЛЯ «Поддержка · онлайн» (топ-сервис паттерн): лейбл +
   статус живого оператора. При скролле схлопывается в кружок (.is-collapsed —
   ставит app.js). Текст скрывается через max-width/opacity (анимируемо, в отличие
   от width:auto). */
.support-fab {
  position: fixed;
  right: var(--space-3);
  bottom: var(--fab-bottom);
  z-index: var(--z-fab);
  height: var(--fab-size);
  border: none;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--brand-text);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, opacity .15s ease, bottom .2s ease;
}
.support-fab:active { transform: scale(.96); }
/* Иконка — квадрат fab-size; коллапс → этот квадрат и есть кружок. */
.support-fab__icon {
  position: relative;
  flex-shrink: 0;
  width: 50px;                /* у́же fab-size → иконка ближе к тексту в пилюле */
  height: var(--fab-size);
  display: grid;
  place-items: center;
  transition: width .22s ease;
}
/* В свёрнутом — икон-бокс снова квадрат fab-size → ровный кружок. */
.support-fab.is-collapsed .support-fab__icon { width: var(--fab-size); }
.support-fab__icon svg { width: 26px; height: 26px; }
/* Текст «Поддержка / ● онлайн». Схлоп — max-width:0 + opacity:0 (анимируемо). */
.support-fab__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  /* С запасом: блок ужимается до контента, но любой (в т.ч. широкий ТГ-) шрифт
     влезает → overflow:hidden ничего НЕ режет в развёрнутом виде. */
  max-width: 220px;
  /* Лёгкий лев/верт зазор: ободок зелёной точки и хвосты букв не обрезаются
     кромкой overflow:hidden (точка — первый элемент строки статуса). */
  padding: 2px var(--space-4) 2px 3px;
  opacity: 1;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  transition: max-width .22s ease, opacity .16s ease, padding .22s ease;
}
.support-fab__title { font-size: .8125rem; font-weight: 700; }
.support-fab__status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .6875rem;
  opacity: .92;
}
.support-fab__online {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--success);
  /* Крисп белый ободок (а не размытый полупрозрачный ореол). */
  box-shadow: 0 0 0 1.5px var(--surface);
}
/* Свёрнуто (после скролла) — только иконка-кружок. */
.support-fab.is-collapsed .support-fab__text {
  max-width: 0;
  opacity: 0;
  padding: 0;
}
/* Красная точка-индикатор непрочитанного — в углу ИКОНКИ (а не всей пилюли). */
.support-fab__dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: var(--r-pill);
  background: var(--danger);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
  animation: support-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes support-dot-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .support-fab__dot { animation: none; }
}
/* Открыт любой sheet-overlay (в т.ч. сам чат) → FAB убираем, чтоб не висел. */
body.modal-open .support-fab { opacity: 0; pointer-events: none; }

/* ── Колесо/бонусы — promo-ярлык, свисающий с ВЕРХНЕЙ кромки слева (только home)
   «Вылезающий сверху подарок» в левом углу шапки: верхние углы flush у кромки,
   нижние скруглены — ярлык свисает вниз и мягко «выезжает». Белый плашка +
   подарок цвета бренда (на градиент-шапке читается чётко; перелив-на-переливе
   слился бы). Текст шапки центрирован, колокольчик справа → левый угол свободен.
   Только на home (app.js удаляет вне '/'); виден если сегодня ещё не крутил.
   Ссылка → /bonuses. */
.wheel-fab {
  position: fixed;
  top: 0;
  left: var(--space-4);
  z-index: var(--z-fab);
  width: 46px;
  height: 52px;
  /* Flush у верхней кромки (верхние углы прямые), низ скруглён — свисает. */
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-float);
  display: grid;
  place-items: center;
  padding-top: 3px;                 /* отодвинуть иконку от flush-кромки */
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s ease;
  animation: wheel-fab-peek 3.4s ease-in-out infinite;
}
.wheel-fab:active { animation: none; transform: translateY(2px) scale(.96); }
.wheel-fab svg { width: 25px; height: 25px; }
/* «Вылезает» сверху: чуть подтянут вверх → мягко свешивается вниз и обратно. */
@keyframes wheel-fab-peek {
  0%, 100% { transform: translateY(-6px); }
  50%      { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-fab { animation: none; transform: translateY(0); }
}
body.modal-open .wheel-fab { opacity: 0; pointer-events: none; }

/* ── Промпт «добавить на экран телефона» (addToHomeScreen, Bot API 8.0+).
   Bottom-карточка, всплывает в тёплый момент (после успешной сделки/отзыва).
   z-index 95 — над FAB(90)/баннерами(80), под sheet-overlay(100). Управление —
   ASIANA.promptAddToHomeScreen / _renderHomeScreenCard в app.js. */
.hs-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, calc(100% + var(--space-5)));
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(480px - 2 * var(--gutter));
  z-index: 95;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-modal);
  box-shadow: var(--shadow-float);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}
.hs-prompt.is-in { transform: translate(-50%, 0); opacity: 1; }

.hs-prompt__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-input);
  background: var(--brand-soft);
  color: var(--brand);
}
.hs-prompt__icon svg { width: 22px; height: 22px; }

.hs-prompt__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hs-prompt__title { font-size: var(--fs-body); font-weight: 600; color: var(--text); }
.hs-prompt__sub { font-size: var(--fs-caption); color: var(--muted); line-height: 1.3; }

.hs-prompt__cta { flex: 0 0 auto; width: auto; min-height: var(--touch); padding: 0 var(--space-4); }

.hs-prompt__close {
  position: absolute;
  top: var(--space-1);
  right: var(--space-2);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .hs-prompt { transition: opacity .2s ease; transform: translate(-50%, 0); }
}

/* Веб-гейт входа (только браузер вне Telegram; Mini App не показывает) —
   full-screen оверлей с кнопкой «Войти через Telegram». Только токены. */
.web-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: var(--bg);
}
.web-gate__card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .08);
}
.web-gate__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: var(--space-3);
}
.web-gate__title { font-size: 1.125rem; font-weight: 600; color: var(--text); }
.web-gate__sub {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.45;
  margin: var(--space-2) 0 var(--space-5);
}
.web-gate__widget { display: flex; justify-content: center; min-height: 48px; }
.web-gate__hint {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: var(--space-3);
  min-height: 1em;
}
