/* ─────────────────────────────────────────────────────────────
   Xenvora App — дизайн-система
   Чёрный фон, графитовые карточки, белые акценты, синий бренд
   ───────────────────────────────────────────────────────────── */
:root {
  --bg: #000;
  --card: #141416;
  --card-hi: #1b1b1e;
  /* плоский почти чёрный фон плиток и списков, как в StriverAI */
  --card-flat: #151517;
  --card-2: #1f1f23;
  --card-3: #2a2a2f;
  --stroke: rgba(255, 255, 255, 0.07);
  --stroke-2: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.4);
  --accent: #f2f2f4;
  --accent-2: #e4e4e8;
  --accent-glow: rgba(255, 255, 255, 0.22);
  --logo-bg: #151718;
  --lime: #c6f432;
  --green: #34c759;
  --orange: #ff9f0a;
  --red: #ff453a;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 18px;
  --r-sm: 14px;
  --pad: 14px;
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --tabbar-h: 58px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* пружины (те же, что были у framer-motion) для CSS-анимаций: их считает видеокарта, а не процессор.
     Браузеры без linear() получают похожие кривые Безье */
  --spring-pill: cubic-bezier(0.3, 1.35, 0.5, 1);
  --spring-page: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-sheet: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-item: cubic-bezier(0.25, 1.05, 0.4, 1);
  --spring-knob: cubic-bezier(0.3, 1.4, 0.5, 1);
  --spring-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-avatar: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: dark;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring-pill: linear(0, 0.024, 0.087, 0.174, 0.274, 0.379, 0.482, 0.58, 0.669, 0.748, 0.816, 0.873, 0.92, 0.957, 0.985, 1.006, 1.02, 1.03, 1.035, 1.038, 1.037, 1.036, 1.033, 1.029, 1.025, 1.021, 1.017, 1.014, 1.011, 1.008, 1.006, 1.004, 1);
    --spring-page: linear(0, 0.029, 0.099, 0.189, 0.285, 0.381, 0.471, 0.552, 0.624, 0.687, 0.741, 0.787, 0.825, 0.857, 0.884, 0.906, 0.924, 0.939, 0.951, 0.96, 0.968, 0.975, 0.98, 0.984, 0.987, 0.99, 0.992, 0.994, 0.995, 0.996, 0.997, 0.997, 1);
    --spring-sheet: linear(0, 0.029, 0.098, 0.188, 0.284, 0.379, 0.468, 0.55, 0.622, 0.685, 0.739, 0.785, 0.823, 0.856, 0.883, 0.905, 0.923, 0.938, 0.95, 0.96, 0.968, 0.974, 0.979, 0.983, 0.987, 0.989, 0.992, 0.993, 0.995, 0.996, 0.997, 0.997, 1);
    --spring-item: linear(0, 0.028, 0.096, 0.188, 0.291, 0.395, 0.494, 0.586, 0.668, 0.739, 0.799, 0.849, 0.89, 0.923, 0.948, 0.967, 0.982, 0.992, 0.999, 1.004, 1.007, 1.009, 1.009, 1.009, 1.009, 1.008, 1.007, 1.006, 1.005, 1.004, 1.003, 1.003, 1);
    --spring-knob: linear(0, 0.037, 0.128, 0.249, 0.382, 0.514, 0.635, 0.741, 0.83, 0.901, 0.955, 0.995, 1.021, 1.038, 1.046, 1.048, 1.047, 1.042, 1.036, 1.03, 1.024, 1.018, 1.013, 1.008, 1.005, 1.002, 1, 0.999, 0.998, 0.998, 0.998, 0.998, 1);
    --spring-pop: linear(0, 0.041, 0.144, 0.284, 0.44, 0.594, 0.735, 0.856, 0.954, 1.027, 1.077, 1.107, 1.119, 1.119, 1.11, 1.095, 1.077, 1.058, 1.04, 1.024, 1.011, 1.001, 0.993, 0.989, 0.986, 0.985, 0.986, 0.988, 0.99, 0.992, 0.994, 0.996, 1);
    --spring-avatar: linear(0, 0.041, 0.144, 0.282, 0.431, 0.578, 0.711, 0.824, 0.915, 0.984, 1.032, 1.063, 1.079, 1.083, 1.08, 1.072, 1.06, 1.048, 1.036, 1.024, 1.015, 1.007, 1.001, 0.997, 0.995, 0.993, 0.993, 0.993, 0.994, 0.995, 0.996, 0.997, 1);
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
  overscroll-behavior: none;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
}

button:disabled {
  cursor: default;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
  -webkit-user-select: text;
  user-select: text;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* у кнопок рамку фокуса не рисуем: в Telegram Desktop она оставалась белым кольцом после нажатия */
button:focus-visible {
  outline: none;
}

.selectable {
  -webkit-user-select: text;
  user-select: text;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ── каркас ─────────────────────────────────────────────── */
.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

.base-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
  transition: transform 0.44s var(--spring-page);
}

/* поверх вкладок открыта страница: вкладки сдвигаются на 22% влево и темнеют (на телефоне и в Telegram на ПК) */
.base-layer.is-covered {
  transform: translateX(-22%);
}

.page {
  position: absolute;
  inset: 0;
  /* непрозрачный фон — браузер прокручивает страницу на видеокарте, без перерисовки (Telegram Desktop) */
  background-color: var(--bg);
  will-change: scroll-position;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(10px + var(--safe-top)) var(--pad) calc(var(--tabbar-h) + 34px + var(--safe-bottom));
  scrollbar-width: none;
}

.page::-webkit-scrollbar {
  display: none;
}

.page.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.page.is-active {
  animation: page-in 0.32s var(--ease);
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── появления: только opacity и transform, их считает видеокарта ──
   (раньше это делал framer-motion на процессоре — при открытии страниц анимации дёргались) */

/* блок проявляется снизу при открытии (шапка магазина, приветствие и т.п.) */
.rise-in {
  animation: rise-in 0.5s var(--spring-item) backwards;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

/* узор профиля проявляется из лёгкого уменьшения */
.fade-scale-in {
  animation: fade-scale-in 0.6s var(--ease) backwards;
}

@keyframes fade-scale-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* аватарка профиля появляется пружинкой */
.avatar-pop {
  animation: avatar-pop 0.6s var(--spring-avatar) backwards;
}

@keyframes avatar-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
}

/* смена урока: новый текст мягко проявляется */
.lesson-swap {
  animation: lesson-swap 0.22s var(--ease) backwards;
}

@keyframes lesson-swap {
  from {
    opacity: 0.35;
    transform: translateY(8px);
  }
}

/* списки появляются лесенкой: каждый следующий элемент на 45 мс позже, дальше двенадцатого — разом */
.stagger > * {
  animation: item-in 0.42s var(--spring-item) backwards;
  animation-delay: 0.56s;
}

.stagger > :nth-child(1) {
  animation-delay: 0.02s;
}

.stagger > :nth-child(2) {
  animation-delay: 0.065s;
}

.stagger > :nth-child(3) {
  animation-delay: 0.11s;
}

.stagger > :nth-child(4) {
  animation-delay: 0.155s;
}

.stagger > :nth-child(5) {
  animation-delay: 0.2s;
}

.stagger > :nth-child(6) {
  animation-delay: 0.245s;
}

.stagger > :nth-child(7) {
  animation-delay: 0.29s;
}

.stagger > :nth-child(8) {
  animation-delay: 0.335s;
}

.stagger > :nth-child(9) {
  animation-delay: 0.38s;
}

.stagger > :nth-child(10) {
  animation-delay: 0.425s;
}

.stagger > :nth-child(11) {
  animation-delay: 0.47s;
}

.stagger > :nth-child(12) {
  animation-delay: 0.515s;
}

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

/* страница поверх вкладок: въезжает справа и уезжает обратно CSS-анимацией (её считает видеокарта) */
.stack-page {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow: hidden;
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.7);
  animation: stack-in 0.44s var(--spring-page) backwards;
  transition: transform 0.44s var(--spring-page);
}

.stack-page.is-under {
  transform: translateX(-22%);
}

.stack-page.is-leaving {
  animation: stack-out 0.4s var(--spring-page) forwards;
  pointer-events: none;
}

/* после свайпа страница уже уезжает сама (переход из пальца) — анимация ухода не нужна */
.stack-page.is-leaving[data-swiped] {
  animation: none;
}

@keyframes stack-in {
  from {
    transform: translateX(100%);
  }
}

@keyframes stack-out {
  to {
    transform: translateX(100%);
  }
}

/* сайт на компьютере: страница не выезжает сбоку, а мягко проявляется */
.stack-page.is-fade {
  animation: stack-fade-in 0.22s var(--ease) backwards;
}

.stack-page.is-fade.is-under {
  transform: none;
}

.stack-page.is-fade.is-leaving {
  animation: stack-fade-out 0.2s var(--ease) forwards;
}

@keyframes stack-fade-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes stack-fade-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* заготовка-загрузка: видна, пока впервые открытая вкладка или страница собирается, потом тает */
.loading-cover {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) var(--pad) 0;
  background: var(--bg);
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.loading-cover > .skeleton {
  display: block;
  flex: none;
}

.loading-cover.is-done {
  opacity: 0;
}

.loading-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 8px;
}

.loading-avatar > .skeleton {
  display: block;
}

.stack-page > .page {
  padding-bottom: calc(40px + var(--safe-bottom));
}

.stack-page.with-bar > .page {
  padding-bottom: calc(120px + var(--safe-bottom));
}

.stack-dim {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.44s var(--ease);
}

.stack-page > .stack-dim {
  z-index: 7;
}

.base-layer.is-dimmed > .stack-dim,
.stack-page.is-under > .stack-dim {
  opacity: 0.55;
}

.edge-swipe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  z-index: 5;
  touch-action: none;
}

.top-fade {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: calc(14px + var(--safe-top));
  background: linear-gradient(#000, rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: 8;
}

/* ── нижнее меню ────────────────────────────────────────── */
.tabbar-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 0 calc(12px + var(--safe-bottom));
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82) 55%);
  transition:
    transform 0.4s var(--spring-page),
    opacity 0.25s var(--ease);
}

/* открыта страница поверх вкладок — меню уезжает вниз */
.tabbar-wrap.is-hidden {
  transform: translateY(130px);
  opacity: 0;
}

.tabbar-wrap.is-hidden .tabbar {
  pointer-events: none;
}

.tabbar {
  position: relative;
  pointer-events: auto;
  width: min(228px, calc(100% - 56px - var(--tabbar-h)));
  height: var(--tabbar-h);
  padding: 5px;
  border-radius: 999px;
  display: flex;
  gap: 2px;
  background: rgba(30, 30, 33, 0.96);
  border: 1px solid var(--stroke-2);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* профиль — круглая кнопка той же высоты, что и капсула; иконка всегда яркая */
.tabbar-solo {
  flex: none;
  width: var(--tabbar-h);
  padding: 0;
  background: rgba(18, 18, 20, 0.97);
}

.tabbar-solo .tab {
  width: 100%;
  height: 100%;
}

.tabbar-solo .tab-icon {
  color: rgba(255, 255, 255, 0.92);
}

.tabbar-solo .tab-icon svg {
  width: 25px;
  height: 25px;
}

.tab {
  position: relative;
  flex: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  min-height: 44px;
}

.tab-pill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8);
  transition:
    transform 0.33s var(--spring-pill),
    opacity 0.2s var(--ease);
}

.tab-pill.is-on {
  opacity: 1;
  transform: none;
}

/* подсветка в капсуле — одна на три вкладки: переезжает к выбранной (ширина вкладки + зазор 2px) */
.tab-pill-slide {
  inset: 5px auto 5px 5px;
  width: calc((100% - 14px) / 3);
  transform: translateX(calc(var(--tab-i, 0) * (100% + 2px))) scale(0.8);
}

.tab-pill-slide.is-on {
  transform: translateX(calc(var(--tab-i, 0) * (100% + 2px)));
}

.tab-icon {
  position: relative;
  display: grid;
  color: rgba(235, 235, 245, 0.42);
  transition: color 0.25s var(--ease);
}

.tab.is-active .tab-icon {
  color: #fff;
}

.tab-icon svg {
  display: block;
  width: 23px;
  height: 23px;
  overflow: visible;
}

/* анимации иконок при выборе вкладки: только transform и штрих — дёшево для видеокарты */
.tb-bag,
.tb-handle,
.tb-lid,
.tb-box,
.tb-info,
.tb-dot,
.tb-head,
.tb-body {
  transform-box: fill-box;
}

/* «Магазин»: пакет подпрыгивает, ручка тянется следом */
.tb-bag {
  transform-origin: 50% 100%;
}

.tab.is-active .tb-bag {
  animation: tb-hop 0.62s ease-in-out both;
}

.tb-handle {
  transform-origin: 50% 100%;
}

.tab.is-active .tb-handle {
  animation: tb-handle 0.62s ease-in-out both;
}

@keyframes tb-hop {
  0% {
    transform: translateY(0) scale(1, 1);
  }
  20% {
    transform: translateY(1px) scale(1.08, 0.9);
  }
  45% {
    transform: translateY(-4px) scale(0.94, 1.08);
  }
  70% {
    transform: translateY(0) scale(1.04, 0.96);
  }
  100% {
    transform: translateY(0) scale(1, 1);
  }
}

@keyframes tb-handle {
  0%,
  20% {
    transform: none;
  }
  50% {
    transform: translateY(-1.6px) scaleY(1.12);
  }
  100% {
    transform: none;
  }
}

/* «Покупки»: крышка приоткрывается, галочка прорисовывается */
.tb-lid {
  transform-origin: 0% 100%;
}

.tab.is-active .tb-lid {
  animation: tb-lid 0.7s ease-in-out both;
}

.tb-box {
  transform-origin: 50% 100%;
}

.tab.is-active .tb-box {
  animation: tb-squash 0.7s ease-in-out both;
}

.tb-check {
  stroke-dasharray: 11;
  stroke-dashoffset: 0;
}

.tab.is-active .tb-check {
  animation: tb-draw 0.45s 0.2s ease-out both;
}

@keyframes tb-lid {
  0% {
    transform: none;
  }
  35% {
    transform: translateY(-2.6px) rotate(-12deg);
  }
  65% {
    transform: translateY(0) rotate(4deg);
  }
  100% {
    transform: none;
  }
}

@keyframes tb-draw {
  from {
    stroke-dashoffset: 11;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* «Инфо»: круг пружинит, точка над «i» подпрыгивает */
.tb-info {
  transform-origin: 50% 50%;
}

.tab.is-active .tb-info {
  animation: tb-pop 0.55s ease-out both;
}

.tb-dot {
  transform-origin: 50% 50%;
}

.tab.is-active .tb-dot {
  animation: tb-dot 0.75s ease-in-out both;
}

@keyframes tb-pop {
  0% {
    transform: scale(0.82);
  }
  55% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tb-dot {
  0%,
  15% {
    transform: none;
  }
  40% {
    transform: translateY(-3.2px);
  }
  60% {
    transform: translateY(0.6px);
  }
  80% {
    transform: translateY(-0.8px);
  }
  100% {
    transform: none;
  }
}

/* «Профиль»: человечек кивает */
.tb-head {
  transform-origin: 50% 100%;
}

.tab.is-active .tb-head {
  animation: tb-nod 0.7s ease-in-out both;
}

.tb-body {
  transform-origin: 50% 100%;
}

.tab.is-active .tb-body {
  animation: tb-squash 0.7s ease-in-out both;
}

@keyframes tb-nod {
  0% {
    transform: none;
  }
  30% {
    transform: translateY(-1.8px) rotate(-10deg);
  }
  60% {
    transform: translateY(0) rotate(7deg);
  }
  100% {
    transform: none;
  }
}

@keyframes tb-squash {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: scale(1.06, 0.92);
  }
  60% {
    transform: scale(0.97, 1.03);
  }
}

/* ── карточки и поверхности ─────────────────────────────── */
.card {
  position: relative;
  background: var(--card-flat);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-pad {
  padding: 16px;
}

.surface {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grow {
  flex: 1;
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* обёртки анимации внутри сетки растягиваем — карточки в ряду одной высоты */
.grid-2 > div:not([class]) {
  display: flex;
}

.grid-2 > div:not([class]) > * {
  flex: 1;
  min-width: 0;
}

.mt-6 {
  margin-top: 6px;
}
.mt-10 {
  margin-top: 10px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-20 {
  margin-top: 20px;
}
.mt-24 {
  margin-top: 24px;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── типографика ────────────────────────────────────────── */
.h1 {
  font-size: 31px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.025em;
  margin: 0;
}

.h2 {
  font-size: 24px;
  line-height: 1.12;
  font-weight: 820;
  letter-spacing: -0.02em;
  margin: 0;
}

.h3 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 760;
  letter-spacing: -0.01em;
  margin: 0;
}

.t-2 {
  color: var(--text-2);
}

.t-3 {
  color: var(--text-3);
}

.small {
  font-size: 13px;
  line-height: 1.35;
}

.tiny {
  font-size: 11.5px;
  line-height: 1.3;
}

.label {
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 20px 4px 10px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  margin: 18px 4px 10px;
}

.price {
  font-weight: 830;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price .cur {
  font-size: 0.78em;
  font-weight: 750;
  opacity: 0.85;
  margin-left: 2px;
}

.price .from {
  font-size: 0.68em;
  font-weight: 600;
  color: var(--text-3);
  margin-right: 4px;
  letter-spacing: 0;
}

.old-price {
  color: var(--text-3);
  text-decoration: line-through;
  font-size: 12px;
  font-weight: 600;
}

/* ── бейджи и точки ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.03em;
  background: var(--lime);
  color: #172000;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 14px rgba(198, 244, 50, 0.25);
  vertical-align: middle;
  white-space: nowrap;
}

.badge.blue {
  background: #f2f2f4;
  color: #111;
  box-shadow: 0 0 14px var(--accent-glow);
}

.badge.gold {
  background: linear-gradient(135deg, #ffe08a, #f5b72e);
  color: #3a2600;
  box-shadow: 0 0 14px rgba(245, 183, 46, 0.3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  white-space: nowrap;
}

.chip.green {
  background: rgba(52, 199, 89, 0.14);
  color: #5fe08a;
}
.chip.orange {
  background: rgba(255, 159, 10, 0.14);
  color: #ffb340;
}
.chip.blue {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}
.chip.red {
  background: rgba(255, 69, 58, 0.14);
  color: #ff7a72;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 1px;
}

.dot.green {
  background: var(--green);
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.7);
}

.dot.orange {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 159, 10, 0.7);
}

/* ── кнопки ─────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 20px;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.btn.block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: #f4f4f6;
  color: #000;
  box-shadow:
    0 10px 30px rgba(255, 255, 255, 0.08),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.btn-dark {
  background: var(--card-2);
  color: #fff;
  border: 1px solid var(--stroke);
}

.btn-accent {
  background: linear-gradient(135deg, #ffffff, #c9c9cf);
  color: #000;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: rgba(255, 69, 58, 0.14);
  color: #ff6b62;
}

.btn-sm {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 13px;
}

.btn[disabled] {
  opacity: 0.45;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  flex: none;
}

.icon-btn.light {
  background: #f4f4f6;
  color: #000;
}

.round-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  flex: none;
}

/* ── списки ─────────────────────────────────────────────── */
.list {
  background: var(--card-flat);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 12px 14px;
  text-align: left;
}

.list-row + .list-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 62px;
  right: 14px;
  height: 1px;
  background: var(--stroke);
}

.list-row .icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  flex: none;
}

.list-row .title {
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.list-row .sub {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 1px;
}

/* ── пилюли категорий ───────────────────────────────────── */
/* без «прилипания» прокрутки: оно возвращало ряд к началу, и соседние категории не выглядывали */
.pills {
  /* relative — чтобы offsetLeft категорий считался от начала ряда (для центрирования выбранной) */
  position: relative;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--pad));
  padding: 2px var(--pad) 4px;
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.pills::-webkit-scrollbar {
  display: none;
}

.pill {
  position: relative;
  flex: none;
  height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 760;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  transition: color 0.25s var(--ease);
}

/* подсветка выбранной пилюли есть у каждой и проявляется на месте (opacity и transform — на видеокарте) */
.pill .pill-bg {
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background: #f4f4f6;
  opacity: 0;
  transform: scale(0.86);
  transition:
    opacity 0.2s var(--ease),
    transform 0.33s var(--spring-pill);
}

.pill.is-active .pill-bg {
  opacity: 1;
  transform: none;
}

.pill > span {
  position: relative;
}

.pill.is-active {
  color: #000;
}

.pill .emoji.is-mono,
.btn-primary .emoji.is-mono,
.presets .is-active .emoji.is-mono {
  transition: filter 0.25s var(--ease);
}

.pill.is-active .emoji.is-mono,
.btn-primary .emoji.is-mono {
  filter: invert(1);
}

/* ── сегменты ───────────────────────────────────────────── */
.seg {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 17px;
  background: var(--card);
  border: 1px solid var(--stroke);
}

/* у кнопок по умолчанию текст наследует выравнивание влево — здесь всё строго по центру */
.seg button {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  height: 42px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 760;
  color: var(--text-2);
  transition: color 0.25s var(--ease);
}

/* три и больше групп — чуть мельче, чтобы длинные названия помещались целиком */
.seg.is-tight button {
  padding: 0 4px;
  font-size: 13.5px;
}

.seg button > span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seg button.is-active {
  color: #fff;
}

/* подсветка выбранного — одна на весь переключатель, переезжает с лёгкой пружинкой */
.seg-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--seg-n, 2));
  border-radius: 13px;
  background: var(--card-3);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(calc(var(--seg-i, 0) * 100%));
  transition: transform 0.36s cubic-bezier(0.3, 1.25, 0.5, 1);
}

.view-toggle {
  position: relative;
  display: flex;
  padding: 3px;
  gap: 2px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--stroke);
}

/* подсветка выбранного вида: кнопка 34px + зазор 2px */
.view-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 34px;
  height: 30px;
  border-radius: 10px;
  background: var(--card-3);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(calc(var(--vt-i, 0) * 36px));
  transition: transform 0.33s var(--spring-pill);
  pointer-events: none;
}

.view-toggle button {
  position: relative;
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-3);
}

.view-toggle button.is-active {
  color: #fff;
}

/* ── товары ─────────────────────────────────────────────── */
.p-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 158px;
  padding: 14px;
  text-align: left;
  overflow: hidden;
}

.p-card .glow {
  position: absolute;
  width: 110px;
  height: 110px;
  left: -22px;
  top: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
}

.p-card > .emoji-glow {
  align-self: flex-start;
}

.p-card .arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--text-3);
}

/* значок («NEW», «ХИТ», «до 29.10») справа сверху, как в StriverAI */
.p-card .p-badge {
  position: absolute;
  top: 14px;
  right: 14px;
}

.p-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.p-price-row .price {
  font-size: 19px;
}

.p-inf {
  margin-left: auto;
  font-size: 15px;
  color: var(--text-3);
}

.p-card .title {
  font-size: 15.5px;
  font-weight: 760;
  letter-spacing: -0.015em;
  margin-top: 14px;
}

.p-card .sub {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.p-card .bottom {
  margin-top: auto;
  padding-top: 12px;
}

.p-card .price {
  font-size: 21px;
}

.p-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
}

.p-row .price {
  font-size: 17px;
}

.stock-bar {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  overflow: hidden;
}

.stock-bar > i {
  display: block;
  height: 100%;
  background: #fff;
  border-radius: 3px;
}

/* ── шапка магазина ─────────────────────────────────────── */
.hero {
  position: relative;
  height: 196px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 55%),
    var(--logo-bg);
  border: 1px solid var(--stroke-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-content {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.hero-name {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.hero-label {
  font-size: 11.5px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: auto;
}

.hero-balance {
  font-size: 42px;
  line-height: 1;
  font-weight: 880;
  letter-spacing: -0.035em;
  margin-top: 6px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.hero-name,
.hero-label {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

.hero-content {
  z-index: 1;
}

.hero-avatar,
.hero-plus {
  z-index: 2;
}

.hero-balance .cur {
  font-size: 0.62em;
  color: var(--text-2);
  margin-left: 4px;
}

.hero-plus {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--stroke-2);
}

.hero-avatar {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  background: rgba(255, 255, 255, 0.08);
}

/* ── логотип: стеклянный куб ────────────────────────────── */
.contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.logo-cube {
  position: relative;
  display: inline-block;
  flex: none;
  pointer-events: none;
  overflow: hidden;
  /* края картинки мягко растворяются — фон логотипа сливается с карточкой */
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}

.logo-cube img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* парит весь куб вместе с маской: маска рисуется один раз, а дальше слой только двигается видеокартой
   (раньше двигалась картинка под маской, и маска перерисовывалась на каждом кадре — поэтому на телефонах это отключали) */
.logo-cube.is-float {
  animation: float 7s ease-in-out infinite;
  will-change: transform;
}

.logo-cube.is-glint::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0) 60%);
  transform: translateX(-130%);
  animation: glint 6.5s ease-in-out infinite;
}

@keyframes glint {
  0%,
  60% {
    transform: translateX(-130%);
  }
  85%,
  100% {
    transform: translateX(130%);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(-1.5deg);
  }
}

.hero-contours {
  opacity: 0.9;
}

.avatar {
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #46464d, #18181b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── страница товара ────────────────────────────────────── */
.p-hero {
  position: relative;
  height: 290px;
  margin: calc(-10px - var(--safe-top)) calc(-1 * var(--pad)) 0;
  overflow: hidden;
}

.p-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0) 45%, #000 100%);
  pointer-events: none;
}

.p-hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* галактика: звёзды нарисованы один раз, кольца вращает и искорки зажигает видеокарта */
.galaxy {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

/* звёзды нарисованы (после того как страница доехала) — галактика мягко проявляется */
.galaxy.is-ready {
  opacity: 1;
}

.galaxy-disc {
  position: absolute;
  transform: scaleY(0.46);
}

.galaxy .g-ring {
  position: absolute;
  inset: auto;
  animation: galaxy-spin 110s linear infinite;
  will-change: transform;
}

.galaxy .g-in {
  animation-duration: 75s;
}

.galaxy .g-out {
  animation-duration: 170s;
}

.galaxy .g-spark {
  animation:
    galaxy-spin 110s linear infinite,
    galaxy-twinkle 2.6s ease-in-out infinite;
}

.galaxy.is-paused .g-ring {
  animation-play-state: paused;
}

@keyframes galaxy-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes galaxy-twinkle {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 1;
  }
}

/* значок товара появляется пружинкой */
.pop-in {
  animation: pop-in 0.6s var(--spring-pop) 0.08s backwards;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

.p-hero .center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.p-hero .halo {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 65%);
}

.variant {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 20px;
  background: var(--card-flat);
  border: 1px solid var(--stroke);
  transition: border-color 0.25s var(--ease);
}

.variant .ring {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.06),
    0 10px 30px rgba(255, 255, 255, 0.06);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.2s var(--ease),
    transform 0.33s var(--spring-pill);
}

.variant.is-selected .ring {
  opacity: 1;
  transform: none;
}

.variant .v-title {
  font-size: 15.5px;
  font-weight: 780;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variant .v-sub {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 3px;
}

.variant .price {
  font-size: 16px;
}

.info-block {
  position: relative;
  padding: 14px 14px 14px 22px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card-flat);
  border: 1px solid var(--stroke);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.info-block::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  /* полоска цитаты у самого края блока, с косыми серыми штрихами — как цитата в Telegram */
  background: repeating-linear-gradient(110deg, #8f8f93 0 3.2px, #6f6f73 3.2px 6.4px, #51515a 6.4px 9.6px);
}

.info-block .ie {
  display: inline-flex;
  vertical-align: -5px;
  margin-right: 6px;
}

.info-block .inline-rich {
  display: inline;
}

.rich .ie {
  display: inline-flex;
  vertical-align: -4px;
}

.rich b,
.rich strong {
  color: #fff;
  font-weight: 750;
}

.rich a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  /* длинный адрес рвётся где угодно, а ссылка-слово («Visual Studio») — только по пробелам */
  overflow-wrap: anywhere;
}

.rich code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 6px;
}

.rich blockquote {
  margin: 6px 0;
  padding-left: 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--card-2);
}

.stepper button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
}

.stepper .val {
  min-width: 26px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
}

.buy-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px var(--pad) calc(12px + var(--safe-bottom));
  display: flex;
  gap: 10px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.92) 38%);
  z-index: 6;
}

/* панель покупки выезжает снизу чуть позже страницы */
.bar-in {
  animation: bar-in 0.5s var(--spring-page) 0.12s backwards;
}

@keyframes bar-in {
  from {
    opacity: 0;
    transform: translateY(110px);
  }
}

.buy-sum {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border-radius: var(--r-md);
  background: rgba(24, 24, 27, 0.92);
  border: 1px solid var(--stroke);
}

.buy-sum .price {
  font-size: 21px;
}

.buy-bar .btn {
  flex: 1;
  height: 58px;
}

/* ── шторки ─────────────────────────────────────────────── */
/* шторки выезжают и уезжают CSS-анимацией (видеокарта), фон проявляется и гаснет */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
  z-index: 40;
  animation: fade-in 0.25s var(--ease) backwards;
}

.sheet-backdrop.is-leaving {
  animation: fade-out 0.26s var(--ease) forwards;
  pointer-events: none;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: calc(100% - 28px - var(--safe-top));
  display: flex;
  flex-direction: column;
  border-radius: 28px 28px 0 0;
  background: #111113;
  border-top: 1px solid var(--stroke-2);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  z-index: 41;
  touch-action: pan-y;
  animation: sheet-in 0.4s var(--spring-sheet) backwards;
}

.sheet.is-leaving {
  animation: sheet-out 0.36s var(--spring-sheet) forwards;
  pointer-events: none;
}

/* закрыли свайпом — шторка уже уезжает из-под пальца */
.sheet.is-leaving[data-swiped] {
  animation: none;
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}

@keyframes sheet-out {
  to {
    transform: translateY(100%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

.sheet-drag {
  flex: none;
  touch-action: none;
  padding-top: 8px;
}

.sheet-handle {
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto;
}

.sheet-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
}

.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px var(--pad) calc(20px + var(--safe-bottom));
  scrollbar-width: none;
}

.sheet-body::-webkit-scrollbar {
  display: none;
}

.sheet-title {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 10px 40px 4px;
}

.sheet-sub {
  text-align: center;
  color: var(--text-2);
  font-size: 13.5px;
}

.sheet-hero {
  position: relative;
  display: grid;
  place-items: center;
  height: 120px;
  margin-top: 4px;
}

.sheet-hero .halo {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 65%);
}

.sheet-hero .halo.warm {
  background: radial-gradient(circle, rgba(255, 170, 60, 0.28), rgba(255, 170, 60, 0) 65%);
}

.sheet-hero .halo.blue {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 65%);
}

.sheet-hero .halo.green {
  background: radial-gradient(circle, rgba(52, 199, 89, 0.34), rgba(52, 199, 89, 0) 65%);
}

.sheet-hero .halo.red {
  background: radial-gradient(circle, rgba(255, 69, 58, 0.3), rgba(255, 69, 58, 0) 65%);
}

.legal {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-3);
  margin: 16px 10px 0;
  line-height: 1.5;
}

.legal button {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.amount-input {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--stroke);
  position: relative;
}

.amount-input input {
  width: 100%;
  background: none;
  border: 0;
  outline: none;
  text-align: center;
  font-size: 46px;
  font-weight: 880;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.amount-input input::placeholder {
  color: var(--text-3);
}

.amount-input .cur {
  position: absolute;
  right: 22px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-3);
}

/* компактное поле суммы (перевод баланса) */
.amount-input.is-compact {
  height: 62px;
}

.amount-input.is-compact input {
  font-size: 30px;
}

.amount-input.is-compact .cur {
  right: 18px;
  font-size: 20px;
}

.presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.presets button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  font-weight: 760;
  font-size: 14px;
  white-space: nowrap;
}

.presets button.is-active {
  background: #f4f4f6;
  color: #000;
}

.big-amount {
  text-align: center;
  font-size: 46px;
  line-height: 1.05;
  font-weight: 880;
  letter-spacing: -0.035em;
  margin: 18px 0 20px;
}

.big-amount .cur {
  font-size: 0.66em;
  color: var(--text-3);
  margin-left: 6px;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 14px;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  flex: none;
}

.spinner.dark {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #000;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.link-field {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--stroke);
  font-size: 13.5px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.86);
}

.stat {
  padding: 14px 16px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
}

.stat .k {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 600;
}

.stat .v {
  font-size: 26px;
  font-weight: 860;
  letter-spacing: -0.03em;
  margin-top: 6px;
}

.stat .v .cur {
  font-size: 0.66em;
  color: var(--text-3);
  margin-left: 3px;
}

.stat .h {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── формы (админка) ────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
  padding-left: 4px;
}

.field .hint {
  font-size: 11.5px;
  color: var(--text-3);
  padding-left: 4px;
  font-weight: 500;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  outline: none;
  font-size: 15px;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(255, 255, 255, 0.42);
  background: #222228;
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.textarea.mono,
.input.mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23999' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.switch {
  position: relative;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.32);
  transition: background 0.25s var(--ease);
  flex: none;
}

.switch.on {
  background: var(--green);
}

.switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.38s var(--spring-knob);
}

/* бегунок переезжает пружинкой (CSS transform — видеокарта) */
.switch.on i {
  transform: translateX(20px);
}

.form-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-card > .h3 {
  margin-bottom: -2px;
}

.save-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px var(--pad) calc(12px + var(--safe-bottom));
  background: linear-gradient(rgba(0, 0, 0, 0), #000 40%);
  z-index: 6;
  display: flex;
  gap: 10px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
}

.emoji-cell {
  height: 66px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--text-3);
  padding: 4px;
  text-align: center;
  overflow: hidden;
}

.emoji-cell.is-active {
  border-color: #fff;
  background: var(--card-3);
}

.emoji-cell span {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 64px;
  margin-top: 12px;
}

.bar-chart i {
  flex: 1;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #ffffff, #8b8b93);
  opacity: 0.85;
}

.bar-chart i.zero {
  background: rgba(255, 255, 255, 0.1);
}

.admin-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  min-height: 104px;
  text-align: left;
}

.admin-tile .title {
  font-size: 15px;
  font-weight: 760;
}

.admin-tile .sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: -6px;
}

.kbd {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-2);
}

/* ── премиум-эмодзи ─────────────────────────────────────── */
.emoji {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  vertical-align: middle;
}

.emoji > * {
  grid-area: 1 / 1;
}

/* холст на 15% больше иконки с каждой стороны — чтобы покачивание не обрезалось */
.emoji-canvas {
  position: absolute;
  left: -15%;
  top: -15%;
  width: 130%;
  height: 130%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.emoji.is-ready .emoji-canvas {
  opacity: 1;
}

/* цветные анимированные эмодзи рисует SVG-рендер; contain — каждый кадр пересчитывает только саму иконку, а не страницу */
.emoji-svg {
  position: absolute;
  inset: 0;
  contain: strict;
  pointer-events: none;
}

.emoji-svg svg {
  display: block;
}

/* статичная иконка «живёт»: дышит, покачивается и время от времени подпрыгивает.
   Анимация только transform — её считает видеокарта, процессор не нагружается */
.emoji-canvas.is-live {
  animation: emoji-live 3.6s ease-in-out infinite;
  animation-delay: var(--live-delay, 0s);
}

/* страница скрыта — покачивание на паузе (вернулись — продолжается с того же места, без рывка) */
.emoji-canvas.is-live.is-paused {
  animation-play-state: paused;
}

@keyframes emoji-live {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate3d(0, -3%, 0) rotate(-7deg) scale(1.06);
  }
  50% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  75% {
    transform: translate3d(0, 2%, 0) rotate(6deg) scale(0.97);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

.emoji-fb {
  line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.emoji video,
.emoji img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.emoji-glow {
  position: relative;
  display: inline-grid;
  place-items: center;
}

/* премиум-фон за эмодзи: свечение его цвета (см. Emoji glow) */
/* свечение компактное — чуть больше самой иконки и не залезает на текст */
.emoji-halo {
  position: absolute;
  inset: -26%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, rgba(var(--halo), 0.3) 0%, rgba(var(--halo), 0.1) 44%, rgba(var(--halo), 0) 70%);
  opacity: 0;
  animation: halo-in 0.5s var(--ease) forwards;
}

/* в плитках — большое мягкое свечение без видимой границы: плитка как будто подсвечена
   цветом эмодзи изнутри, а края свечения обрезает сама плитка (как у Reactus) */
.p-card .emoji-halo,
.p-row .emoji-halo,
.admin-tile .emoji-halo {
  inset: -210%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(var(--halo), 0.24) 0%,
    rgba(var(--halo), 0.14) 16%,
    rgba(var(--halo), 0.06) 34%,
    rgba(var(--halo), 0.02) 50%,
    rgba(var(--halo), 0) 64%
  );
}

/* свечение лежит под текстом плитки, но над её фоном */
.p-card .emoji-halo,
.p-row .emoji-halo,
.admin-tile .emoji-halo {
  z-index: -1;
}

.p-card,
.p-row,
.admin-tile {
  overflow: hidden;
  isolation: isolate;
}

@keyframes halo-in {
  to {
    opacity: 1;
  }
}

/* ── прочее ─────────────────────────────────────────────── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--r-lg);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.toast-wrap {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(10px + var(--safe-top));
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 100;
}

.toast {
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(36, 36, 40, 0.97);
  border: 1px solid var(--stroke-2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.error {
  color: #ff8a82;
}

.toast.success {
  color: #6ee797;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
}

.center-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}

.divider {
  height: 1px;
  background: var(--stroke);
  margin: 4px 0;
}

.quote {
  position: relative;
  padding: 13px 14px 13px 20px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.quote::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: #fff;
  opacity: 0.85;
}

.lesson-progress {
  position: sticky;
  top: 0;
  height: 2px;
  margin: -10px calc(-1 * var(--pad)) 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff, rgba(255, 255, 255, 0));
  transform-origin: left center;
  z-index: 5;
  pointer-events: none;
}

/* закрытый урок: замок, пояснение и кнопка покупки */
.lesson-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 26px;
}

.lesson-locked .btn {
  width: 100%;
}

.lesson-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #0d0d0f;
  border: 1px solid var(--stroke);
}

.lesson-video iframe,
.lesson-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── профиль как в Telegram ─────────────────────────────── */
.tg-header {
  position: relative;
  margin: calc(-10px - var(--safe-top)) calc(-1 * var(--pad)) 6px;
  padding-top: var(--safe-top);
  overflow: hidden;
}

/* фон профиля тянется под кнопками и плавно уходит в чёрный */
.tg-header-bg {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 40px), transparent);
}

.tg-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px var(--pad) 26px;
}

.tg-header.no-audio .tg-actions {
  padding-top: 20px;
}

.tg-actions .btn {
  height: 56px;
  color: #fff;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.tg-gift-layer {
  position: absolute;
  left: 50%;
  top: calc(67px + var(--safe-top));
  width: 0;
  height: 0;
  z-index: 2;
}

.tg-gift {
  position: absolute;
}

.tg-gift-btn {
  display: grid;
}

.tg-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: spark 1.6s ease-in-out infinite;
  pointer-events: none;
}

.tg-spark.s1 {
  left: -8px;
  top: -4px;
}

.tg-spark.s2 {
  right: -9px;
  top: 6px;
  width: 6px;
  height: 6px;
  animation-delay: 0.5s;
}

.tg-spark.s3 {
  left: 2px;
  bottom: -6px;
  width: 5px;
  height: 5px;
  animation-delay: 1s;
}

@keyframes spark {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.tg-pattern {
  position: absolute;
  left: 50%;
  top: calc(80px + var(--safe-top));
  width: 0;
  height: 0;
  pointer-events: none;
}

.tg-pattern > span {
  position: absolute;
  display: block;
  transform: translate(-50%, -50%);
}

.tg-header-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 0;
}

.tg-avatar {
  border-radius: 50%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.tg-name {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.tg-username {
  margin-top: 2px;
  font-size: 13.5px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.74);
}

.tg-balance {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.tg-balance b {
  font-weight: 800;
  color: #fff;
}

.tg-audio {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 16px;
  overflow: hidden;
  text-align: left;
  font-size: 13.5px;
  font-weight: 650;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}

.tg-audio-fill {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  transform-origin: left center;
  transition: transform 0.25s linear;
  pointer-events: none;
}

.tg-audio > *:not(.tg-audio-fill) {
  position: relative;
}

.tg-audio-ico {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  flex: none;
}

.recipient-ok {
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.25);
}

/* блок промпта или кода: текст переносится, сверху — кнопка «Скопировать» */
.rich-pre {
  position: relative;
  margin: 8px 0 14px;
}

/* «Показать ответ» в заданиях уроков: раскрывается по нажатию */
.rich-details {
  margin: 8px 0 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  white-space: normal;
}

.rich-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 720;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.rich-details > summary::-webkit-details-marker {
  display: none;
}

.rich-details > summary::after {
  content: '';
  flex: none;
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.55;
  rotate: 45deg;
  translate: 0 -2px;
  transition:
    rotate 0.22s var(--ease),
    translate 0.22s var(--ease);
}

.rich-details[open] > summary::after {
  rotate: 225deg;
  translate: 0 2px;
}

.rich-details-body {
  padding: 0 14px 12px;
  white-space: pre-wrap;
}

.rich-details-body .rich-pre:last-child {
  margin-bottom: 0;
}

.rich-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  background: #f2f2f4;
  color: #000;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 750;
  white-space: normal;
}

.rich pre {
  margin: 0;
  padding: 46px 14px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  -webkit-user-select: text;
  user-select: text;
}

/* ── отзывы ─────────────────────────────────────────────── */
.stars {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  line-height: 0;
}

.stars-row {
  display: inline-flex;
  gap: 2px;
  color: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}

.stars-fill {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  color: #ffc94d;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 201, 77, 0.12);
  color: #ffc94d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rating-pill b {
  font-weight: 800;
}

.rating-pill span {
  color: rgba(255, 201, 77, 0.7);
  font-weight: 600;
}

.review-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-card .stars {
  margin-top: 3px;
}

.review-product {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.review-text {
  font-size: 14.5px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.review-reply {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(255, 255, 255, 0.25);
  font-size: 13.5px;
  line-height: 1.4;
}

.review-reply b {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--text-2);
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
}

.review-avg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 92px;
}

.review-avg > .num {
  font-size: 40px;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1;
}

.review-dist {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.review-dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.review-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #ffc94d;
}

.review-ask {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-color: rgba(255, 201, 77, 0.25);
}

.review-sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px 4px;
}

.review-sheet > div {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.review-done {
  padding: 18px 0 10px;
}

.star-picker {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.star-pick {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.16);
  transition: color 0.2s var(--ease);
}

.star-pick svg {
  width: 40px;
  height: 40px;
}

.star-pick.on {
  color: #ffc94d;
  filter: drop-shadow(0 4px 14px rgba(255, 201, 77, 0.35));
}

.star-label {
  min-height: 20px;
  margin-top: 6px;
  font-weight: 700;
  color: var(--text-2);
}

.btn-link {
  display: block;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-2);
}

.is-dim {
  opacity: 0.55;
}

/* выбор цвета свечения за эмодзи */
.glow-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.glow-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.glow-swatch {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #000;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.glow-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #000 inset;
}

.glow-swatch.auto {
  color: #fff;
  background: conic-gradient(#ff8a3d, #ff5fa2, #b46bff, #36d1ff, #3ddc84, #ffd34d, #ff8a3d);
}

.glow-swatch.custom {
  color: #fff;
  background: var(--card-3);
  overflow: hidden;
}

.glow-swatch.custom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* выбор эмодзи: ваши паки и сетка превью */
.pack-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.pack-strip::-webkit-scrollbar {
  display: none;
}

.pack-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  height: 42px;
  padding: 0 12px 0 8px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--stroke);
  font-size: 13.5px;
  font-weight: 650;
}

.pack-chip.is-active {
  border-color: #fff;
  background: var(--card-3);
}

.pack-chip img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: none;
}

.emoji-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 6px;
}

.emoji-thumb {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid transparent;
}

.emoji-thumb.is-active {
  border-color: #fff;
  background: var(--card-3);
}

.emoji-thumb img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.emoji-thumb .emoji-fb {
  font-size: 22px;
}

/* поле поиска с лупой и кнопкой очистки */
.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field > .t-3 {
  position: absolute;
  left: 14px;
  z-index: 1;
  display: grid;
  pointer-events: none;
}

.search-field .input {
  padding-left: 40px;
  padding-right: 46px;
}

.search-field .icon-btn {
  position: absolute;
  right: 6px;
}

/* ── поддержка: переписка в стиле Telegram ──────────────── */
.chat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.chat-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) var(--pad) 10px;
  background: rgba(14, 14, 16, 0.96);
  border-bottom: 1px solid var(--stroke);
}

.chat-title {
  display: block;
  font-size: 16.5px;
  font-weight: 780;
  letter-spacing: -0.01em;
}

.chat-sub {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  color: var(--text-3);
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* фон как «обои» чата: еле заметная сетка точек */
  background-color: #050506;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.2px);
  background-size: 22px 22px;
}

.chat-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 10px 10px;
  max-width: 640px;
  margin: 0 auto;
}

.chat-intro {
  align-self: center;
  width: min(100%, 320px);
  margin: 4px 0 14px;
  border-radius: 20px;
  overflow: hidden;
  background: #121214;
  border: 1px solid var(--stroke);
}

.chat-intro img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 50% 55%;
}

.chat-intro-text {
  padding: 12px 14px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-2);
}

.chat-intro-text b {
  color: #fff;
}

.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 10px;
}

.chip-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke-2);
  font-size: 13.5px;
  font-weight: 650;
}

.chat-day {
  display: flex;
  justify-content: center;
  margin: 10px 0 6px;
}

.chat-day span {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
}

.bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.bubble-row.own {
  flex-direction: row-reverse;
}

.bubble {
  position: relative;
  max-width: min(78%, 440px);
  padding: 7px 10px 6px 12px;
  border-radius: 18px;
  background: #1c1c1f;
  font-size: 15px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.bubble.own {
  background: #f2f2f4;
  color: #0b0b0c;
}

/* у последнего сообщения в группе — «хвостик», как в Telegram */
.bubble.tail {
  border-bottom-left-radius: 6px;
}

.bubble.own.tail {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
}

.bubble.has-photo {
  padding: 3px 3px 6px;
}

.bubble.failed {
  opacity: 0.6;
}

.bubble-photo {
  display: block;
  width: 100%;
  min-width: 180px;
  max-height: 340px;
  object-fit: cover;
  border-radius: 15px;
  cursor: zoom-in;
}

.bubble.has-photo .bubble-text {
  padding: 6px 8px 0 9px;
}

.bubble-text {
  white-space: pre-wrap;
}

.bubble-meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 6px 0 -2px 10px;
  font-size: 11.5px;
  line-height: 1;
  color: var(--text-3);
}

.bubble.own .bubble-meta {
  color: rgba(0, 0, 0, 0.45);
}

.bubble.has-photo .bubble-meta {
  margin-right: 8px;
}

.ticks.read {
  color: #1b9b52;
}

.ticks.failed {
  font-weight: 900;
  color: #ff453a;
}

.bubble-retry {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 69, 58, 0.16);
  color: #ff6b62;
}

.chat-compose {
  position: relative;
  z-index: 2;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  background: rgba(14, 14, 16, 0.98);
  border-top: 1px solid var(--stroke);
}

.chat-attach {
  overflow: hidden;
}

.chat-attach-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 8px;
}

.chat-attach-inner img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.chat-bar {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.chat-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 132px;
  padding: 11px 14px;
  border-radius: 22px;
  background: #1c1c1f;
  border: 1px solid var(--stroke);
  outline: none;
  resize: none;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  color: #fff;
}

.chat-input:focus {
  border-color: rgba(255, 255, 255, 0.24);
}

.chat-send {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0.5;
  transition:
    background 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.chat-send.is-on {
  background: #f2f2f4;
  opacity: 1;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.photo-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  object-fit: contain;
}

/* счётчики непрочитанного */
.count-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #000;
  font-size: 12.5px;
  font-weight: 800;
}

/* точка вне .tab-icon — неактивные иконки полупрозрачные, а точка должна быть яркой */
.tab-dot {
  position: absolute;
  top: 10px;
  left: calc(50% + 7px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff453a;
  box-shadow: 0 0 0 2px #1a1a1d;
}

/* подарок в профиле: мягкое свечение цвета фона подарка */
.tg-gift-glow {
  position: absolute;
  inset: -55%;
  border-radius: 50%;
  pointer-events: none;
}

/* на профиле шапка Telegram того же цвета, что и фон — тёмная полоска сверху не нужна */
.app.is-profile .top-fade {
  opacity: 0;
}

.top-fade {
  transition: opacity 0.25s var(--ease);
}

@media (min-width: 560px) {
  .page {
    padding-left: max(var(--pad), calc(50% - 260px));
    padding-right: max(var(--pad), calc(50% - 260px));
  }
}

/* ─────────────────────────────────────────────────────────────
   Сайт в браузере (html.web): шапка, вход, гостевой режим,
   а на широком экране — раскладка для компьютера
   ───────────────────────────────────────────────────────────── */
.web {
  --web-head: calc(58px + env(safe-area-inset-top, 0px));
}

.web .page {
  padding-top: calc(var(--web-head) + 12px);
}

.web .top-fade {
  display: none;
}

.web .toast-wrap {
  top: calc(var(--web-head) + 10px);
}

/* картинка товара уходит под полупрозрачную шапку — как под шапку Telegram */
.web .p-hero {
  margin-top: calc(-12px - var(--web-head));
}

.web-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 35;
  height: var(--web-head);
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, 0.86);
  border-bottom: 1px solid var(--stroke);
}

.web-head-in {
  height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.web-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 16px;
  font-weight: 830;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.web-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 0 10px 0 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14.5px;
  font-weight: 720;
}

.web-nav {
  display: flex;
  gap: 2px;
  margin-left: 18px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}

.web-nav button {
  position: relative;
  height: 36px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 720;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}

.web-nav button:hover {
  color: #fff;
}

.web-nav button.is-active {
  color: #000;
}

.web-nav-pill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #f2f2f4;
  opacity: 0;
  transform: scale(0.86);
  transition:
    opacity 0.2s var(--ease),
    transform 0.33s var(--spring-pill);
  pointer-events: none;
}

.web-nav button.is-active .web-nav-pill {
  opacity: 1;
  transform: none;
}

.web-nav-label {
  position: relative;
}

.web-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 159, 10, 0.7);
}

.web-head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.web-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
}

.web-balance-plus {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
}

.web-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  flex: none;
}

.web-login.btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14.5px;
}

/* ── гость: «Войти» вместо баланса ──────────────────────── */
.hero-login {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  margin-top: 12px;
  padding: 0 12px 0 18px;
  border-radius: 999px;
  background: #f4f4f6;
  color: #000;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.guest-card {
  padding: 30px 20px 20px;
  text-align: center;
  overflow: hidden;
}

.guest-emoji {
  display: inline-grid;
  place-items: center;
}

/* ── окно входа ─────────────────────────────────────────── */
.login-hero {
  display: grid;
  place-items: center;
  padding-top: 16px;
}

.login-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
}

a.btn {
  text-decoration: none;
}

.btn-tg {
  background: #f4f4f6;
  color: #000;
  box-shadow:
    0 10px 30px rgba(255, 255, 255, 0.08),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.tg-login {
  display: flex;
  flex-direction: column;
}

.tg-login > .btn-link {
  margin-top: 2px;
}

.tg-wait {
  overflow: hidden;
}

.tg-wait-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0 6px;
}

.qr {
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 16px 50px rgba(255, 255, 255, 0.07);
}

.or-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 2px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.or-line::before,
.or-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--stroke-2);
}

.email-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 48px;
}

.input-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.code-input.input {
  height: 64px;
  text-align: center;
  font-size: 30px;
  font-weight: 820;
  letter-spacing: 0.45em;
  padding-left: calc(14px + 0.45em);
}

.code-head {
  padding: 4px 2px 2px;
}

.form-error {
  padding: 2px 4px;
  color: #ff8a82;
  font-size: 13.5px;
  font-weight: 620;
}

.email-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 8px;
}

.email-links .btn-link {
  margin: 0;
}

.btn-link:disabled {
  opacity: 0.5;
  cursor: default;
}

.login-terms {
  text-align: center;
  margin-top: 6px;
  line-height: 1.5;
}

.login-terms .btn-link,
.list-row .btn-link {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: inherit;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.list-row .btn-link {
  font-size: 12.5px;
}

/* профиль → «Вход на сайте» */
.method-ok {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(52, 199, 89, 0.16);
  color: var(--green);
}

.list-row .icon-wrap.is-danger {
  background: rgba(255, 69, 58, 0.12);
  color: #ff6b62;
}

/* покупка в колонке тарифов — только на компьютере */
.p-buy {
  display: none;
}

.p-buy-price.price {
  font-size: 30px;
}

/* ── компьютер ──────────────────────────────────────────── */
@media (min-width: 960px) {
  .web {
    --web-head: 68px;
  }

  .web-head-in {
    padding: 0 28px;
  }

  .web .page {
    padding: calc(var(--web-head) + 28px) max(32px, calc((100% - 1180px) / 2)) 80px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  }

  .web .page::-webkit-scrollbar {
    display: block;
    width: 10px;
  }

  .web .page::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    border: 3px solid #000;
  }

  .web .stack-page > .page {
    padding-inline: max(32px, calc((100% - 820px) / 2));
    padding-bottom: 80px;
  }

  .web .stack-page.with-bar > .page {
    padding-bottom: 128px;
  }

  .web .stack-page.is-wide > .page {
    padding-inline: max(32px, calc((100% - 1180px) / 2));
    padding-bottom: 80px;
  }

  .web .stack-page {
    box-shadow: none;
  }

  .web .edge-swipe,
  .web .tabbar-wrap,
  .web .buy-bar {
    display: none;
  }

  .web .save-bar {
    padding-inline: max(32px, calc((100% - 820px) / 2));
  }

  .web .toast-wrap {
    top: calc(var(--web-head) + 14px);
  }

  /* магазин */
  .web .hero {
    height: 250px;
  }

  .web .hero-content {
    padding: 28px 32px;
  }

  .web .hero-name {
    font-size: 27px;
  }

  .web .hero-balance {
    font-size: 58px;
  }

  .web .hero-avatar {
    right: 24px;
    top: 24px;
  }

  .web .hero-plus {
    right: 24px;
    bottom: 24px;
  }

  .web .pills {
    margin-inline: 0;
    flex-wrap: wrap;
    overflow: visible;
  }

  .web .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .web .shop-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .web .p-card {
    min-height: 210px;
    padding: 18px;
    transition:
      transform 0.25s var(--ease),
      border-color 0.25s var(--ease),
      box-shadow 0.25s var(--ease);
  }

  .web .p-card:hover {
    transform: translateY(-3px);
    border-color: var(--stroke-2);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  }

  .web .list-row:hover,
  .web .variant:hover {
    background-color: rgba(255, 255, 255, 0.03);
  }

  /* товар: слева картинка и описание, справа тарифы и покупка (колонка едет вместе со страницей) */
  .web .p-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-areas:
      'head side'
      'body side';
    column-gap: 36px;
    align-items: start;
  }

  .web .p-head {
    grid-area: head;
  }

  .web .p-side {
    grid-area: side;
    position: sticky;
    top: 0;
  }

  .web .p-side > .label:first-child {
    margin-top: 0;
  }

  .web .p-body {
    grid-area: body;
  }

  .web .p-hero {
    margin: 0;
    height: 400px;
    border-radius: 30px;
    border: 1px solid var(--stroke);
  }

  .web .p-head .row {
    margin-top: 22px !important;
  }

  .web .p-buy {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding: 18px;
  }

  /* шторки → окна по центру экрана */
  .web .sheet {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: min(460px, calc(100% - 48px));
    height: fit-content;
    max-height: min(88vh, 900px);
    border-radius: 28px;
    border: 1px solid var(--stroke-2);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.75);
  }

  .web .sheet-handle {
    display: none;
  }

  .web .sheet-body {
    padding: 6px 22px 24px;
  }

  .web .sheet-backdrop {
    background: rgba(0, 0, 0, 0.72);
  }

  /* окно по центру появляется из лёгкого уменьшения */
  .web .sheet {
    animation: sheet-pop-in 0.22s var(--ease) backwards;
  }

  .web .sheet.is-leaving {
    animation: sheet-pop-out 0.18s var(--ease) forwards;
  }

  .web .loading-cover {
    padding: calc(var(--web-head) + 28px) max(32px, calc((100% - 820px) / 2)) 0;
  }
}

@keyframes sheet-pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

@keyframes sheet-pop-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
}

@media (min-width: 1200px) {
  .web .shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* админка → «Вход на сайт»: шаги со ссылками */
.steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.45;
}

.btn-link.inline {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: inherit;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* лента категорий: бесконечно и медленно едет по кругу — в дорожке две одинаковые копии, сдвиг ровно на одну */
.pills-ribbon {
  position: relative;
  display: flex;
  overflow: hidden;
  margin: 0 calc(-1 * var(--pad));
  padding: 4px var(--pad);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.pills-track {
  display: flex;
  flex: none;
  width: max-content;
  animation: pills-ride 10s linear infinite;
  will-change: transform;
}

.pills-track > .pill {
  margin-right: 6px;
}

.pills-ribbon[data-paused] .pills-track {
  animation-play-state: paused;
}

@keyframes pills-ride {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* сколько штук осталось — под названием товара; число меняется в админке (тариф → «Ограничено») */
.stock-left {
  display: block;
  margin-top: 4px;
  font-weight: 650;
}

/* компьютер: категории помещаются в одну строку — лента стоит, без повтора */
@media (min-width: 960px) {
  .web .pills-ribbon {
    margin-inline: 0;
    padding-inline: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .web .pills-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }

  .web .pills-track > [aria-hidden] {
    display: none;
  }
}

/* админка → Магазин → Дизайн: выбор темы */
.theme-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theme-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border-radius: 16px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  text-align: center;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.theme-pick.is-active {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.theme-swatch {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.45);
}

.theme-name {
  font-size: 13.5px;
  font-weight: 760;
}

.theme-sub {
  font-size: 11px;
  line-height: 1.25;
  color: var(--text-3);
}

/* ── витрина на главной: приветствие, баннеры, подборки ─── */
.sc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 0;
}

.sc-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
}

.sc-hello {
  font-size: 13px;
  color: var(--text-3);
}

.sc-name {
  margin-top: 1px;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 840;
  letter-spacing: -0.02em;
}

.sc-balance {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 6px 0 15px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--stroke-2);
  font-size: 15px;
  font-weight: 820;
  white-space: nowrap;
}

.sc-plus {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
}

.sc-login.btn {
  flex: none;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
}

.sc-banners-wrap {
  margin-top: 16px;
}

.sc-banners {
  position: relative;
  display: flex;
  gap: var(--pad);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.sc-banners::-webkit-scrollbar {
  display: none;
}

.sc-banner {
  position: relative;
  flex: 0 0 calc(100% - 26px);
  scroll-snap-align: start;
  min-height: 176px;
  padding: 18px;
  display: flex;
  text-align: left;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(110% 120% at 100% 0%, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, #1d1d22, #0f0f11);
  border: 1px solid var(--stroke-2);
}

.sc-banner-text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-right: 92px;
}

.sc-banner-kicker {
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sc-banner-title {
  font-size: 22px;
  line-height: 1.08;
  font-weight: 860;
  letter-spacing: -0.02em;
}

.sc-banner-sub {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-2);
}

.sc-banner-cta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sc-banner-cta .price {
  font-size: 20px;
}

.sc-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  background: #f4f4f6;
  color: #000;
  font-size: 13px;
  font-weight: 780;
}

.sc-banner-art {
  position: absolute;
  z-index: 0;
  right: 16px;
  top: 50%;
  translate: 0 -54%;
}

/* цвет эмодзи заливает баннер, как свет из-за угла */
.sc-banner .emoji-halo {
  inset: -130%;
  background: radial-gradient(circle, rgba(var(--halo), 0.5) 0%, rgba(var(--halo), 0.18) 30%, rgba(var(--halo), 0) 62%);
}

.sc-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.sc-dots span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  transition:
    width 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

.sc-dots span.is-on {
  width: 20px;
  background: #fff;
}

.sc-rail {
  margin-top: 24px;
}

.sc-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}

.sc-rail-title {
  margin: 0;
  font-size: 21px;
  font-weight: 840;
  letter-spacing: -0.02em;
}

.sc-all {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13.5px;
  font-weight: 720;
  color: var(--text-2);
}

.rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  margin: 0 calc(-1 * var(--pad));
  padding: 2px var(--pad) 6px;
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail > * {
  flex: 0 0 160px;
  min-width: 0;
  scroll-snap-align: start;
}

.rail .p-card {
  min-width: 0;
  min-height: 190px;
}

/* цена и оценка не помещаются в узкую карточку — оценка уходит под цену */
.rail .p-card .bottom .row {
  flex-wrap: wrap;
  row-gap: 6px;
}

.sc-catalog-title {
  margin: 28px 4px 0;
  font-size: 11.5px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (min-width: 960px) {
  .web .sc-banners {
    margin: 0;
    padding: 0;
    scroll-padding: 0;
  }

  .web .sc-banner {
    flex-basis: calc(50% - var(--pad) / 2);
    min-height: 220px;
    padding: 26px;
  }

  .web .sc-banner-title {
    font-size: 27px;
  }

  .web .rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  /* у обёрток карточек display задан в разметке — перебиваем */
  .web .rail > :nth-child(n + 5) {
    display: none !important;
  }

  .web .sc-name {
    font-size: 30px;
  }

  .web .sc-hello {
    font-size: 15px;
  }
}

@media (min-width: 1200px) {
  .web .rail {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .web .rail > :nth-child(5) {
    display: flex !important;
  }
}

/* на сайте баланс, аватар и «Войти» уже есть в шапке */
.web .sc-avatar,
.web .sc-balance,
.web .sc-login {
  display: none;
}

/* ── игра по уроку (как в Duolingo) ─────────────────────── */
.lesson-game-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px 10px 14px;
  border-radius: 16px;
  text-align: left;
  font-size: 14px;
  color: var(--text-2);
  background: rgba(88, 204, 2, 0.08);
  border: 1px solid rgba(88, 204, 2, 0.24);
}

.lesson-game-strip b {
  color: var(--text);
}

.lesson-game-go {
  flex: none;
  height: 30px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #0b1a00;
  background: linear-gradient(180deg, #7ee03c, #58cc02);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.lesson-game-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.lesson-game-card .btn {
  flex-basis: 100%;
}

.lesson-game-icon {
  flex: none;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(88, 204, 2, 0.1);
}

.game-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 15px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
}

.game-stars .is-on {
  color: #ffc800;
  text-shadow: 0 0 10px rgba(255, 200, 0, 0.45);
}

.game-stars.is-big {
  gap: 6px;
  margin-top: 8px;
  font-size: 30px;
}

.page.game {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.game-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 12px;
}

.game-close,
.game-sound {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 16px;
}

.game-bar {
  flex: 1;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.game-bar i {
  position: relative;
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #7ee03c, #58cc02);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}

.game-bar i::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 3px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.game-hearts,
.game-super {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 820;
}

.game-hearts {
  color: #ff6b6b;
}

.game-hearts.is-low {
  animation: game-pulse 0.9s ease-in-out infinite;
}

.game-super {
  height: 30px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #ce82ff, #1cb0f6);
  box-shadow: 0 4px 14px rgba(28, 176, 246, 0.3);
}

.game-combo {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #ffb020;
  background: rgba(255, 150, 0, 0.14);
  border: 1px solid rgba(255, 176, 32, 0.4);
}

.game-task {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.game-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 20px;
  overscroll-behavior: contain;
}

.game-retry {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #ffb020;
  background: rgba(255, 176, 32, 0.12);
}

.game-label {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ce82ff;
}

.game-q {
  margin: 6px 0 16px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 820;
  letter-spacing: -0.015em;
}

.game-code {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.game-slot {
  display: inline-block;
  min-width: 70px;
  padding: 0 8px;
  margin: 0 2px;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid #1cb0f6;
  background: rgba(28, 176, 246, 0.1);
  color: #7fd3ff;
  font: inherit;
  text-align: center;
}

.game-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-tf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* «объёмные» кнопки как в Duolingo: нижняя грань толще, при нажатии кнопка опускается */
.game-opt,
.game-chip,
.game-token,
.game-pair {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  background: var(--card-2);
  border: 2px solid var(--stroke-2);
  border-bottom-width: 4px;
  color: var(--text);
  font-weight: 700;
  transition:
    border-color 0.15s var(--ease),
    background-color 0.15s var(--ease),
    opacity 0.2s var(--ease),
    translate 0.08s var(--ease);
}

.game-opt {
  min-height: 56px;
  padding: 12px 16px;
  font-size: 16px;
}

.game-chip,
.game-token {
  min-height: 44px;
  padding: 8px 14px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px;
}

.game-opt:active,
.game-chip:active,
.game-token:active,
.game-pair:active {
  translate: 0 2px;
  border-bottom-width: 2px;
}

.game-opt code,
.game-pair code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px;
  background: none;
  padding: 0;
}

.game-opt.is-picked,
.game-chip.is-picked,
.game-pair.is-picked {
  border-color: #1cb0f6;
  background: rgba(28, 176, 246, 0.12);
  color: #8fdcff;
}

.game-opt.is-right,
.game-chip.is-right {
  border-color: #58cc02;
  background: rgba(88, 204, 2, 0.14);
  color: #9be15d;
}

.game-opt.is-wrong,
.game-chip.is-wrong,
.game-pair.is-wrong {
  border-color: #ff4b4b;
  background: rgba(255, 75, 75, 0.14);
  color: #ff8a8a;
  animation: game-shake 0.35s ease;
}

.game-chips,
.game-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.game-token.is-used {
  opacity: 0.18;
  pointer-events: none;
}

.game-answer {
  min-height: 112px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  padding: 8px 0 14px;
  margin-bottom: 18px;
  background: repeating-linear-gradient(transparent 0 52px, var(--stroke-2) 52px 54px);
}

.game-answer.is-right .game-token {
  border-color: #58cc02;
}

.game-answer.is-wrong .game-token {
  border-color: #ff4b4b;
}

.game-answer-hint {
  padding-top: 12px;
  font-size: 14px;
  color: var(--text-3);
}

.game-pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.game-pairs-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-pair {
  min-height: 58px;
  padding: 10px 12px;
  font-size: 14.5px;
  line-height: 1.25;
}

.game-pair.is-done {
  opacity: 0.32;
  border-color: #58cc02;
  pointer-events: none;
}

.game-footer {
  flex: none;
  padding: 12px 0 calc(12px + var(--safe-bottom));
}

.game-check {
  height: 56px;
}

.game-check:disabled {
  opacity: 0.4;
}

/* панель с ответом выезжает снизу: зелёная — верно, красная — ошибка */
.game-verdict {
  position: absolute;
  left: calc(-1 * var(--pad));
  right: calc(-1 * var(--pad));
  bottom: 0;
  z-index: 5;
  padding: 16px var(--pad) calc(14px + var(--safe-bottom));
  border-radius: 22px 22px 0 0;
}

.game-verdict.is-ok {
  background: #12260a;
  border-top: 2px solid rgba(88, 204, 2, 0.5);
  color: #9be15d;
}

.game-verdict.is-bad {
  background: #2c0f10;
  border-top: 2px solid rgba(255, 75, 75, 0.5);
  color: #ff8a8a;
}

.game-verdict-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}

.game-verdict-answer {
  margin-top: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: pre-wrap;
}

.game-verdict-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
}

.game-continue {
  width: 100%;
  margin-top: 14px;
  height: 54px;
  border: 0;
  font-weight: 800;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.game-verdict.is-ok .game-continue {
  color: #0b1a00;
  background: linear-gradient(180deg, #7ee03c, #58cc02);
}

.game-verdict.is-bad .game-continue {
  color: #fff;
  background: linear-gradient(180deg, #ff6b6b, #ff4b4b);
}

/* финиш: медаль, звёзды, опыт, конфетти */
.page.game.game-finish {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding-bottom: calc(24px + var(--safe-bottom));
  text-align: center;
}

.game-finish-art {
  margin-top: 28px;
}

.game-finish-title {
  margin: 14px 0 0;
  font-size: 30px;
  font-weight: 860;
  letter-spacing: -0.02em;
  color: #ffc800;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 22px;
}

.game-stat {
  border-radius: 16px;
  border: 2px solid;
  overflow: hidden;
}

.game-stat > span {
  display: block;
  padding: 5px 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0b0b0d;
}

.game-stat b {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0 12px;
  font-size: 19px;
}

.game-stat.is-xp {
  border-color: #ffc800;
}

.game-stat.is-xp > span {
  background: #ffc800;
}

.game-stat.is-xp b {
  color: #ffc800;
}

.game-stat.is-acc {
  border-color: #58cc02;
}

.game-stat.is-acc > span {
  background: #58cc02;
}

.game-stat.is-acc b {
  color: #7ee03c;
}

.game-stat.is-time {
  border-color: #1cb0f6;
}

.game-stat.is-time > span {
  background: #1cb0f6;
}

.game-stat.is-time b {
  color: #5cc8fa;
}

.game-streak {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 760;
  color: #ffb020;
  background: rgba(255, 150, 0, 0.12);
}

.game-finish-actions {
  width: 100%;
  margin-top: auto;
  padding-top: 26px;
}

.game-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.game-confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: game-confetti 2.2s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}

@keyframes game-confetti {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(70vh) rotate(540deg);
  }
}

@keyframes game-shake {
  0%,
  100% {
    translate: 0 0;
  }
  25% {
    translate: -6px 0;
  }
  75% {
    translate: 6px 0;
  }
}

@keyframes game-pulse {
  50% {
    scale: 1.15;
  }
}

/* ── конструктор эмодзи: выбрать → текст и цвета → как забрать ─── */
.maker-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 2px;
}

.maker-step {
  height: 18px;
  display: flex;
  align-items: center;
}

.maker-step i {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.3s var(--ease);
}

.maker-step.is-on i {
  background: var(--text);
}

.maker-title {
  margin: 10px 0 6px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
}

.maker-lead {
  margin: 4px 2px 14px;
  line-height: 1.45;
}

.maker-packs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--pad)) 12px;
  padding: 0 var(--pad) 2px;
  scrollbar-width: none;
}

.maker-packs::-webkit-scrollbar {
  display: none;
}

.maker-pack {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  color: var(--text-2);
}

.maker-pack span {
  font-size: 11.5px;
  color: var(--text-3);
}

.maker-pack.is-active {
  background: var(--text);
  color: #000;
}

.maker-pack.is-active span {
  color: rgba(0, 0, 0, 0.5);
}

.maker-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--stroke-2);
}

.maker-admin.is-on {
  color: #ffb020;
  border-color: rgba(255, 176, 32, 0.5);
}

.maker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.maker-tile {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--card-2);
  border: 2px solid transparent;
  transition:
    border-color 0.15s var(--ease),
    background-color 0.15s var(--ease);
}

.maker-tile img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  pointer-events: none;
}

.maker-tile.is-picked {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.maker-tile.is-hidden {
  opacity: 0.3;
}

.maker-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: #000;
}

.maker-card {
  padding: 12px;
}

.maker-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.maker-thumb {
  flex: none;
  width: 58px;
  height: 58px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  object-fit: contain;
}

.maker-input {
  width: 100%;
  border: 0;
  background: none;
  padding: 2px 0;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  outline: none;
}

.maker-input::placeholder {
  color: var(--text-3);
  font-weight: 700;
}

.maker-notext {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-2);
}

.maker-x {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
}

.maker-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.maker-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.maker-chip.is-on {
  background: rgba(255, 255, 255, 0.12);
}

.maker-rainbow {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(#ff3b30, #ff9500, #ffcc00, #34c759, #0a84ff, #bf5af2, #ff3b30);
}

.maker-editor {
  overflow: hidden;
}

.maker-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.maker-seg > * {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.maker-seg > .is-on {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.maker-seg.is-small > * {
  height: 30px;
  font-size: 12.5px;
}

.maker-preview {
  position: relative;
  margin-top: 12px;
  aspect-ratio: 1;
  max-height: 300px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 70%),
    rgba(255, 255, 255, 0.03);
}

.maker-preview-anim {
  position: absolute;
  inset: 8%;
}

.maker-preview-busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.maker-letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.maker-letters > * {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
}

.maker-letters > .is-on {
  background: var(--text);
  color: #000;
}

.maker-colors-title {
  margin: 14px 2px 8px;
  font-size: 12.5px;
  color: var(--text-3);
}

.maker-colors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.maker-color {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border-radius: 999px;
  border: 2px solid transparent;
}

.maker-color i {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.maker-color.is-label {
  padding-right: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
}

.maker-color.is-label i {
  width: 24px;
  height: 24px;
}

.maker-color.is-on {
  border-color: var(--text);
}

.maker-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffb020;
  box-shadow: 0 0 0 2px var(--card);
}

.maker-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.maker-swatch {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.maker-swatch.is-on {
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 4px var(--text);
}

.maker-swatch.is-custom {
  overflow: hidden;
  background: conic-gradient(#ff3b30, #ff9500, #ffcc00, #34c759, #0a84ff, #bf5af2, #ff3b30);
  cursor: pointer;
}

.maker-swatch.is-custom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.maker-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
}

.maker-format,
.maker-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  text-align: left;
  background: var(--card-2);
  border: 1px solid var(--stroke);
}

.maker-format .title,
.maker-toggle .title {
  display: block;
  font-size: 15px;
  font-weight: 760;
}

.maker-format .sub,
.maker-toggle .sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-3);
}

.maker-format.is-on {
  border-color: var(--text);
}

.maker-format-emoji {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.maker-radio {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--stroke-2);
  color: #000;
}

.maker-format.is-on .maker-radio {
  border-color: var(--text);
  background: var(--text);
}

.maker-total .row {
  align-items: baseline;
}

.maker-total-sum {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--stroke);
  font-size: 16px;
  font-weight: 800;
}

.maker-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  gap: 10px;
  padding: 26px var(--pad) calc(12px + var(--safe-bottom));
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.92) 38%);
}

.maker-bar .btn {
  height: 56px;
}

.maker-plus {
  flex: none;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--stroke-2);
  color: var(--text);
}

/* разделы шага 1: «С надписью» и «С буквой», как в StriverAI Shop */
.maker-marks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.maker-marks .maker-admin {
  margin-bottom: 0;
}

.maker-section + .maker-section {
  margin-top: 18px;
}

.maker-section-title {
  font-size: 15px;
  font-weight: 800;
}

.maker-section-sub {
  margin: 2px 0 10px;
  line-height: 1.4;
}

/* на широком экране кнопки внизу — по ширине колонки с содержимым */
@media (min-width: 560px) {
  .maker-bar {
    padding-left: max(var(--pad), calc(50% - 260px));
    padding-right: max(var(--pad), calc(50% - 260px));
  }
}

@media (min-width: 960px) {
  .web .maker-bar {
    padding-inline: max(32px, calc((100% - 820px) / 2));
  }

  .web .maker-packs {
    flex-wrap: wrap;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .web .maker-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* кнопки управления способами входа: «Сменить пароль», «Отвязать» */
.acc-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke);
  cursor: pointer;
  transition:
    background 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.acc-btn:active {
  transform: scale(0.96);
}

.acc-btn.is-danger {
  color: #ff8a82;
  background: rgba(255, 90, 80, 0.1);
  border-color: rgba(255, 90, 80, 0.28);
}

/* баннер → поиск → лента категорий: одинаковые промежутки по 12px (у ленты свой отступ 4px внутри) */
.shop-search {
  margin-top: 12px;
}

.search-field + .pills-ribbon {
  margin-top: 8px;
}

/* «печатающаяся» подсказка в пустом поле поиска */
.search-hint {
  position: absolute;
  left: 40px;
  right: 46px;
  display: flex;
  align-items: center;
  pointer-events: none;
  color: var(--text-3);
  font-size: 15px;
  overflow: hidden;
  white-space: nowrap;
}

.search-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  border-radius: 1px;
  background: var(--text-2);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

/* в плитках полоска приглушённая, как в StriverAI */
.p-card .stock-bar > i {
  background: rgba(255, 255, 255, 0.32);
}

/* плитки и карточки: плоский цвет из админки (--tile-bg) без рамок; перебивает градиенты тем */
html.tile-flat .card,
html.tile-flat .list,
html.tile-flat .variant,
html.tile-flat .info-block {
  border-color: transparent;
  background: var(--tile-bg, #151517);
  box-shadow: none;
}

/* свечение за иконкой в плитках можно выключить в админке */
html.no-tile-glow .p-card .emoji-halo,
html.no-tile-glow .p-row .emoji-halo,
html.no-tile-glow .admin-tile .emoji-halo {
  display: none;
}

/* выбор цвета плиток в админке */
.tile-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tile-swatch {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0;
}

.tile-swatch.is-active {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.tile-swatch-custom {
  overflow: hidden;
  background: conic-gradient(#ff5f5f, #ffd45f, #6fff7a, #5fd4ff, #8a5fff, #ff5fd4, #ff5f5f);
}

.tile-swatch-custom input {
  position: absolute;
  inset: -8px;
  width: 60px;
  height: 60px;
  opacity: 0;
  cursor: pointer;
}

/* вкладки (нижнее меню и категории) — того же цвета, что и плитки; меняются вместе с ним */
html.tile-flat .tabbar,
html.tile-flat .tabbar-solo {
  background: var(--tile-bg, #151517);
  border-color: transparent;
}

html.tile-flat .pill {
  background: var(--tile-bg, #151517);
  border-color: transparent;
}

/* нижнее меню как в StriverAI: плоская тёмная капсула без светлой каймы, иконки яркие, выбранная — на серой подложке */
html.tile-flat .tabbar,
html.tile-flat .tabbar-solo {
  border: 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65);
}

html.tile-flat .tab-pill {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

html.tile-flat .tab-icon,
html.tile-flat .tabbar-solo .tab-icon {
  color: rgba(255, 255, 255, 0.92);
}

/* смена раздела и группы: лёгкое проявление (с 55%), а не провал в пустоту */
.shop-fade {
  animation: shop-fade 0.22s ease both;
}

@keyframes shop-fade {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

