/* АНАРХИЯ · магазин: список товаров, окно товара снизу. Свои классы sx-*,
   старые слои стилей магазина на них не действуют. */
.sx-shop { display: grid; gap: 18px; text-align: left; font-family: var(--nx-font, system-ui, sans-serif); color: var(--nx-ink, #f5f3ff); }
.sx-svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sx-coin { width: 16px; height: 16px; color: var(--nx-gold, #ffd166); }
.sx-star { width: 15px; height: 15px; color: var(--nx-gold, #ffd166); fill: currentColor; stroke-width: 1.2; }

/* Кошелёк */
.sx-wallet { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 209, 102, .16), transparent 60%), rgba(18, 16, 30, .78);
  border: 1px solid rgba(255, 255, 255, .09); }
.sx-wallet-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none;
  color: #1a1204; background: linear-gradient(140deg, #ffe08a, #f2b84b); }
.sx-wallet-ico .sx-svg { width: 26px; height: 26px; stroke-width: 2; }
.sx-wallet-text { display: grid; line-height: 1.15; }
.sx-wallet-text strong { font: 800 26px/1.1 var(--nx-display, system-ui); color: #fff; }
.sx-wallet-text span { font-size: 13px; color: var(--nx-muted, #8c86ad); }
.sx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; }
.sx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  font-size: 13px; color: var(--nx-ink-2, #c9c4e3); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); }
.sx-chip .sx-svg { width: 15px; height: 15px; }
.sx-chip.is-gold { color: var(--nx-gold, #ffd166); border-color: rgba(255, 209, 102, .3); }

/* Разделы и строки товаров */
.sx-section { display: grid; gap: 8px; }
.sx-label { margin: 0 2px; font: 700 12px/1 var(--nx-font, system-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--nx-muted, #8c86ad); }
.sx-list { display: grid; border-radius: 18px; overflow: hidden; background: rgba(18, 16, 30, .78); border: 1px solid rgba(255, 255, 255, .08); }
.sx-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 68px; padding: 12px 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sx-list .sx-row + .sx-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.sx-row:hover { background: rgba(255, 255, 255, .03); }
.sx-row:active { background: rgba(255, 255, 255, .06); }
.sx-row:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); outline-offset: -2px; }
.sx-row-plain { border-radius: 18px; background: rgba(18, 16, 30, .78); border: 1px solid rgba(255, 255, 255, .08); min-height: 58px; }
.sx-row-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.sx-row-name { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; color: #fff; }
.sx-row-desc { font-size: 13px; line-height: 1.3; color: var(--nx-muted, #8c86ad); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sx-tag { padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #1a1204; background: var(--nx-gold, #ffd166); }
.sx-price { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 7px 10px; border-radius: 999px;
  font-weight: 700; font-size: 14px; color: #fff; background: rgba(255, 255, 255, .06); }
.sx-chev { width: 18px; height: 18px; color: var(--nx-muted, #8c86ad); }

/* Иконка товара в цветной плашке */
.sx-ico { --tint: 200, 200, 220; width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center;
  color: rgb(var(--tint)); background: linear-gradient(145deg, rgba(var(--tint), .22), rgba(var(--tint), .08));
  box-shadow: inset 0 0 0 1px rgba(var(--tint), .22); }
.sx-ico .sx-svg { width: 22px; height: 22px; }
.sx-ico-lg { width: 76px; height: 76px; border-radius: 22px; }
.sx-ico-lg .sx-svg { width: 38px; height: 38px; stroke-width: 1.6; }

/* Пакеты монет за звёзды */
.sx-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sx-pack { all: unset; box-sizing: border-box; display: grid; gap: 4px; padding: 14px; border-radius: 16px; cursor: pointer;
  background: rgba(18, 16, 30, .78); border: 1px solid rgba(255, 255, 255, .08); -webkit-tap-highlight-color: transparent; }
.sx-pack:active { background: rgba(255, 255, 255, .06); }
.sx-pack:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); }
.sx-pack-coins { display: inline-flex; align-items: center; gap: 6px; font: 700 18px/1.1 var(--nx-display, system-ui); color: #fff; }
.sx-pack-stars { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--nx-muted, #8c86ad); }

/* Окно снизу */
.sx-sheet { margin: auto auto 0; padding: 0; width: 100%; max-width: 520px; max-height: 88dvh; border: 0; border-radius: 26px 26px 0 0;
  background: #120f1e; color: var(--nx-ink, #f5f3ff); box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); overflow: auto; overscroll-behavior: contain; }
.sx-sheet::backdrop { background: rgba(4, 3, 10, .72); }
.sx-sheet[open] { animation: sx-up .2s ease-out; }
@keyframes sx-up { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 600px) { .sx-sheet { margin: auto; border-radius: 26px; } }
body:has(.sx-sheet[open]) { overflow: hidden; }
.sx-sheet-body { position: relative; display: grid; gap: 12px; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); text-align: left; font-family: var(--nx-font, system-ui, sans-serif); }
.sx-grip { justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.sx-x { all: unset; position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; color: var(--nx-ink-2, #c9c4e3); background: rgba(255, 255, 255, .07); }
.sx-x .sx-svg { width: 18px; height: 18px; }
.sx-x:focus-visible { outline: 2px solid var(--nx-cyan, #2fe6ff); }
.sx-hero { --tint: 200, 200, 220; display: grid; place-items: center; padding: 18px 0 6px; }
.sx-title { margin: 0; text-align: center; font: 700 21px/1.2 var(--nx-display, system-ui); color: #fff; }
.sx-text { margin: 0; text-align: center; font-size: 15px; line-height: 1.5; color: var(--nx-ink-2, #c9c4e3); }
.sx-sub { margin: 6px 0 0; font-size: 13px; color: var(--nx-muted, #8c86ad); }
.sx-note { margin: -4px 0 0; text-align: center; font-size: 13px; color: var(--nx-muted, #8c86ad); }
.sx-facts { margin: 0; display: grid; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.sx-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.sx-facts div + div { border-top: 1px solid rgba(255, 255, 255, .06); }
.sx-facts dt { color: var(--nx-muted, #8c86ad); font-size: 14px; }
.sx-facts dd { margin: 0; font-weight: 650; font-size: 14px; color: #fff; text-align: right; }
.sx-extra:empty { display: none; }
.sx-extra { display: grid; gap: 8px; }

.sx-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 52px;
  padding: 0 18px; border-radius: 16px; cursor: pointer; font: 700 16px var(--nx-font, system-ui); color: #05050a;
  background: linear-gradient(120deg, #ff2e88, #b03cff 55%, #2fe6ff); -webkit-tap-highlight-color: transparent; }
.sx-btn .sx-coin { color: #05050a; }
.sx-btn:active { filter: brightness(.92); }
.sx-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sx-btn:disabled { cursor: default; color: var(--nx-muted, #8c86ad); background: rgba(255, 255, 255, .07); }
.sx-btn:disabled .sx-coin { color: var(--nx-muted, #8c86ad); }
.sx-btn.is-busy { opacity: .7; }
.sx-btn-quiet { color: #fff; background: rgba(255, 255, 255, .08); }

/* Выбор цвета и рамки */
.sx-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sx-swatch { all: unset; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); }
.sx-swatch[aria-pressed=true] { box-shadow: 0 0 0 3px #120f1e, 0 0 0 5px #fff; }
.sx-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sx-option { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 14px;
  cursor: pointer; font-size: 14px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.sx-option[aria-pressed=true] { border-color: #fff; background: rgba(255, 255, 255, .1); }
.sx-option-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.sx-frame { width: 24px; height: 24px; border-radius: 50%; flex: none; background: #2a2340; box-shadow: inset 0 0 0 3px #888; }
.sx-frame-gold { box-shadow: inset 0 0 0 3px #f2c14e, 0 0 8px rgba(242, 193, 78, .5); }
.sx-frame-neon { box-shadow: inset 0 0 0 3px #2fe6ff, 0 0 10px rgba(47, 230, 255, .6); }
.sx-frame-fire { box-shadow: inset 0 0 0 3px #ff6a2b, 0 0 10px rgba(255, 106, 43, .6); }
.sx-field { display: grid; gap: 6px; font-size: 13px; color: var(--nx-muted, #8c86ad); }
.sx-field input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; font: 500 16px var(--nx-font, system-ui);
  color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); outline: none; }
.sx-field input:focus { border-color: var(--nx-cyan, #2fe6ff); }
.sx-field input.is-error { border-color: #ff5a6a; }

/* Лотерея */
.sx-odds { display: grid; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.sx-odds-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; padding: 10px 14px; font-size: 14px; color: #fff; }
.sx-odds-row + .sx-odds-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.sx-odds-row span:first-child { font-weight: 700; color: var(--nx-gold, #ffd166); }
.sx-odds-row span:last-child { color: var(--nx-muted, #8c86ad); }
.sx-odds-row.is-empty span { color: var(--nx-muted, #8c86ad); }

/* Результат покупки */
.sx-result { display: grid; justify-items: center; gap: 12px; padding: 22px 0 6px; text-align: center; }
.sx-result p { margin: 0; font-size: 16px; line-height: 1.45; color: #fff; }
.sx-result-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.sx-result-ico .sx-svg { width: 32px; height: 32px; stroke-width: 2.4; }
.sx-result.is-ok .sx-result-ico { color: #35e0a1; background: rgba(53, 224, 161, .14); }
.sx-result.is-bad .sx-result-ico { color: #ff6a7a; background: rgba(255, 106, 122, .14); }

/* История */
.sx-hist { display: grid; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .04); }
.sx-hist-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.sx-hist-row + .sx-hist-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.sx-hist-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.sx-hist-main strong { font-size: 14px; color: #fff; }
.sx-hist-main small { font-size: 12px; color: var(--nx-muted, #8c86ad); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .sx-sheet[open] { animation: none; } }
