/*
 * Единый «человечный» стиль поверх старых экранов:
 * один шрифт (Inter) вместо рукописных, SVG-иконки вместо эмодзи,
 * спокойные карточки без неонового свечения.
 * Подключается последним — после shell.css.
 */

/* ── Шрифт: рукописные Caveat / Pangolin / Patrick Hand больше нигде не используются ── */
.theme-neon body,
.theme-neon body * {
  font-family: var(--sh-font) !important;
}
.theme-neon body { -webkit-font-smoothing: antialiased; }

/* ── Иконки ── */
/* :where — нулевой вес: размеры иконок оболочки (.sh-ico 22px и др.) важнее этого запасного 1em */
:where(.ui-ico) { width: 1em; height: 1em; flex-shrink: 0; }
.ui-coin { width: 1.05em; height: 1.05em; flex-shrink: 0; vertical-align: -0.17em; }
.ui-art { width: 1em; height: 1em; display: block; }
.ui-medal { width: 28px; height: 28px; display: block; margin: 0 auto; }
.sh-ico--inline { width: 16px !important; height: 16px !important; vertical-align: -2px; }
.sh-perk__lvl .sh-ico { width: 14px; height: 14px; vertical-align: -2px; }
.sh-hero__art .ui-art { width: 44px; height: 44px; }
.sh-mode__art .ui-art { width: 72px; height: 72px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25)); }
.sh-mode__art { filter: none !important; }
.sh-gold, .sh-coins, .sh-reward, .sh-chip, .sh-primary { white-space: nowrap; }
.sh-gold .ui-coin, .sh-coins .ui-coin { margin-right: 2px; }

/* Монета у строк «На счёте» и «Этот забег» — картинкой, а не эмодзи */
.overlay-wallet-line:not(:empty)::after,
#sessionCoinsHud:not(:empty)::after {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-left: 0.3em;
  vertical-align: -0.17em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23e9a23b'/%3E%3Ccircle cx='12' cy='11.2' r='9' fill='%23f7c64f'/%3E%3Ccircle cx='12' cy='11.2' r='6' fill='none' stroke='%23fde9a8' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.theme-neon .overlay-wallet-line { color: #f7c64f; font-weight: 700; text-shadow: none; }
.theme-neon #sessionCoinsHud { color: #f7c64f !important; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

/* ── Задания / сезон / карьера (оболочка) ── */
.sh-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
}
.sh-note > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.sh-note__icon { color: #fbbf24; font-size: 22px; line-height: 0; margin-top: 1px; }

.sh-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: var(--sh-card);
}
.sh-summary__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sh-summary .sh-bar { background: rgba(255, 255, 255, 0.08); height: 8px; }
.sh-summary .sh-primary { margin-top: 4px; }
.sh-season-head { display: flex; align-items: center; gap: 12px; }
.sh-season-head .sh-hexmini {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sh-tasks { display: flex; flex-direction: column; gap: 8px; }
.sh-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--sh-card);
  border: 1px solid transparent;
}
.sh-task.is-ready { border-color: rgba(90, 162, 255, 0.45); background: linear-gradient(100deg, rgba(90, 162, 255, 0.1), rgba(123, 97, 255, 0.1)), var(--sh-card); }
.sh-task.is-done { opacity: 0.55; }
.sh-task__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 20px;
  color: var(--sh-blue);
  background: rgba(90, 162, 255, 0.12);
}
.sh-task__icon--num { font-weight: 800; font-size: 1rem; color: var(--sh-text); background: var(--sh-card-2); }
.sh-task.is-done .sh-task__icon { color: var(--sh-green); background: rgba(74, 222, 128, 0.12); }
.sh-task__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.sh-task__body b { font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.sh-task__meta { font-size: 0.78rem; color: var(--sh-muted); font-weight: 600; }
.sh-task .sh-bar { background: rgba(255, 255, 255, 0.08); height: 5px; }
.sh-task.is-done .sh-bar i { background: var(--sh-green); }
.sh-task__side { flex-shrink: 0; display: flex; align-items: center; }
.sh-reward { font-weight: 800; font-size: 0.85rem; color: #fbbf24; display: inline-flex; align-items: center; gap: 3px; }
.sh-claim {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 99px;
  background: var(--sh-grad) !important;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}
.sh-claim .sh-reward { color: #fff; }
.sh-done {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--sh-green);
  background: rgba(74, 222, 128, 0.14);
}
.sh-done .sh-ico { width: 18px; height: 18px; }

.sh-achs { padding: 2px 0; }
.sh-ach { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--sh-line); }
.sh-ach:last-child { border-bottom: 0; }
.sh-ach__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--sh-muted);
  background: var(--sh-card-2);
}
.sh-ach__icon .sh-ico { width: 15px; height: 15px; }
.sh-ach.is-done .sh-ach__icon { color: var(--sh-green); background: rgba(74, 222, 128, 0.14); }
.sh-ach__title { flex: 1; min-width: 0; font-size: 0.88rem; line-height: 1.3; color: var(--sh-muted); }
.sh-ach.is-done .sh-ach__title { color: var(--sh-text); font-weight: 600; }
.sh-ach__reward { font-size: 0.8rem; font-weight: 700; color: var(--sh-muted); white-space: nowrap; }
.sh-ach.is-done .sh-ach__reward { color: #fbbf24; }

/* ── Экран конца забега ── */
.theme-neon #menuPanel.is-gameover:not(.go-show-menu) :is(#title, #bodyText, #recordLine, #mountainRunStats, #modeSwitchGroup, #bulletDensityRow, #obstacleMenuExtras, .settings-anchor) {
  display: none !important;
}
.theme-neon #menuPanel.is-gameover { padding-top: 22px; }
.go-stats { gap: 0; margin: 0 0 16px; align-items: stretch; text-align: center; }
.go-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sh-muted);
}
.go-value {
  margin: 6px 0 8px;
  font-size: clamp(2.8rem, 15vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--sh-text);
}
.go-record {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.9rem;
}
.go-record .ui-ico { font-size: 16px; }
.go-best { color: var(--sh-muted); font-size: 0.9rem; font-weight: 600; }
.go-chips { display: flex; gap: 10px; margin-top: 16px; }
.go-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 16px;
  background: var(--sh-card-2);
  font-size: 0.85rem;
  color: var(--sh-muted);
}
.go-chip .ui-coin, .go-chip .ui-ico { font-size: 20px; }
.go-chip b { font-size: 1.1rem; color: var(--sh-text); }
.go-chip--xp .ui-ico { color: #a78bfa; }
.go-skin { margin-top: 10px; font-size: 0.85rem; color: var(--sh-muted); }
.go-skin b { color: #a78bfa; }
.go-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.go-tiles > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid var(--sh-line);
}
.go-tiles .ui-ico { font-size: 17px; color: var(--sh-blue); }
.go-tiles b { font-size: 1rem; }
.go-tiles span { font-size: 0.72rem; color: var(--sh-muted); }

.theme-neon #menuPanel.is-gameover .panel .btn.menu-start-btn,
.theme-neon #menuPanel.is-gameover .btn.menu-start-btn { font-size: 1.2rem !important; min-height: 56px !important; }
.theme-neon .go-home-btn::before, .theme-neon .go-share-btn::before { display: none !important; content: none !important; }
.theme-neon .go-home-btn, .theme-neon .go-share-btn { color: var(--sh-text); font-family: var(--sh-font); }
.theme-neon .go-home-btn .ui-ico { font-size: 22px; }
.theme-neon .go-share-btn { gap: 8px; }
.theme-neon .go-share-btn .ui-ico { font-size: 19px; }

/* ── Окна: инфо, умение перед забегом, обучение Преград ── */
.skill-modal__backdrop, .obstacle-tutorial__backdrop { background: rgba(10, 14, 20, 0.72) !important; backdrop-filter: blur(4px); }
.pre-run-brief { background: rgba(10, 14, 20, 0.72) !important; }
.theme-neon :is(.skill-modal__dialog, .pre-run-brief__inner, .obstacle-tutorial__card).panel {
  background: var(--sh-card) !important;
  border: 1px solid var(--sh-line) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  padding: 24px 20px 20px !important;
}
.theme-neon :is(.skill-modal__title, .pre-run-brief__heading, .obstacle-tutorial__title) {
  color: var(--sh-text) !important;
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  text-shadow: none !important;
  line-height: 1.25 !important;
}
.theme-neon .pre-run-brief__kicker {
  color: var(--sh-muted) !important;
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Плашка «Инфо» ничего не сообщает — в информационных окнах её нет */
.skill-modal--info .skill-modal__badge { display: none !important; }
.theme-neon :is(.skill-modal__text, .obstacle-tutorial__body, .pre-run-text, .pre-run-note, .pre-run-controls) {
  color: #c9d2de !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}
.theme-neon :is(.skill-modal__dialog, .pre-run-brief__inner, .obstacle-tutorial__card) .btn:not(.btn-secondary) {
  background: var(--sh-grad) !important;
  border: 0 !important;
  border-radius: 99px !important;
  min-height: 50px;
  font-weight: 700;
  color: #fff !important;
}
.theme-neon :is(.skill-modal__dialog, .obstacle-tutorial__card) .btn.btn-secondary { border-radius: 99px !important; min-height: 50px; }

/* ── Обучение на первом запуске ── */
.onb__card { background: var(--sh-card) !important; border: 1px solid var(--sh-line) !important; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45) !important; }
.onb__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 36px !important;
  color: #fff;
  background: var(--sh-grad);
  filter: none !important;
}
.onb__title { font-size: 1.3rem !important; font-weight: 800 !important; }
.onb__next { border: 0 !important; background: var(--sh-grad) !important; }
.onb__dots span { background: rgba(255, 255, 255, 0.18) !important; box-shadow: none !important; }
.onb__dots span.is-active { background: var(--sh-blue) !important; }

/* ── Таблица лидеров: медали ── */
.lb-row--top1 .lb-rank, .lb-row--top2 .lb-rank, .lb-row--top3 .lb-rank { font-size: 1rem; line-height: 0; }

/* ── Уведомления о достижениях ── */
.ui-toasts {
  position: fixed;
  top: calc(var(--tg-inset-top, 0px) + 12px);
  left: 0;
  right: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  pointer-events: none;
}
.ui-toast {
  pointer-events: auto;
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--sh-line);
  border-radius: 18px;
  background: rgba(37, 46, 58, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  color: var(--sh-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: ui-toast-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.ui-toast.is-out { opacity: 0; transform: translateY(-10px); transition: opacity 0.25s, transform 0.25s; }
@keyframes ui-toast-in { from { opacity: 0; transform: translateY(-14px) scale(0.98); } }
.ui-toast__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}
.ui-toast__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-toast__title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sh-muted); }
.ui-toast__text { font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.ui-toast__reward { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #fbbf24; white-space: nowrap; }
.ui-toast__reward .ui-coin { font-size: 18px; }

/* Кнопки «Назад» в старых окнах — как в оболочке */
.theme-neon .shop-back-btn { color: var(--sh-blue) !important; font-weight: 700; }

/* ── Троица: слоты умений и выбор скина ── */
.sh-tri-slot {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--sh-card) !important;
  border: 1px solid transparent !important;
}
.sh-tri-slot.is-on { border-color: rgba(74, 222, 128, 0.45) !important; }
.sh-tri-slot[disabled] { opacity: 0.6; }
.sh-tri-slot .sh-skin-thumb--sm { flex-shrink: 0; }
.sh-tri-slot__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sh-tri-slot__text {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--sh-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sh-tri-tag {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--sh-card-2);
  color: var(--sh-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.sh-skin-hero .sh-chip { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }

/* Кнопки прямо на экране не растягиваются по высоте (flex: 1 нужен им только в строке) */
.sh-screen > .sh-primary { flex: 0 0 auto; }

/* Подсказка под вкладками таблицы лидеров */
.lb-hint { margin: 2px 0 6px; font-size: 0.82rem; color: var(--sh-muted); text-align: center; }

/* ── Награда за вход (главная) ── */
.sh-daily {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(249, 115, 22, 0.1)), var(--sh-card);
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.sh-daily__head { display: flex; gap: 12px; align-items: center; }
.sh-daily__head > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sh-daily__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}
.sh-daily__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.sh-daily__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 0 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--sh-muted);
  min-width: 0;
}
.sh-daily__day i { font-style: normal; font-size: 0.72rem; font-weight: 700; line-height: 1; height: 14px; display: grid; place-items: center; }
.sh-daily__day i .sh-ico { width: 14px; height: 14px; }
.sh-daily__day b { font-size: 0.74rem; font-weight: 800; color: #fbbf24; }
.sh-daily__day.is-done { opacity: 0.55; }
.sh-daily__day.is-done i { color: var(--sh-green); }
.sh-daily__day.is-now { background: rgba(251, 191, 36, 0.2); color: var(--sh-text); box-shadow: inset 0 0 0 1.5px #fbbf24; }

/* ── Мультиплеер (js/mpView.js): старая панель — «двигатель», видна только новая вёрстка ── */
#multiplayerPanel.mp-panel > :not(.mp-view) { display: none !important; }
.theme-neon #multiplayerPanel.mp-panel {
  width: 100%;
  max-width: 560px;
  padding: 8px 16px 20px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-align: left;
}
.mp-view { display: flex; flex-direction: column; gap: 12px; color: var(--sh-text); }
.mp-view > * { flex-shrink: 0; }
:where(.mp-view) button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
:where(.mp-view) button:active { transform: scale(0.98); }
.mp-view .sh-ico, .mp-view .ui-ico { width: 20px; height: 20px; }
.mp-view > .sh-primary { flex: 0 0 auto; }
.mp-view .sh-backlink { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; color: var(--sh-blue); font-weight: 700; }
.mp-view .sh-flip { transform: scaleX(-1); }
.mp-join { display: flex; gap: 8px; }
.mp-join__input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--sh-line);
  background: var(--sh-card);
  color: var(--sh-text);
  font: 700 1rem var(--sh-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mp-join__input::placeholder { letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--sh-muted); }
.mp-status { margin: 0; font-size: 0.85rem; color: var(--sh-muted); white-space: pre-line; }

.mp-code {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--sh-card);
}
.mp-code b { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.12em; }
.mp-copy {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid !important;
  place-items: center;
  background: var(--sh-card-2) !important;
  color: var(--sh-muted);
}
.mp-copy.is-done { color: var(--sh-green); }
.mp-state {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(90, 162, 255, 0.12);
  color: var(--sh-blue);
  font-weight: 700;
  font-size: 0.86rem;
}
.mp-state.is-hot { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.mp-players { display: flex; flex-direction: column; gap: 8px; }
.mp-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--sh-card);
  border: 1px solid transparent;
}
.mp-player.is-me { border-color: rgba(90, 162, 255, 0.45); }
.mp-player--empty { background: transparent; border: 1.5px dashed rgba(255, 255, 255, 0.14); color: var(--sh-muted); }
.mp-thumb { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; background: var(--sh-card-2); }
.mp-thumb--empty { display: grid; place-items: center; }
.mp-player__name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-chip { padding: 4px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; background: var(--sh-card-2); color: var(--sh-muted); white-space: nowrap; }
.mp-chip--ok { background: rgba(74, 222, 128, 0.14); color: var(--sh-green); }
.mp-chip--off { background: rgba(248, 113, 113, 0.14); color: #f87171; }
.mp-rank { width: 28px; flex-shrink: 0; text-align: center; font-weight: 800; color: var(--sh-muted); }
.mp-time { font-weight: 800; white-space: nowrap; }
.mp-result-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px;
  border-radius: 22px;
  background: var(--sh-card);
  text-align: center;
}
.mp-result-head b { font-size: 1.6rem; font-weight: 800; }
.mp-result-head__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
  background: var(--sh-grad);
}
.mp-result-head.is-win .mp-result-head__icon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.mp-result-head .ui-ico { width: 28px; height: 28px; }
.mp-view .sh-page-title { color: var(--sh-text) !important; text-shadow: none !important; text-align: left; font-size: 2rem !important; margin: 6px 0 4px !important; }
.mp-view .sh-section { color: var(--sh-text); }
.mp-notice { margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(248, 113, 113, 0.1); color: #fca5a5; font-size: 0.88rem; font-weight: 600; }

/* Нижняя панель: иконки крупнее, подпись читаемая */
.sh-tab .sh-ico { width: 26px; height: 26px; }
.sh-tab { font-size: 0.75rem !important; gap: 5px !important; }

/* ── Донатные скины (магазин → «Донат») ── */
.sh-donate {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 14px !important;
  padding: 16px !important;
  border-radius: 24px !important;
  overflow: hidden;
  border: 1.5px solid transparent !important;
  background:
    linear-gradient(160deg, #2a1f3d, #1d2230) padding-box,
    var(--dn-frame) border-box !important;
}
.sh-donate--vip { --dn-frame: linear-gradient(135deg, #fde68a, #f59e0b 35%, #e11d48 70%, #fde68a); --dn-accent: #fbbf24; }
.sh-donate--tri { --dn-frame: linear-gradient(135deg, #22d3ee, #e879f9 50%, #fbbf24); --dn-accent: #e879f9; }
/* Мягкий отблеск, пробегающий по карточке */
.sh-donate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.07) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: dn-shine 5s ease-in-out infinite;
  pointer-events: none;
}
.sh-donate--tri::after { animation-delay: 2.5s; }
@keyframes dn-shine { 60%, 100% { transform: translateX(100%); } }

.sh-donate__top { display: flex; align-items: center; gap: 14px; }
.sh-donate__art {
  width: 104px;
  height: 104px;
  flex-shrink: 0;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.35) 70%);
}
.sh-donate__art svg { width: 92px; height: 92px; overflow: visible; }
.sh-donate__art .spin, .sh-donate__art .spin-rev { transform-origin: 32px 33px; animation: dn-spin 14s linear infinite; }
.sh-donate__art .spin-rev { animation-direction: reverse; animation-duration: 18s; }
.sh-donate__art .pulse { transform-origin: 32px 30px; animation: dn-pulse 2.2s ease-in-out infinite; }
@keyframes dn-spin { to { transform: rotate(360deg); } }
@keyframes dn-pulse { 50% { transform: scale(0.88); opacity: 0.75; } }
@media (prefers-reduced-motion: reduce) {
  .sh-donate::after, .sh-donate__art .spin, .sh-donate__art .spin-rev, .sh-donate__art .pulse { animation: none; }
}

.sh-donate__title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sh-donate__badge {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b1030;
  background: var(--dn-frame);
}
.sh-donate.is-owned .sh-donate__badge { background: rgba(74, 222, 128, 0.18); color: var(--sh-green); }
.sh-donate__name { font-size: 1.5rem !important; font-weight: 800; line-height: 1.1; }
.sh-donate__tag { color: var(--dn-accent); font-weight: 700; font-size: 0.9rem; }

.sh-donate__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sh-donate__perks li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; line-height: 1.3; color: #d7dde8; }
.sh-donate__perks .sh-ico {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--dn-accent);
  background: rgba(255, 255, 255, 0.06);
}
.sh-donate__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-donate__buy { flex: 1 1 100% !important; min-height: 52px; font-size: 1rem; }
.sh-donate--vip .sh-donate__buy { background: linear-gradient(100deg, #f59e0b, #e11d48) !important; }
.sh-donate--tri .sh-donate__buy { background: linear-gradient(100deg, #06b6d4, #c026d3) !important; }

/* ── Кастомизация (магазин → «Донат») ── */
.sh-cos-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-cos-pill {
  padding: 9px 14px !important;
  border-radius: 99px;
  background: var(--sh-card) !important;
  border: 1px solid var(--sh-line) !important;
  color: var(--sh-muted) !important;
  font-weight: 700;
  font-size: 0.88rem;
}
.sh-cos-pill.is-on { color: var(--sh-text) !important; border-color: var(--sh-blue) !important; background: rgba(90, 162, 255, 0.14) !important; }
.sh-cos-where { margin: -4px 0 0; display: flex; align-items: center; gap: 6px; }
.sh-cos-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sh-cos {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px 12px;
  border-radius: 20px;
  background: var(--sh-card);
  border: 1.5px solid transparent;
  text-align: center;
}
.sh-cos.is-on { border-color: var(--sh-blue); }
.sh-cos .sh-mode__tag { position: absolute; top: 8px; left: 8px; }
.sh-cos__preview {
  width: 100%;
  height: 104px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, #1d2440, #10131c 75%);
  margin-bottom: 6px;
}
.sh-cos b { font-size: 0.98rem; }
.sh-cos__tag { font-size: 0.78rem; color: var(--sh-muted); line-height: 1.25; min-height: 2em; }
.sh-cos .sh-chip { margin-top: 4px; width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 4px; }

/* Выбор режима на главной */
.sh-modepick .sh-pill-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; min-height: 44px; font-size: 0.95rem; }
.sh-modepick .sh-pill-btn.is-on { background: var(--sh-grad) !important; border-color: transparent !important; color: #fff !important; }

/* Рамка фокуса — только для клавиатуры, не после нажатия пальцем */
#appShell button:focus:not(:focus-visible),
.mp-view button:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* Режим «Реакция»: карточка во вкладке «Режимы» */
.sh-mode--reflex { background: linear-gradient(160deg, #10b981, #0891b2); }
/* Третья карточка — во всю ширину под двумя */
.sh-modes > .sh-mode:nth-child(3):last-child { grid-column: 1 / -1; }
.sh-modepick .sh-pill-btn { font-size: 0.88rem; padding: 0 6px; }

/* ── Таблица лидеров (оболочка) ── */
.sh-cos-pills--sub .sh-cos-pill { padding: 7px 12px !important; font-size: 0.82rem; }
.sh-lb-ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.sh-lb-ava--big { width: 56px; height: 56px; font-size: 1.4rem; border: 3px solid rgba(255, 255, 255, 0.85); }
.sh-lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 4px; }
.sh-lb-pod {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  text-align: center;
}
.sh-lb-pod__medal { margin-top: -18px; line-height: 0; }
.sh-lb-pod__medal .ui-medal { width: 26px; height: 26px; }
.sh-lb-pod__name { font-size: 0.85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-lb-pod__score { font-size: 0.82rem; font-weight: 800; color: var(--sh-blue); }
.sh-lb-pod__step {
  width: 100%;
  margin-top: 4px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 6px 6px;
  font-size: 1.4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
}
.sh-lb-pod--1 .sh-lb-pod__step { height: 84px; background: linear-gradient(180deg, rgba(247, 198, 79, 0.45), rgba(247, 198, 79, 0.08)); }
.sh-lb-pod--2 .sh-lb-pod__step { height: 62px; background: linear-gradient(180deg, rgba(214, 221, 232, 0.35), rgba(214, 221, 232, 0.06)); }
.sh-lb-pod--3 .sh-lb-pod__step { height: 46px; background: linear-gradient(180deg, rgba(232, 160, 106, 0.4), rgba(232, 160, 106, 0.06)); }
.sh-lb-pod--1 .sh-lb-ava--big { width: 66px; height: 66px; border-color: #f7c64f; box-shadow: 0 0 22px rgba(247, 198, 79, 0.45); }
.sh-lb-pod.is-me .sh-lb-pod__name { color: var(--sh-blue); }
.sh-lb-list { display: flex; flex-direction: column; border-radius: 20px; background: var(--sh-card); overflow: hidden; }
.sh-lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--sh-line); }
.sh-lb-row:last-child { border-bottom: 0; }
.sh-lb-row.is-me { background: rgba(90, 162, 255, 0.12); }
.sh-lb-row__rank { width: 24px; text-align: center; font-weight: 800; color: var(--sh-muted); flex-shrink: 0; }
.sh-lb-row__name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-lb-row__score { white-space: nowrap; }
.sh-lb-me {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--sh-card);
  color: var(--sh-muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.sh-lb-me.is-ranked { background: linear-gradient(100deg, rgba(90, 162, 255, 0.18), rgba(123, 97, 255, 0.18)); color: var(--sh-text); }
.sh-lb-me .sh-ico { color: #fbbf24; }

/* ── Испытание дня (главная) ── */
.sh-challenge {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.16), rgba(239, 68, 68, 0.1)), var(--sh-card);
  border-color: rgba(251, 146, 60, 0.3);
}
.sh-challenge--reflex { background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(8, 145, 178, 0.12)), var(--sh-card); border-color: rgba(16, 185, 129, 0.32); }
.sh-challenge__head { display: flex; gap: 12px; align-items: center; }
.sh-challenge__head > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sh-challenge__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #ef4444);
}
.sh-challenge--reflex .sh-challenge__icon { background: linear-gradient(135deg, #10b981, #0891b2); }
.sh-challenge__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sh-challenge__stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}
.sh-challenge__stats b { font-size: 1.05rem; display: inline-flex; align-items: center; min-height: 1.3em; }
.sh-challenge__stats b .sh-ico { color: var(--sh-green); width: 20px; height: 20px; }
.sh-challenge__stats span { font-size: 0.72rem; color: var(--sh-muted); }
.sh-challenge .sh-primary .sh-ico { width: 18px; height: 18px; }
