/* Mini App сообщества · «ржавый» тёмный стиль: зерно, стекло, 3D-карточка профиля.
   Всё рисуется CSS и SVG прямо в браузере — без внешних картинок и библиотек (CDN в России часто недоступны). */
:root {
  --bg: #0f0c0a;
  --bg2: #17120f;
  --glass: rgba(255, 240, 225, .055);
  --glass2: rgba(255, 240, 225, .09);
  --stroke: rgba(255, 230, 205, .1);
  --text: #f1e9e1;
  --hint: #a2958a;
  --accent: #e0672a;
  --accent2: #ffb648;
  --ok: #52c46b;
  --bad: #ef5a44;
  --gold: #ffcf5a;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.42 -apple-system, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(224, 103, 42, .22), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(255, 182, 72, .07), transparent 60%),
    var(--bg);
}
/* зерно поверх всего — «ржавый металл» */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .07; transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- верх ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: linear-gradient(var(--bg) 55%, rgba(15, 12, 10, .85));
}
.topbar h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 800; letter-spacing: .3px; }
.back { font-size: 30px; line-height: 1; padding: 0 4px 2px 0; color: var(--accent2); }
.balance {
  display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700;
  padding: 6px 10px; border-radius: 99px; background: var(--glass); border: 1px solid var(--stroke);
}
.balance:empty { display: none; }
.balance b { color: var(--accent2); }

main { position: relative; z-index: 1; padding: 6px 16px 24px; max-width: 640px; margin: 0 auto; }
main > * { animation: rise .45s var(--ease) both; }
main > *:nth-child(2) { animation-delay: .04s; } main > *:nth-child(3) { animation-delay: .08s; }
main > *:nth-child(4) { animation-delay: .12s; } main > *:nth-child(5) { animation-delay: .16s; }
main > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- нижний «док» ---------- */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; justify-content: space-around; padding: 6px; border-radius: 22px;
  background: rgba(26, 20, 16, .96);
  border: 1px solid var(--stroke); box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
  max-width: 616px; margin: 0 auto;
}
.tabs button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 5px; border-radius: 16px;
  font-size: 10.5px; font-weight: 600; color: var(--hint); transition: color .2s, background .25s;
}
.tabs button span { font-size: 21px; line-height: 1.05; filter: grayscale(.7) brightness(.85); transition: transform .25s var(--ease), filter .2s; }
.tabs button.on { color: var(--text); background: linear-gradient(180deg, rgba(224, 103, 42, .32), rgba(224, 103, 42, .12)); }
.tabs button.on span { filter: none; transform: translateY(-2px) scale(1.12); }

/* ---------- заголовки разделов ---------- */
.hero { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.hero .ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex: none;
  background: linear-gradient(145deg, #3a2417, #1c130e); border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 16px rgba(0, 0, 0, .4);
}
.hero h2 { margin: 0; font-size: 21px; font-weight: 800; }
.hero p { margin: 1px 0 0; color: var(--hint); font-size: 13px; }

/* ---------- стекло ---------- */
.card {
  position: relative; background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.card::before { /* верхний блик стекла */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 40%);
}
.card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--hint); font-weight: 800; display: flex; align-items: center; gap: 6px; }
.card h3 small { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.muted { color: var(--hint); font-size: 13px; }
.row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--stroke); }
.row:first-of-type, h3 + .row { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--hint); font-size: 12.5px; }
.ava {
  width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 18px; font-weight: 800;
  background: linear-gradient(145deg, #5a3520, #2b1a11); color: #ffd9b8; position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 10px rgba(0, 0, 0, .35);
}
.ava img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.ava.live::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--bg);
}
.ava.live::before { /* расходящееся кольцо — масштаб и прозрачность, без перерисовки */
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: rgba(82, 196, 107, .6); animation: pulse 1.8s ease-out infinite; will-change: transform, opacity;
}
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2.4); opacity: 0; } }

/* ---------- кнопки, чипы, переключатели ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px;
  border-radius: 13px; font-weight: 700; font-size: 14px; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, #f07a3a, #c9531c); box-shadow: 0 6px 16px rgba(224, 103, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .12s var(--ease), filter .2s;
}
.btn:active { transform: scale(.96); filter: brightness(.95); }
.btn.ghost { background: var(--glass2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); color: var(--text); }
.btn.ok { background: linear-gradient(180deg, #5fd27a, #2f9c4b); box-shadow: 0 6px 16px rgba(82, 196, 107, .3); }
.btn.bad { background: linear-gradient(180deg, #f6705b, #c53a26); box-shadow: 0 6px 16px rgba(239, 90, 68, .3); }
.btn.gold { background: linear-gradient(180deg, #ffd96e, #e0a12b); color: #3b2604; box-shadow: 0 6px 18px rgba(255, 207, 90, .35); }
.btn.small { padding: 7px 11px; font-size: 13px; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.shine::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: 0; transform: translateX(-150%); will-change: transform;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shine 2.8s infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-150%); } 100% { transform: translateX(330%); } }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btns.grid2 { display: grid; grid-template-columns: 1fr 1fr; }

.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 8px; margin-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 13px; border-radius: 99px; background: var(--glass); border: 1px solid var(--stroke);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: .2s;
}
.chip.on { background: linear-gradient(180deg, #f07a3a, #c9531c); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(224, 103, 42, .35); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: rgba(224, 103, 42, .18); color: var(--accent2); }
.tag.green { background: rgba(82, 196, 107, .18); color: #8ee2a0; }
.tag.gray { background: var(--glass2); color: var(--hint); }

.switch { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--stroke); width: 100%; text-align: left; }
h3 + .switch { border-top: 0; }
.switch .grow { flex: 1; }
.switch i {
  position: relative; width: 46px; height: 28px; border-radius: 99px; background: rgba(255, 255, 255, .14); flex: none; transition: .25s;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: transform .25s var(--ease);
}
.switch.on i { background: linear-gradient(180deg, #f07a3a, #c9531c); }
.switch.on i::after { transform: translateX(18px); }

.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .8s var(--ease); box-shadow: 0 0 10px rgba(255, 182, 72, .5); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stat b { display: block; font-size: 18px; font-weight: 800; }
.stat span { font-size: 11px; color: var(--hint); }

/* ---------- 3D-карточка профиля ---------- */
.scene { perspective: 1100px; margin: 2px 0 14px; touch-action: pan-y; }
/* Производительность: все анимации ниже двигают/проявляют готовые слои (transform/opacity) — это делает видеокарта
   без перерисовки. Никаких анимаций фона, фильтров и размытия «за стеклом» внутри 3D. */
.card3d { position: relative; border-radius: 26px; transform-style: preserve-3d; will-change: transform; transition: transform .6s var(--ease); }
.card3d.live { transition: none; }  /* плавность даёт пружина в JS */
.card3d.idle { animation: drift 8s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: rotateX(3deg) rotateY(-6deg); } 50% { transform: rotateX(-3deg) rotateY(6deg); } }
.card3d.paused *, .card3d.paused, .card3d.paused *::before, .card3d.paused *::after { animation-play-state: paused !important; }
.c-shadow { position: absolute; left: 10%; right: 10%; bottom: -16px; height: 28px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); transform: translateZ(-40px); }

/* «кожа» карточки — один плоский слой: кант, материал, рельеф, живой слой, обои, блики, частицы */
.c-skin {
  position: absolute; inset: 0; border-radius: 26px; overflow: hidden; transform: translateZ(0);
  box-shadow: 0 0 22px -4px var(--glow), 0 14px 30px rgba(0, 0, 0, .55);
}
/* кант: под материалом крутится большой градиент цветов темы — видны только 5 px по краю */
.c-frame { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: var(--r2); }
.c-frame::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; margin: -80% 0 0 -80%;
  background: conic-gradient(var(--r1), var(--r2), var(--r3), var(--r4), var(--r5), var(--r1));
  animation: rot 8s linear infinite; will-change: transform;
}
.c-frame::after { /* фаска: светлая кромка сверху, тёмная снизу */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, .4));
}
@keyframes rot { to { transform: rotate(360deg); } }
.card3d.common .c-frame::before { animation-duration: 18s; }
.c-tex, .c-noise, .c-deco, .c-wall, .c-shine, .c-fx { position: absolute; inset: 5px; border-radius: 21px; pointer-events: none; overflow: hidden; }
.c-tex { background-size: cover; box-shadow: inset 0 0 50px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.c-noise { background-size: cover; }  /* запечённый PNG с прозрачностью — без режима наложения */
.c-fx { width: calc(100% - 10px); height: calc(100% - 10px); }

/* уголки-накладки у эпических и легендарных рамок */
.corner { position: absolute; width: 30px; height: 30px; pointer-events: none; }
.corner::before {
  content: ""; position: absolute; inset: 0; border: 3px solid var(--r1); border-radius: 4px; box-shadow: 0 0 8px var(--glow);
  -webkit-mask: linear-gradient(135deg, #000 50%, transparent 50%); mask: linear-gradient(135deg, #000 50%, transparent 50%);
}
.corner.tl { top: 10px; left: 10px; }
.corner.tr { top: 10px; right: 10px; transform: rotate(90deg); }
.corner.br { bottom: 10px; right: 10px; transform: rotate(180deg); }
.corner.bl { bottom: 10px; left: 10px; transform: rotate(270deg); }
.card3d.legend .corner::after { content: "✦"; position: absolute; top: -3px; left: -3px; font-size: 12px; color: #fff; animation: twinkle 2s ease-in-out infinite; will-change: opacity; }

/* обои из эмодзи (фоны): большая плитка внутри, плывёт по диагонали сдвигом (без перерисовки) */
.c-wall { opacity: .2; -webkit-mask: radial-gradient(ellipse 70% 60% at 45% 50%, rgba(0, 0, 0, .25), #000 85%); mask: radial-gradient(ellipse 70% 60% at 45% 50%, rgba(0, 0, 0, .25), #000 85%); }
.c-wall i { position: absolute; inset: -150px 0 0 -150px; background-size: 150px 150px; animation: wall 40s linear infinite; }
.swatch .c-wall { -webkit-mask: none; mask: none; }
@keyframes wall { to { transform: translate(150px, 150px); } }

/* блик и голограмма: большие готовые слои, которые просто сдвигаются за наклоном */
.c-glare { position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .2), transparent 40%); will-change: transform; }
/* голограмма — узкая радужная полоса обычным слоем (без режима наложения), ездит за наклоном */
.c-holo {
  position: absolute; left: 25%; top: -70%; width: 50%; height: 240%; opacity: 0; will-change: transform; transform: rotate(25deg);
  background: linear-gradient(90deg, transparent, rgba(255, 61, 110, .35) 20%, rgba(255, 210, 63, .35) 35%, rgba(61, 255, 155, .35) 50%,
    rgba(61, 201, 255, .35) 65%, rgba(178, 61, 255, .35) 80%, transparent);
}
.card3d.rare .c-holo { opacity: .35; } .card3d.epic .c-holo { opacity: .5; } .card3d.legend .c-holo { opacity: .65; }

/* ---------- живые слои тем (только transform/opacity) ---------- */
.deco-stars {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 30%, #fff, transparent), radial-gradient(1px 1px at 63% 78%, #fff, transparent),
    radial-gradient(2px 2px at 82% 40%, #fff, transparent), radial-gradient(1px 1px at 90% 12%, #fff, transparent),
    radial-gradient(1px 1px at 8% 85%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 55%, #e6deff, transparent),
    radial-gradient(1px 1px at 37% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 18% 45%, #fff, transparent),
    radial-gradient(44px 44px at 78% 14%, rgba(230, 222, 255, .6), transparent 70%);
}
.deco-stars::after { /* второй слой звёзд мигает */
  content: ""; position: absolute; inset: 0; animation: twinkle 3s ease-in-out infinite;
  background-image: radial-gradient(1px 1px at 20% 40%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 22%, #fff, transparent),
    radial-gradient(1px 1px at 36% 88%, #fff, transparent), radial-gradient(1px 1px at 92% 70%, #fff, transparent),
    radial-gradient(1px 1px at 50% 35%, #fff, transparent), radial-gradient(1.5px 1.5px at 6% 60%, #fff, transparent);
}
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.deco-grid { background: radial-gradient(85% 32% at 50% 60%, color-mix(in srgb, var(--glow) 60%, transparent), transparent 70%); }
.deco-grid .floor {
  position: absolute; left: -50%; right: -50%; bottom: -6%; height: 46%; transform-origin: 50% 0; overflow: hidden;
  transform: perspective(200px) rotateX(64deg); opacity: .45;
  -webkit-mask: linear-gradient(transparent, #000 55%); mask: linear-gradient(transparent, #000 55%);
}
.deco-grid .floor::before {
  content: ""; position: absolute; left: 0; right: 0; top: -34px; bottom: 0; animation: floor 2.4s linear infinite;
  background-image: linear-gradient(var(--r1) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--r2) 1.5px, transparent 1.5px);
  background-size: 34px 34px;
}
@keyframes floor { to { transform: translateY(34px); } }

.deco-embers {
  background-image: radial-gradient(65% 32% at 50% 106%, rgba(255, 214, 100, .8), transparent 70%);
}
.deco-embers::after {
  content: ""; position: absolute; inset: 0; animation: flicker 2.2s ease-in-out infinite;
  background-image: radial-gradient(3px 3px at 20% 80%, #ffd36b, transparent), radial-gradient(2px 2px at 70% 70%, #ffb347, transparent),
    radial-gradient(2.5px 2.5px at 45% 88%, #fff1a8, transparent), radial-gradient(2px 2px at 85% 85%, #ff8a3d, transparent),
    radial-gradient(2px 2px at 10% 92%, #ffd36b, transparent), radial-gradient(1.5px 1.5px at 58% 64%, #fff1a8, transparent),
    radial-gradient(50% 20% at 50% 100%, rgba(255, 240, 180, .5), transparent 70%);
}
@keyframes flicker { 0%, 100% { opacity: .8; } 30% { opacity: 1; } 55% { opacity: .55; } 75% { opacity: .95; } }

.deco-facets {
  background:
    conic-gradient(from 20deg at 30% 35%, rgba(255, 255, 255, .22) 0 12%, transparent 12% 28%, rgba(255, 255, 255, .1) 28% 40%, transparent 40% 62%, rgba(255, 255, 255, .16) 62% 70%, transparent 70%),
    conic-gradient(from 200deg at 72% 70%, rgba(255, 255, 255, .14) 0 10%, transparent 10% 35%, rgba(255, 255, 255, .09) 35% 48%, transparent 48%);
}
.deco-facets::after, .deco-brushed::after, .deco-rivets::after {
  content: ""; position: absolute; inset: -40%; animation: sweep 5s ease-in-out infinite;
  background: linear-gradient(115deg, transparent 43%, rgba(255, 255, 255, .4) 50%, transparent 57%);
}
.deco-brushed::after, .deco-rivets::after { opacity: .55; animation-duration: 7s; }
@keyframes sweep { 0%, 35% { transform: translateX(-60%); } 75%, 100% { transform: translateX(60%); } }

.deco-hex::before {
  content: ""; position: absolute; inset: 0; animation: twinkle 3s ease-in-out infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0l14 8v16l-14 8L0 24V8zM14 32l14 8v16M14 32L0 40v16' fill='none' stroke='%237dff4d' stroke-opacity='.4' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 28px 48px;
}
.deco-hex { -webkit-mask: radial-gradient(85% 75% at 35% 30%, #000, transparent 90%); mask: radial-gradient(85% 75% at 35% 30%, #000, transparent 90%); }

.deco-brushed { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 7px); }
.deco-rivets {
  background:
    radial-gradient(circle at 12px 12px, #f3e3d2 0 2px, #6b4a33 3px, rgba(0, 0, 0, .5) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 12px) 12px, #f3e3d2 0 2px, #6b4a33 3px, rgba(0, 0, 0, .5) 5px, transparent 6px),
    radial-gradient(circle at 12px calc(100% - 12px), #f3e3d2 0 2px, #6b4a33 3px, rgba(0, 0, 0, .5) 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #f3e3d2 0 2px, #6b4a33 3px, rgba(0, 0, 0, .5) 5px, transparent 6px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 4px);
}
.deco-rays::before {
  content: ""; position: absolute; inset: -20%; animation: rays 30s ease-in-out infinite alternate;
  background: repeating-conic-gradient(from 0deg at 50% 0%, rgba(255, 215, 90, .17) 0 5deg, transparent 5deg 15deg);
}
@keyframes rays { to { transform: rotate(6deg) scale(1.06); } }
.deco-smoke::before, .deco-bokeh::before { content: ""; position: absolute; inset: -10%; animation: smoke 9s ease-in-out infinite alternate; }
.deco-smoke::before { background: radial-gradient(60% 40% at 30% 70%, rgba(255, 255, 255, .14), transparent 70%), radial-gradient(50% 35% at 75% 30%, rgba(255, 255, 255, .11), transparent 70%); }
.deco-bokeh::before {
  background: radial-gradient(18px 18px at 20% 30%, rgba(255, 255, 255, .26), transparent), radial-gradient(26px 26px at 75% 22%, rgba(255, 255, 255, .2), transparent),
    radial-gradient(14px 14px at 60% 70%, rgba(255, 255, 255, .24), transparent), radial-gradient(22px 22px at 30% 80%, rgba(255, 255, 255, .15), transparent);
}
@keyframes smoke { to { transform: translate(-6%, -4%) scale(1.12); } }
/* размытые слои рисуются один раз и дальше только вращаются/сдвигаются */
.deco-swirl::before {
  content: ""; position: absolute; inset: -30%; animation: rot 16s linear infinite; filter: blur(6px);
  background: conic-gradient(from 0deg, transparent, rgba(177, 75, 255, .5), transparent 30%, rgba(106, 27, 255, .4), transparent 60%, rgba(211, 139, 255, .35), transparent 85%);
  -webkit-mask: radial-gradient(circle, transparent 6%, #000 28%, transparent 70%); mask: radial-gradient(circle, transparent 6%, #000 28%, transparent 70%);
}
.deco-aurora::before, .deco-aurora::after {
  content: ""; position: absolute; left: -20%; right: -20%; height: 55%; filter: blur(20px); border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(77, 255, 184, .6), rgba(77, 155, 255, .5), rgba(176, 77, 255, .55), transparent);
  animation: aurora 9s ease-in-out infinite alternate;
}
.deco-aurora::before { top: 2%; }
.deco-aurora::after { top: 22%; opacity: .6; animation-duration: 12s; animation-direction: alternate-reverse; }
@keyframes aurora { from { transform: rotate(-6deg); } to { transform: translateX(12%) rotate(3deg); } }
.deco-waves { -webkit-mask: linear-gradient(transparent 15%, #000 60%); mask: linear-gradient(transparent 15%, #000 60%); }
.deco-waves::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -120px; right: 0; animation: waves 6s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cpath d='M0 20 Q15 8 30 20 T60 20 T90 20 T120 20' fill='none' stroke='%23b8faff' stroke-opacity='.3' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 120px 40px;
}
@keyframes waves { to { transform: translateX(120px); } }
.deco-leaves { background: radial-gradient(70% 45% at 50% 0%, rgba(216, 245, 162, .32), transparent 70%), repeating-linear-gradient(100deg, rgba(0, 0, 0, .12) 0 6px, transparent 6px 22px); }
.deco-sun { background: linear-gradient(180deg, transparent 63%, rgba(255, 220, 160, .6) 63.5%, transparent 64.5%); }
.deco-sun .orb {
  position: absolute; left: 50%; top: 63%; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%;
  background: radial-gradient(circle, #fff3c4, #ffb35e 55%, rgba(255, 107, 107, 0) 72%);
  -webkit-mask: linear-gradient(#000 50%, transparent 50%); mask: linear-gradient(#000 50%, transparent 50%);
  animation: sunpulse 5s ease-in-out infinite;
}
@keyframes sunpulse { 50% { transform: scale(1.06); } }
.deco-petals::before {
  content: ""; position: absolute; left: 0; right: 0; top: -340px; bottom: 0; animation: petals 9s linear infinite;
  background-image: radial-gradient(5px 3px at 18% 22%, rgba(255, 240, 247, .9), transparent), radial-gradient(4px 3px at 68% 12%, rgba(255, 200, 225, .9), transparent),
    radial-gradient(5px 3px at 82% 48%, rgba(255, 240, 247, .85), transparent), radial-gradient(4px 3px at 35% 64%, rgba(255, 200, 225, .75), transparent),
    radial-gradient(5px 3px at 55% 82%, rgba(255, 240, 247, .75), transparent);
  background-size: 100% 340px;
}
@keyframes petals { to { transform: translateY(340px); } }
.deco-stripes::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40px; right: 0; animation: stripes 3s linear infinite;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .14) 0 14px, transparent 14px 28px);
}
@keyframes stripes { to { transform: translateX(39.6px); } }
.deco-prism::before {
  content: ""; position: absolute; inset: -40%; filter: blur(28px); opacity: .55; animation: rot 14s linear infinite;
  background: conic-gradient(#ff3d6e, #ffd23f, #3dff9b, #3dc9ff, #b23dff, #ff3d6e);
}
.deco-drips {
  background: linear-gradient(180deg, rgba(196, 18, 31, .55), transparent 18%),
    radial-gradient(4px 16px at 15% 10%, rgba(196, 18, 31, .75), transparent), radial-gradient(3px 26px at 42% 12%, rgba(196, 18, 31, .65), transparent),
    radial-gradient(4px 20px at 73% 9%, rgba(196, 18, 31, .75), transparent), radial-gradient(3px 12px at 90% 8%, rgba(196, 18, 31, .65), transparent);
}

/* ---------- содержимое карточки (приподнято над «кожей») ---------- */
.c-body { position: relative; padding: 20px 18px 18px; transform-style: preserve-3d; }
.c-top { display: flex; justify-content: space-between; align-items: center; transform: translateZ(30px); }
.ribbon {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; padding: 4px 9px; border-radius: 99px;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .15); color: #fff;
}
.ribbon.legend { color: var(--gold); border-color: rgba(255, 207, 90, .5); }
.ribbon.epic { color: #d39bff; border-color: rgba(178, 61, 255, .5); }
.ribbon.rare { color: #8fd0ff; border-color: rgba(61, 201, 255, .5); }
.c-id { display: flex; gap: 14px; align-items: center; margin-top: 14px; transform-style: preserve-3d; }
.ring {
  --p: .5; width: 88px; height: 88px; border-radius: 50%; padding: 4px; flex: none; position: relative; transform: translateZ(60px);
  background: conic-gradient(var(--r1, var(--accent2)), var(--r2, var(--accent)) calc(var(--p) * 1turn), rgba(255, 255, 255, .14) 0);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .55), 0 0 18px var(--glow, rgba(255, 182, 72, .5));
}
.ring .ph {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 900; color: #fff;
  background: radial-gradient(circle at 35% 30%, #6d4128, #1d120c); border: 3px solid rgba(0, 0, 0, .55); overflow: hidden;
}
.ring .ph img { width: 100%; height: 100%; object-fit: cover; }
.medal {
  position: absolute; right: -6px; bottom: -4px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px;
  background: radial-gradient(circle at 30% 30%, #fff6d0, #c8963a 70%); box-shadow: 0 3px 8px rgba(0, 0, 0, .5), inset 0 -2px 3px rgba(0, 0, 0, .3);
}
.c-name { min-width: 0; transform: translateZ(45px); }
.nick {
  font-size: 26px; line-height: 1.05; font-weight: 900; letter-spacing: .2px; word-break: break-word;
  background: linear-gradient(180deg, #fff 35%, var(--r1, #ffd9b8)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .7));
}
.plate {
  display: inline-block; margin-top: 7px; padding: 3px 12px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #2a2017;
  background: linear-gradient(180deg, #e9e4dc, #a39a8e); position: relative; text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(0, 0, 0, .45);
}
.plate::before, .plate::after { content: ""; position: absolute; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #6b6157; box-shadow: inset 0 1px 0 rgba(0, 0, 0, .5); }
.plate::before { left: 4px; } .plate::after { right: 4px; }
.c-role { margin-top: 6px; font-size: 12.5px; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 2px #000; }
.c-rank { margin-top: 16px; transform: translateZ(30px); }
.c-rank .top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; text-shadow: 0 1px 2px #000; }
.c-rank .top span:last-child { color: rgba(255, 255, 255, .72); font-weight: 600; }
.c-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; transform: translateZ(40px); }
.c-stat { border-radius: 14px; padding: 9px 4px; text-align: center; background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.c-stat b { display: block; font-size: 18px; font-weight: 900; }
.c-stat span { font-size: 10.5px; color: rgba(255, 255, 255, .72); }
.c-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11px; color: rgba(255, 255, 255, .62); transform: translateZ(20px); letter-spacing: .4px; }
.preview-note { text-align: center; font-size: 12.5px; color: var(--accent2); margin: -2px 0 12px; font-weight: 700; }

/* ---------- значки-монеты ---------- */
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px 8px; }
.coin { text-align: center; perspective: 500px; }
.coin .in { position: relative; width: 62px; height: 62px; margin: 0 auto; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.coin.flip .in { transform: rotateY(180deg); }
.coin .face {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: radial-gradient(circle at 32% 28%, var(--c1), var(--c2) 70%);
  box-shadow: inset 0 0 0 3px var(--c3), inset 0 -5px 8px rgba(0, 0, 0, .35), inset 0 4px 6px rgba(255, 255, 255, .35), 0 6px 12px rgba(0, 0, 0, .45);
  font-size: 27px;
}
.coin .face.back { transform: rotateY(180deg); font-size: 11px; font-weight: 800; line-height: 1.15; padding: 8px; color: #1d140c; }
.coin span.n { display: block; margin-top: 6px; font-size: 11px; color: var(--hint); line-height: 1.2; }
.coin.sel .in { outline: 3px solid var(--accent2); outline-offset: 3px; border-radius: 50%; }
.coin.common { --c1: #f1f1f1; --c2: #9aa3ab; --c3: #c9d0d6; }
.coin.rare { --c1: #c8ecff; --c2: #2f86c9; --c3: #8fd0ff; }
.coin.epic { --c1: #f1d2ff; --c2: #8a39c9; --c3: #d39bff; }
.coin.legend { --c1: #fff4c2; --c2: #d7962c; --c3: #ffd96e; }
.coin.legend .face.front { box-shadow: inset 0 0 0 3px var(--c3), inset 0 -5px 8px rgba(0, 0, 0, .35), inset 0 4px 6px rgba(255, 255, 255, .35), 0 0 14px rgba(255, 207, 90, .6); }

/* ---------- кастомизация ---------- */
.items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.item { background: var(--glass); border: 1px solid var(--stroke); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.item .swatch.mat { position: relative; overflow: hidden; box-shadow: inset 0 0 0 2px var(--r2, transparent), inset 0 0 20px rgba(0, 0, 0, .5); }
.item .swatch.mat > div { inset: 0; border-radius: 0; }
.item .swatch .sw-ic { position: relative; z-index: 2; }
.item .swatch { height: 64px; border-radius: 11px; display: grid; place-items: center; font-size: 26px; background-size: cover; box-shadow: inset 0 0 20px rgba(0, 0, 0, .5); text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.item .nm { font-weight: 700; font-size: 13.5px; }
.item .pr { font-size: 12.5px; color: var(--accent2); font-weight: 700; }
.item .btns { margin-top: auto; }
.item.equipped { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2), 0 0 18px rgba(255, 182, 72, .25); }
.item .rar { position: absolute; top: 14px; right: 14px; font-size: 13px; }

/* ---------- мероприятия, опросы, дропсы, квесты ---------- */
.event { display: flex; gap: 12px; }
.date {
  flex: none; width: 58px; text-align: center; border-radius: 14px; padding: 8px 0;
  background: linear-gradient(180deg, rgba(224, 103, 42, .35), rgba(224, 103, 42, .1)); border: 1px solid rgba(224, 103, 42, .35);
}
.date b { display: block; font-size: 21px; font-weight: 900; color: var(--accent2); line-height: 1.1; }
.date span { font-size: 11px; color: var(--hint); font-weight: 600; }
.countdown { font-variant-numeric: tabular-nums; }
.opt { position: relative; display: block; width: 100%; text-align: left; padding: 11px 12px; margin-top: 8px; border-radius: 13px; overflow: hidden; background: var(--glass2); border: 1px solid var(--stroke); }
.opt .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(224, 103, 42, .45), rgba(255, 182, 72, .2)); transition: width .8s var(--ease); }
.opt .lbl { position: relative; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.opt.mine { border-color: var(--accent2); }
.opt[disabled] { opacity: .55; }
.drops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drop { border-radius: 13px; overflow: hidden; background: var(--glass2); text-align: center; font-size: 12px; border: 1px solid var(--stroke); }
.drop img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #222; }
.drop div { padding: 6px 4px; font-weight: 600; }
.quest { padding: 11px 0; border-top: 1px solid var(--stroke); }
h3 + .quest { border-top: 0; }
.quest .head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 7px; }
.quest .head b { font-size: 14px; }
.reward { font-weight: 800; color: var(--accent2); white-space: nowrap; }

/* ---------- кошелёк ---------- */
.wallet-hero { display: flex; align-items: center; gap: 16px; }
.coin3d {
  width: 74px; height: 74px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 34px;
  background: radial-gradient(circle at 32% 28%, #fff1bf, #d08a24 68%, #8a5412);
  box-shadow: inset 0 0 0 4px #f5c65a, inset 0 -6px 10px rgba(0, 0, 0, .35), 0 10px 24px rgba(255, 170, 60, .3);
  animation: coinspin 6s ease-in-out infinite;
}
@keyframes coinspin { 0%, 70%, 100% { transform: rotateY(0); } 85% { transform: rotateY(360deg); } }
.big { font-size: 34px; font-weight: 900; line-height: 1; }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; }
.streak i { height: 34px; border-radius: 10px; background: var(--glass2); display: grid; place-items: center; font-style: normal; font-size: 11px; color: var(--hint); font-weight: 700; }
.streak i.on { background: linear-gradient(180deg, #f07a3a, #c9531c); color: #fff; box-shadow: 0 4px 10px rgba(224, 103, 42, .35); }

/* ---------- служебное ---------- */
.empty { text-align: center; color: var(--hint); padding: 26px 8px; }
.skel { position: relative; overflow: hidden; border-radius: var(--radius); margin-bottom: 12px; background: var(--glass); }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, var(--glass2) 50%, transparent 70%); animation: skel 1.2s linear infinite; will-change: transform; }
@keyframes skel { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.input { width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--stroke); background: rgba(0, 0, 0, .3); color: var(--text); font: inherit; outline: none; }
.input:focus { border-color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0; z-index: 50;
  background: rgba(20, 15, 12, .92); border: 1px solid var(--stroke); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 600;
  max-width: 88vw; text-align: center; transition: .3s var(--ease); pointer-events: none; backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- лёгкая графика (слабые ПК и телефоны) ---------- */
body.lite .c-holo, body.lite .btn.shine::after { display: none; }
body.lite .card3d.idle { animation: none; }
body.lite .c-frame::before, body.lite .c-wall i, body.lite .c-deco, body.lite .c-deco *,
body.lite .c-deco::before, body.lite .c-deco::after, body.lite .corner::after, body.lite .coin3d { animation: none !important; }
body.lite .deco-aurora::before, body.lite .deco-aurora::after, body.lite .deco-swirl::before, body.lite .deco-prism::before { filter: none; opacity: .35; }
body.lite .c-skin { box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
body.lite main > * { animation: none; }

/* ---------- вкладка «Всё»: плитки разделов ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 14px; text-align: left;
  background: var(--glass2); border: 1px solid var(--stroke); transition: transform .12s var(--ease);
}
.tile:active { transform: scale(.97); }
.tile .ti { font-size: 24px; line-height: 1; margin-bottom: 4px; }
.tile b { font-size: 14px; }
.tile small { color: var(--hint); font-size: 11.5px; line-height: 1.25; }
textarea.input { min-height: 96px; resize: vertical; font: inherit; }
.form label { display: block; font-size: 12.5px; color: var(--hint); margin: 10px 0 5px; font-weight: 600; }
.pill { display: inline-flex; gap: 4px; align-items: center; padding: 3px 9px; border-radius: 99px; background: var(--glass2); font-size: 12px; margin: 0 4px 4px 0; }


/* ---------- раздел «Профиль» (sec/profile2.js) ---------- */
.field { display: flex; gap: 8px; align-items: flex-start; }
.field .input { flex: 1; min-width: 0; }
.field textarea.input { min-height: 64px; }
.field .btn { flex: none; min-width: 46px; padding-inline: 12px; }
.pbar { height: 10px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.pbar i { display: block; height: 100%; transform-origin: 0 50%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: transform .6s var(--ease); }
details.fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "▾"; margin-left: 8px; color: var(--hint); transition: transform .2s var(--ease); }
details.fold[open] summary::after { transform: rotate(180deg); }
details.fold summary small { margin-left: auto; color: var(--hint); font-size: 12px; }
details.fold[open] summary { margin-bottom: 6px; }
.list { display: grid; gap: 6px; }
.row.press { width: 100%; text-align: left; font: inherit; color: inherit; background: var(--glass); border: 1px solid var(--stroke); border-radius: 14px; padding: 10px 12px; cursor: pointer; transition: transform .15s var(--ease); }
.row.press:active { transform: scale(.98); }
.row.press.on { border-color: var(--accent); }
.row .ti { font-size: 22px; width: 30px; text-align: center; }
.range { flex: 1; accent-color: var(--accent); }
.achs { display: grid; gap: 8px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); opacity: .6; }
.ach.have { opacity: 1; border-color: rgba(255, 207, 90, .35); }
.ach .ai { font-size: 26px; width: 36px; text-align: center; }
.ach .grow { flex: 1; min-width: 0; }
.ach .sub { color: var(--hint); font-size: 12.5px; }
.codebox { display: block; margin: 8px 0; padding: 12px; width: 100%; border-radius: 12px; border: 1px dashed var(--accent2); background: rgba(0, 0, 0, .3); color: var(--accent2); font: 800 20px/1 ui-monospace, Consolas, monospace; letter-spacing: 3px; cursor: pointer; }

/* ---------- раздел «Экономика» (sec/econ.js) ---------- */
.tiles.quick { grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.tiles.quick .tile { align-items: center; text-align: center; padding: 12px 6px; }
.row .col { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.stars { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.star { font-size: 34px; line-height: 1; background: none; border: 0; color: rgba(255, 255, 255, .18); cursor: pointer; transition: transform .15s var(--ease), color .15s; }
.star.on { color: var(--gold); }
.star:active { transform: scale(.85); }
.press-row { cursor: pointer; }

/* ---------- раздел «Соревнования» (sec/comp.js) ---------- */
.press-card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .15s var(--ease); }
.press-card:active { transform: scale(.985); }
.card.glow { border-color: rgba(255, 182, 72, .45); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 182, 72, .15) inset; }
.vs { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 16px; }
.vs span { color: var(--hint); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.bracket { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.rnd { flex: none; min-width: 150px; display: flex; flex-direction: column; gap: 8px; justify-content: space-around; scroll-snap-align: start; }
.rnd-t { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--hint); font-weight: 800; }
.match { border-radius: 12px; overflow: hidden; border: 1px solid var(--stroke); background: rgba(0, 0, 0, .25); }
.match.mine { border-color: var(--accent); }
.match .pl { padding: 7px 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match .pl + .pl { border-top: 1px solid var(--stroke); }
.match .pl.win { color: var(--gold); font-weight: 800; }
.q { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; color: inherit; padding: 12px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass); cursor: pointer; transition: transform .15s var(--ease); }
.opt:active:not(:disabled) { transform: scale(.98); }
.opt b { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--glass2); }
.opt.right { border-color: var(--ok); background: rgba(82, 196, 107, .14); }
.opt.wrong { border-color: var(--bad); background: rgba(239, 90, 68, .14); }
.opt:disabled { cursor: default; }
.star:hover { color: var(--gold); }

/* ---------- админка (sec/admin2.js) ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid3 .input { min-width: 0; }

/* ---------- шторка снизу: карточка предмета/товара (только transform/opacity) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .22s ease; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap.on { opacity: 1; }
.sheet { width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--stroke); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .28s var(--ease); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); }
.sheet-wrap.on .sheet { transform: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--glass2); margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-head b { flex: 1; font-size: 17px; }
.sheet-preview .swatch { height: 110px; border-radius: 16px; display: grid; place-items: center; font-size: 44px; position: relative; overflow: hidden; box-shadow: inset 0 0 30px rgba(0, 0, 0, .5); }
.sheet-preview .swatch.mat > div { position: absolute; inset: 0; }
.sheet-preview .swatch .sw-ic { position: relative; z-index: 2; }
.sheet-lines { display: grid; gap: 6px; margin: 12px 0; font-size: 14px; }
.sheet-lines .pill { justify-self: start; }
.sheet-status { font-weight: 800; margin-bottom: 10px; color: var(--accent2); }

/* ---------- кастомизация как в боте ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--stroke); margin-bottom: 10px; }
.seg button { font: inherit; font-weight: 700; color: var(--hint); background: none; border: 0; border-radius: 10px; padding: 9px 6px; cursor: pointer; transition: background-color .15s, color .15s; }
.seg button.on { background: var(--glass2); color: var(--text); }
.item.press { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease); }
.item.press:active { transform: scale(.97); }
.item.locked { opacity: .62; }
.item .tg { font-size: 12px; letter-spacing: 1px; }

/* ---------- магазин как в боте ---------- */
.shop-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.shop-cta .ti { font-size: 28px; }
.shop-cta .grow { flex: 1; }
.shop-cta .chev { font-size: 26px; color: var(--hint); }
.deal { display: grid; gap: 4px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border-color: rgba(255, 182, 72, .45); background: linear-gradient(135deg, rgba(224, 103, 42, .22), rgba(255, 182, 72, .08)); }
.deal b { font-size: 16px; }
.gold-t { color: var(--gold); }
.shop-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-top: 1px solid var(--stroke); padding: 11px 0; cursor: pointer; }
.shop-row:first-of-type { border-top: 0; }
.shop-row .grow { flex: 1; min-width: 0; }
.shop-row .name { font-weight: 700; }
.shop-row .sub { color: var(--hint); font-size: 12.5px; }
.pr-col { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.pr-col s { font-size: 11.5px; color: var(--hint); }
.pr-col b { color: var(--accent2); }
.pr-col small { font-size: 11px; color: #8ee2a0; }
.press:active { transform: scale(.985); }

/* ---------- BETA ---------- */
.beta-pill { flex: none; margin-right: auto; margin-left: -4px; padding: 3px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 900; letter-spacing: 1.2px;
  color: #1b1206; background: linear-gradient(180deg, #ffd96e, #e0a12b); cursor: pointer; box-shadow: 0 2px 10px rgba(255, 182, 72, .35); }
.topbar h1:has(+ .beta-pill) { flex: 0 1 auto; }
