:root {
  --bg: #0b0c10;
  --surface: #15171d;
  --surface-2: #1c1f27;
  --border: rgba(255, 255, 255, 0.07);
  --text: #f2f2f5;
  --text-dim: #8b8d97;
  --gold: #f5b83d;
  --violet: #7c6cf0;
  --violet-dim: rgba(124, 108, 240, 0.16);
  --green: #33a852;
  --red: #e0475a;
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Сгенерированный фон: едва заметный повторяющийся узор из контуров
   подарочных коробок поверх лёгкого радиального градиента. Полностью
   свой (нарисован в CSS/SVG) — можно заменить на своё изображение,
   просто поменяв body { background-image: ... } на url('/static/bg.jpg'). */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(124, 108, 240, 0.14), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.035' stroke-width='2'%3E%3Crect x='24' y='40' width='32' height='28' rx='2'/%3E%3Cline x1='24' y1='50' x2='56' y2='50'/%3E%3Cline x1='40' y1='40' x2='40' y2='68'/%3E%3Cpath d='M32 40c0-6 5-10 8-10s8 4 8 10'/%3E%3Ccircle cx='90' cy='90' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 84px;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.balance-pill .star {
  color: var(--gold);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

/* ---------- sub tabs (catalog / market) ---------- */

.subtabs {
  display: flex;
  gap: 8px;
  padding: 4px 16px 14px;
}

.subtab {
  flex: 1;
  border: none;
  background: var(--surface);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.subtab.active {
  background: var(--violet);
  color: #fff;
}

/* ---------- grid of gift cards ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 16px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
}

.card.sold-out { cursor: default; }

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.05), transparent 60%);
  pointer-events: none;
}

.ribbon {
  position: absolute;
  top: 10px;
  right: -28px;
  transform: rotate(45deg);
  padding: 3px 32px;
  font-size: 10px;
  font-weight: 700;
  text-transform: lowercase;
  color: #0b0c10;
}

.ribbon.very_rare { background: var(--green); color: #06210d; }
.ribbon.rare { background: var(--gold); color: #2a1a02; }
.ribbon.author { background: var(--red); color: #2a0208; }
.ribbon.limited { background: var(--violet); color: #fff; }

.card-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 14px;
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-art img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-art .placeholder {
  font-size: 40px;
}

.card-name {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2px;
  line-height: 1.25;
}

.card-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.card-action {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.card-action.buy {
  background: var(--violet-dim);
  color: var(--violet);
}

.card-action.owned {
  background: rgba(51, 168, 82, 0.16);
  color: var(--green);
}

.card-action.locked,
.card-action.soldout {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.card-action .star { color: var(--gold); }

/* ---------- empty state ---------- */

.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-dim);
}

.empty-state .emoji {
  font-size: 36px;
  margin-bottom: 8px;
  display: block;
}

/* ---------- status toast ---------- */

.status-line {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 60;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- bottom nav ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  padding: 10px 16px 16px;
  z-index: 40;
}

.bottom-nav-inner {
  width: 100%;
  max-width: 520px;
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  gap: 6px;
}

.nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-btn .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---------- profile ---------- */

.profile-header {
  margin: 4px 16px 18px;
  background: linear-gradient(145deg, rgba(124,108,240,0.22), rgba(124,108,240,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.profile-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.profile-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-balance {
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.profile-balance .star { color: var(--gold); }

.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary { background: var(--violet); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-gold { background: var(--gold); color: #2a1a02; }
.btn-danger { background: rgba(224, 71, 90, 0.15); color: var(--red); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; }

/* -- кнопка "зажми, чтобы купить": вместо случайного клика требует
   удержания — заполняющаяся плашка внутри показывает прогресс, звук/вибрация
   в начале и в момент завершения (см. attachHoldToConfirm в script.js). -- */

.btn-hold {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.btn-hold .hold-fill {
  position: absolute;
  inset: 0;
  left: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.28);
  z-index: 0;
  pointer-events: none;
}

.btn-hold.holding .hold-fill {
  width: 100%;
  transition: width var(--hold-ms, 650ms) linear;
}

.btn-hold .hold-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-hold.holding {
  transform: scale(0.97);
}

@keyframes hold-complete-pop {
  0%   { transform: scale(0.97); }
  45%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.btn-hold.held-complete {
  animation: hold-complete-pop 0.32s cubic-bezier(.34,1.56,.64,1);
}

.section-title {
  padding: 4px 16px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---------- modal / bottom sheet ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.overlay.hidden { display: none; }

.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px 26px;
  position: relative;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 6px auto 14px;
}

.sheet-art {
  width: 100%;
  aspect-ratio: 1.2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.sheet-art img { max-width: 60%; max-height: 100%; object-fit: contain; }

/* Окно покупки из каталога — картинка подарка крупнее (+~20%), чтобы было
   лучше видно, чем в остальных карточках/окнах, использующих .sheet-art. */
#buy-overlay .sheet-art img { max-width: 72%; }

/* "Рулетка" улучшения фона: дорожка карточек-фонов, летящая слева
   направо и плавно замедляющаяся до полной остановки ровно на том
   фоне, который уже выбран на сервере (см. runBackdropRoulette). */
.roulette-wrap {
  margin: 14px 0 4px;
}

.roulette-viewport {
  position: relative;
  width: 100%;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
}

.roulette-track {
  position: absolute;
  top: 4px;
  left: 0;
  display: flex;
  gap: 10px;
  will-change: transform;
}

.roulette-item {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
}

.roulette-pointer {
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(245, 184, 61, 0.7);
  transform: translateX(-50%);
  pointer-events: none;
}

.backdrop-result {
  text-align: center;
  font-size: 14px;
  color: var(--text);
  margin: 10px 0 14px;
}

.sheet-actions {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
}

.sheet-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sheet-title-row h2 {
  font-size: 18px;
  margin: 0;
}

.sheet-title-row .num {
  color: var(--text-dim);
  font-size: 13px;
}

.attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.attr-row:last-child { border-bottom: none; }

.attr-label { color: var(--text-dim); }
.attr-value { font-weight: 600; }
.attr-value.link { color: var(--violet); }

.history-title {
  margin: 18px 0 8px;
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

.history-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

.history-item:last-child { border-bottom: none; }
.history-item .ev-type { color: var(--text); font-weight: 600; }

.field {
  margin: 14px 0;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
}

.field input:focus { outline: 1px solid var(--violet); }

.quick-amounts {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.quick-amounts button {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 0;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.quick-amounts button.active {
  border-color: var(--violet);
  color: var(--violet);
  background: var(--violet-dim);
}

.hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

.hint.error { color: var(--red); }

.close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}

.gate {
  padding: 80px 24px;
  text-align: center;
  color: var(--text-dim);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

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

/* ---------- admin ---------- */

.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 16px 14px;
  overflow-x: auto;
}

.admin-tabs .subtab {
  flex: none;
  padding: 9px 16px;
  white-space: nowrap;
}

.panel {
  margin: 0 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.panel-row {
  display: flex;
  gap: 10px;
}

.panel-row .field { flex: 1; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 14px;
}

.checkbox-row input { width: 16px; height: 16px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child { border-bottom: none; }

.list-item .thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.list-item .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

.list-item .info { flex: 1; min-width: 0; }
.list-item .info .title { font-weight: 600; font-size: 14px; }
.list-item .info .sub { font-size: 12px; color: var(--text-dim); }

.list-item .actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.mini-btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mini-btn.on { color: var(--green); border-color: rgba(51,168,82,0.4); }
.mini-btn.off { color: var(--text-dim); }
.mini-btn.danger { color: var(--red); border-color: rgba(224,71,90,0.4); }

.tag {
  display: inline-block;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text-dim);
}


/* ---------- icons ---------- */

.icon {
  display: inline-block;
  vertical-align: -0.15em;
  flex: none;
}

.icon-img {
  display: inline-block;
  vertical-align: -0.15em;
  flex: none;
  object-fit: contain;
}

.icon.star,
.star .icon,
[data-icon="star"] .icon {
  color: var(--gold);
}

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

.brand-mark {
  display: flex;
  color: var(--violet);
}

.balance-pill .star,
.profile-balance .star {
  display: flex;
  align-items: center;
  color: var(--gold);
}

.card-action,
.btn,
.tag,
.attr-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-action,
.btn-block {
  justify-content: center;
}

.attr-value { justify-content: flex-end; }

.icon-btn {
  padding: 0;
}

.quick-amounts button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.empty-state .emoji {
  display: flex;
  justify-content: center;
  color: var(--text-dim);
  opacity: 0.6;
  margin-bottom: 10px;
}

.card-art .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  opacity: 0.45;
}

/* ==================================================== animations ==================================================== */

/* -- universal tap feedback: любая кликабельная штука чуть "проседает" -- */

.btn,
.card-action,
.mini-btn,
.icon-btn,
.subtab,
.nav-btn,
.quick-amounts button,
.close-x,
.balance-pill,
.profile-balance {
  transition: transform 0.15s cubic-bezier(.4,0,.2,1), background-color 0.18s ease, color 0.18s ease,
    opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:not(:disabled):active,
.card-action:not(:disabled):active,
.mini-btn:active,
.icon-btn:active,
.quick-amounts button:active,
.close-x:active,
.balance-pill:active,
.profile-balance:active {
  transform: scale(0.94);
}

.nav-icon {
  transition: transform 0.18s cubic-bezier(.4,0,.2,1);
}

.nav-btn:active .nav-icon {
  transform: scale(0.82);
}

.nav-btn.active .nav-icon {
  animation: nav-pop 0.28s cubic-bezier(.34,1.56,.64,1);
}

@keyframes nav-pop {
  0% { transform: scale(0.75); }
  100% { transform: scale(1); }
}

/* -- карточки подарков / строки списков: аккуратное появление и press -- */

.card {
  transition: transform 0.15s cubic-bezier(.4,0,.2,1), box-shadow 0.2s ease;
  animation: item-in 0.36s cubic-bezier(.22,.9,.32,1.1) both;
}

.card:not(.sold-out):active {
  transform: scale(0.95);
}

.list-item {
  animation: item-in 0.3s ease both;
}

@keyframes item-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* -- переключение вкладок / экранов (fade + едва заметный сдвиг) -- */

#screen-gifts,
#screen-profile,
section[data-panel] {
  animation: fade-in 0.26s ease both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -- модальные окна / bottom sheets -- */

.overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0s linear 0s;
}

.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.sheet {
  transform: translateY(30px) scale(0.99);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(.22,.9,.32,1.15), opacity 0.24s ease;
}

.overlay:not(.hidden) .sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* -- тост со статусом -- */

.status-line {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.22,.9,.32,1.1);
  pointer-events: none;
}

.status-line.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* -- пульс баланса при изменении -- */

@keyframes balance-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.balance-pill.pulse,
.profile-balance.pulse {
  animation: balance-pulse 0.4s cubic-bezier(.34,1.56,.64,1);
}

.balance-pill.pulse .star,
.profile-balance.pulse .star {
  animation: balance-pulse 0.4s cubic-bezier(.34,1.56,.64,1);
}

/* -- спиннер загрузки вместо пустого экрана -- */

.loading-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 0;
  animation: fade-in 0.2s ease both;
}

/* -- поля ввода: мягкий переход рамки -- */

.field input {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-dim);
}

/* -- уважение к настройке "меньше анимаций" в системе -- */

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

/* ---------- success (успешная покупка) ---------- */

.success-sheet {
  text-align: center;
  padding-top: 6px;
  padding-bottom: 28px;
}

.success-visual {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 6px;
  animation: success-pop 0.4s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes success-pop {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

.success-gif {
  max-width: 180px;
  max-height: 180px;
  border-radius: var(--radius);
  object-fit: contain;
}

.success-check-bg {
  fill: var(--violet);
}

.success-check-ring {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  animation: success-ring 0.55s ease forwards 0.05s;
}

.success-check-mark {
  fill: none;
  stroke: #fff;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
  animation: success-mark 0.3s ease forwards 0.5s;
}

@keyframes success-ring { to { stroke-dashoffset: 0; } }
@keyframes success-mark { to { stroke-dashoffset: 0; } }

.success-title {
  margin: 10px 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.success-sub {
  margin: 0 0 22px;
  color: var(--text-dim);
  font-size: 14px;
  padding: 0 8px;
}

/* ---------- generic celebration badge (send / receive / stars) ---------- */

.celebrate-badge {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: success-pop 0.4s cubic-bezier(.34,1.56,.64,1) both;
}

.celebrate-badge .icon,
.celebrate-badge .icon-img {
  animation: nav-pop 0.45s cubic-bezier(.34,1.56,.64,1) 0.12s both;
}

.celebrate-badge.violet { background: var(--violet); color: #fff; }
.celebrate-badge.green  { background: var(--green); color: #06210d; }
.celebrate-badge.gold   { background: var(--gold); color: #2a1a02; }

.stars-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 4px;
}
