/* ==========================================================================
   Магазин: баланс, список предметів, кейси з анімаціями, привілеї.
   Токени кольорів і розмірів — з style.css; тут лише те, що потрібне магазину.
   ========================================================================== */

:root {
  --r-common: #9aa3b2;   --r-common-rgb: 154, 163, 178;
  --r-uncommon: #5ee08a; --r-uncommon-rgb: 94, 224, 138;
  --r-rare: #5aa7ff;     --r-rare-rgb: 90, 167, 255;
  --r-epic: #b07cff;     --r-epic-rgb: 176, 124, 255;
  --r-legendary: #ffc94d; --r-legendary-rgb: 255, 201, 77;
}
[data-rarity='common'] { --rc: var(--r-common); --rc-rgb: var(--r-common-rgb); }
[data-rarity='uncommon'] { --rc: var(--r-uncommon); --rc-rgb: var(--r-uncommon-rgb); }
[data-rarity='rare'] { --rc: var(--r-rare); --rc-rgb: var(--r-rare-rgb); }
[data-rarity='epic'] { --rc: var(--r-epic); --rc-rgb: var(--r-epic-rgb); }
[data-rarity='legendary'] { --rc: var(--r-legendary); --rc-rgb: var(--r-legendary-rgb); }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sh-money { font-feature-settings: var(--feat), 'tnum'; }

/* ---------- шапка: баланс і вкладки ---------- */
.sh-head { padding-bottom: 8px; }
.sh-head__row { display: flex; gap: 32px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.sh-wallet { display: grid; gap: 12px; min-width: min(100%, 300px); padding: 18px 20px; border-radius: var(--r-lg); background: linear-gradient(160deg, rgba(169, 122, 245, 0.14), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.sh-wallet__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.sh-wallet__label { font-size: 13px; color: var(--mute); }
.sh-wallet__sum { font: 600 clamp(28px, 4vw, 36px)/1 var(--font-display); color: var(--ink); letter-spacing: -0.02em; font-feature-settings: var(--feat), 'tnum'; transition: color 0.4s; }
.sh-wallet__sum.is-up { color: var(--ok); }
.sh-wallet__pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-wallet__pills:empty { display: none; }
.sh-tabs { display: inline-flex; gap: 4px; margin-top: 36px; padding: 4px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; overflow-x: auto; }
.sh-tabs button { height: 44px; padding: 0 22px; border-radius: 9px; font: inherit; font-size: 15px; font-weight: 500; color: var(--mute); background: none; border: 0; cursor: pointer; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.sh-tabs button:hover { color: var(--ink); }
.sh-tabs button[aria-selected='true'] { background: var(--surface-4); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.sh-body { padding-top: 24px; }
.sh-guest { margin-bottom: 20px; padding: 14px 18px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--am-50); font-size: 14.5px; }
.sh-guest a { color: #fff; text-underline-offset: 3px; }
.sh-fine { margin-top: 24px; font-size: 13px; color: var(--ash); max-width: 78ch; }

/* ---------- предмети ---------- */
.sh-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sh-search { position: relative; flex: 1 1 320px; display: block; }
.sh-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ash); pointer-events: none; }
.sh-search input, .sh-sort select { width: 100%; height: 46px; border: 0; border-radius: var(--r-md); background: var(--surface-3); color: var(--ink); font: inherit; font-size: 15px; box-shadow: inset 0 0 0 1px var(--line-2); }
.sh-search input { padding: 0 14px 0 42px; }
.sh-sort select { padding: 0 36px 0 14px; cursor: pointer; }
.sh-search input:focus, .sh-sort select:focus { outline: none; background: var(--surface-4); box-shadow: inset 0 0 0 1px var(--am-400), 0 0 0 3px rgba(169, 122, 245, 0.18); }
.sh-groups { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sh-groups button { height: 34px; padding: 0 13px; border: 0; border-radius: 999px; font: inherit; font-size: 13.5px; color: var(--body); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.sh-groups button:hover { background: var(--surface-4); color: var(--ink); }
.sh-groups button[aria-pressed='true'] { background: var(--am-700); color: var(--am-50); box-shadow: inset 0 0 0 1px var(--am-500); }
.sh-groups small { margin-left: 6px; color: var(--ash); font-size: 12px; }
.sh-groups button[aria-pressed='true'] small { color: var(--am-200); }
.sh-count { margin-bottom: 12px; font-size: 13px; color: var(--ash); min-height: 1.4em; }
.sh-list { display: grid; gap: 34px; }
.sh-list__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 8px; }
.sh-sec { display: grid; gap: 4px; }
.sh-sec__title { font: 700 clamp(22px, 2.6vw, 28px)/1.1 var(--font-display); color: var(--ink); letter-spacing: -0.01em; margin: 0 0 4px; }
.sh-sec__type { margin: 18px 0 10px; font: 600 13px/1.2 var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.sh-sec__type:first-child { margin-top: 6px; }
.sh-types { margin-top: -6px; }
.sh-types button { height: 30px; font-size: 13px; background: transparent; }
.sh-types button[aria-pressed='true'] { background: var(--surface-4); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-3); }
.sh-types button[aria-pressed='true'] small { color: var(--mute); }
.sh-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; width: 100%; padding: 10px 16px 10px 10px; border: 0; border-radius: var(--r-md); text-align: left; font: inherit; color: var(--body); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background-color 0.15s, box-shadow 0.15s, transform 0.15s var(--ease); content-visibility: auto; contain-intrinsic-size: auto 68px; }
.sh-row:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-3); }
.sh-row:active { transform: scale(0.995); }
.sh-row:focus-visible { outline: 2px solid var(--am-400); outline-offset: 2px; }
.sh-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 9px; background: var(--surface-4); box-shadow: inset 0 0 0 1px var(--line); }
.sh-ico img { width: 38px; height: 38px; object-fit: contain; }
.sh-ico--ph { color: var(--ash); font-size: 11px; }
.sh-name { display: grid; gap: 2px; min-width: 0; }
.sh-name b { font-weight: 500; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-name small { font-size: 12.5px; color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-name small.is-warn { color: #ffb86b; }
.sh-price { text-align: right; font: 600 16px/1.1 var(--font-display); color: var(--ink); font-feature-settings: var(--feat), 'tnum'; white-space: nowrap; }
.sh-price s { display: block; font: 400 12px var(--font); color: var(--ash); }
.sh-price em { display: block; font: 500 11.5px var(--font); font-style: normal; color: var(--ok); }
.sh-empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--mute); }
/* магазин режиму ще закритий: без пошуку й розділів — лише пояснення */
.sh-body.is-closed .sh-tools, .sh-body.is-closed .sh-groups, .sh-body.is-closed .sh-count { display: none; }
.sh-soon { max-width: 560px; padding: 32px; border-radius: var(--r-xl); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.sh-soon h2 { font: 600 22px/1.25 var(--font-display); color: var(--ink); letter-spacing: -0.01em; }
.sh-soon p { margin-top: 10px; color: var(--body); text-wrap: pretty; }
.sh-soon .row { margin-top: 24px; }

/* ---------- кейси: картки як у ігровому магазині ----------
   Гострі зрізані кути, насичене поле кольору кейса зі смугами, величезний «привид» джекпоту на тлі, ігровий шрифт. */
@font-face { font-family: 'Russo One'; src: url('/assets/fonts/russo-one-cyrillic.woff2') format('woff2'); font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Russo One'; src: url('/assets/fonts/russo-one-latin.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root { --font-game: 'Russo One', var(--font-display); --cut: 22px; }
.sh-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 26px; perspective: 1400px; }
/* тінь і сяйво — окремі статичні шари під карткою: розмиття малюється один раз, при наведенні змінюється лише прозорість
   (фільтр drop-shadow на самій картці перемальовувався б щокадру разом з анімаціями всередині) */
.sh-cw { position: relative; isolation: isolate; contain: layout style; }
.sh-cw::before, .sh-cw::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.sh-cw::after { inset: 24px 10px -12px; background: #000; filter: blur(18px); opacity: 0.6; }
.sh-cw::before { inset: 10px 4px -6px; background: var(--cg); filter: blur(30px); opacity: 0; transition: opacity 0.35s; will-change: opacity; }
.sh-cw:hover::before { opacity: 0.55; }
.sh-case { --mx: 50%; --my: 20%; --rx: 0deg; --ry: 0deg; display: block; width: 100%; height: 100%; padding: 2px; border: 0; font: inherit; color: var(--body); text-align: left; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  background: linear-gradient(135deg, color-mix(in srgb, var(--cg) 90%, #fff), color-mix(in srgb, var(--ca) 60%, #000) 45%, color-mix(in srgb, var(--cg) 70%, #000));
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.35s var(--ease); }
.sh-cw:hover .sh-case { will-change: transform; }
.sh-cw:hover .sh-case { transform: translateY(-8px) rotateX(var(--rx)) rotateY(var(--ry)); }
.sh-case:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.sh-case__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); height: 100%; overflow: hidden; isolation: isolate;
  clip-path: polygon(0 0, calc(100% - var(--cut) + 1px) 0, 100% calc(var(--cut) - 1px), 100% 100%, calc(var(--cut) - 1px) 100%, 0 calc(100% - var(--cut) + 1px));
  background: linear-gradient(160deg, var(--ca), var(--cb) 62%, #07080c); }
/* смуги, що повільно їдуть, і темний низ під текст */
.sh-case__field { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 34%, rgba(6, 7, 11, 0.86) 58%, #07080c 82%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.075) 0 12px, transparent 12px 30px) 0 0 / 200% 100%,
    radial-gradient(70% 50% at 50% 18%, rgba(255, 255, 255, 0.2), transparent 70%); }
/* «привид» джекпоту: величезна піксельна іконка головного призу за кейсом */
.sh-case__ghost { position: absolute; z-index: 0; right: -40px; top: -30px; width: 250px; height: 250px; object-fit: contain; image-rendering: pixelated; opacity: 0.2; transform: rotate(14deg); transition: transform 0.6s var(--ease), opacity 0.4s; pointer-events: none; }
.sh-cw:hover .sh-case__ghost { opacity: 0.38; transform: rotate(6deg) scale(1.12); }
.sh-case__dust { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
/* іскри — лише коли курсор на картці: у спокої нічого не рухається, крім легкого гойдання кейса */
.sh-case__dust i { position: absolute; bottom: 40%; width: 5px; height: 5px; border-radius: 50%; background: radial-gradient(circle, #fff 30%, var(--cg) 60%, transparent 70%); opacity: 0; animation: sh-dust 4.5s ease-in infinite paused; }
.sh-cw:hover .sh-case__dust i { animation-play-state: running; }
.sh-case__dust i:nth-child(n + 5) { display: none; }
.sh-case__dust i:nth-child(1) { left: 16%; } .sh-case__dust i:nth-child(2) { left: 32%; animation-delay: 1.2s; } .sh-case__dust i:nth-child(3) { left: 50%; animation-delay: 2.3s; }
.sh-case__dust i:nth-child(4) { left: 66%; animation-delay: 0.6s; } .sh-case__dust i:nth-child(5) { left: 80%; animation-delay: 3s; } .sh-case__dust i:nth-child(6) { left: 90%; animation-delay: 1.8s; }
@keyframes sh-dust { 0% { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-190px) rotate(180deg); opacity: 0; } }
.sh-case__count { position: absolute; z-index: 4; top: 14px; left: 14px; padding: 5px 14px 5px 10px; font: 400 12px/1.2 var(--font-game); letter-spacing: 0.04em; text-transform: uppercase; color: #0a0a0c; background: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.sh-case__stage { position: relative; z-index: 2; height: 232px; display: grid; place-items: end center; }
.sh-case__stage::before { content: ''; position: absolute; left: 50%; bottom: 10px; width: 280px; height: 160px; margin-left: -140px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--cg) 55%, transparent), transparent); filter: blur(10px); opacity: 0.7; transition: opacity 0.4s; }
.sh-cw:hover .sh-case__stage::before { opacity: 1; }
.sh-case__art { position: relative; z-index: 2; display: block; height: 214px; animation: sh-bob 5.2s ease-in-out infinite; animation-delay: calc(var(--n) * -0.8s); will-change: transform; }
.sh-cw.is-off .sh-case__art { animation-play-state: paused; }
.sh-case__art svg { height: 100%; width: auto; overflow: visible; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.6)); }
@keyframes sh-bob { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
/* 3D-рендери кейса: закритий і відкритий кадри, при наведенні — відкритий */
.cs-shot { display: block; width: 100%; height: auto; max-width: none; user-select: none; pointer-events: none; transition: opacity 0.35s var(--ease); }
.sh-case__art.is-shot { display: grid; place-items: center; height: auto; width: min(calc(100% + 24px), 330px); margin: 0 -12px -14px; }
.sh-case__art.is-shot .cs-shot { grid-area: 1 / 1; }
.cs-shot--open { opacity: 0; }
.sh-cw:hover .cs-shot--open { opacity: 1; }
.sh-cw:hover .cs-shot:not(.cs-shot--open) { opacity: 0; }
.sh-stage__art .cs-shot { width: min(100%, 420px); height: auto; animation: sh-float 4.5s ease-in-out infinite; }
.vt__chest .cs-shot { position: absolute; inset: 0; width: 100%; height: auto; }
.vt__chest:has(.cs-shot) { aspect-ratio: 4 / 3; }
.vt.is-open .vt__chest .cs-shot--open { opacity: 1; }
.vt.is-open .vt__chest .cs-shot:not(.cs-shot--open) { opacity: 0; }
.sh-cw:hover .sh-case__art { animation: sh-hop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes sh-hop { 0% { transform: translateY(0); } 30% { transform: translateY(-14px) rotate(-3deg) scale(1.04); } 55% { transform: translateY(0) rotate(2deg); } 75% { transform: translateY(-4px) rotate(-1deg); } 100% { transform: none; } }
.cx__lid { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.55s cubic-bezier(0.3, 1.5, 0.5, 1); }
.cx__glow { opacity: 0; transition: opacity 0.4s; } .cx__seam { opacity: 0.55; transition: opacity 0.4s; }
.sh-cw:hover .cx__lid { transform: translateY(-18px); }
.sh-cw:hover .cx__glow { opacity: 0.95; } .sh-cw:hover .cx__seam { opacity: 1; }
.sh-case__fan { position: absolute; left: 0; right: 0; bottom: 92px; z-index: 1; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.sh-case__fan span { display: grid; place-items: center; width: 62px; height: 62px; opacity: 0; transform: translateY(60px) scale(0.5); transition: transform 0.55s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.3s; transition-delay: calc(var(--i) * 70ms);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background: linear-gradient(180deg, rgba(var(--rc-rgb), 0.55), rgba(var(--rc-rgb), 0.15)), #14151c; }
.sh-case__fan span img { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; }
.sh-cw:hover .sh-case__fan span { opacity: 1; transform: translateY(-50px) scale(1) rotate(calc((var(--i) - 1) * 14deg)); }
.sh-cw:hover .sh-case__fan span:nth-child(2) { transform: translateY(-74px) scale(1.1); }
.sh-case__body { position: relative; z-index: 3; display: grid; gap: 12px; padding: 4px 22px 22px; }
.sh-case__title { font: 400 27px/1 var(--font-game); color: #fff; text-transform: uppercase; letter-spacing: 0.01em; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.45); }
.sh-case__desc { font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.72); min-height: 4.1em; text-wrap: pretty; }
.sh-case__best { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px 8px 8px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  background: linear-gradient(90deg, rgba(var(--rc-rgb), 0.32), rgba(var(--rc-rgb), 0.06)), rgba(255, 255, 255, 0.04); }
.sh-case__bi { display: grid; place-items: center; width: 50px; height: 50px; background: rgba(0, 0, 0, 0.4); }
.sh-case__bi img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.sh-case__best small { display: block; font: 400 11px/1.2 var(--font-game); letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--rc-rgb)); }
.sh-case__best b { display: block; font-weight: 600; font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-odds { display: flex; height: 5px; overflow: hidden; gap: 2px; }
.sh-odds i { display: block; background: var(--rc); min-width: 4px; }
.sh-case__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 2px; }
.sh-case__price { font: 400 30px/1 var(--font-game); color: #fff; font-feature-settings: 'tnum'; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4); }
.sh-case__go { position: relative; overflow: hidden; display: inline-flex; align-items: center; height: 46px; padding: 0 26px 0 22px; font: 400 15px/1 var(--font-game); letter-spacing: 0.05em; text-transform: uppercase; color: #0a0a0c; background: #fff;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: background-color 0.25s, transform 0.25s var(--ease); }
.sh-case__go::after { content: ''; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent); }
.sh-cw:hover .sh-case__go { background: var(--cg); transform: scale(1.05); }
.sh-cw:hover .sh-case__go::after { transition: transform 0.7s var(--ease); transform: translateX(120%) skewX(-20deg); }
@media (prefers-reduced-motion: reduce) {
  .sh-case__dust i, .sh-case__art, .sh-cw:hover .sh-case__art { animation: none; }
  .sh-case, .cx__lid, .sh-case__fan span, .sh-case__ghost { transition: none; }
}

/* ---------- привілеї ---------- */
.sh-mine { margin-bottom: 22px; padding: 20px 22px; border-radius: var(--r-lg); background: linear-gradient(120deg, rgba(89, 212, 153, 0.12), transparent 55%), var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); display: grid; gap: 16px; }
.sh-mine h3 { font: 600 18px/1.2 var(--font-display); color: var(--ink); }
.sh-mine p { font-size: 14px; color: var(--mute); margin-top: 4px; }
.sh-mykits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.sh-mykit { display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.sh-mykit.is-ready { box-shadow: inset 0 0 0 1px rgba(89, 212, 153, 0.5); }
.sh-mykit__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sh-mykit__top b { font-weight: 500; color: var(--ink); font-size: 14.5px; }
.sh-mykit__top small { font-size: 12.5px; color: var(--mute); }
.sh-mykit.is-ready .sh-mykit__top small { color: var(--ok); }
.sh-mykit__act { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-mykit__act .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.sh-ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; align-items: stretch; }
.sh-rank { --rk: var(--am-400); position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 22px 22px; border-radius: 20px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; isolation: isolate; }
.sh-rank::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 140px; z-index: -1; background: radial-gradient(90% 100% at 50% 0%, color-mix(in srgb, var(--rk) 26%, transparent), transparent 75%); }
.sh-rank::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rk); }
.sh-rank--best { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rk) 55%, transparent), 0 20px 50px -24px var(--rk); }
.sh-rank h3 { font: 700 26px/1 var(--font-display); color: var(--rk); letter-spacing: -0.01em; }
.sh-rank__price { font: 600 30px/1 var(--font-display); color: var(--ink); font-feature-settings: var(--feat), 'tnum'; }
.sh-rank__price small { font: 400 13px var(--font); color: var(--mute); }
.sh-rank ul { display: grid; gap: 8px; font-size: 14px; color: var(--body); list-style: none; padding: 0; }
.sh-rank li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; }
.sh-rank li::before { content: ''; width: 16px; height: 16px; margin-top: 2px; background: var(--rk); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8.5 3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8.5 3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.sh-kit { padding: 12px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; }
.sh-kit h4 { font-size: 12.5px; font-weight: 500; color: var(--mute); }
.sh-kit__items { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-chip { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--surface-4); box-shadow: inset 0 0 0 1px var(--line); }
.sh-chip img { width: 30px; height: 30px; object-fit: contain; }
.sh-chip b { position: absolute; right: 1px; bottom: 0; padding: 0 3px; border-radius: 4px; background: rgba(0, 0, 0, 0.72); font: 600 10.5px/1.5 var(--font); color: #fff; font-feature-settings: var(--feat), 'tnum'; }
.sh-chip:hover::after, .sh-chip:focus-visible::after { content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 5px 9px; border-radius: 6px; background: #000; color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; }
.sh-kit--d { padding: 0; overflow: hidden; }
.sh-kit--d summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 12px; cursor: pointer; list-style: none; font-size: 13.5px; color: var(--ink); }
.sh-kit--d summary::-webkit-details-marker { display: none; }
.sh-kit--d summary::after { content: '+'; margin-left: 4px; color: var(--ash); font-size: 16px; line-height: 1; }
.sh-kit--d[open] summary::after { content: '−'; }
.sh-kit--d summary b { font-weight: 500; }
.sh-kit--d summary small { margin-left: auto; font-size: 12px; color: var(--ash); }
.sh-kit--d p { padding: 0 12px 8px; font-size: 12.5px; color: var(--mute); }
.sh-kit--d .sh-kit__items { padding: 0 12px 12px; }
.sh-rank__more { font-size: 12.5px; color: var(--ash); }
.sh-rank__buy { margin-top: auto; }
.sh-rank__state + .sh-rank__buy, .sh-kit + .sh-kit--d { padding: 0; overflow: hidden; }
.sh-kit--d summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 12px; cursor: pointer; list-style: none; font-size: 13.5px; color: var(--ink); }
.sh-kit--d summary::-webkit-details-marker { display: none; }
.sh-kit--d summary::after { content: '+'; margin-left: 4px; color: var(--ash); font-size: 16px; line-height: 1; }
.sh-kit--d[open] summary::after { content: '−'; }
.sh-kit--d summary b { font-weight: 500; }
.sh-kit--d summary small { margin-left: auto; font-size: 12px; color: var(--ash); }
.sh-kit--d p { padding: 0 12px 8px; font-size: 12.5px; color: var(--mute); }
.sh-kit--d .sh-kit__items { padding: 0 12px 12px; }
.sh-rank__more { font-size: 12.5px; color: var(--ash); }
.sh-rank__buy { margin-top: auto; }
.sh-rank__state { font-size: 13px; color: var(--ok); }

/* ---------- діалоги покупки й поповнення ---------- */
dialog.modal.sh-buy, dialog.modal.sh-topup { max-width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 26px; }
.sh-x { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--mute); font-size: 26px; line-height: 1; cursor: pointer; z-index: 3; }
.sh-x:hover { background: var(--surface-4); color: var(--ink); }
.sh-buy__top { display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: center; padding-right: 28px; margin-bottom: 18px; }
.sh-buy__top h2 { margin: 0 0 6px; }
.sh-buy__icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 14px; background: radial-gradient(70% 70% at 50% 40%, rgba(169, 122, 245, 0.22), transparent), var(--surface-4); box-shadow: inset 0 0 0 1px var(--line-2); }
.sh-buy__icon img { width: 66px; height: 66px; object-fit: contain; }
.sh-buy__desc { font-size: 14px; color: var(--mute); text-wrap: pretty; }
.sh-buy__limit { margin-top: 6px; font-size: 13px; color: #ffb86b; }
.sh-buy__extra:empty { display: none; }
.sh-buy__extra { margin-bottom: 14px; }
.sh-qty { display: grid; gap: 10px; margin-bottom: 14px; }
.sh-qty__label { font-size: 13px; color: var(--mute); }
.sh-qty__ctl { display: grid; grid-template-columns: 44px 1fr 44px; height: 48px; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.sh-qty__ctl button { border: 0; background: none; color: var(--ink); font-size: 22px; cursor: pointer; transition: background-color 0.15s; }
.sh-qty__ctl button:hover { background: var(--surface-4); }
.sh-qty__ctl input { min-width: 0; border: 0; background: none; color: var(--ink); text-align: center; font: 600 18px var(--font-display); font-feature-settings: var(--feat), 'tnum'; -moz-appearance: textfield; }
.sh-qty__ctl input::-webkit-outer-spin-button, .sh-qty__ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sh-qty__ctl input:focus { outline: none; background: var(--surface-4); }
.sh-qty__chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.sh-qty .sh-qty__chips { margin: 0 0 4px; }
.sh-qty__chips button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--surface-3); color: var(--body); font: inherit; font-size: 13px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.sh-qty__chips button:hover { background: var(--surface-4); color: var(--ink); }
.sh-sum { display: grid; gap: 8px; margin: 0 0 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.sh-sum > div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.sh-sum dt { color: var(--mute); }
.sh-sum dd { margin: 0; color: var(--ink); font-feature-settings: var(--feat), 'tnum'; }
.sh-sum__disc dd { color: var(--ok); }
.sh-sum__total { padding-top: 8px; border-top: 1px solid var(--line); }
.sh-sum__total dt, .sh-sum__total dd { font: 600 18px/1.2 var(--font-display); color: var(--ink); }
.sh-sum dd.is-bad { color: #ff8a96; }
.sh-buy__act { margin: 6px 0 10px; }
.sh-buy__act .btn--primary { flex: 1 1 auto; justify-content: center; }
.sh-done { position: absolute; inset: 0; z-index: 4; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 28px; text-align: center; background: var(--surface-2); animation: sh-pop 0.35s var(--ease); }
.sh-done h3 { font: 600 26px/1.1 var(--font-display); color: var(--ink); }
.sh-done p { max-width: 38ch; font-size: 14.5px; color: var(--body); }
.sh-done__tick { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; color: #062012; background: var(--ok); box-shadow: 0 0 0 10px rgba(89, 212, 153, 0.15); }
.sh-done__tick svg { width: 34px; height: 34px; }
.sh-done__tick path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: sh-draw 0.5s 0.15s var(--ease) forwards; }
@keyframes sh-draw { to { stroke-dashoffset: 0; } }
@keyframes sh-pop { from { opacity: 0; transform: scale(0.97); } }

/* ---------- сцена кейса ---------- */
dialog.sh-stage { width: min(1120px, 100vw); height: min(800px, 100dvh); max-width: 100vw; max-height: 100dvh; padding: 0; border: 0; border-radius: 24px; color: var(--body); background: #0a0b0f; box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 120px rgba(0, 0, 0, 0.8); overflow: hidden; }
dialog.sh-stage::backdrop { background: rgba(3, 4, 6, 0.82); backdrop-filter: blur(6px); }
.sh-stage__bg { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 30%, color-mix(in srgb, var(--ca, #8a5ce0) 34%, transparent), transparent 72%); pointer-events: none; transition: background 0.6s; }
.sh-x--stage { top: 14px; right: 16px; background: rgba(255, 255, 255, 0.06); }
.sh-stage__in { position: relative; height: 100%; overflow-y: auto; padding: 36px clamp(20px, 4vw, 44px) 32px; display: grid; }
.sh-stage__view { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 32px 44px; align-content: start; align-items: center; }
.sh-stage__art { display: grid; place-items: center; min-height: 260px; }
.sh-stage__art svg { width: min(100%, 340px); height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55)); animation: sh-float 4.5s ease-in-out infinite; }
@keyframes sh-float { 50% { transform: translateY(-8px); } }
.sh-stage__info { display: grid; gap: 14px; align-content: center; }
.sh-stage__info h2 { font: 700 clamp(28px, 4vw, 44px)/1.05 var(--font-display); color: var(--ink); letter-spacing: -0.02em; margin: 0; }
.sh-qty--case { max-width: 260px; margin: 6px 0 0; }
.sh-open { min-width: 240px; justify-content: center; }
.sh-loot { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-top: 4px; }
.sh-prize { position: relative; display: grid; grid-template-rows: 64px auto auto; justify-items: center; gap: 6px; padding: 14px 10px 12px; border-radius: 14px; text-align: center; background: linear-gradient(180deg, rgba(var(--rc-rgb), 0.16), transparent 75%), var(--surface-3); box-shadow: inset 0 0 0 1px rgba(var(--rc-rgb), 0.28); }
.sh-prize img { width: 56px; height: 56px; object-fit: contain; align-self: center; }
.sh-prize b { font: 500 12.5px/1.25 var(--font); color: var(--ink); text-wrap: balance; }
.sh-prize span { font-size: 12px; color: rgba(var(--rc-rgb), 1); font-feature-settings: var(--feat), 'tnum'; }
.sh-stage__play { display: grid; grid-template-rows: 1fr auto; align-items: center; justify-items: center; gap: 18px; min-height: 100%; }
.sh-stage__play[hidden], .sh-stage__view[hidden] { display: none; }
.sh-play { position: relative; width: 100%; min-height: 380px; display: grid; place-items: center; }
.sh-skip { position: absolute; right: clamp(20px, 4vw, 44px); bottom: 24px; }

.rl-wrap { width: 100%; display: grid; gap: 18px; justify-items: center; }
.rl-wrap .rl { justify-self: stretch; }
.rl__title { font: 700 clamp(22px, 3vw, 30px)/1.1 var(--font-display); color: var(--ink); letter-spacing: -0.01em; }
.rl__hint { font-size: 13px; color: var(--ash); }
/* рулетка: горизонтальна стрічка. Візерунок фону й колір променя — від «стилю» кейса (data-style) */
.rl { --lc: 255, 255, 255; position: relative; width: 100%; height: 252px; overflow: hidden; border-radius: 20px; background: #0b0c11; box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 60px -24px rgba(0, 0, 0, 0.9); isolation: isolate; }
.rl__bg { position: absolute; inset: 0; z-index: 0; opacity: 0.9; background: radial-gradient(60% 100% at 50% 50%, color-mix(in srgb, var(--ca, #8a5ce0) 22%, transparent), transparent 75%); }
.rl[data-style='ore'] .rl__bg { background: radial-gradient(60% 100% at 50% 50%, color-mix(in srgb, var(--ca) 24%, transparent), transparent 75%), repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, 0.035) 22px 24px); }
.rl[data-style='blueprint'] .rl__bg { background: radial-gradient(60% 100% at 50% 50%, color-mix(in srgb, var(--ca) 22%, transparent), transparent 75%), linear-gradient(rgba(150, 190, 255, 0.07) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(150, 190, 255, 0.07) 1px, transparent 1px) 0 0 / 28px 28px; }
.rl[data-style='circuit'] .rl__bg { background: radial-gradient(60% 100% at 50% 50%, color-mix(in srgb, var(--ca) 22%, transparent), transparent 75%), repeating-linear-gradient(90deg, transparent 0 46px, rgba(120, 255, 190, 0.06) 46px 47px), repeating-linear-gradient(0deg, transparent 0 46px, rgba(120, 255, 190, 0.05) 46px 47px); }
.rl[data-style='solar'] .rl__bg { background: repeating-conic-gradient(from 0deg at 50% 118%, rgba(255, 214, 90, 0.14) 0 5deg, transparent 5deg 14deg), radial-gradient(70% 100% at 50% 100%, rgba(255, 190, 60, 0.22), transparent 70%); }
.rl[data-style='honey'] .rl__bg { background: radial-gradient(60% 100% at 50% 50%, rgba(255, 197, 51, 0.2), transparent 75%), radial-gradient(circle at 50% 50%, transparent 0 9px, rgba(255, 200, 70, 0.08) 9px 10px, transparent 10px) 0 0 / 34px 30px; }
.rl::before, .rl::after { content: ''; position: absolute; top: 0; bottom: 0; width: 22%; z-index: 3; pointer-events: none; }
.rl::before { left: 0; background: linear-gradient(90deg, #0b0c11 8%, transparent); }
.rl::after { right: 0; background: linear-gradient(270deg, #0b0c11 8%, transparent); }
.rl__track { position: relative; z-index: 1; display: flex; gap: 12px; padding: 20px 0; will-change: transform; }
.rl__cell { --f: 0; position: relative; flex: none; width: 158px; height: 212px; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: center; gap: 4px; padding: 16px 10px 14px; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, rgba(var(--rc-rgb), 0.26), rgba(var(--rc-rgb), 0.04) 70%), #151720; box-shadow: inset 0 0 0 1px rgba(var(--rc-rgb), 0.34), inset 0 -4px 0 rgb(var(--rc-rgb)); transform: translateY(calc(var(--f) * -4px)) scale(calc(1 + var(--f) * 0.09)); filter: brightness(calc(0.86 + var(--f) * 0.34)); }
.rl__cell::before { content: ''; position: absolute; inset: 0 0 40% 0; background: radial-gradient(70% 70% at 50% 40%, rgba(var(--rc-rgb), calc(0.18 + var(--f) * 0.4)), transparent 72%); pointer-events: none; }
.rl__cell img { position: relative; width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55)); }
.rl__cell b { position: relative; font: 500 12.5px/1.25 var(--font); text-align: center; color: var(--ink); max-width: 134px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; }
.rl__cell em { position: relative; font: 600 10.5px/1 var(--font); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--rc-rgb)); }
.rl__cell.is-win { z-index: 2; filter: brightness(1.3); box-shadow: inset 0 0 0 2px rgb(var(--rc-rgb)), inset 0 -4px 0 rgb(var(--rc-rgb)), 0 0 46px rgba(var(--rc-rgb), 0.75); transform: translateY(-6px) scale(1.12); transition: transform 0.5s var(--ease), box-shadow 0.5s; }
.rl.is-done .rl__cell:not(.is-win) { opacity: 0.32; transition: opacity 0.6s; }
.rl__line { position: absolute; left: 50%; top: 0; bottom: 0; z-index: 4; width: 4px; margin-left: -2px; background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.5)); box-shadow: 0 0 22px 2px rgba(255, 255, 255, 0.75); border-radius: 2px; }
.rl__line::before, .rl__line::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 11px solid transparent; }
.rl__line::before { top: 0; border-top-color: #fff; border-bottom: 0; }
.rl__line::after { bottom: 0; border-bottom-color: #fff; border-top: 0; }
.rl__line.is-tick { animation: rl-tick 0.14s ease-out; }
@keyframes rl-tick { 30% { box-shadow: 0 0 36px 8px rgba(255, 255, 255, 0.95); width: 6px; margin-left: -3px; } }
.rl.is-done .rl__line { background: linear-gradient(180deg, rgb(var(--rc-rgb)), rgba(var(--rc-rgb), 0.4)); box-shadow: 0 0 28px 4px rgba(var(--rc-rgb), 0.9); transition: background 0.3s, box-shadow 0.3s; }
.rl__spark { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }

/* скарбниця */
.vt { position: relative; width: min(100%, 520px); height: 400px; display: grid; place-items: center; }
.vt__beams { position: absolute; left: 50%; top: 52%; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%; opacity: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg, rgba(var(--rc-rgb), 0.5) 0deg 7deg, transparent 7deg 22deg); -webkit-mask: radial-gradient(circle, #000 5%, transparent 68%); mask: radial-gradient(circle, #000 5%, transparent 68%); }
.vt.is-open .vt__beams { animation: vt-beams 6s linear infinite, vt-fade 0.6s 0.1s forwards; }
@keyframes vt-beams { to { transform: rotate(360deg); } }
@keyframes vt-fade { to { opacity: 1; } }
.vt__chest { position: relative; z-index: 2; width: 300px; transition: transform 0.6s var(--ease), opacity 0.5s 0.2s; }
.vt__chest svg { width: 100%; height: auto; overflow: visible; }
.vt.is-shake .vt__chest { animation: vt-shake 0.9s ease-in-out; }
@keyframes vt-shake { 10% { transform: translateX(-6px) rotate(-2deg); } 25% { transform: translateX(7px) rotate(2deg); } 40% { transform: translateX(-8px) rotate(-3deg); } 55% { transform: translateX(8px) rotate(3deg); } 70% { transform: translateX(-5px) rotate(-1.5deg); } 85% { transform: translateX(4px) rotate(1deg); } }
.vt__lid { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.7s cubic-bezier(0.3, 1.5, 0.5, 1); }
.vt.is-open .vt__lid { transform: perspective(500px) rotateX(-115deg) translateY(6px); }
.vt__glow { opacity: 0; transition: opacity 0.4s; }
.vt.is-open .vt__glow { opacity: 1; }
.vt.is-reveal .vt__chest { transform: translateY(70px) scale(0.78); opacity: 0.55; }
.vt__flash { position: absolute; inset: -40px; z-index: 4; border-radius: 50%; background: radial-gradient(circle, rgba(var(--rc-rgb), 0.95), transparent 65%); opacity: 0; pointer-events: none; }
.vt.is-open .vt__flash { animation: vt-flash 0.7s ease-out; }
@keyframes vt-flash { 0% { opacity: 0; transform: scale(0.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
.vt__prize { position: absolute; z-index: 5; left: 50%; top: 10%; width: 220px; display: grid; justify-items: center; gap: 8px; padding: 18px 14px 14px; border-radius: 18px; text-align: center; transform: translate(-50%, 130px) scale(0.4); opacity: 0; background: linear-gradient(180deg, rgba(var(--rc-rgb), 0.28), transparent 70%), #101118; box-shadow: inset 0 0 0 1px rgba(var(--rc-rgb), 0.7), 0 0 60px rgba(var(--rc-rgb), 0.55); }
.vt.is-reveal .vt__prize { animation: vt-rise 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
@keyframes vt-rise { to { transform: translate(-50%, -4%) scale(1); opacity: 1; } }
.vt__prize img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6)); animation: sh-float 3s ease-in-out infinite; }
.vt__prize b { font: 600 16px/1.25 var(--font-display); color: var(--ink); }
.vt__prize span { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--rc-rgb)); }
.vt__spark { position: absolute; inset: 0; z-index: 6; pointer-events: none; width: 100%; height: 100%; }

/* результат */
.sh-result { width: 100%; display: grid; gap: 18px; justify-items: center; text-align: center; animation: sh-pop 0.4s var(--ease); }
.sh-result h3 { font: 600 clamp(22px, 3vw, 30px)/1.15 var(--font-display); color: var(--ink); margin: 0; }
.sh-result__grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 150px)); justify-content: center; gap: 10px; }
.sh-result__grid .sh-prize { opacity: 0; transform: translateY(14px) scale(0.94); animation: sh-card 0.5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes sh-card { to { opacity: 1; transform: none; } }
.sh-result__top { display: grid; justify-items: center; gap: 10px; }
.sh-result__top .sh-prize { width: 200px; transform: none; opacity: 1; animation: none; box-shadow: inset 0 0 0 1px rgba(var(--rc-rgb), 0.7), 0 0 50px rgba(var(--rc-rgb), 0.45); }
.sh-shake { animation: sh-quake 0.6s ease-in-out; }
@keyframes sh-quake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(6px, -3px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(3px, 2px); } }

/* ---------- режими, попередження, вибір видачі ---------- */
.sh-servers { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.sh-servers button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; font: inherit; font-size: 14.5px; font-weight: 500; color: var(--body); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.sh-servers button:hover:not(:disabled):not([aria-pressed='true']) { background: var(--surface-4); color: var(--ink); }
.sh-servers button[aria-pressed='true'] { background: var(--am-700); color: #fff; box-shadow: inset 0 0 0 1px var(--am-500); }
.sh-servers button:disabled { cursor: default; color: var(--ash); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.sh-servers small { font-size: 11.5px; color: var(--ash); }
.sh-servers + .sh-tabs { margin-top: 14px; }
.sh-badge { margin-left: 8px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--am-500); color: #fff; font: 600 12px/1.5 var(--font); font-feature-settings: var(--feat), 'tnum'; }
.sh-warn { padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 184, 107, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 184, 107, 0.35); color: #ffd2a1; font-size: 13.5px; text-wrap: pretty; }
.sh-warn[hidden] { display: none; }
.sh-notice { margin-bottom: 16px; }
.sh-deliver { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.sh-deliver legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--mute); }
.sh-opt { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow 0.15s, background-color 0.15s; }
.sh-opt:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--am-400); }
.sh-opt.is-off { opacity: 0.5; cursor: not-allowed; }
.sh-opt input { margin: 3px 0 0; accent-color: var(--am-400); }
.sh-opt b { display: block; font-weight: 500; font-size: 14.5px; color: var(--ink); }
.sh-opt small { display: block; font-size: 12.5px; color: var(--mute); }
.sh-deliver + .sh-warn { margin-bottom: 12px; }
.sh-choose { display: grid; gap: 12px; justify-items: center; width: 100%; max-width: 640px; }
.sh-choose__q { font: 600 17px/1.2 var(--font-display); color: var(--ink); }
.sh-choose__row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sh-choose .sh-warn { text-align: left; }
.sh-choose .cart__note.is-ok { color: var(--ok); }
.btn--quiet { background: none; color: var(--mute); box-shadow: none; }
.btn--quiet:hover { color: #ff9aa5; background: rgba(255, 120, 135, 0.08); }

/* ---------- інвентар ---------- */
.sh-inv__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 12px 0 14px; }
.sh-inv__bar:empty { display: none; }
.sh-inv__sum b { display: block; font: 600 17px/1.2 var(--font-display); color: var(--ink); }
.sh-inv__sum small { font-size: 13px; color: var(--mute); }
.sh-warn[data-visit] { margin-bottom: 4px; }
.sh-inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.sh-lot { --rc-rgb: 154, 163, 178; display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px 12px 12px; border-radius: var(--r-md); background: linear-gradient(90deg, rgba(var(--rc-rgb), 0.1), transparent 45%), var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sh-lot[data-rarity] { box-shadow: inset 0 0 0 1px rgba(var(--rc-rgb), 0.35); }
.sh-lot__ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 12px; background: var(--surface-4); box-shadow: inset 0 0 0 1px var(--line); }
.sh-lot__ico img { width: 52px; height: 52px; object-fit: contain; }
.sh-lot__body { display: grid; gap: 4px; min-width: 0; }
.sh-lot__body b { font-weight: 500; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sh-lot__body small { font-size: 12.5px; color: var(--ash); }
.sh-lot__act { display: grid; gap: 6px; justify-items: stretch; }
.sh-lot__act .btn { height: 38px; padding: 0 14px; font-size: 14px; justify-content: center; }
.sh-lot__st { font-size: 12.5px; white-space: nowrap; }
.sh-lot__st.is-ok { color: var(--ok); }
.sh-lot__st.is-wait { color: #ffb86b; }
.sh-empty--inv { display: grid; gap: 6px; justify-items: center; }
.sh-empty--inv b { color: var(--ink); font: 600 18px var(--font-display); }
.sh-empty--inv p { max-width: 52ch; font-size: 14px; }
.sh-hist { margin-top: 22px; }
.sh-hist summary { cursor: pointer; font-size: 14px; color: var(--mute); padding: 6px 0; }
.sh-hist__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 8px; margin-top: 10px; }
.sh-hist .sh-lot { grid-template-columns: 52px 1fr auto; padding: 8px 12px 8px 8px; opacity: 0.85; }
.sh-hist .sh-lot__ico { width: 52px; height: 52px; }
.sh-hist .sh-lot__ico img { width: 40px; height: 40px; }

/* ---------- кабінет: рух коштів ---------- */
.sh-balance { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 14px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.sh-balance b { font: 600 24px/1 var(--font-display); color: var(--ink); font-feature-settings: var(--feat), 'tnum'; }
.sh-balance small { display: block; font-size: 12.5px; color: var(--mute); margin-bottom: 4px; }
.order__won { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.order__won img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
.order__won span[data-rarity] { display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px 2px 4px; border-radius: 999px; background: rgba(var(--rc-rgb), 0.14); color: rgb(var(--rc-rgb)); font-size: 12.5px; }

/* ---------- адаптив ---------- */
@media (max-width: 760px) {
  .sh-sort { flex: 1 1 100%; }
  .sh-head__row { align-items: stretch; }
  .sh-wallet { width: 100%; }
  .sh-tabs { display: flex; width: 100%; }
  .sh-tabs button { flex: 1; padding: 0 12px; }
  .sh-list__grid { grid-template-columns: 1fr; }
  .sh-stage__view { grid-template-columns: 1fr; gap: 18px; }
  .sh-stage__art { min-height: 170px; }
  .sh-stage__art svg { width: min(70%, 240px); }
  .sh-open { width: 100%; }
  dialog.sh-stage { border-radius: 0; width: 100vw; height: 100dvh; }
  .sh-play { min-height: 320px; }
  .rl { height: 212px; }
  .rl__cell { width: 124px; height: 174px; padding: 12px 8px 12px; }
  .rl__cell img { width: 64px; height: 64px; }
  .rl__cell b { max-width: 106px; }
  .sh-lot { grid-template-columns: 52px 1fr; }
  .sh-lot__ico { width: 52px; height: 52px; }
  .sh-lot__ico img { width: 42px; height: 42px; }
  .sh-lot__act, .sh-lot__st { grid-column: 1 / -1; grid-auto-flow: column; }
  .sh-servers button { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
  .vt { height: 340px; }
  .vt__chest { width: 240px; }
  .vt__prize { width: 190px; }
  .vt__beams { width: 560px; height: 560px; margin: -280px 0 0 -280px; }
  .sh-skip { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-stage__art svg, .vt__prize img { animation: none; }
  .sh-case, .sh-case__art svg { transition: none; }
}

/* ==========================================================================
   Експеримент «Raycast × StateMine»: магазин у світловій сцені.
   Перемикач-пігулка, спокійні картки предметів, привілеї як тарифи:
   з’єднані картки, найвищий ранг піднятий і підсвічений.
   ========================================================================== */
.sh-head { text-align: center; padding-bottom: 8px; }
.sh-head__row { flex-direction: column; align-items: center; gap: 28px; }
.sh-head__row > div { display: flex; flex-direction: column; align-items: center; }
.sh-wallet {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px;
  min-width: 0; padding: 8px 8px 8px 18px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.sh-wallet[hidden] { display: none; }
.sh-wallet__top { gap: 10px; }
.sh-wallet__label { font: 500 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.sh-wallet__sum { font: 600 22px/1 var(--font); letter-spacing: 0; }
.sh-servers { justify-content: center; margin-top: 32px; gap: 6px; }
.sh-servers button {
  height: 34px; padding: 0 14px; font-size: 13.5px; color: var(--body);
  background: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.sh-servers button:hover:not(:disabled):not([aria-pressed='true']) { background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.sh-servers button[aria-pressed='true'] { background: rgba(255, 255, 255, 0.1); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.sh-servers button:disabled { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.sh-servers small { font: 500 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.sh-tabs {
  margin-top: 16px; padding: 4px; gap: 2px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.sh-servers + .sh-tabs { margin-top: 16px; }
.sh-tabs button { height: 36px; padding: 0 18px; border-radius: 999px; font-size: 14px; color: var(--body); }
.sh-tabs button[aria-selected='true'] { background: var(--key-face); color: #2f3031; box-shadow: 0 0 14px rgba(255, 255, 255, 0.16), inset 0 1px 0.4px #fff, inset 0 -1px 0.4px rgba(0, 0, 0, 0.2); }
.sh-tabs button[aria-selected='true'] .sh-badge { background: #2f3031; color: #fff; }
.sh-badge { background: var(--am-500); font: 500 11px/1.6 var(--mono); }
.sh-guest {
  max-width: 760px; margin: 0 auto 28px; padding: 12px 16px; border-radius: 12px; text-align: center;
  background: rgba(var(--light-rgb), 0.08); box-shadow: inset 0 0 0 1px rgba(var(--light-rgb), 0.2);
  color: var(--body); font-size: 14px;
}
.sh-guest a { color: var(--ink); }
.sh-fine { margin: 32px auto 0; text-align: center; font: 400 12px/1.7 var(--mono); color: var(--mute); max-width: 84ch; }
.sh-count { font: 400 12px/1.6 var(--mono); color: var(--mute); }

/* пошук, сортування й розділи */
.sh-search input, .sh-sort select { height: 44px; border-radius: 8px; font-size: 14px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.sh-search input:focus, .sh-sort select:focus { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 0 3px rgba(var(--light-rgb), 0.2); }
.sh-groups button { height: 32px; padding: 0 12px; font-size: 13px; color: var(--body); background: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.sh-groups button:hover { background: rgba(255, 255, 255, 0.04); }
.sh-groups button[aria-pressed='true'] { background: rgba(255, 255, 255, 0.1); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.sh-groups small { font: 400 11px/1 var(--mono); color: var(--ash); }
.sh-groups button[aria-pressed='true'] small { color: var(--body); }
.sh-sec__title { font: 500 20px/1.3 var(--font); letter-spacing: -0.005em; margin-top: 8px; }
.sh-sec__type { font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.14em; color: var(--ash); }

/* предмет — картка-рядок; іконка на «клавіші» */
.sh-row {
  border-radius: 10px; background: var(--shell);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.sh-row:hover { background: linear-gradient(45deg, #101113, #0a0b0d); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.sh-ico { border-radius: 9px; background: linear-gradient(#1b1c1f, #111214); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.7); }
.sh-name b { font-size: 14.5px; }
.sh-name small { font-size: 12px; color: var(--mute); }
.sh-price { font: 600 15px/1.1 var(--font); }
.sh-price s { font: 400 11px var(--mono); }
.sh-price em { font: 500 11px var(--mono); }

/* привілеї — тарифи */
.sh-ranks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; margin: 32px 0 16px; }
.sh-rank {
  gap: 16px; padding: 32px 24px 26px; border-radius: 0;
  background: linear-gradient(180deg, #0e0f11, #0a0b0d);
  box-shadow: 0 0 0 1px var(--rule);
}
.sh-rank:first-child { border-radius: 16px 0 0 16px; }
.sh-rank:last-child { border-radius: 0 16px 16px 0; }
.sh-rank::before, .sh-rank::after { display: none; }
.sh-rank h3 { display: flex; align-items: center; gap: 10px; font: 500 16px/1.2 var(--font); color: var(--ink); letter-spacing: 0; }
.sh-rank h3::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--rk); box-shadow: 0 0 12px var(--rk); }
.sh-rank__price { font: 600 44px/1 var(--font); letter-spacing: 0.005em; font-feature-settings: 'liga' 0, 'ss02', 'ss08', 'tnum'; }
.sh-rank__price small { font: 400 13px var(--font); color: var(--mute); letter-spacing: 0; }
.sh-rank ul { font-size: 13.5px; gap: 9px; }
.sh-kit { border-radius: 10px; background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.sh-kit h4 { font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash); }
.sh-kit--d summary small { font: 400 11px var(--mono); }
.sh-chip { border-radius: 7px; background: linear-gradient(#1b1c1f, #111214); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 0 1px rgba(0, 0, 0, 0.7); }
.sh-rank__more { font: 400 11.5px/1.5 var(--mono); }
.sh-rank__state { font: 500 12px/1.5 var(--mono); }
.sh-rank:not(.sh-rank--best) .sh-rank__buy {
  color: var(--ink);
  background: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.sh-rank:not(.sh-rank--best) .sh-rank__buy:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.2); }
.sh-rank--best {
  z-index: 1; margin: -16px 0; padding-top: 48px; padding-bottom: 42px; border-radius: 16px !important;
  background: linear-gradient(137deg, #222326 4.87%, #151619 75.88%);
  box-shadow: 0 0 0 1px #2f3031, inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 80px -24px rgba(var(--light-rgb), 0.45);
}
.sh-rank--best::after {
  display: block; content: 'Найбільше можливостей'; position: absolute; top: 18px; right: 18px; left: auto; height: auto;
  padding: 4px 8px; border-radius: 999px; background: rgba(var(--light-rgb), 0.14); box-shadow: inset 0 0 0 1px rgba(var(--light-rgb), 0.3);
  font: 500 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal);
}
.sh-mine { border-radius: 14px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 1px rgba(255, 255, 255, 0.1); }
.sh-mine h3 { font: 500 18px/1.3 var(--font); }
.sh-mykit { border-radius: 10px; background: rgba(255, 255, 255, 0.025); }

/* інвентар і порожні стани */
.sh-lot { border-radius: 12px; }
.sh-soon { margin: 0 auto; text-align: center; border-radius: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), inset 0 1px 1px rgba(255, 255, 255, 0.1); }
.sh-soon h2 { font: 500 20px/1.3 var(--font); }
.sh-soon .row { justify-content: center; }
.sh-warn { border-radius: 10px; }

@media (max-width: 1080px) {
  .sh-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sh-rank, .sh-rank:first-child, .sh-rank:last-child { border-radius: 16px; }
  .sh-rank--best { margin: 0; padding-top: 40px; }
}
@media (max-width: 640px) {
  .sh-ranks { grid-template-columns: 1fr; }
  .sh-head { text-align: left; }
  .sh-head__row, .sh-head__row > div { align-items: stretch; }
  .sh-servers { justify-content: flex-start; }
  .sh-tabs { border-radius: 14px; }
  .sh-wallet { justify-content: space-between; }
}
.sh-kit--d summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 3px; }
.sh-kit--d summary b { grid-column: 1; }
.sh-kit--d summary small { grid-column: 1; grid-row: 2; margin-left: 0; }
.sh-kit--d summary::after { grid-column: 2; grid-row: 1 / span 2; }
