@font-face {
  font-family: 'TikTok Sans';
  src: url('../shared/fonts/TikTokSans-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'A24';
  src: url('../shared/fonts/A24-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'A24';
  src: url('../shared/fonts/A24-Regular.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #100b14;
  --card-dark: #130f18;
  --surface-2: #201a29;
  --text: #faf5f1;
  --text-muted: #9a93a6;
  --text-dim: #655f72;

  --gold-light: #ffc373;
  --gold-mid: #f0b880;
  --gold-deep: #7a4f16;

  --coral-light: #e98539;
  --coral-mid: #e65016;
  --coral-deep: #2a0f06;

  --teal-light: #7fe3cc;
  --teal-mid: #26ab93;
  --teal-deep: #0c2b26;

  --violet-light: #b39bff;
  --violet-mid: #8862ea;
  --violet-deep: #1c1338;

  --error: #ff6b76;
  --success: #3fdb9a;

  /* Формула вложенных скруглений: radius-внутреннего = radius-внешнего − отступ.
     --radius-sm получается из --radius-xl минус --sheet-inset (44 − 14 = 30),
     поэтому угол листа и угол кнопки внутри него визуально совпадают по кривизне. */
  --radius-xl: 44px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 30px;
  --sheet-inset: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* убираем системную синюю подсветку/рамку при тапе на мобильных браузерах —
     outline:none у button/input ниже её не перекрывает, это отдельный эффект */
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea {
  border: none;
  outline: none;
  font-family: inherit;
}

html, body {
  height: 100%;
}

body {
  font-family: 'TikTok Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

/* --- фон на весь экран: мягкое цветное свечение + айдентика, под всем контентом --- */

.page-glow {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(68% 52% at 10% 2%, var(--coral-light) 0%, var(--coral-mid) 46%, transparent 82%),
    radial-gradient(65% 50% at 92% 6%, var(--gold-light) 0%, var(--gold-mid) 46%, transparent 82%),
    radial-gradient(74% 44% at 50% 100%, var(--gold-mid) 0%, var(--coral-mid) 48%, transparent 84%),
    var(--bg);
  filter: blur(70px);
  opacity: 0.82;
}

.page-identity {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url('../shared/brand/pattern.png');
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
  opacity: 0.025;
}

/* лёгкая зернистость по всей странице */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='1.6' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.6' intercept='-0.8'/%3E%3CfeFuncG type='linear' slope='2.6' intercept='-0.8'/%3E%3CfeFuncB type='linear' slope='2.6' intercept='-0.8'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 110px 110px;
  mix-blend-mode: overlay;
  opacity: 0.35;
}

#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.offline-banner {
  flex: none;
  width: 100%;
  padding: 10px 16px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  background: color-mix(in srgb, var(--gold-mid) 55%, var(--card-dark) 45%);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.view {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none !important;
}

.view-home,
.view-sub {
  gap: 0;
}

/* --- герой: свой цветной акцент поверх общего фона, без своей рамки --- */

.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px 36px;
}

.view-home .hero,
#view-bank .hero {
  position: sticky;
  top: 0;
}

.hero-brand {
  background: radial-gradient(150% 85% at 50% -15%, color-mix(in srgb, var(--gold-mid) 32%, transparent) 0%, transparent 72%);
}

.hero-coral {
  background: radial-gradient(150% 85% at 50% -15%, color-mix(in srgb, var(--coral-mid) 32%, transparent) 0%, transparent 72%);
}

.hero-teal {
  background: radial-gradient(150% 85% at 50% -15%, color-mix(in srgb, var(--teal-mid) 32%, transparent) 0%, transparent 72%);
}

.hero-gold {
  background: radial-gradient(150% 85% at 50% -15%, color-mix(in srgb, var(--gold-mid) 32%, transparent) 0%, transparent 72%);
}

.hero-violet {
  background: radial-gradient(150% 85% at 50% -15%, color-mix(in srgb, var(--violet-mid) 32%, transparent) 0%, transparent 72%);
}

.view-sub .hero {
  padding-bottom: 36px;
  gap: 18px;
  display: flex;
  flex-direction: column;
}

.view-sub .hero .back {
  margin-bottom: 4px;
}

.hero-top {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-tagline {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-tagline::after {
  content: '';
  display: none;
  width: 2px;
  height: 10px;
  margin-left: 2px;
  background: var(--gold-light);
  vertical-align: middle;
}

.hero-tagline.is-typing::after {
  display: inline-block;
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.brand-mark-box,
.avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--coral-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.brand-mark-box {
  cursor: default;
  padding: 9px;
}

.brand-mark-box::before {
  content: '';
  width: 100%;
  height: 100%;
  background: #ffffff;
  -webkit-mask-image: url('../shared/brand/logo-mark.png');
  mask-image: url('../shared/brand/logo-mark.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.avatar svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

.hero-stat {
  position: relative;
  z-index: 1;
}

.hero-number-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.balance {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 84px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-shadow: 0 0 34px rgba(224, 166, 63, 0.5);
}

.balance-unit {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

/* --- лист: стеклянная панель, заходит внахлёст на герой сверху --- */

.sheet {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  flex: 1;
  margin-top: -30px;
  background: color-mix(in srgb, var(--card-dark) 32%, transparent);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--sheet-inset) var(--sheet-inset) calc(env(safe-area-inset-bottom, 0px) + var(--sheet-inset));
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

/* Экраны с коротким, разовым содержимым (не список) — центрируем по высоте,
   чтобы страница выглядела завершённой композицией, а не контентом сверху
   и пустотой снизу. */
#view-give .sheet,
#view-receive .sheet {
  justify-content: center;
}

/* --- карточка входа/установки/ожидания: не лист во весь экран, а компактный
   прямоугольник со скруглением со всех сторон --- */

.view.view-card {
  max-width: 560px;
}

.view-card .sheet {
  flex: none;
  border-radius: var(--radius-xl);
  padding-bottom: var(--sheet-inset);
  margin-bottom: 24px;
}

/* Вход/регистрация — по центру экрана, а не прижаты к верху. */
.view.view-card {
  justify-content: center;
}

/* Кнопка обмена теперь живёт внутри шапки, под балансом — шапка сама
   зафиксирована (position: sticky сверху), поэтому кнопка "фиксируется"
   вместе с ней автоматически, отдельный плавающий бар снизу экрана больше
   не нужен. */
.bottom-actions {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: stretch;
  margin-top: 18px;
}

/* Плоская кнопка без градиентов и свечений — цвет и высота как у обычной
   .btn внутри листа, радиус по формуле (--radius-sm), одна на всю ширину
   плашки. */
.action-wide {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--coral-mid);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.action-wide-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.9;
}

.action-wide:active {
  transform: scale(0.97);
}

/* --- история операций (появляется, только если операции есть) --- */

.activity {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.feed-item-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.feed-item-time {
  font-size: 12px;
  color: var(--text-dim);
}

.notify-enable {
  width: 100%;
}

.notify-status {
  font-size: 13px;
  color: var(--text-muted);
}

.activity-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.activity-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px auto;
}

.activity-icon-in {
  background-color: var(--teal-deep);
  background-image: url('../shared/brand/arrow-received.png');
}

.activity-icon-out {
  background-color: var(--coral-deep);
  background-image: url('../shared/brand/arrow-given.png');
}

.activity-name {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.activity-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.activity-amount {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.activity-amount.amount-in {
  color: var(--success);
}

.activity-amount.amount-out {
  color: var(--coral-light);
}

.activity-time {
  font-size: 12px;
  color: var(--text-dim);
}

/* --- задания (пока пример-заглушка под будущую функцию) --- */

/* Блок заданий — целиком в одной подложке (заголовок и список вместе), по
   образцу блока программы: радиус подложки по формуле вложенных скруглений
   из :root, поэтому углы визуально концентричны углам листа. */
.tasks {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: var(--sheet-inset);
  transition: gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Трек — та же карточка, что у заданий, но другим цветом из палитры, чтобы
   отличаться от остальных блоков на главной. */
#track-section {
  background: var(--coral-light);
}

/* Уведомления от организаторов — та же карточка, что у заданий/трека на
   главной, просто своим (фиолетовым) цветом из палитры; внутри — те же
   плашки-сообщения (feed-item), но тёмным текстом на светлом фоне. */
.notify-card {
  background: var(--violet-light);
}

.notify-card .tasks-head .activity-title {
  color: var(--card-dark);
}

#notify-list {
  gap: 10px;
}

#notify-list .feed-item {
  background: color-mix(in srgb, var(--text) 45%, transparent);
}

#notify-list .feed-item-text {
  color: var(--card-dark);
}

#notify-list .feed-item-time {
  color: color-mix(in srgb, var(--card-dark) 65%, transparent);
}

.tasks.is-collapsed {
  gap: 0;
}

.tasks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tasks-head .activity-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--card-dark);
}

.tasks-head-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--coral-mid);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tasks-head-icon svg {
  width: 15px;
  height: 15px;
}

.tasks-head-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-btn {
  background: none;
  color: var(--coral-light);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.link-btn-arrow {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.link-btn-arrow svg {
  width: 18px;
  height: 18px;
}

/* --- пикер визуального кода с бейджа (3 картинки вместо ввода текста) --- */

.badge-code-selected {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 32px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.badge-code-palette {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.badge-emoji-btn {
  aspect-ratio: 1;
  font-size: 22px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-emoji-btn.is-selected {
  background: color-mix(in srgb, var(--teal-mid) 45%, transparent);
}

.tasks-list {
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.25s ease 0.05s;
}

.program-collapse.is-collapsed .tasks-list {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.task-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--card-dark) 15%, transparent);
}

.task-card:first-child {
  border-top: none;
  padding-top: 0;
}

.task-card:last-child {
  padding-bottom: 0;
}

.task-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--card-dark);
  line-height: 1.3;
}

.task-more {
  flex: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--coral-mid);
  cursor: pointer;
}

/* --- блок трека — та же светлая карточка, что у заданий, плюс описание и
   ссылка на чат перед своим списком заданий. Свой (не золотой) цвет фона —
   поэтому заголовок/имена заданий здесь белые, а не тёмные, как у заданий. */
.track-body {
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.25s ease 0.05s;
}

.program-collapse.is-collapsed .track-body {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.track-description {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.75;
}

.track-chat-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--coral-mid);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

#track-section .activity-title,
#track-section .task-name {
  color: var(--text);
}

#track-section .program-toggle {
  color: var(--text);
}

#track-section .task-more {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text);
}

#track-section .task-more svg {
  width: 18px;
  height: 18px;
}

/* Вся программа — целиком в одной подложке (заголовок и текст вместе), а не
   заголовок отдельной строкой над карточкой. Радиус подложки — по формуле
   вложенных скруглений из :root (radius-xl − sheet-inset = radius-sm),
   поэтому её углы визуально концентричны углам листа. */
.program-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: var(--sheet-inset);
  transition: gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Свёрнуто: список схлопнут до 0 высоты, но flex-gap между ним и шапкой сам
   не исчезает — без этого правила снизу оставалась лишняя пустая полоса, и
   заголовок с иконкой сидели не по центру подложки, а ближе к верху. */
.program-block.is-collapsed {
  gap: 0;
}

.program-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.program-header-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--coral-mid);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.program-header-icon svg {
  width: 15px;
  height: 15px;
}

.program-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--card-dark);
}

.program-toggle {
  margin-left: auto;
  flex: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  padding: 0;
  color: var(--text-dim);
  cursor: pointer;
  transform: rotate(180deg);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.program-toggle.is-collapsed {
  transform: rotate(0deg);
}

.program-toggle svg {
  width: 16px;
  height: 16px;
}

.program-collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.program-collapse.is-collapsed {
  grid-template-rows: 0fr;
}

.program-list {
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.25s ease 0.05s;
}

.program-collapse.is-collapsed .program-list {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.program-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--card-dark) 15%, transparent);
}

.program-item:first-child {
  border-top: none;
  padding-top: 0;
}

/* Низ последнего пункта не должен добавлять своё padding сверх padding
   самой подложки — иначе перед скруглённым нижним углом (по формуле
   вложенных скруглений) остаётся лишний зазор. */
.program-item:last-child {
  padding-bottom: 0;
}

.program-item-time {
  flex: none;
  align-self: center;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--coral-mid);
  margin-top: 4px;
}

.program-item-time-text {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transform: translateY(-2px);
}

.program-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding-left: 10px;
}

.program-item-title-mask {
  width: 100%;
  overflow: hidden;
}

.program-item-title {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--card-dark);
}

/* Вторая копия текста (см. renderProgramItems) едет следом за первой на
   расстоянии distance — когда первая уезжает ровно настолько влево, вторая
   аккуратно становится на её место, стыка не видно. Короткая пауза ~4
   секунды, затем медленно едем и мгновенно, незаметно "перематываемся" на
   стыке цикла (100% -> 0%) — только влево, без обратного хода. Раскадровка
   одна и та же у всех строк — значит все длинные заголовки трогаются с
   места и замирают синхронно. */
.program-item-title-track {
  display: flex;
  width: max-content;
}

.program-item-title-track .program-item-title {
  flex: none;
  padding-right: 48px;
}

.program-item-title-track.is-marquee {
  animation: program-item-marquee 12s linear infinite;
}

.activity-name-mask {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.activity-name-track {
  display: flex;
  width: max-content;
}

.activity-name-track .activity-name {
  flex: none;
  padding-right: 48px;
}

.activity-name-track.is-marquee {
  animation: program-item-marquee 12s linear infinite;
}

@keyframes program-item-marquee {
  0%,
  33.33% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-1 * var(--marquee-distance, 0px)));
  }
}

.program-item-desc {
  width: 100%;
  max-height: 54px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.5;
  color: #55524f;
}

/* --- карточка-подсказка (после программы) — тот же светлый стиль, что и у
   блока программы и заданий: сплошная светлая подложка, тёмный текст,
   круглый значок вместо фото. Углы — по формуле (--radius-sm). */
.info-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--coral-mid);
  background-image: url('../shared/brand/exchange.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px auto;
}

.info-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.info-card-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.info-card-more {
  align-self: flex-start;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--coral-mid);
  cursor: pointer;
}

/* --- шторка снизу: общий компонент для "открывающихся окон" --- */

.sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.sheet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.sheet-modal.is-open .sheet-modal-backdrop {
  opacity: 1;
}

/* Шторка — жидкое стекло: полупрозрачная, с размытием того, что под ней и
   бликом по верхнему краю. Выезжает снизу и расширяется: сдвиг идёт по
   плавной "затухающей" кривой, ширина — с лёгкой пружиной, углы округляются
   вместе с ними. Закрытие короче и без пружины. Только 2D и отдельные
   свойства translate/scale (у каждого своя кривая). */
.sheet-modal-panel {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background-color: color-mix(in srgb, var(--card-dark) 42%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border-radius: 72px 72px 0 0;
  padding: 0 var(--sheet-inset) calc(env(safe-area-inset-bottom, 0px) + var(--sheet-inset));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.3);
  transform-origin: 50% 100%;
  translate: 0 100%;
  scale: 0.9 1;
  transition:
    translate 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    scale 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: translate, scale;
}

.sheet-modal.is-open .sheet-modal-panel {
  translate: 0 0;
  scale: 1 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transition:
    translate 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    scale 1s cubic-bezier(0.3, 1.25, 0.5, 1),
    border-radius 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-modal-handle-zone {
  flex: none;
  width: 100%;
  padding: 10px 0 16px;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.sheet-modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--text-dim);
}

.sheet-modal-title {
  flex: none;
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
  color: var(--text);
  margin-bottom: 16px;
}

.sheet-modal-body {
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 82%, transparent);
  padding-bottom: 4px;
  overscroll-behavior: contain;
}

.task-reward {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--coral-mid);
  margin-top: 4px;
}

.task-reward-text {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transform: translateY(-2px);
}

/* --- предложка --- */

.suggest-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  cursor: pointer;
}

.suggest-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--coral-mid);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.suggest-icon svg {
  width: 15px;
  height: 15px;
}

.suggest-trigger-title {
  flex: 1;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.suggest-trigger-arrow {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--coral-mid);
}

.suggest-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.suggest-textarea {
  width: 100%;
  min-height: 84px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  resize: vertical;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
}

.suggest-textarea::placeholder {
  color: var(--text-dim);
}

.suggest-intro {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.suggest-text-field {
  position: relative;
}

.suggest-textarea-designed {
  width: 100%;
  min-height: 130px;
  padding: 18px 18px 36px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  border-radius: var(--radius-lg);
  border: 1.5px solid color-mix(in srgb, var(--coral-mid) 22%, transparent);
  background: linear-gradient(165deg, color-mix(in srgb, var(--coral-mid) 12%, var(--surface-2)) 0%, var(--surface-2) 65%);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.suggest-textarea-designed:focus {
  outline: none;
  border-color: var(--coral-mid);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral-mid) 16%, transparent);
}

.suggest-textarea-designed::placeholder {
  color: var(--text-dim);
}

.suggest-char-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

/* --- "Ну как тебе?" — оценка блока программы --- */

.feedback-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-modal-block {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.feedback-stars {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 6px 0 2px;
}

.feedback-star {
  font-size: 40px;
  line-height: 1;
  color: color-mix(in srgb, var(--text) 18%, transparent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.feedback-star:active {
  transform: scale(0.88);
}

.feedback-star.is-filled {
  color: var(--gold-light);
}

/* --- полная история --- */

.history-list {
  width: 100%;
}

/* --- второстепенные экраны --- */

.screen-heading {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}


.screen-title {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
  text-align: center;
}

.name {
  width: 100%;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

/* --- профиль: шапка с аватаркой и сводкой --- */

.profile-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  cursor: default;
  margin-bottom: 4px;
}

.profile-avatar span {
  font-size: 24px;
  color: #ffffff;
  font-weight: 700;
}

.profile-stats {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 4px;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 28px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.profile-stat-value {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 28px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}

.profile-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.profile-info-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.profile-info-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.profile-info-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.hint {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
}

.error {
  font-size: 14px;
  color: var(--error);
  text-align: center;
}

.success {
  font-size: 15px;
  font-weight: 700;
  color: var(--success);
  text-align: center;
}

.group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn {
  width: 100%;
  padding: 19px;
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-coral-solid {
  background: color-mix(in srgb, var(--coral-mid) 62%, var(--card-dark) 38%);
}

.btn-violet-solid {
  background: color-mix(in srgb, var(--violet-mid) 62%, var(--card-dark) 38%);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  width: auto;
}

.profile-delete-btn {
  color: var(--error);
}

.back {
  align-self: flex-start;
}

.amount-input {
  width: 100%;
  padding: 22px;
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}

.amount-presets {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.amount-chip {
  padding: 20px 0;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.amount-chip.is-selected {
  background: color-mix(in srgb, var(--coral-mid) 45%, transparent);
  color: var(--coral-light);
}

.amount-input::placeholder {
  color: var(--text-dim);
  font-weight: 700;
}

/* --- пикер суммы: крупное число + слайдер + широкая лента быстрых сумм --- */

.amount-picker {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.amount-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.amount-display-value {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-shadow: 0 0 28px rgba(236, 106, 69, 0.45);
}

.amount-display-unit {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.amount-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
}

.amount-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral-mid), var(--coral-light));
}

.amount-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 4px color-mix(in srgb, var(--coral-mid) 55%, transparent);
  cursor: pointer;
}

.amount-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
}

.amount-slider::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral-mid), var(--coral-light));
}

.amount-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 0 4px color-mix(in srgb, var(--coral-mid) 55%, transparent);
  cursor: pointer;
}

.amount-ribbon {
  width: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.amount-ribbon::-webkit-scrollbar {
  display: none;
}

.amount-pill {
  flex: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.amount-pill:active {
  transform: scale(0.94);
}

.amount-pill.is-selected {
  background: color-mix(in srgb, var(--coral-mid) 45%, transparent);
  color: var(--coral-light);
}

/* --- переключатель валюты на экране передачи баллов --- */

.currency-toggle {
  width: 100%;
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-lg, 22px);
  background: var(--surface-2);
}

.currency-toggle-btn {
  flex: 1 1 0;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: calc(var(--radius-lg, 22px) - 6px);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.currency-toggle-btn.is-selected {
  background: var(--card-dark);
  color: var(--text);
}

/* --- анимация ожидания NFC-метки: расходящиеся кольца вокруг значка --- */

.nfc-animation {
  position: relative;
  width: 120px;
  height: 120px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
}

.nfc-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--violet-light);
  opacity: 0;
  animation: nfc-pulse 2s ease-out infinite;
}

.nfc-pulse-delay {
  animation-delay: 1s;
}

@keyframes nfc-pulse {
  0% { transform: scale(0.45); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.nfc-icon-badge {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--violet-mid) 45%, transparent);
  color: var(--violet-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nfc-icon-badge svg {
  width: 32px;
  height: 32px;
}

video {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius-md);
  background: #000;
}

.qr-frame {
  align-self: center;
  background: #ffffff;
  padding: 18px;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--teal-mid) 60%, transparent);
}

.receive-hint {
  align-self: center;
  width: 100%;
  max-width: 300px;
  margin-top: 4px;
}

.qr-canvas {
  display: block;
}

/* --- банк форумных --- */

/* Шапка банка — как на главной: закреплена сверху (sticky), а лента (.sheet)
   заезжает на неё внахлёст. Цвета блоков — яркие сплошные цвета палитры с
   тёмным текстом, как у заданий и трека на главной. */
#view-bank .hero {
  gap: 0;
}

#view-bank .hero-top {
  margin-bottom: 14px;
}

#view-bank .balance {
  font-size: 72px;
}

.bank-hero-rank {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
}

.bank-rank-title {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--coral-mid);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.bank-progress-track {
  width: 100%;
  max-width: 220px;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 18%, transparent);
  overflow: hidden;
}

.bank-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--coral-light);
  transition: width 0.8s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.bank-progress-label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 75%, transparent);
}

/* Ежедневный бонус — широкая кнопка на всю ширину, того же вида, что
   главная кнопка на главной. */
.bank-bonus-btn {
  flex: none;
  width: 100%;
}

.tasks.bank-card-coral {
  background: var(--coral-light);
}

.tasks.bank-card-teal {
  background: var(--teal-light);
}

.bank-news-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--card-dark) 15%, transparent);
}

.bank-news-item:first-child {
  border-top: none;
  padding-top: 0;
}

.bank-news-item:last-child {
  padding-bottom: 0;
}

.bank-news-emoji {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--text) 45%, transparent);
  font-size: 18px;
  line-height: 1;
}

.bank-news-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--card-dark);
}

/* --- карточка «Юбилейные»: баланс, курс, график цены, покупка --- */

.jubilee-balance-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.jubilee-balance {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--card-dark);
}

.jubilee-balance-unit {
  font-size: 14px;
  font-weight: 700;
  color: color-mix(in srgb, var(--card-dark) 65%, transparent);
}

.jubilee-rate-label {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: color-mix(in srgb, var(--card-dark) 70%, transparent);
}

.jubilee-chart {
  width: 100%;
  height: 64px;
  display: block;
}

.jubilee-chart-line {
  fill: none;
  stroke: var(--card-dark);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jubilee-chart-fill {
  stroke: none;
  fill: color-mix(in srgb, var(--card-dark) 14%, transparent);
}

.jubilee-buy-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.jubilee-stepper-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-dark) 12%, transparent);
  color: var(--card-dark);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.jubilee-stepper-btn:active {
  transform: scale(0.92);
}

.jubilee-buy-count-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 96px;
}

.jubilee-buy-count {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  color: var(--card-dark);
}

.jubilee-buy-cost {
  font-size: 12px;
  font-weight: 700;
  color: color-mix(in srgb, var(--card-dark) 65%, transparent);
}

/* --- ачивки: почтовые марки-штампы --- */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
}

/* Ачивка — почтовая марка-штамп с перфорированным краем, как настоящий штамп
   форума: бумага и чернила. Зубцы вырезаются маской (внутренний прямоугольник
   плюс четыре полосы с полукруглыми вырезами), тень — на обёртке, потому что
   маска обрезает собственную тень. Запертая марка — пустое место под штамп:
   полупрозрачная, лого бледное, вместо иконки замок. */
.achievement-badge {
  filter: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.achievement-badge.is-unlocked {
  filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--teal-deep) 45%, transparent));
}

.achievement-badge.is-unlocked:nth-child(3n + 1) { rotate: -2deg; }
.achievement-badge.is-unlocked:nth-child(3n + 2) { rotate: 1.5deg; }
.achievement-badge.is-unlocked:nth-child(3n) { rotate: -1deg; }

.achievement-stamp {
  --perf-r: 4px;
  --perf-pitch: 12px;
  --paper: #f7f0df;
  --ink: #1b1613;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 7px;
  aspect-ratio: 4 / 5;
  padding: 14px 8px 12px;
  background: color-mix(in srgb, var(--teal-deep) 14%, transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) center / calc(100% - 2 * var(--perf-r)) calc(100% - 2 * var(--perf-r)) no-repeat,
    radial-gradient(circle at 50% 0, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) top / var(--perf-pitch) calc(2 * var(--perf-r)) round no-repeat,
    radial-gradient(circle at 50% 100%, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) bottom / var(--perf-pitch) calc(2 * var(--perf-r)) round no-repeat,
    radial-gradient(circle at 0 50%, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) left / calc(2 * var(--perf-r)) var(--perf-pitch) no-repeat round,
    radial-gradient(circle at 100% 50%, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) right / calc(2 * var(--perf-r)) var(--perf-pitch) no-repeat round;
  mask:
    linear-gradient(#000 0 0) center / calc(100% - 2 * var(--perf-r)) calc(100% - 2 * var(--perf-r)) no-repeat,
    radial-gradient(circle at 50% 0, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) top / var(--perf-pitch) calc(2 * var(--perf-r)) round no-repeat,
    radial-gradient(circle at 50% 100%, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) bottom / var(--perf-pitch) calc(2 * var(--perf-r)) round no-repeat,
    radial-gradient(circle at 0 50%, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) left / calc(2 * var(--perf-r)) var(--perf-pitch) no-repeat round,
    radial-gradient(circle at 100% 50%, #0000 var(--perf-r), #000 calc(var(--perf-r) + 0.5px)) right / calc(2 * var(--perf-r)) var(--perf-pitch) no-repeat round;
}

.is-unlocked .achievement-stamp {
  background: var(--paper);
}

/* Лого ФМД очень бледным оттиском под иконкой. */
.achievement-stamp::before {
  content: '';
  position: absolute;
  inset: 20% 14%;
  background: color-mix(in srgb, var(--teal-deep) 10%, transparent);
  -webkit-mask: url('../shared/brand/logo-mark.png') center / contain no-repeat;
  mask: url('../shared/brand/logo-mark.png') center / contain no-repeat;
  pointer-events: none;
}

.is-unlocked .achievement-stamp::before {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.achievement-icon {
  position: relative;
  font-size: 30px;
  line-height: 1;
}

.achievement-badge:not(.is-unlocked) .achievement-icon {
  font-size: 20px;
  opacity: 0.55;
}

.achievement-title {
  position: relative;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.2;
}

.achievement-badge:not(.is-unlocked) .achievement-title {
  font-weight: 700;
  color: color-mix(in srgb, var(--teal-deep) 65%, transparent);
}

/* --- история операций внутри карточки: тёмный текст на яркой подложке --- */

#bank-history-list .activity-row,
#bank-leaderboard-list .activity-row {
  background: none;
  border-radius: 0;
  padding: 10px 0;
}

#bank-history-list .activity-row {
  border-top: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
}

#bank-leaderboard-list .activity-row {
  border-top: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
}

#bank-history-list .activity-row:first-child,
#bank-leaderboard-list .activity-row:first-child {
  border-top: none;
  padding-top: 0;
}

#bank-history-list .activity-row:last-child,
#bank-leaderboard-list .activity-row:last-child {
  padding-bottom: 0;
}

#bank-history-list .activity-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

#bank-history-list .activity-time {
  color: color-mix(in srgb, var(--text) 78%, transparent);
}

#bank-history-list .activity-amount.amount-in,
#bank-history-list .activity-amount.amount-out {
  color: var(--text);
}

.tasks.bank-card-coral .tasks-head .activity-title,
.fortune-card .tasks-head .activity-title {
  color: var(--text);
}

/* --- топ форумных: без подложки, на самой ленте --- */

.bank-top .tasks-head .activity-title {
  color: var(--text);
}

#bank-leaderboard-list .activity-name {
  flex: 1;
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-rank-number {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--text) 12%, transparent);
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
}

/* --- пьедестал топ-3: одна цельная фигура ---
   Форма ступеней рисуется одним SVG-путём (см. podiumShapePath в app.js),
   поверх неё — три колонки без зазоров с аватаром, именем и суммой. */

.bank-podium {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
}

.podium-shape {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  color: var(--coral-mid);
  filter: drop-shadow(0 14px 20px color-mix(in srgb, var(--coral-mid) 40%, transparent));
}

.podium-columns {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
}

.podium-place {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-avatar {
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.podium-place-1 .podium-avatar {
  width: 60px;
  height: 60px;
  font-size: 24px;
}

.podium-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 6px 16px;
}

/* Номер места — крупная цифра на фирменной вертушке (вертушка полупрозрачная,
   как тиснение), внизу ступени и с отступом от края. */
.podium-rank {
  flex: none;
  position: relative;
  isolation: isolate;
  margin-top: auto;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 2px 8px color-mix(in srgb, var(--coral-deep) 55%, transparent);
}

.podium-rank::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--text) 34%, transparent);
  -webkit-mask: url('../shared/brand/logo-mark.png') center / contain no-repeat;
  mask: url('../shared/brand/logo-mark.png') center / contain no-repeat;
}

.podium-place-1 .podium-rank {
  width: 66px;
  height: 66px;
  font-size: 34px;
}

.podium-crown {
  margin-bottom: 2px;
  font-size: 24px;
  line-height: 1;
}

.podium-name {
  position: relative;
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-amount {
  position: relative;
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* --- анимации банка: карточки въезжают по очереди, аватары топ-3
   выскакивают с лёгким пружинным перехлёстом --- */

@keyframes bankCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#view-bank .sheet > * {
  animation: bankCardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

#view-bank .sheet > *:nth-child(1) { animation-delay: 0s; }
#view-bank .sheet > *:nth-child(2) { animation-delay: 0.06s; }
#view-bank .sheet > *:nth-child(3) { animation-delay: 0.1s; }
#view-bank .sheet > *:nth-child(4) { animation-delay: 0.16s; }
#view-bank .sheet > *:nth-child(5) { animation-delay: 0.22s; }
#view-bank .sheet > *:nth-child(6) { animation-delay: 0.28s; }
#view-bank .sheet > *:nth-child(7) { animation-delay: 0.34s; }
#view-bank .sheet > *:nth-child(8) { animation-delay: 0.4s; }

@keyframes podiumPop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.podium-avatar {
  animation: podiumPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.podium-place-2 .podium-avatar {
  animation-delay: 0.15s;
}

.podium-place-1 .podium-avatar {
  animation-delay: 0.3s;
}

.podium-place-3 .podium-avatar {
  animation-delay: 0.45s;
}

@keyframes achievementPop {
  0% {
    transform: scale(0.7);
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.achievement-badge.is-unlocked {
  animation: achievementPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.achievement-badge:active {
  transform: scale(0.95);
}

#bank-news-list {
  transition: opacity 0.25s ease;
}

/* --- кольцо прогресса достижений, в духе колец активности --- */

.bank-ring-badge {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
}

.bank-ring-svg {
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}

.bank-ring-track {
  fill: none;
  stroke: color-mix(in srgb, var(--teal-deep) 18%, transparent);
  stroke-width: 3;
}

.bank-ring-fill {
  fill: none;
  stroke: var(--teal-deep);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.bank-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--card-dark);
}

/* --- "Ну шо ты, фортовый?" — колесо фортуны на главной ---
   Коралловая карточка с белым текстом, как блок трека. Колесо — SVG, крутится
   одним CSS-переходом; приз выбирает сервер, клиент только доводит колесо до
   нужного сектора. */

.fortune-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--coral-light);
}

/* тот же паттерн, что на фоне страниц (белые "вертушки"), приглушённо */
.fortune-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../shared/brand/pattern.png') center / cover no-repeat;
  opacity: 0.11;
  pointer-events: none;
}

.fortune-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.fortune-sub {
  width: 100%;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text);
}

.fortune-stage {
  position: relative;
  width: 100%;
  max-width: 270px;
  aspect-ratio: 1;
  margin-top: 8px;
}

/* Стекло под колесом: колесо само полупрозрачное, поэтому диск не крутится —
   он симметричен, а размытие и блик по краю должны оставаться на месте. */
.fortune-glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-dark) 22%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    inset 0 0 30px rgba(255, 255, 255, 0.06),
    0 14px 30px color-mix(in srgb, var(--coral-deep) 40%, transparent);
}

.fortune-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 5.2s cubic-bezier(0.12, 0.55, 0.12, 1);
}

.fortune-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 22px solid var(--text);
  filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--coral-deep) 55%, transparent));
}

.fortune-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 17%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--text);
}

.fortune-hub::before {
  content: '';
  position: absolute;
  inset: 22%;
  background: var(--coral-mid);
  -webkit-mask: url('../shared/brand/logo-mark.png') center / contain no-repeat;
  mask: url('../shared/brand/logo-mark.png') center / contain no-repeat;
}

.fortune-spin-btn {
  width: 100%;
  padding: 17px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--coral-mid);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.fortune-spin-btn:active {
  transform: scale(0.97);
}

.fortune-spin-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.fortune-tickets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.fortune-tickets-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.fortune-tickets-list {
  display: flex;
  flex-direction: column;
}

.fortune-ticket-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
  background: none;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.fortune-ticket-row:first-child {
  border-top: none;
}

.fortune-ticket-row.is-used {
  opacity: 0.7;
}

.fortune-ticket-row-emoji {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--card-dark) 22%, transparent);
  font-size: 19px;
}

.fortune-ticket-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fortune-ticket-row-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.fortune-ticket-row-meta {
  font-size: 12px;
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 80%, transparent);
}

.fortune-ticket-row-arrow {
  flex: none;
  width: 18px;
  height: 18px;
}

/* --- билетик: бумажный купон с выемками по бокам на линии отрыва --- */

.fortune-ticket {
  --tear: 168px;
  --paper: #f7f0df;
  --ink: #1b1613;
  width: 100%;
  max-width: 300px;
  margin: 4px auto 0;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  border-radius: var(--radius-md);
  -webkit-mask:
    radial-gradient(circle 12px at 0 var(--tear), #0000 11.5px, #000 12px) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% var(--tear), #0000 11.5px, #000 12px) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 12px at 0 var(--tear), #0000 11.5px, #000 12px) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% var(--tear), #0000 11.5px, #000 12px) right / 51% 100% no-repeat;
}

.fortune-ticket-top {
  height: var(--tear);
  padding: 20px 22px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.fortune-ticket-emoji {
  font-size: 46px;
  line-height: 1.1;
}

.fortune-ticket-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.fortune-ticket-prize {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--coral-mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fortune-ticket-tear {
  height: 2px;
  margin: 0 24px;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 35%, transparent) 0 7px, transparent 7px 14px);
}

.fortune-ticket-bottom {
  padding: 16px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fortune-ticket-barcode {
  width: 74%;
  height: 34px;
  color: var(--ink);
}

.fortune-ticket-code {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}

.fortune-ticket-hint {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
}

.fortune-ticket.is-used .fortune-ticket-top,
.fortune-ticket.is-used .fortune-ticket-barcode,
.fortune-ticket.is-used .fortune-ticket-code {
  opacity: 0.45;
}

/* Билетик с фото приза: верх выше, фото на всю ширину и мягко проявляется. */
.fortune-ticket.has-photo {
  --tear: 240px;
}

.fortune-ticket.has-photo .fortune-ticket-top {
  padding-top: 18px;
  gap: 6px;
}

.fortune-ticket-photo {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: var(--radius-md);
  animation: ticketPhotoIn 0.5s ease both;
}

@keyframes ticketPhotoIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --- диалоги подтверждения в стиле приложения (вместо системных) ---
   Стеклянная карточка по центру. Радиусы по формуле вложенных скруглений:
   карточка --radius-xl (44), кнопки внутри --radius-sm (44 − 14 отступа). */

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.app-dialog.is-open .app-dialog-backdrop {
  opacity: 1;
}

.app-dialog-panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: var(--sheet-inset);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  background-color: color-mix(in srgb, var(--card-dark) 46%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  opacity: 0;
  scale: 0.88;
  translate: 0 14px;
  transition:
    opacity 0.25s ease,
    scale 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    translate 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-dialog.is-open .app-dialog-panel {
  opacity: 1;
  scale: 1;
  translate: 0 0;
  transition:
    opacity 0.3s ease,
    scale 0.6s cubic-bezier(0.3, 1.3, 0.5, 1),
    translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-dialog-title {
  padding: 10px 10px 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.app-dialog-text {
  padding: 0 10px 8px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 82%, transparent);
}

.app-dialog-actions {
  display: flex;
  gap: 10px;
}

.app-dialog-btn {
  flex: 1;
  padding: 16px 10px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.app-dialog-btn:active {
  transform: scale(0.97);
}

.app-dialog-btn-primary {
  background: var(--coral-mid);
}

.app-dialog-btn-ghost {
  background: color-mix(in srgb, var(--text) 16%, transparent);
}

/* Заголовок колеса — крупный, фирменным display-шрифтом, всё по центру. */
.fortune-card .tasks-head {
  justify-content: center;
}

.fortune-card .tasks-head-label {
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.fortune-card .tasks-head .activity-title {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
}

.fortune-sub,
.fortune-tickets-title {
  text-align: center;
}

/* Мягкая тень под белым текстом блока колеса — чтобы не сливался с паттерном. */
.fortune-card .tasks-head .activity-title,
.fortune-sub,
.fortune-tickets-title,
.fortune-ticket-row-title,
.fortune-ticket-row-meta {
  text-shadow: 0 2px 10px color-mix(in srgb, var(--coral-deep) 45%, transparent);
}

/* Текст на пьедестале — с той же мягкой тенью, что в блоке колеса: паттерн
   под ним не должен спорить с белым. */
.podium-name,
.podium-amount {
  text-shadow: 0 2px 10px color-mix(in srgb, var(--coral-deep) 45%, transparent);
}

.fortune-tickets-more {
  align-self: center;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-dark) 22%, transparent);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* --- ежедневный бонус: получение с анимацией, потом серая кнопка --- */

.bank-bonus-btn {
  position: relative;
  transition: background-color 0.5s ease, color 0.5s ease, transform 0.15s ease;
}

.bank-bonus-btn.is-claimed {
  background: #4d4756;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  cursor: default;
}

.bank-bonus-btn:disabled {
  opacity: 1;
}

/* --- второстепенные экраны (мой QR-код, профиль): в стиле банка ---
   Шапка с круглой кнопкой "назад" и заголовком по центру, яркие карточки
   палитры с паттерном, скругления по формуле вложенных радиусов. */

.hero-top-spacer {
  flex: none;
  width: 38px;
  height: 38px;
}

.qr-card,
.profile-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.qr-card::before,
.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../shared/brand/pattern.png') center / cover no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

.qr-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 26px 22px 24px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  background: var(--coral-mid);
  color: var(--text);
}

.qr-card-title {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 34px;
  line-height: 1.05;
  text-shadow: 0 2px 12px color-mix(in srgb, var(--coral-deep) 45%, transparent);
}

.qr-card .qr-frame {
  align-self: center;
  padding: 16px;
  border-radius: 24px;
  background: var(--text);
  box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--coral-deep) 70%, transparent);
}

.qr-card-name {
  font-size: 21px;
  font-weight: 800;
  text-shadow: 0 2px 10px color-mix(in srgb, var(--coral-deep) 45%, transparent);
}

.qr-card-hint {
  max-width: 260px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 90%, transparent);
  text-shadow: 0 2px 10px color-mix(in srgb, var(--coral-deep) 45%, transparent);
}

/* профиль: герой с аватаром, именем и балансом */

.profile-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.profile-hero-avatar {
  width: 88px;
  height: 88px;
  margin-bottom: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: var(--coral-mid);
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 44px;
  line-height: 1;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--coral-deep) 45%, transparent);
}

.profile-hero-name {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 32px;
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 2px 12px color-mix(in srgb, var(--coral-deep) 45%, transparent);
}

.profile-hero-username {
  font-size: 15px;
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 80%, transparent);
}

.profile-hero-balance {
  margin-top: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: color-mix(in srgb, var(--text) 22%, transparent);
  color: var(--text);
}

.profile-hero-balance-value {
  font-family: 'A24', 'TikTok Sans', sans-serif;
  font-size: 24px;
  line-height: 1;
}

.profile-hero-balance-label {
  font-size: 13px;
  font-weight: 700;
}

/* профиль: карточка с данными */

.profile-card {
  background: var(--gold-light);
  color: var(--card-dark);
}

.profile-card .tasks-head {
  justify-content: flex-start;
}

.profile-email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--text) 50%, transparent);
}

.profile-email-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 700;
  color: var(--card-dark);
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--card-dark) 62%, transparent);
}

.profile-card .text-input {
  background: color-mix(in srgb, var(--text) 62%, transparent);
  color: var(--card-dark);
}

.profile-card .text-input::placeholder {
  color: color-mix(in srgb, var(--card-dark) 45%, transparent);
}

.profile-save-btn {
  background: var(--coral-mid);
  color: #ffffff;
}

.profile-card .success {
  color: var(--teal-deep);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-action-btn {
  padding: 16px;
  font-size: 16px;
  background: color-mix(in srgb, var(--text) 14%, transparent);
  color: var(--text);
}

.profile-action-btn.profile-delete-btn {
  color: var(--error);
}

/* --- приветственный экран-знакомство: показывается один раз, сразу после
   регистрации ("человек первый раз открывает приложение в автобусе") ---   */

.view-welcome {
  justify-content: center;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* Тот же фон, что и на остальных экранах приложения (page-glow) — мягкое
   цветное свечение поверх --bg, сильно размытое, без резких границ между
   пятнами, плюс фирменный паттерн почти прозрачным слоем поверх, с
   плавным затуханием к краям (маска-градиент), а не жёсткой рамкой. */
.view-welcome::before {
  content: '';
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(68% 54% at 8% 2%, var(--coral-light) 0%, var(--coral-mid) 52%, transparent 84%),
    radial-gradient(64% 52% at 92% 6%, var(--gold-light) 0%, var(--gold-mid) 52%, transparent 84%),
    radial-gradient(76% 46% at 50% 102%, var(--gold-mid) 0%, var(--coral-mid) 54%, transparent 86%);
  filter: blur(80px);
  opacity: 0.95;
  animation: welcome-drift 22s ease-in-out infinite;
}

.view-welcome::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url('../shared/brand/pattern.png');
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
  opacity: 0.035;
  -webkit-mask-image: radial-gradient(72% 68% at 50% 38%, #000 35%, transparent 90%);
  mask-image: radial-gradient(72% 68% at 50% 38%, #000 35%, transparent 90%);
}

@keyframes welcome-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3%, 4%) scale(1.06); }
}

.welcome-mute-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, #000 30%, transparent);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Три ряда: шапка (аватар) сверху, текст по центру в оставшемся
   пространстве, кнопки ответа всегда внизу экрана, независимо от того,
   насколько длинная фраза. Так длинный текст никогда не выталкивает кнопку
   за пределы экрана и не уезжает сам вверх за край. */
.welcome-stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 18px;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) 24px calc(env(safe-area-inset-bottom, 0px) + 28px);
  box-sizing: border-box;
}

.welcome-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Тот же кружок с маскотом, что и в шапке главного экрана (.brand-mark-box),
   чтобы казалось, что этот текст пишет именно он. */
.welcome-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--coral-mid);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.welcome-avatar::before {
  content: '';
  position: absolute;
  inset: 9px;
  background: #ffffff;
  -webkit-mask-image: url('../shared/brand/logo-mark.png');
  mask-image: url('../shared/brand/logo-mark.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.welcome-text-area {
  display: flex;
  align-items: center;
  min-height: 0;
  overflow-y: auto;
}

.welcome-bubble {
  width: 100%;
  padding: 0;
  background: none;
}

.welcome-typing-dots {
  display: flex;
  gap: 6px;
  height: 24px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.welcome-typing-dots.is-active {
  opacity: 1;
}

.welcome-typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.55;
  animation: welcome-dot-bounce 1s ease-in-out infinite;
}

.welcome-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.welcome-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes welcome-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.welcome-text {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: #fff;
  text-align: left;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  min-height: 1.28em;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Прежняя фраза мягко уходит вверх и растворяется, прежде чем начнёт
   печататься следующая, вместо того чтобы просто обнуляться. */
.welcome-text.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
}

.welcome-text.is-typing::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 3px;
  vertical-align: -0.05em;
  background: var(--gold-light);
  animation: welcome-cursor-blink 0.9s steps(1) infinite;
}

@keyframes welcome-cursor-blink {
  50% { opacity: 0; }
}

.welcome-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  min-height: 116px;
  animation: welcome-options-in 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes welcome-options-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.welcome-choices-grid .btn {
  padding: 16px 10px;
  font-size: 15px;
  background: color-mix(in srgb, #000 22%, transparent);
  backdrop-filter: blur(4px);
}

.welcome-options .btn-coral-solid {
  align-self: flex-start;
  padding: 15px 28px;
}

/* Уход со встречающего экрана и появление главного экрана после него —
   мягкий переход вместо мгновенной подмены. */
.view-welcome.is-exiting {
  animation: welcome-exit 0.45s cubic-bezier(0.4, 0, 0.7, 0.2) forwards;
}

@keyframes welcome-exit {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.96); }
}

.view-home:not(.hidden) {
  animation: view-arrive 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes view-arrive {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-preview-note {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 10;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
