/* =====================================================================
   MANHWCARD · SHOP ELITE EDITION
   Подключать ПОСЛЕДНИМ (после upgrade.css). Всё скоупится в #tab-shop,
   поэтому остальные экраны не затрагиваются.
   Снимки космоса: NASA, ESA, CSA, STScI (James Webb Space Telescope).
   ===================================================================== */

#tab-shop.es-shop {
    --es-gold: #f3d38b;
    --es-gold-2: #d9a650;
    --es-gold-rgb: 243, 211, 139;
    --es-violet: #8b5cf6;
    --es-violet-rgb: 139, 92, 246;
    --es-cyan: #67e8f9;
    --es-line: rgba(255, 255, 255, 0.08);
    --es-display: 'Unbounded', 'Inter', sans-serif;
    --es-img-cliffs: url('https://cdn.esawebb.org/archives/images/screen/weic2205a.jpg');
    --es-img-pillars: url('https://cdn.esawebb.org/archives/images/screen/weic2216a.jpg');
    --es-spring: cubic-bezier(0.34, 1.45, 0.5, 1);

    position: relative;
    isolation: isolate;
    padding-top: 12px;
}

#tab-shop.es-shop * { -webkit-tap-highlight-color: transparent; }
#tab-shop.es-shop button { font-family: inherit; }

/* =====================  НЕБО  ===================== */
.es-sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(120% 60% at 50% -10%, #1b1233 0%, transparent 60%),
        radial-gradient(90% 50% at 100% 100%, #0b1a2e 0%, transparent 60%),
        #05050a;
}
.es-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.es-sky-neb {
    position: absolute;
    width: 90vw; height: 90vw;
    max-width: 640px; max-height: 640px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
}
.es-sky-neb.n1 {
    top: -20vw; left: -30vw;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 65%);
    animation: esDrift 28s ease-in-out infinite alternate;
}
.es-sky-neb.n2 {
    bottom: -10vw; right: -35vw;
    background: radial-gradient(circle, rgba(217, 166, 80, 0.32), transparent 65%);
    animation: esDrift 34s ease-in-out infinite alternate-reverse;
}
@keyframes esDrift { to { transform: translate3d(12vw, 10vh, 0) scale(1.15); } }
@keyframes esKen {
    from { transform: scale(1.02) translate3d(0, 0, 0); }
    to   { transform: scale(1.14) translate3d(-3%, -2%, 0); }
}

/* Общие подписи */
#tab-shop .es-eyebrow {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--es-gold);
    text-shadow: 0 0 14px rgba(var(--es-gold-rgb), 0.5);
}
#tab-shop .es-lbl {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 3px;
}

/* =====================  ШАПКА  ===================== */
.es-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    margin-bottom: 14px;
    background: #0a0912;
    border: 1px solid rgba(var(--es-gold-rgb), 0.22);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.es-hero-img {
    position: absolute;
    inset: -8%;
    background:
        var(--es-img-cliffs) center 72% / cover no-repeat,
        radial-gradient(80% 55% at 30% 85%, #7a3412, transparent 70%),
        radial-gradient(70% 60% at 80% 20%, #1e3a8a, transparent 70%),
        #0a0912;
    animation: esKen 40s ease-in-out infinite alternate;
}
.es-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 5, 10, 0.2) 0%, rgba(5, 5, 10, 0.35) 40%, rgba(5, 5, 10, 0.92) 100%),
        radial-gradient(90% 70% at 0% 0%, rgba(var(--es-violet-rgb), 0.35), transparent 60%);
}
/* Золотая кромка сверху */
.es-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--es-gold-rgb), 0.9), transparent);
    z-index: 3;
}
.es-hero-inner {
    position: relative;
    z-index: 2;
    min-height: 262px;
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px;
}
.es-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.es-brand { display: flex; align-items: center; gap: 12px; }
.es-brand-mark {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    display: grid; place-items: center;
    color: var(--es-gold);
    background:
        linear-gradient(#120f1c, #120f1c) padding-box,
        linear-gradient(135deg, #fff1c2, #b07a26 50%, #f3d38b) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 0 22px rgba(var(--es-gold-rgb), 0.35), inset 0 0 14px rgba(var(--es-gold-rgb), 0.15);
}
.es-brand-mark svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(var(--es-gold-rgb), 0.8)); }
.es-title {
    margin-top: 3px;
    font-family: var(--es-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
    background: linear-gradient(180deg, #ffffff 25%, #f3d38b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.6));
}
.es-hero-help {
    width: 42px; height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid; place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(10, 10, 18, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.es-hero-help:active { transform: scale(0.9); }
.es-hero-help svg { width: 19px; height: 19px; }
.es-hero-sub {
    max-width: 260px;
    margin: 14px 0 auto;
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

/* ---------- Кошелёк ---------- */
.es-wallet {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 20px;
}
.es-coin {
    --cc: #c4b5fd;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    padding: 9px 9px 8px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(8, 8, 14, 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    text-align: left;
    overflow: hidden;
}
.es-coin::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cc), transparent);
    opacity: 0.8;
}
.es-coin.c-krw { --cc: #c4b5fd; }
.es-coin.c-dia { --cc: #22d3ee; }
.es-coin.c-bc  { --cc: #fbbf24; }
.es-coin.c-tix { --cc: #fb7185; cursor: pointer; border-color: rgba(251, 113, 133, 0.35); }
.es-coin.c-tix:active { transform: scale(0.95); }
.es-coin-ico {
    height: 16px;
    display: flex; align-items: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    color: var(--cc);
    text-shadow: 0 0 10px var(--cc);
}
.es-coin-ico svg { width: 15px; height: 15px; filter: drop-shadow(0 0 5px var(--cc)); }
.es-coin-val {
    max-width: 100%;
    margin-top: 3px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.es-coin-val.es-flash { animation: esFlash 0.6s var(--es-spring); }
@keyframes esFlash { 40% { transform: scale(1.18); color: var(--cc); } }
.es-coin-lbl {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}
.es-coin-plus {
    position: absolute;
    top: 6px; right: 6px;
    width: 17px; height: 17px;
    border-radius: 6px;
    display: grid; place-items: center;
    font-style: normal;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #fb7185, #a855f7);
    box-shadow: 0 0 10px rgba(251, 113, 133, 0.6);
}

/* =====================  ПРОМО: БЕСПЛАТНЫЙ СПИН  ===================== */
.es-promo {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(var(--es-gold-rgb), 0.5);
    background:
        linear-gradient(100deg, rgba(var(--es-gold-rgb), 0.2), rgba(var(--es-violet-rgb), 0.14)),
        rgba(10, 9, 16, 0.85);
    color: #fff;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 26px -6px rgba(var(--es-gold-rgb), 0.55);
    animation: esPromoIn 0.6s var(--es-spring);
}
.es-promo[hidden] { display: none; }
.es-promo::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    animation: esSheen 3.6s ease-in-out infinite;
}
.es-promo:active { transform: scale(0.98); }
@keyframes esPromoIn { from { opacity: 0; transform: translateY(-10px) scale(0.96); } }
.es-promo-ico {
    width: 40px; height: 40px;
    flex-shrink: 0;
    border-radius: 13px;
    display: grid; place-items: center;
    font-size: 21px;
    background: linear-gradient(135deg, #f3c969, #b7791f);
    box-shadow: 0 6px 18px rgba(var(--es-gold-rgb), 0.45);
    animation: esGift 1.8s ease-in-out infinite;
}
@keyframes esGift {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(-10deg) scale(1.06); }
    20% { transform: rotate(8deg) scale(1.06); }
    30% { transform: rotate(0); }
}
.es-promo-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.es-promo-txt b { font-size: 14px; font-weight: 900; }
.es-promo-txt small { font-size: 11.5px; color: rgba(255, 255, 255, 0.65); }
.es-promo-go { font-size: 26px; font-weight: 300; color: var(--es-gold); }

/* =====================  ТАБЫ  ===================== */
#tab-shop .es-tabs {
    position: -webkit-sticky;
    position: sticky;
    top: 8px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 5px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: rgba(9, 9, 16, 0.78);
    border: 1px solid var(--es-line);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.es-tabs-glider {
    position: absolute;
    top: 5px; bottom: 5px; left: 5px;
    width: calc((100% - 10px) / 3);
    border-radius: 15px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed 55%, #4c1d95);
    box-shadow: 0 8px 22px rgba(var(--es-violet-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateX(calc(var(--i, 0) * 100%));
    transition: transform 0.55s var(--es-spring), background 0.4s ease, box-shadow 0.4s ease;
}
.es-tabs[data-tab="wheel"] .es-tabs-glider {
    background: linear-gradient(135deg, #fff1c2, #f3c969 40%, #b7791f);
    box-shadow: 0 8px 22px rgba(var(--es-gold-rgb), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.es-tabs[data-tab="frames"] .es-tabs-glider {
    background: linear-gradient(135deg, #67e8f9, #0891b2 50%, #5b21b6);
    box-shadow: 0 8px 22px rgba(6, 182, 212, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
#tab-shop .es-tabs .gacha-tab {
    position: relative;
    z-index: 1;
    flex-direction: row;
    gap: 7px;
    padding: 12px 4px;
    font-size: 12.5px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
    transition: color 0.35s ease, transform 0.15s ease;
}
#tab-shop .es-tabs .gacha-tab svg { width: 16px; height: 16px; }
#tab-shop .es-tabs .gacha-tab.active { color: #fff; }
#tab-shop .es-tabs .gacha-tab.active::after { display: none; }
#tab-shop .es-tabs[data-tab="wheel"] #tabShopWheelBtn { color: #1f1405; }
#tab-shop .es-tabs .gacha-tab .free-dot { top: 5px; left: auto; right: 10px; }

/* Появление вкладки */
#tab-shop .es-pane { animation: esPaneIn 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes esPaneIn { from { opacity: 0; transform: translateY(14px); } }

/* =====================  ГАЧА-ПОРТАЛ  ===================== */
.es-portal {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 28px;
    background: #0a0814;
    border: 1px solid rgba(var(--es-violet-rgb), 0.4);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 60px -22px rgba(var(--es-violet-rgb), 0.9);
}
.es-portal-img {
    position: absolute;
    inset: -8%;
    background:
        var(--es-img-pillars) 62% 28% / cover no-repeat,
        radial-gradient(55% 50% at 75% 35%, #7c2d12, transparent 70%),
        radial-gradient(60% 60% at 20% 80%, #312e81, transparent 70%),
        #0a0814;
    animation: esKen 36s ease-in-out infinite alternate;
}
.es-portal-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 5, 12, 0.94) 0%, rgba(6, 5, 12, 0.72) 42%, rgba(6, 5, 12, 0.1) 100%),
        linear-gradient(0deg, rgba(6, 5, 12, 0.96) 0%, rgba(6, 5, 12, 0.4) 38%, transparent 60%),
        radial-gradient(50% 40% at 78% 30%, rgba(var(--es-violet-rgb), 0.35), transparent 70%);
}
.es-portal::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 3;
    background:
        linear-gradient(var(--es-gold), var(--es-gold)) left top / 16px 1px no-repeat,
        linear-gradient(var(--es-gold), var(--es-gold)) left top / 1px 16px no-repeat,
        linear-gradient(var(--es-gold), var(--es-gold)) right top / 16px 1px no-repeat,
        linear-gradient(var(--es-gold), var(--es-gold)) right top / 1px 16px no-repeat;
    opacity: 0.55;
}

/* Орбиты и ядро портала */
.es-orbit {
    position: absolute;
    top: 18px; right: -18px;
    width: 196px; height: 196px;
    z-index: 2;
    perspective: 600px;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.4s ease-out;
    pointer-events: none;
}
.es-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(var(--es-gold-rgb), 0.45);
    box-shadow: 0 0 14px rgba(var(--es-gold-rgb), 0.15), inset 0 0 14px rgba(var(--es-violet-rgb), 0.2);
}
.es-ring::before {
    content: '';
    position: absolute;
    top: -3px; left: 50%;
    width: 6px; height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--es-gold);
}
.es-ring.r1 { animation: esOrbit1 9s linear infinite; }
.es-ring.r2 { inset: 22px; border-color: rgba(167, 139, 250, 0.5); border-style: dashed; animation: esOrbit2 13s linear infinite; }
.es-ring.r2::before { background: #c4b5fd; box-shadow: 0 0 10px #a78bfa; }
.es-ring.r3 { inset: 46px; border-color: rgba(103, 232, 249, 0.4); animation: esOrbit3 7s linear infinite reverse; }
.es-ring.r3::before { background: #67e8f9; box-shadow: 0 0 10px #22d3ee; }
@keyframes esOrbit1 { from { transform: rotateX(70deg) rotateZ(0); } to { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes esOrbit2 { from { transform: rotateX(62deg) rotateY(24deg) rotateZ(0); } to { transform: rotateX(62deg) rotateY(24deg) rotateZ(360deg); } }
@keyframes esOrbit3 { from { transform: rotateX(74deg) rotateY(-30deg) rotateZ(0); } to { transform: rotateX(74deg) rotateY(-30deg) rotateZ(360deg); } }
.es-core {
    position: absolute;
    top: 50%; left: 50%;
    width: 58px; height: 58px;
    margin: -29px 0 0 -29px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #e9d5ff 18%, #8b5cf6 45%, rgba(76, 29, 149, 0.4) 70%, transparent 72%);
    box-shadow: 0 0 40px 10px rgba(var(--es-violet-rgb), 0.6), 0 0 90px 20px rgba(var(--es-violet-rgb), 0.3);
    animation: esCore 3.2s ease-in-out infinite;
}
.es-core::after {
    content: '';
    position: absolute;
    inset: -26px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(var(--es-gold-rgb), 0.35), transparent 30%, rgba(167, 139, 250, 0.4), transparent 60%, rgba(103, 232, 249, 0.3), transparent 85%);
    -webkit-mask: radial-gradient(circle, transparent 38%, #000 40%, #000 62%, transparent 70%);
    mask: radial-gradient(circle, transparent 38%, #000 40%, #000 62%, transparent 70%);
    animation: esSpin 6s linear infinite;
}
@keyframes esCore { 50% { transform: scale(1.12); filter: brightness(1.2); } }
@keyframes esSpin { to { transform: rotate(360deg); } }

/* Карты, летающие вокруг портала */
.es-fcard {
    position: absolute;
    width: 34px; height: 47px;
    border-radius: 6px;
    background:
        radial-gradient(circle at 50% 50%, rgba(var(--es-gold-rgb), 0.9) 0 2px, transparent 3px),
        repeating-linear-gradient(45deg, rgba(var(--es-gold-rgb), 0.12) 0 2px, transparent 2px 6px),
        linear-gradient(160deg, #2e1065, #0f0a1f);
    border: 1px solid rgba(var(--es-gold-rgb), 0.75);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(var(--es-gold-rgb), 0.3);
}
.es-fcard::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 4px;
    border: 1px solid rgba(var(--es-gold-rgb), 0.3);
}
.es-fcard.f1 { top: 18px; left: 40px; --r: -16deg; animation: esFloat 5s ease-in-out infinite; }
.es-fcard.f2 { top: 104px; left: 12px; --r: 12deg; animation: esFloat 6s ease-in-out -2s infinite; transform-origin: center; scale: 0.82; }
.es-fcard.f3 { top: 62px; right: 34px; --r: 20deg; animation: esFloat 5.5s ease-in-out -1s infinite; scale: 0.9; }
@keyframes esFloat {
    0%, 100% { transform: translateY(0) rotate(var(--r)); }
    50%      { transform: translateY(-9px) rotate(calc(var(--r) * -0.4)); }
}

.es-portal-inner {
    position: relative;
    z-index: 4;
    max-width: 62%;
    padding: 20px 0 0 18px;
}
.es-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 5px 10px 5px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.4);
}
.es-live i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: esLive 1.6s ease-out infinite;
}
@keyframes esLive { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.es-portal-kicker {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #a5f3fc;
    text-shadow: 0 0 14px rgba(34, 211, 238, 0.7);
    margin-bottom: 6px;
}
.es-portal-title {
    font-family: var(--es-display);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.02;
    color: #fff;
    text-shadow: 0 0 30px rgba(var(--es-violet-rgb), 0.8), 0 2px 0 rgba(0, 0, 0, 0.4);
}
.es-portal-title span {
    background: linear-gradient(90deg, #f3d38b, #fff1c2, #c4b5fd, #f3d38b);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 14px rgba(var(--es-gold-rgb), 0.5));
    animation: esShimmer 6s linear infinite;
}
@keyframes esShimmer { to { background-position: 300% 0; } }
.es-portal-desc {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.68);
}

.es-portal-foot { position: relative; z-index: 4; padding: 16px 14px 14px; }
.es-rarity-rail {
    display: flex;
    gap: 6px;
    margin: 0 -14px 12px;
    padding: 0 14px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 24px), transparent);
}
.es-rarity-rail::-webkit-scrollbar { display: none; }
.es-rarity-rail span {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.es-ticket-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 12px;
    border-radius: 20px;
    background: rgba(6, 6, 12, 0.6);
    border: 1px solid rgba(var(--es-gold-rgb), 0.25);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.es-ticket-ico {
    width: 46px; height: 46px;
    flex-shrink: 0;
    border-radius: 15px;
    display: grid; place-items: center;
    font-size: 24px;
    background: linear-gradient(135deg, #fb7185, #a855f7);
    box-shadow: 0 8px 20px rgba(251, 113, 133, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: rotate(-8deg);
}
.es-ticket-ico span { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); }
.es-ticket-info { flex: 1; min-width: 0; }
#tab-shop .es-ticket-val {
    font-family: var(--es-display);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 18px rgba(var(--es-violet-rgb), 0.8);
    display: inline-block;
}
.es-buy-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 46px;
    padding: 0 16px;
    border: none;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 900;
    color: #1f1405;
    background: linear-gradient(135deg, #fff1c2, #f3c969 45%, #c98a25);
    box-shadow: 0 8px 22px rgba(var(--es-gold-rgb), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.es-buy-btn b { font-size: 19px; line-height: 1; }
.es-buy-btn:active { transform: scale(0.94); }

/* =====================  ПАНЕЛИ  ===================== */
.es-panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    padding: 18px 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(24, 21, 40, 0.8), rgba(10, 10, 18, 0.86));
    border: 1px solid var(--es-line);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.es-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 18%; right: 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--es-gold-rgb), 0.6), transparent);
}
.es-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.es-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}
.es-panel-title svg { width: 14px; height: 14px; color: var(--es-gold); }
.es-panel-meta {
    padding: 4px 9px;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--es-line);
    font-variant-numeric: tabular-nums;
}

/* ---------- Циферблат количества ---------- */
.es-dial-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
#tab-shop .es-step {
    width: 52px; height: 52px;
    border-radius: 17px;
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    color: #fff;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px rgba(0, 0, 0, 0.35);
}
#tab-shop .es-step:active {
    transform: scale(0.88);
    background: rgba(var(--es-violet-rgb), 0.3);
    border-color: var(--es-violet);
}
.es-dial {
    position: relative;
    width: 168px; height: 168px;
    flex-shrink: 0;
    display: grid; place-items: center;
}
.es-dial::before {
    content: '';
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, rgba(var(--es-violet-rgb), 0.28), rgba(8, 8, 14, 0.9) 70%);
    box-shadow: inset 0 2px 16px rgba(0, 0, 0, 0.8), 0 0 30px rgba(var(--es-violet-rgb), 0.25);
}
.es-dial-ticks { position: absolute; inset: 0; }
.es-dial-ticks i {
    position: absolute;
    top: 2px; left: 50%;
    width: 3px; height: 9px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.14);
    transform-origin: 50% 82px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.es-dial-ticks i.on { background: var(--es-gold); box-shadow: 0 0 8px rgba(var(--es-gold-rgb), 0.9); }
.es-dial-ring { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); transform: rotate(-90deg); }
.es-dial-ring circle { fill: none; stroke-width: 5; }
.es-dial-ring .trk { stroke: rgba(255, 255, 255, 0.07); }
.es-dial-ring .fil {
    stroke: url(#esDialGrad);
    stroke-linecap: round;
    stroke-dasharray: 314.16;
    stroke-dashoffset: 157;
    transition: stroke-dashoffset 0.6s var(--es-spring);
    filter: drop-shadow(0 0 6px rgba(var(--es-violet-rgb), 0.9));
}
.es-dial-num { position: relative; text-align: center; }
#tab-shop #gachaSliderVal {
    display: block;
    font-family: var(--es-display);
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #fff;
    text-shadow: 0 0 26px rgba(var(--es-violet-rgb), 0.9), 0 0 60px rgba(var(--es-violet-rgb), 0.4);
}
#tab-shop #gachaSliderVal.es-pop { animation: esPop 0.4s var(--es-spring); }
@keyframes esPop { 40% { transform: scale(1.18); } }
.es-dial-num small {
    display: block;
    margin-top: 5px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

/* ---------- Ползунок ---------- */
#tab-shop .es-range { padding: 10px 4px 14px; margin: 0; }
#tab-shop #gachaSlider {
    display: block;
    width: 100%;
    height: 6px;
    margin: 0;
    border-radius: 99px;
    background:
        linear-gradient(90deg, #7c3aed 0%, #c4b5fd calc(var(--fill, 50%) - 1%), #f3d38b var(--fill, 50%), rgba(255, 255, 255, 0.08) var(--fill, 50%));
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}
#tab-shop #gachaSlider::-webkit-slider-runnable-track { height: 6px; background: transparent; border-radius: 99px; }
#tab-shop #gachaSlider::-webkit-slider-thumb {
    width: 26px; height: 26px;
    margin-top: -10px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #ffffff, #fff1c2 45%, #d9a650);
    border: 2px solid #0b0912;
    box-shadow: 0 0 0 2px rgba(var(--es-gold-rgb), 0.8), 0 0 18px rgba(var(--es-gold-rgb), 0.7), 0 4px 10px rgba(0, 0, 0, 0.6);
}
#tab-shop #gachaSlider::-moz-range-thumb {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #ffffff, #fff1c2 45%, #d9a650);
    border: 2px solid #0b0912;
    box-shadow: 0 0 0 2px rgba(var(--es-gold-rgb), 0.8), 0 0 18px rgba(var(--es-gold-rgb), 0.7);
}
#tab-shop #gachaSlider::-moz-range-track { background: transparent; }
.es-range-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    padding: 0 2px;
    font-size: 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    font-variant-numeric: tabular-nums;
}

/* ---------- Быстрый выбор ---------- */
#tab-shop .es-quick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
#tab-shop .es-quick .gacha-quick-btn {
    padding: 11px 0;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-variant-numeric: tabular-nums;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
#tab-shop .es-quick .gacha-quick-btn.active {
    color: #fff;
    background: linear-gradient(160deg, #8b5cf6, #5b21b6);
    border-color: rgba(196, 181, 253, 0.7);
    box-shadow: 0 6px 18px rgba(var(--es-violet-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* =====================  СТОИМОСТЬ  ===================== */
#tab-shop .es-cost {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background:
        linear-gradient(100deg, rgba(var(--es-violet-rgb), 0.22), rgba(6, 182, 212, 0.08) 60%, rgba(var(--es-gold-rgb), 0.1)),
        rgba(10, 10, 18, 0.85);
    border: 1px solid rgba(var(--es-violet-rgb), 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.35s ease, border-color 0.35s ease;
}
.es-cost-ico {
    width: 40px; height: 40px;
    flex-shrink: 0;
    border-radius: 13px;
    display: grid; place-items: center;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.es-cost-main { flex: 1; min-width: 0; }
#tab-shop .es-cost .gacha-t-val-large { font-size: 17px; font-weight: 800; color: rgba(255, 255, 255, 0.85); text-shadow: none; }
#tab-shop .es-cost #summonCostText {
    font-family: var(--es-display);
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}
.es-cost-side { text-align: right; padding-left: 12px; border-left: 1px solid var(--es-line); }
.es-after {
    font-size: 16px;
    font-weight: 900;
    color: #6ee7b7;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
#tab-shop .es-cost.not-enough {
    background: linear-gradient(100deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05)), rgba(10, 10, 18, 0.85);
    border-color: rgba(239, 68, 68, 0.5);
}
#tab-shop .es-cost.not-enough .es-after { color: #fca5a5; font-size: 13px; }

/* =====================  КНОПКИ  ===================== */
#tab-shop .es-actions { display: flex; gap: 10px; }
#tab-shop .es-actions .gacha-btn-quick {
    flex: 0 0 34%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 900;
    color: #e9d5ff;
    background: rgba(var(--es-violet-rgb), 0.12);
    border: 1px solid rgba(var(--es-violet-rgb), 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
#tab-shop .es-actions .gacha-btn-quick::before {
    content: '⚡';
    font-size: 14px;
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.8));
}
#tab-shop .es-actions .gacha-btn-main {
    flex: 1;
    padding: 20px 0;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #1f1405;
    background: linear-gradient(135deg, #fff4cf, #f3c969 35%, #d9a650 65%, #f3d38b);
    background-size: 220% 220%;
    box-shadow:
        0 14px 34px rgba(var(--es-gold-rgb), 0.38),
        0 0 0 1px rgba(255, 241, 194, 0.5) inset,
        inset 0 -3px 0 rgba(120, 72, 10, 0.35);
    animation: shopBtnFlow 5s ease infinite;
}
#tab-shop .es-actions .gacha-btn-main::after {
    left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    animation: esSheen 3.4s ease-in-out infinite;
}
@keyframes esSheen { 0%, 55% { left: -60%; } 100% { left: 140%; } }

/* Искры при нажатии (создаются из JS) */
.es-spark {
    position: fixed;
    z-index: 12000;
    width: 6px; height: 6px;
    border-radius: 50%;
    pointer-events: none;
    background: var(--c, #f3d38b);
    box-shadow: 0 0 10px var(--c, #f3d38b);
    animation: esSparkFly 0.85s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}
@keyframes esSparkFly {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to   { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.2); opacity: 0; }
}

/* =====================  КОЛЕСО  ===================== */
#tab-shop .es-wheel.wheel-wrap {
    padding: 22px 16px 18px;
    border-radius: 28px;
    background: #0b0810;
    border: 1px solid rgba(var(--es-gold-rgb), 0.38);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), 0 0 60px -20px rgba(var(--es-gold-rgb), 0.7);
}
#tab-shop .es-wheel.wheel-wrap::before { display: none; }
.es-wheel-img {
    position: absolute;
    inset: -8%;
    background:
        var(--es-img-cliffs) center 25% / cover no-repeat,
        radial-gradient(70% 50% at 50% 20%, #7a3412, transparent 70%),
        #0b0810;
    transform: scaleY(-1);
    filter: saturate(1.1) brightness(0.8);
    opacity: 0.85;
}
.es-wheel-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 42% at 50% 46%, rgba(8, 6, 12, 0.2), rgba(8, 6, 12, 0.85) 100%),
        linear-gradient(180deg, rgba(8, 6, 12, 0.55) 0%, transparent 30%, rgba(8, 6, 12, 0.95) 80%);
}
#tab-shop .es-wheel .wheel-head { position: relative; z-index: 2; margin-bottom: 18px; }
#tab-shop .es-wheel .wheel-kicker { color: var(--es-gold); }
#tab-shop .es-wheel .wheel-title {
    font-family: var(--es-display);
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(180deg, #ffffff 20%, #f3d38b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 18px rgba(var(--es-gold-rgb), 0.45));
}
.es-wheel-sub { margin-top: 6px; font-size: 11.5px; color: rgba(255, 255, 255, 0.6); }

#tab-shop .es-wheel .wheel-stage { max-width: 312px; margin-bottom: 20px; }
.es-wheel-halo {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--es-gold-rgb), 0.32), rgba(var(--es-violet-rgb), 0.15) 45%, transparent 68%);
    animation: esCore 4s ease-in-out infinite;
    pointer-events: none;
}
.es-wheel-rays {
    position: absolute;
    inset: -22%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(var(--es-gold-rgb), 0.12) 0deg 6deg, transparent 6deg 18deg);
    -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 68%);
    mask-image: radial-gradient(circle, #000 30%, transparent 68%);
    animation: esSpin 40s linear infinite;
    pointer-events: none;
}
#tab-shop .es-wheel .wheel-svg {
    position: relative;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 22px rgba(var(--es-gold-rgb), 0.25));
}
#tab-shop .es-wheel .wheel-sector-label { font-family: 'Unbounded', 'Inter', sans-serif; font-size: 14px; font-weight: 700; }
#tab-shop .es-wheel .wheel-sector-icon { font-size: 13px; }

/* Лампочки по ободу */
.es-bulb { fill: #fff3c4; transition: fill 0.2s; }
.es-bulb.b-a { animation: esBulb 1.4s ease-in-out infinite; }
.es-bulb.b-b { animation: esBulb 1.4s ease-in-out -0.7s infinite; }
.wheel-wrap.spinning .es-bulb.b-a { animation-duration: 0.28s; }
.wheel-wrap.spinning .es-bulb.b-b { animation-duration: 0.28s; animation-delay: -0.14s; }
@keyframes esBulb {
    0%, 100% { opacity: 1; fill: #fffbe8; }
    50%      { opacity: 0.25; fill: #d9a650; }
}

#tab-shop .es-wheel .wheel-pointer {
    top: -10px;
    width: 34px; height: 44px;
    margin-left: -17px;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 10px rgba(var(--es-gold-rgb), 0.55));
}
#tab-shop .es-wheel .wheel-hub {
    width: 26%; height: 26%;
    color: var(--es-gold);
    background: radial-gradient(circle at 38% 30%, #2d2440, #0b0912 72%);
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 0 0 2px #d9a650,
        0 0 0 5px #0b0912,
        0 0 0 6px rgba(var(--es-gold-rgb), 0.5),
        0 0 30px rgba(var(--es-gold-rgb), 0.45),
        inset 0 2px 12px rgba(0, 0, 0, 0.8);
}
#tab-shop .es-wheel .wheel-hub svg {
    width: 44%; height: 44%;
    filter: drop-shadow(0 0 8px rgba(var(--es-gold-rgb), 0.9));
}
#tab-shop .es-wheel.spinning .wheel-hub svg { animation: esSpin 1.2s linear infinite; }

#tab-shop .es-wheel .wheel-bal {
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(6, 6, 12, 0.62);
    border: 1px solid rgba(var(--es-gold-rgb), 0.22);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.es-wbal-ico {
    width: 42px; height: 42px;
    flex-shrink: 0;
    border-radius: 14px;
    display: grid; place-items: center;
    font-size: 20px;
    font-weight: 900;
    color: #1f1405;
    background: linear-gradient(135deg, #fff1c2, #f3c969 45%, #b7791f);
    box-shadow: 0 6px 16px rgba(var(--es-gold-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
#tab-shop .es-wheel .gacha-t-info { flex: 1; min-width: 0; }
#tab-shop .es-wheel .wheel-bal-val { font-family: var(--es-display); font-size: 22px; font-weight: 800; }
.es-wbal-note {
    text-align: right;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.45);
}
#tab-shop .es-wheel .wheel-spin-btn {
    padding: 20px 0;
    border-radius: 20px;
    color: #1f1405;
    background: linear-gradient(135deg, #fff4cf, #f3c969 35%, #d9a650 65%, #f3d38b);
    background-size: 220% 220%;
    box-shadow:
        0 14px 34px rgba(var(--es-gold-rgb), 0.38),
        0 0 0 1px rgba(255, 241, 194, 0.5) inset,
        inset 0 -3px 0 rgba(120, 72, 10, 0.35);
}
#tab-shop .es-wheel .wheel-hint { color: rgba(255, 255, 255, 0.55); }

/* Окно выигрыша */
#tab-shop .wheel-prize-card {
    background:
        radial-gradient(80% 50% at 50% 0%, color-mix(in srgb, var(--pc, #fbbf24) 28%, transparent), transparent 70%),
        linear-gradient(180deg, #16121f 0%, #07070d 100%);
}
#tab-shop .wheel-prize-amount { font-family: var(--es-display); font-weight: 800; }

/* =====================  РАМКИ  ===================== */
.es-atelier {
    position: relative;
    overflow: hidden;
    min-height: 196px;
    margin-bottom: 18px;
    border-radius: 28px;
    background: #070b14;
    border: 1px solid rgba(103, 232, 249, 0.3);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 60px -22px rgba(34, 211, 238, 0.7);
}
.es-atelier-img {
    position: absolute;
    inset: -8%;
    background:
        var(--es-img-pillars) 30% 70% / cover no-repeat,
        radial-gradient(60% 60% at 80% 40%, #134e4a, transparent 70%),
        #070b14;
    filter: hue-rotate(170deg) saturate(1.15) brightness(0.85);
    animation: esKen 38s ease-in-out infinite alternate-reverse;
}
.es-atelier-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 8, 14, 0.95) 0%, rgba(5, 8, 14, 0.7) 50%, rgba(5, 8, 14, 0.15) 100%),
        linear-gradient(0deg, rgba(5, 8, 14, 0.8), transparent 50%);
}
.es-atelier-inner { position: relative; z-index: 2; max-width: 60%; padding: 22px 0 22px 18px; }
#tab-shop .es-atelier .es-eyebrow { color: #a5f3fc; text-shadow: 0 0 14px rgba(34, 211, 238, 0.6); }
.es-atelier-title {
    margin-top: 8px;
    font-family: var(--es-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.02;
    color: #fff;
}
.es-atelier-title span {
    background: linear-gradient(90deg, #67e8f9, #c4b5fd, #f3d38b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.es-atelier-desc { margin-top: 10px; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.66); }
.es-atelier-art {
    position: absolute;
    top: 50%; right: 18px;
    width: 112px; height: 112px;
    margin-top: -56px;
    z-index: 2;
    display: grid; place-items: center;
}
.es-art-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #67e8f9, #a78bfa, #f3d38b, #f472b6, #67e8f9);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    filter: drop-shadow(0 0 12px rgba(103, 232, 249, 0.8));
    animation: esSpin 6s linear infinite;
}
.es-art-ring.b {
    inset: -12px;
    background: conic-gradient(from 90deg, transparent, rgba(var(--es-gold-rgb), 0.9) 10%, transparent 22%, transparent 50%, rgba(167, 139, 250, 0.9) 60%, transparent 72%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    animation-duration: 10s;
    animation-direction: reverse;
}
.es-art-ava {
    width: 82px; height: 82px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.85) 0 14%, transparent 15%),
        radial-gradient(ellipse 34% 26% at 50% 86%, rgba(255, 255, 255, 0.85) 0 98%, transparent 100%),
        radial-gradient(circle at 50% 40%, #1e3a5f, #0b1220 70%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

.es-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 4px 12px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.es-section-label i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(var(--es-gold-rgb), 0.5), transparent); }

/* Витрина рамок (карточки рисует script.js) */
#tab-shop #shopFramesGrid { gap: 12px; padding: 2px 0 10px; }
#tab-shop #shopFramesGrid:has(.premium-frame-card) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#tab-shop .premium-frame-card {
    padding: 22px 10px 16px;
    border-radius: 22px;
    background:
        radial-gradient(70% 45% at 50% 30%, rgba(var(--es-violet-rgb), 0.22), transparent 70%),
        linear-gradient(180deg, rgba(26, 22, 42, 0.85), rgba(8, 8, 14, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    animation: esPaneIn 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}
#tab-shop .premium-frame-card:nth-child(2n) { animation-delay: 0.06s; }
#tab-shop .premium-frame-card:nth-child(3n) { animation-delay: 0.12s; }
#tab-shop .premium-frame-card::before {
    left: 20%; right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--es-gold), transparent);
    box-shadow: 0 -6px 24px rgba(var(--es-gold-rgb), 0.7);
}
#tab-shop .premium-frame-card::after {
    content: '';
    position: absolute;
    top: 0; left: -70%;
    width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: skewX(-20deg);
    animation: esSheen 5s ease-in-out infinite;
    pointer-events: none;
}
#tab-shop .premium-frame-card:active { border-color: rgba(var(--es-gold-rgb), 0.6); }
#tab-shop .pf-name { font-size: 14px; font-weight: 900; }
#tab-shop .pf-price-tag {
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(var(--es-gold-rgb), 0.35);
    color: #fff1c2;
    font-variant-numeric: tabular-nums;
}
#tab-shop .pf-price-tag.owned { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.4); background: rgba(16, 185, 129, 0.12); }
#tab-shop .pf-discount { background: linear-gradient(135deg, #fff1c2, #f3c969); border: none; }

/* =====================================================================
   ПОДДЕРЖКА
   ===================================================================== */
.es-support { z-index: 12500; }
.es-support.open .es-sup-sheet { animation: esSheetUp 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.05); }
@keyframes esSheetUp { from { transform: translateY(100%); } }
.es-sup-sheet {
    position: relative;
    background: linear-gradient(180deg, #16131f 0%, #0b0b12 50%);
    border-top: 1px solid rgba(var(--es-violet-rgb, 139, 92, 246), 0.4);
    box-shadow: 0 -20px 60px rgba(139, 92, 246, 0.22);
    overflow-x: hidden;
}
.es-sup-sheet::before {
    content: '';
    position: absolute;
    top: -110px; left: 50%;
    width: 380px; height: 240px;
    margin-left: -190px;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.32), transparent);
    pointer-events: none;
}
.es-sup-sheet > * { position: relative; }
.es-sup-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.es-sup-ico {
    width: 48px; height: 48px;
    flex-shrink: 0;
    border-radius: 15px;
    display: grid; place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #a78bfa, #6d28d9);
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.es-sup-ico svg { width: 24px; height: 24px; }
.es-sup-titles { flex: 1; min-width: 0; }
.es-sup-note {
    display: flex;
    gap: 9px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 15px;
    font-size: 12.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.es-sup-note i {
    width: 8px; height: 8px;
    flex-shrink: 0;
    margin-top: 5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
}
.es-sup-main {
    width: 100%;
    height: 54px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    border-radius: 17px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #38bdf8, #6366f1 55%, #8b5cf6);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
}
.es-sup-main svg { width: 18px; height: 18px; }
.es-sup-main:active { transform: scale(0.97); }
.es-sup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.es-sup-topic {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    color: #fff;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}
.es-sup-topic span { font-size: 17px; }
.es-sup-topic:active { transform: scale(0.96); background: rgba(139, 92, 246, 0.15); }
.es-sup-faq-title {
    margin: 0 2px 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.es-sup-faq details {
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.es-sup-faq summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
}
.es-sup-faq summary::-webkit-details-marker { display: none; }
.es-sup-faq summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
    color: #c4b5fd;
    transition: transform 0.25s ease;
}
.es-sup-faq details[open] summary::after { transform: rotate(45deg); }
.es-sup-faq details[open] { border-color: rgba(139, 92, 246, 0.35); }
.es-sup-faq p { padding: 0 14px 14px; font-size: 12.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.68); }
.es-sup-id {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}
.es-sup-id b { color: #fff; font-variant-numeric: tabular-nums; }
.es-sup-id button {
    padding: 7px 12px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 800;
    color: #fff;
    background: rgba(139, 92, 246, 0.25);
    cursor: pointer;
}

/* =====================  УЗКИЕ ЭКРАНЫ  ===================== */
@media (max-width: 360px) {
    .es-title { font-size: 24px; }
    .es-coin { padding: 8px 7px; }
    .es-coin-val { font-size: 12.5px; }
    .es-orbit { right: -40px; }
    .es-portal-title { font-size: 26px; }
    .es-dial { width: 150px; height: 150px; }
    .es-dial-ticks i { transform-origin: 50% 73px; }
    #tab-shop .es-step { width: 46px; height: 46px; }
    .es-atelier-art { width: 92px; height: 92px; margin-top: -46px; right: 12px; }
    .es-art-ava { width: 66px; height: 66px; }
}

/* =====================  ДОСТУПНОСТЬ  ===================== */
@media (prefers-reduced-motion: reduce) {
    .es-sky-neb, .es-hero-img, .es-portal-img, .es-atelier-img,
    .es-ring, .es-core, .es-core::after, .es-fcard, .es-portal-title span,
    .es-wheel-rays, .es-wheel-halo, .es-bulb, .es-art-ring, .es-promo, .es-promo::after, .es-promo-ico,
    #tab-shop .es-actions .gacha-btn-main, #tab-shop .es-actions .gacha-btn-main::after,
    #tab-shop .premium-frame-card, #tab-shop .premium-frame-card::after, #tab-shop .es-pane {
        animation: none !important;
    }
}

/* =====================  ФИКСЫ ПОВЕРХ СТАРЫХ СТИЛЕЙ  ===================== */
/* Заблокированные кнопки не должны переливаться */
#tab-shop .es-actions .gacha-btn-main:disabled,
#tab-shop .es-actions .gacha-btn-quick:disabled {
    animation: none;
    opacity: 0.45;
    filter: grayscale(0.8);
    pointer-events: none;
}
/* Боковые неоновые полоски в окне покупки круток убраны */
.gacha-buy-overlay .gacha-gate { display: none !important; }
/* Тост должен быть виден поверх шторки поддержки и магазина */
#toast.toast { z-index: 13000; }
