/* ── Сезонное оформление: Хеллоуин v3 «Полночь на кладбище брейнротов» (OPS → body.season-halloween) ──────────
   Главный баннер — живая ночная сцена в несколько слоёв: небо с луной и облаками, ведьма на метле, дальний лес с
   колокольней, кладбище со склепом и воротами, танцующие скелеты, земля и туман. Остальной сайт подхватывает её
   деталями: гирлянда под шапкой, костяные орнаменты у заголовков, «жильцы» на карточках, надгробия-статистика,
   рука из могилы внизу.

   Производительность (замерено: см. HALLOWEEN.md): вся графика пиксельная, 1x в файле, 2x на экране, грузится только
   при включённой теме. Всё движение — только transform и opacity, их браузер считает на видеокарте и не трогает
   основной поток. Кадры спрайтов тоже: лист кадров (.hw-sheet) едет внутри окна (.hw-win) через translateX по шагам,
   а не через background-position (тот перерисовывал бы элемент на каждом кадре). Никаких filter на движущемся.
   Всё, что двигается, засыпает вне экрана (halloween.js ставит .hw-asleep), низ страницы создаётся, только когда к
   нему подъехали. Слабые устройства получают .hw-lite: без танцоров, тумана, ведьмы и мерцания.
   Декор вставляет /halloween.js элементами hw-*, ::before/::after основных стилей не используются. */

body.season-halloween {
    --hw-pumpkin: #E07012;
    --hw-pumpkin-l: #F08A2A;
    --hw-toxic: #8CFF3A;
    --hw-moon: #F6EEDB;
    --hw-night: #0B0F24;
    --hw-dusk: #241848;
}
.hw-px { image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; }
.hw-asleep, .hw-asleep * { animation-play-state: paused !important; }
/* спрайт: элемент (позиция, своё движение) > окно размером с кадр > лист кадров, который едет transform-ом */
.hw-win { position: absolute; inset: 0; overflow: hidden; }
.hw-sheet { position: absolute; left: 0; top: 0; height: 100%; background: 0 0 / 100% 100% no-repeat; }

/* ── фон сайта: тусклый узор из плоских летучих мышей и синее свечение ── */
body.season-halloween .main-content {
    background-image:
        radial-gradient(ellipse 55% 30% at 88% 0%, rgba(88, 166, 255, .09) 0%, transparent 70%),
        url("/season/halloween/bat-pattern.png");
    background-size: auto, 320px 320px;
    background-repeat: no-repeat, repeat;
}

/* ── шапка: тыква на логотипе, гирлянда под шапкой ── */
body.season-halloween .brand-btn { position: relative; }
.hw-badge {
    position: absolute; right: -9px; top: -8px; width: 22px; height: 22px; z-index: 2;
    background: url("/season/halloween/pumpkin-icon.png") center / 22px 22px no-repeat;
}
.hw-bunting {                                       /* висит с верхнего края баннера: только на главной, ничего не закрывает */
    position: absolute; left: 0; right: 0; top: -6px; height: 36px; z-index: 3; pointer-events: none;
    background: url("/season/halloween/bunting.png") 0 0 / 192px 36px repeat-x;
    transform-origin: 50% 0; animation: hw-bunting 6s ease-in-out infinite alternate;
}
@keyframes hw-bunting { from { transform: translateY(-2px); } to { transform: translateY(1px); } }

/* ── баннер-сцена ── */
body.season-halloween #homeView .hero-banner {
    position: relative;
    overflow: hidden;
    padding-bottom: 176px !important;             /* полоса сцены под кнопками: земля, склеп, танцоры видны целиком */
    background: none !important;
    border-color: rgba(120, 100, 200, .28) !important;
}
body.season-halloween #homeView .hero-banner > *:not(.hw-scene):not(.hw-bunting) { position: relative; z-index: 2; }
.hw-scene {
    position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict;
    background:
        radial-gradient(circle at calc(14% + 60px) calc(100% - 124px), rgba(246, 238, 219, .16) 0, rgba(246, 238, 219, 0) 170px),
        linear-gradient(180deg, var(--hw-night) 0%, #120F30 45%, var(--hw-dusk) 78%, #2C1A4A 100%);
}
.hw-scene::after {                                 /* тёмный край под текстом, чтобы заголовок читался поверх неба */
    content: ""; position: absolute; inset: 0 40% 176px 0;
    background: linear-gradient(90deg, rgba(8, 10, 24, .82) 0%, rgba(8, 10, 24, .5) 55%, rgba(8, 10, 24, 0) 100%);
}
.hw-moon { position: absolute; bottom: 64px; left: 14%; width: 120px; height: 120px;   /* встаёт над дальним лесом, под кнопками: не за текстом */
    background: url("/season/halloween/moon-big.png") 0 0 / 120px 120px; }   /* свечение — радиальный градиент в фоне сцены: у сайта все углы квадратные, тень вышла бы квадратом */
.hw-stars {                                         /* два слоя звёзд мерцают вразнобой; только над сценой, справа от текста не нужны */
    position: absolute; left: 0; right: 0; top: 0; bottom: 120px;
    background: url("/season/halloween/stars-a.png") 0 0 / 400px 180px repeat;
    animation: hw-twinkle 3.2s steps(4) infinite alternate;
}
.hw-stars.b { background-image: url("/season/halloween/stars-b.png"); background-position: 130px 60px; animation-delay: -1.6s; }
@keyframes hw-twinkle { from { opacity: .35; } to { opacity: 1; } }
.hw-clouds {
    position: absolute; top: 46px; left: 0; width: calc(100% + 480px); height: 52px;
    background: url("/season/halloween/clouds.png") 0 0 / 480px 52px repeat-x;
    animation: hw-drift 70s linear infinite; opacity: .9;
}
.hw-clouds.b { top: 92px; opacity: .55; animation-duration: 110s; animation-direction: reverse; transform: scaleX(-1); }
@keyframes hw-drift { from { transform: translateX(-480px); } to { transform: translateX(0); } }
.hw-witch {
    position: absolute; bottom: 120px; left: 4%; width: 92px; height: 64px;
    animation: hw-witch-fly 32s linear infinite;
    opacity: 0;
}
.hw-witch .hw-sheet { width: 184px; background-image: url("/season/halloween/witch-sheet.png"); animation: hw-witch-flap .32s steps(1) infinite; }
@keyframes hw-witch-flap { 50% { transform: translateX(-92px); } }
@keyframes hw-witch-fly {                          /* раз в 32 с перелетает луну слева направо с горкой, остальное время её нет */
    0%   { opacity: 0; transform: translate(-120px, 20px); }
    2%   { opacity: 1; }
    9%   { transform: translate(120px, -14px); }
    16%  { opacity: 1; transform: translate(380px, 6px); }
    18%, 100% { opacity: 0; transform: translate(440px, 10px); }
}
.hw-far { position: absolute; left: 0; right: 0; bottom: 56px; height: 128px; background: url("/season/halloween/far.png") 0 100% / 640px 128px repeat-x; }
.hw-mid { position: absolute; right: 0; bottom: 34px; width: 600px; height: 168px; background: url("/season/halloween/scene.png") 0 0 / 600px 168px; }
.hw-glow {                                         /* свет фонарей поверх сцены, мерцает */
    position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 210, 90, .55) 0, rgba(255, 210, 90, 0) 70%);
    animation: hw-flicker 2.6s steps(6) infinite;
}
@keyframes hw-flicker { 0%, 100% { opacity: .9; } 30% { opacity: .65; } 55% { opacity: 1; } 80% { opacity: .75; } }
.hw-hp {                                           /* злые тыквы на ветке дерева */
    position: absolute; width: 40px; height: 60px; margin-left: -20px; background: url("/season/halloween/pumpkin-hang.png") 0 0 / 40px 60px;
    transform-origin: 20px 0; animation: hw-sway 3.6s ease-in-out infinite alternate;
}
.hw-hp.b { animation-duration: 4.4s; animation-delay: -1.7s; }
@keyframes hw-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.hw-dancer {                                       /* в 1x: передний план; разворачиваются то в одну, то в другую сторону, каждый в свой момент */
    position: absolute; bottom: 24px; width: 96px; height: 80px;
    animation: hw-turn 9.6s steps(1) infinite;
    transform-origin: 36px 45px;                   /* разворот вокруг ступней (x 36 кадра): ноги не перескакивают на 24 px */
}
.hw-dshadow {                                      /* контактная тень танцора: пиксельный эллипс 26×3, две сплошные ступени */
    position: absolute; bottom: 28px; width: 26px; height: 3px; pointer-events: none;
    background: linear-gradient(rgba(10, 6, 16, .4), rgba(10, 6, 16, .4)) 3px 0 / 20px 1px no-repeat,
                linear-gradient(rgba(10, 6, 16, .4), rgba(10, 6, 16, .4)) 0 1px / 26px 1px no-repeat,
                linear-gradient(rgba(10, 6, 16, .4), rgba(10, 6, 16, .4)) 3px 2px / 20px 1px no-repeat,
                linear-gradient(rgba(10, 6, 16, .45), rgba(10, 6, 16, .45)) 6px 0 / 14px 3px no-repeat;
}
.hw-dancer.w { animation-delay: -1.6s; } .hw-dancer.d { animation-delay: -3.2s; }
@keyframes hw-turn { 0%, 49.9% { transform: scaleX(1); } 50%, 100% { transform: scaleX(-1); } }
/* танец из двух движений (мягкий присед с качанием рук, потом джига), 36 кадров за 2.4 с — см. dance2_pose в skel.py */
.hw-dancer .hw-sheet { width: 3456px; animation: hw-dance 2.4s steps(36) infinite; }   /* спокойный темп: цикл 2.4 с */
.hw-dancer.c .hw-sheet { background-image: url("/season/halloween/dance3-common.png"); }
.hw-dancer.w .hw-sheet { background-image: url("/season/halloween/dance3-witch.png"); animation-delay: -.8s; }
.hw-dancer.d .hw-sheet { background-image: url("/season/halloween/dance3-demon.png"); animation-delay: -1.6s; }
@keyframes hw-dance { to { transform: translateX(-3456px); } }
.hw-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: url("/season/halloween/ground.png") 0 100% / 384px 52px repeat-x; }
.hw-fog {
    position: absolute; left: 0; bottom: 6px; width: calc(100% + 512px); height: 56px;
    background: url("/season/halloween/fog.png?v=s1") 0 100% / 512px 56px repeat-x;
    animation: hw-drift-fog 40s linear infinite;
}
.hw-fog.b { bottom: 22px; opacity: .6; animation-duration: 64s; animation-direction: reverse; }
@keyframes hw-drift-fog { from { transform: translateX(-512px); } to { transform: translateX(0); } }

body.season-halloween #homeView .hero-badge {
    background: var(--hw-pumpkin) !important; color: #1B0D02 !important; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25);
}
body.season-halloween #homeView .hero-banner h1 .h1-digit { color: var(--hw-pumpkin-l); text-shadow: 0 0 18px rgba(140, 255, 58, .3); }
body.season-halloween #homeView .hero-banner .promo-stat {
    background: rgba(10, 12, 28, .72) !important; border-color: rgba(140, 120, 220, .22) !important;
}

/* ── бесплатный кейс: ведёрко со сладостями ── */
body.season-halloween #freeCaseBanner { position: relative; }
.hw-candy {
    position: absolute; right: 172px; top: 50%; width: 52px; height: 48px; margin-top: -24px;
    background: url("/season/halloween/candy-bucket.png") 0 0 / 52px 48px;
    animation: hw-bob 2.4s ease-in-out infinite alternate;
}
@keyframes hw-bob { from { transform: translateY(-2px) rotate(-3deg); } to { transform: translateY(2px) rotate(3deg); } }

/* ── заголовки разделов и страниц: кость, фонарик, название, фонарик, кость ── */
.hw-orn { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin: 0 10px; }
.hw-orn > i { display: block; }
.hw-orn .bone { width: 44px; height: 14px; background: url("/season/halloween/bone.png") 0 0 / 44px 14px; }
.hw-orn .jack { position: relative; width: 28px; height: 26px; transform: rotate(-4deg); }   /* свободная мелочь: лёгкий крен */
.hw-orn.r .jack { transform: rotate(4deg); }
.hw-orn .jack .hw-sheet { width: 56px; background-image: url("/season/halloween/orn-jack-sheet.png?v=hw82"); animation: hw-ornjack 2.3s steps(1) infinite; }
/* своё имя анимации: «hw-jack» уже занят тыквой-жильцом (кадр 36 px) — с ним лист уезжал на 36 px и тыкву резало пополам */
@keyframes hw-ornjack { 0%, 62%, 70%, 100% { transform: translateX(0); } 64%, 68%, 86% { transform: translateX(-28px); } }   /* неровное мерцание лица */
.hw-orn.r .jack .hw-sheet { animation-delay: -1.1s; }
@keyframes hw-lamp { 50% { transform: translateX(-10px); } }
.hw-orn.r { flex-direction: row-reverse; }

/* ── карточки ── */
/* все кейсы (выбор пользователя 22.10, гибрид вариантов A и C): тыквенная обводка 1 px, тёплый отсвет снизу ступенями,
   паутинка в углу (.hw-cweb) и полоса цены внизу: медь до 100, сталь до 1000, золото дороже (data-hw-tier ставит halloween.js) */
body.season-halloween .case-card {
    --hw-tier: transparent;
    border-color: rgba(224, 112, 18, .42) !important;
    background-image: linear-gradient(0deg, rgba(224, 112, 18, .13) 0 9%, rgba(224, 112, 18, .08) 9% 18%, rgba(224, 112, 18, .04) 18% 27%, rgba(224, 112, 18, 0) 27%) !important;
    box-shadow: inset 0 -3px 0 var(--hw-tier), 0 4px 24px rgba(0, 0, 0, .5) !important;
}
body.season-halloween .case-card:hover { border-color: rgba(255, 160, 72, .7) !important; }
body.season-halloween .case-card[data-hw-tier="cu"] { --hw-tier: #B8733A; }
body.season-halloween .case-card[data-hw-tier="st"] { --hw-tier: #8E8AA8; }
body.season-halloween .case-card[data-hw-tier="au"] { --hw-tier: #F2C230; }
.hw-cweb {
    position: absolute; top: 0; right: 0; width: 28px; height: 28px; z-index: 3; pointer-events: none;
    background: url("/season/halloween/cobweb.png") 0 0 / 28px 28px no-repeat; opacity: .85;
}
.hw-cweb.l { right: auto; left: 0; transform: scaleX(-1); }
body.season-halloween .case-card.hw-card {
    border-color: rgba(224, 112, 18, .65) !important;
    box-shadow: inset 0 -3px 0 var(--hw-tier), 0 0 0 1px rgba(224, 112, 18, .30), 0 0 26px rgba(224, 112, 18, .20) !important;
    background-image: linear-gradient(180deg, rgba(224, 112, 18, .10), rgba(255, 255, 255, 0) 60%) !important;
}
.hw-hang {
    position: absolute; top: -2px; left: 14px; width: 40px; height: 60px; z-index: 3;
    background: url("/season/halloween/pumpkin-hang.png") center top / 40px 60px no-repeat;
    transform-origin: 20px 0; animation: hw-sway 3.4s ease-in-out infinite alternate;
}
.hw-peek-clip { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 2; }
.hw-peek {
    position: absolute; left: -36px; bottom: 58px; width: 96px; height: 80px;
    transform: translateX(-34px); opacity: 0; transition: transform .28s cubic-bezier(.2, .9, .3, 1.2), opacity .18s;
}
.hw-peek .hw-sheet { width: 1152px; background-image: url("/season/halloween/skel-peek-sheet.png"); animation: hw-peek .5s steps(12) infinite; }
.case-card.hw-card:not(:hover):not(:focus-within) .hw-peek .hw-sheet { animation-play-state: paused; }   /* спрятан — не крутим */
.case-card.hw-card:hover .hw-peek, .case-card.hw-card:focus-within .hw-peek { transform: none; opacity: 1; }
@keyframes hw-peek { to { transform: translateX(-1152px); } }
/* «жильцы»: на каждой седьмой карточке спит летучая мышь, на некоторых при наведении спускается паучок */
.hw-sleeper {                                      /* висит вниз головой, держится лапками за край карточки */
    position: absolute; top: -4px; width: 48px; height: 56px; margin-left: -24px; z-index: 3;
    transform-origin: 24px 0;
    animation: hw-bat-sway 3.4s ease-in-out infinite alternate;
}
.hw-sleeper::before {                              /* лунный ореол: не теряется на яркой картинке (вместо filter, рисуется один раз) */
    content: ""; position: absolute; left: 4px; right: 4px; top: 6px; bottom: 2px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(190, 170, 255, .32), rgba(190, 170, 255, 0));
}
.hw-sleeper .hw-sheet { width: 336px; background-image: url("/season/halloween/bat-sleep-sheet.png"); animation: hw-bat-sleep 5.2s steps(1) infinite; }
/* дыхание: крылья чуть раздуваются и опадают; раз за цикл он приоткрывает глаз, потом дёргает ухом */
@keyframes hw-bat-sleep {
    0%, 100% { transform: translateX(0); } 8% { transform: translateX(-48px); } 16% { transform: translateX(-96px); }
    24% { transform: translateX(-48px); } 32% { transform: translateX(0); } 40% { transform: translateX(-48px); }
    48% { transform: translateX(-96px); } 56% { transform: translateX(-48px); } 62% { transform: translateX(-144px); }
    68% { transform: translateX(0); } 84% { transform: translateX(-192px); } 88% { transform: translateX(0); }
}
@keyframes hw-bat-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.hw-z {                                            /* «z» поднимаются от головы и тают */
    position: absolute; left: 30px; top: 40px; width: 10px; height: 10px; opacity: 0;
    background: url("/season/halloween/zzz.png") 0 0 / 10px 10px;
    animation: hw-z 3.6s linear infinite;
}
.hw-z.b { animation-delay: -1.2s; } .hw-z.c { animation-delay: -2.4s; }
@keyframes hw-z {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: .9; }
    100% { opacity: 0; transform: translate(14px, -46px) scale(1); }
}
/* навели на карточку: проснулся, глаза красные, хлопает крыльями */
.case-card:hover .hw-sleeper { animation: none; }
.case-card:hover .hw-sleeper .hw-sheet { animation: hw-bat-awake .22s steps(1) infinite; }
@keyframes hw-bat-awake { 0%, 100% { transform: translateX(-240px); } 50% { transform: translateX(-288px); } }
.case-card:hover .hw-z { display: none; }
.hw-spider-wrap { position: absolute; top: 0; right: 22px; width: 22px; height: 0; z-index: 3; }
.hw-spider {
    position: absolute; left: 0; top: 0; width: 22px; height: 18px; background: url("/season/halloween/spider.png") 0 0 / 22px 18px;
    transform: translateY(-22px); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1);
}
.hw-spider::before { content: ""; position: absolute; left: 10px; bottom: 16px; width: 1px; height: 80px; background: rgba(220, 214, 240, .55); }
.case-card:hover .hw-spider { transform: translateY(34px); }

/* ── страница кейса: тыквенный указатель (ворота убраны, кейс крупный: case-stage.css) ── */
body.season-halloween #caseShowcase > .hw-gate { display: none !important; }
body.season-halloween #caseShowcase > .hw-gate-off {
    position: absolute; left: 50%; top: 4px; width: 216px; height: 192px; transform: translateX(-50%); z-index: 0; opacity: .9;
    background: url("/season/halloween/gate.png") center / 216px 192px no-repeat;
}
body.season-halloween .roulette-pointer {
    background: var(--hw-pumpkin) !important; box-shadow: 0 0 14px rgba(224, 112, 18, .55) !important; border-color: var(--hw-pumpkin) !important;
}

/* ── краш: луна и кладбище в небе ракеты ── */
.hw-cmoon { position: absolute; top: 3%; left: 42%; width: 120px; height: 120px;   /* между ракетой и множителем: ничего не закрывает */
    background: url("/season/halloween/moon-big.png") 0 0 / 120px 120px; opacity: .9; }
.hw-planet {                                        /* тыква-планета с кольцом медленно плывёт по космосу */
    position: absolute; right: 7%; bottom: 9%; width: 112px; height: 72px; opacity: .95;   /* правый нижний угол: ни ракета, ни множитель там не бывают */
    background: url("/season/halloween/pumpkin-planet.png") 0 0 / 112px 72px;
    animation: hw-planet 26s ease-in-out infinite alternate;
}
@keyframes hw-planet { from { transform: translate(0, 0) rotate(-6deg); } to { transform: translate(60px, -24px) rotate(4deg); } }

/* ── FAQ, профиль, розыгрыши ── */
.hw-rip { display: block; width: 54px; height: 66px; margin: 0 auto 12px; }
.hw-rip.sm { width: 36px; height: 44px; margin-bottom: 8px; opacity: .85; }

/* ── паутина в углу панелей режимов ── */
.hw-web {
    position: absolute; top: 0; right: 0; width: 56px; height: 56px; z-index: 1; opacity: .55;
    background: url("/season/halloween/cobweb.png") 0 0 / 56px 56px;
    border-top-right-radius: inherit;
}
.hw-web.l { right: auto; left: 0; transform: scaleX(-1); }
body.season-halloween #caseShowcase > .hw-web { position: absolute; top: 0; right: 0; margin: 0; }   /* у сайта свои правила для детей витрины */
body.season-halloween #profileView .profile-avatar-large { position: relative; overflow: visible; }
body.season-halloween .rf-jackpot { box-shadow: 0 0 0 1px rgba(224, 112, 18, .45), 0 0 28px rgba(224, 112, 18, .22) !important; }

/* ── плавающие кнопки ── */
body.season-halloween #wwFab { box-shadow: 0 0 0 1px var(--hw-pumpkin), 0 8px 22px -6px rgba(224, 112, 18, .55) !important; }
body.season-halloween #supportFloatingBtn { overflow: visible; }
.hw-skull { position: absolute; right: -8px; top: -10px; width: 32px; height: 32px; background: url("/season/halloween/skull-icon.png") center / 32px 32px no-repeat; }

/* ── статистика сайта: маленькое кладбище ──────────────────────────────────────────────────────────────────────
   Каждая плитка — надгробие из пиксельного спрайта (border-image, 9 частей, в 2x), трёх форм по очереди: арка, с
   уступами, с отбитым углом. Внизу мох и холмик с травой, на двух камнях трещины, цифры выбиты в камне.
   На каждом камне свой жилец: ворон, тыква, свечи, череп, чёрный кот; из-за последнего выглядывает привидение. */
body.season-halloween .site-stats-grid { padding-top: 38px; row-gap: 52px; }
body.season-halloween .site-stat { flex: 1 1 210px !important; }   /* шире камень — ряд переносится, длинные числа не вылезают за край */
body.season-halloween .site-stat-value { font-size: clamp(18px, 2.2vw, 26px) !important; white-space: nowrap; }
body.season-halloween .site-stat {
    position: relative;
    background: none !important;
    border-style: solid !important; border-color: transparent !important;
    border-width: 28px 16px 16px !important;
    border-image: url("/season/halloween/stone9b-round.png") 14 14 8 fill / 28px 28px 16px round !important;   /* картинка шире рамки: углы целиком, текст не сжимается */
    image-rendering: pixelated;
    border-radius: 0 !important;
    padding: 0 4px 6px !important;
    box-shadow: none !important;
}
body.season-halloween .site-stat:nth-child(3n + 2) { border-image-source: url("/season/halloween/stone9b-shoulder.png") !important; }
body.season-halloween .site-stat:nth-child(3n) { border-image-source: url("/season/halloween/stone9b-chip.png") !important; }
body.season-halloween .site-stat-value {
    color: #241E33 !important;                       /* выбито в камне: тёмная буква, светлая кромка снизу; 6.1:1 на #8E87A8 */
    text-shadow: 0 1px 0 rgba(211, 205, 230, .55);
}
body.season-halloween .site-stat-label { color: #2E2842 !important; font-weight: 600 !important; }
.hw-mound {
    position: absolute; left: -24px; right: -24px; bottom: -24px; height: 20px;
    background: url("/season/halloween/grass-mound.png") 0 100% / 96px 20px repeat-x;
}
.hw-crack { position: absolute; top: -14px; right: 6px; width: 20px; height: 32px; background: url("/season/halloween/crack.png") 0 0 / 20px 32px; opacity: .9; }
.hw-tenant { position: absolute; left: 50%; bottom: calc(100% + 24px); }   /* 28px верхней кромки камня минус 4: стоит на ней */
.hw-tenant .hw-sheet { animation-timing-function: steps(1); animation-iteration-count: infinite; }
.hw-tenant.crow { width: 40px; height: 32px; margin-left: -14px; }
.hw-tenant.crow .hw-sheet { width: 80px; background-image: url("/season/halloween/crow-sheet.png"); animation-name: hw-crow; animation-duration: 4.2s; }
@keyframes hw-crow { 0%, 86%, 100% { transform: translateX(0); } 88%, 92% { transform: translateX(-40px); } 90% { transform: translateX(0); } }
.hw-tenant.jack { width: 36px; height: 30px; margin-left: -18px; }
.hw-tenant.jack .hw-sheet { width: 72px; background-image: url("/season/halloween/jack-sheet.png"); animation-name: hw-jack; animation-duration: 1.3s; }
@keyframes hw-jack { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(-36px); } 55% { transform: translateX(0); } 70% { transform: translateX(-36px); } }
.hw-tenant.candles { width: 40px; height: 36px; margin-left: -20px; }
.hw-tenant.candles .hw-sheet { width: 120px; background-image: url("/season/halloween/candles-sheet.png"); animation: hw-candles .6s steps(3) infinite; }
@keyframes hw-candles { to { transform: translateX(-120px); } }
.hw-tenant.jack::before, .hw-tenant.candles::before {   /* тёплый свет вокруг огня: статичный градиент вместо filter */
    content: ""; position: absolute; left: -14px; right: -14px; top: -14px; bottom: -8px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 176, 48, .3), rgba(255, 176, 48, 0));
}
.hw-tenant.skull { width: 30px; height: 26px; margin-left: -15px; }
.hw-tenant.skull .hw-sheet { width: 60px; background-image: url("/season/halloween/skull-sheet.png"); animation-name: hw-skullglow; animation-duration: 3.4s; }
@keyframes hw-skullglow { 0%, 60%, 100% { transform: translateX(0); } 64%, 90% { transform: translateX(-30px); } }
.hw-tenant.cat { width: 36px; height: 40px; margin-left: -10px; }
.hw-tenant.cat .hw-sheet { width: 144px; background-image: url("/season/halloween/cat-sheet.png"); animation-name: hw-cat; animation-duration: 2.4s; }
@keyframes hw-cat {
    0%, 100% { transform: translateX(0); } 15% { transform: translateX(-36px); } 30% { transform: translateX(-72px); } 45% { transform: translateX(-36px); }
    60% { transform: translateX(0); } 78% { transform: translateX(-108px); } 84% { transform: translateX(0); }
}
.hw-ghost-clip { position: absolute; left: 50%; bottom: calc(100% + 26px); width: 40px; height: 40px; margin-left: -20px; overflow: hidden; }
.hw-ghost {
    position: absolute; left: 4px; bottom: 0; width: 32px; height: 36px; background: url("/season/halloween/ghost.png") 0 0 / 32px 36px;
    transform: translateY(100%); animation: hw-ghost 7s ease-in-out infinite;
}
@keyframes hw-ghost {                                /* выглядывает из-за камня, осматривается и прячется */
    0%, 40%, 100% { transform: translateY(100%); } 50% { transform: translateY(18%); } 56% { transform: translate(-3px, 8%); }
    66% { transform: translate(3px, 8%); } 74% { transform: translateY(14%); } 84% { transform: translateY(100%); }
}

/* ── низ главной: земля, кучки скелетов, рука из могилы ── */
.hw-graves { position: relative; height: 92px; margin: 30px 0 6px; pointer-events: none; contain: layout paint; }
.hw-graves .soil { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: url("/season/halloween/ground.png") 0 100% / 384px 52px repeat-x; }
.hw-graves .pile { position: absolute; bottom: 10px; width: 120px; height: 52px; }
.hw-graves .hand { position: absolute; bottom: 10px; left: 50%; width: 36px; height: 48px; margin-left: -18px; }
.hw-graves .hand .hw-sheet { width: 144px; background-image: url("/season/halloween/hand-sheet.png"); animation: hw-hand 4s steps(1) infinite; }
@keyframes hw-hand {
    0%, 30% { transform: translateX(0); } 34% { transform: translateX(-36px); } 38% { transform: translateX(-72px); }
    44%, 56%, 68% { transform: translateX(-108px); } 50%, 62%, 74% { transform: translateX(-72px); }
    80% { transform: translateX(-36px); } 84%, 100% { transform: translateX(0); }
}

/* ── летучие мыши (стайка раз в 45 с, запускает halloween.js) ── */
.hw-bat { position: fixed; top: 0; left: 0; width: 48px; height: 24px; z-index: 60; pointer-events: none; }
.hw-bat.s { width: 32px; height: 16px; }
.hw-bat .hw-sheet { width: 200%; background-image: url("/season/halloween/bat2-sheet.png"); animation: hw-flap .24s steps(1) infinite; }
@keyframes hw-flap { 50% { transform: translateX(-50%); } }

/* ── рулетка кейса: кованая ограда над лентой, череп на указателе, вспышка с мышами на остановке ── */
.hw-rail {
    display: block; height: 18px; margin: 0 0 -2px; pointer-events: none;
    background: url("/season/halloween/fence-rail.png") 0 100% / 24px 18px repeat-x;
}
.hw-ptr-skull {
    position: absolute; left: 50%; top: -1px; width: 22px; height: 22px; margin-left: -11px; z-index: 4;
    background: url("/season/halloween/avatar-skull.png") 0 0 / 22px 22px;
}
body.season-halloween .roulette-item.winner-landed { outline: 2px solid rgba(140, 255, 58, .75); outline-offset: -2px; }
.hw-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.hw-burst::before {                                  /* ядовитая вспышка: растёт и гаснет (только transform/opacity) */
    content: ""; position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%; opacity: 0;
    background: radial-gradient(closest-side, rgba(140, 255, 58, .45), rgba(140, 255, 58, 0));
}
.hw-burst > i {
    position: absolute; left: -12px; top: -6px; width: 24px; height: 12px; opacity: 0;
    background: url("/season/halloween/bat2-sheet.png") 0 0 / 48px 12px;
}
.roulette-window.hw-landed .hw-burst::before { animation: hw-flash .9s ease-out forwards; }
.roulette-window.hw-landed .hw-burst > i { animation: hw-scatter 1.2s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes hw-flash { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes hw-scatter {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); } 12% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2); }
}

/* ── окна: воск стекает с верхнего края, паутина в углу (её ставит общий список) ── */
.hw-drip {
    position: absolute; left: 0; right: 0; top: 0; height: 12px; z-index: 2; pointer-events: none; opacity: .85;
    background: url("/season/halloween/drip.png") 0 0 / 64px 12px repeat-x;
}

/* ── всплывающие уведомления: ночная плашка с тыквой ── */
body.season-halloween:not(#hw0):not(#hw1) #toast {
    background: url("/season/halloween/pumpkin-icon.png") 12px 50% / 22px 22px no-repeat, linear-gradient(180deg, #221A30, #15101E) !important;
    border: 1px solid rgba(255, 160, 72, .45) !important;
    color: #F1ECFF !important;
    padding-left: 44px !important;
    image-rendering: pixelated;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7), 0 0 0 1px rgba(120, 80, 200, .25) !important;
}

/* ── боковое меню: паутина в углу (мышь убрана: закрывала аватар и баланс в карточке игрока) ── */
#mainNav > .hw-web { top: auto; bottom: 0; transform: scaleY(-1); }   /* внизу меню: наверху карточка игрока */

/* ── FAQ: наклейка у каждой темы ── */
.hw-faqi { display: inline-block; width: 24px; height: 24px; margin: -4px 8px 0 0; vertical-align: middle; transform: rotate(-6deg); }
.faq-section-title:nth-of-type(even) .hw-faqi { transform: rotate(5deg); }

/* ── батл в ожидании: надгробие со свечой в пустом правом нижнем углу карточки ── */
.hw-bwait { position: absolute; right: 16px; bottom: 14px; width: 48px; height: 38px; pointer-events: none; opacity: .92; }
.hw-bwait .hw-sheet { width: 96px; background-image: url("/season/halloween/battle-wait-sheet.png?v=hw82"); animation: hw-bwait 1.4s steps(1) infinite; }
@keyframes hw-bwait { 0%, 45%, 55%, 100% { transform: translateX(0); } 50%, 80% { transform: translateX(-48px); } }
@media (max-width: 560px) { .hw-bwait { right: 10px; bottom: 10px; } }

/* ── выделение текста тыквенным ── */
body.season-halloween ::selection { background: rgba(224, 112, 18, .55); color: #FFF6E8; }

/* ── пустой инвентарь: открытый гроб ── */
.hw-coffin { display: block; width: 52px; height: 68px; margin: 4px 0 8px; }

/* ── профиль: та же ночная сцена, что на главной; склеп игрока с табличкой, портрет в кованой раме ── */
body.season-halloween #profileView .profile-hero {
    position: relative; overflow: hidden;
    padding-bottom: 176px !important;
    background: none !important;
    border-color: rgba(120, 100, 200, .28) !important;
}
body.season-halloween #profileView .profile-hero > *:not(.hw-scene) { position: relative; z-index: 2; }
body.season-halloween #profileView .profile-hero > .hw-web { position: absolute; }
.hw-plaque {                                         /* табличка на фронтоне склепа: ник игрока, выбит в камне */
    position: absolute; left: 50%; top: 19.5%; transform: translateX(-50%); width: 25%; text-align: center;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font: 800 11px/16px 'Syne', sans-serif; letter-spacing: .06em; text-transform: uppercase;
    color: #2A2338; text-shadow: 0 1px 0 rgba(226, 220, 240, .7);
}
body.season-halloween #profileView .profile-avatar-large { position: relative; overflow: visible !important; }
.hw-frame {                                          /* кованое кольцо вокруг круглого портрета 96×96 */
    position: absolute; left: -16px; top: -28px; width: 128px; height: 144px; z-index: 3; pointer-events: none;
    background: url("/season/halloween/avatar-ring.png") 0 0 / 128px 144px;   /* круглая рама: аватар круглый */
}
body.season-halloween #profileView .profile-user-block { padding-top: 22px; padding-left: 14px; }
body.season-halloween #profileView .profile-user-block > .has-bdg-row { margin-left: 22px; }   /* имя не упирается в завиток кольца */
body.season-halloween #profileView .profile-username-label { color: #A99FC4 !important; }
/* статистика аккаунта: каждая цифра на маленьком надгробии (тот же камень, что у статистики сайта, в 1x) */
body.season-halloween .profile-stats-body > div {
    border-style: solid !important; border-color: transparent !important; border-width: 14px 8px 8px !important;
    border-image: url("/season/halloween/stone9n-round.png") 14 14 8 fill / 14px 14px 8px round !important;   /* надгробие с выемкой */
    image-rendering: pixelated; padding: 2px 10px 6px !important; background: none !important;
}
body.season-halloween .profile-stats-body > div:nth-child(2n) { border-image-source: url("/season/halloween/stone9n-shoulder.png") !important; }
/* лучший дроп: свечи по краям, как у постамента */
body.season-halloween .profile-bestdrop-card { position: relative; }
.hw-shrine { position: absolute; bottom: 8px; width: 40px; height: 36px; }
.hw-shrine.l { left: 10px; } .hw-shrine.r { right: 10px; }
.profile-bestdrop-card > .hw-shrine.l { display: none; }   /* слева в карточке лежит сам брейнрот: свеча только справа */
/* подпись «из кейса Драгон» / «из апгрейда» под ценой (best drop source): колонка с текстом тянется до края карточки,
   подпись кончается за 42px до него, и длинное имя кейса переносится перед свечой, а не уходит под неё. Имя и цена
   брейнрота не сдвигаются. Цвета лунные, иконка режима и стрелка тыквенные */
body.season-halloween .profile-bestdrop-card .profile-bestdrop-body > div,
body.season-halloween .profile-bestdrop-card .profile-bestdrop-body > div > div { flex: 1 1 auto; min-width: 0; }
body.season-halloween .profile-bestdrop-card .profile-bestdrop-src { max-width: calc(100% - 42px) !important; }
body.season-halloween:not(.theme-light-red) .profile-bestdrop-card { --bd-src-c: #A99FC4; --bd-src-name: #F6EEDB; --bd-src-ic: #FFA048; --bd-src-go: #FFA048; }
body.season-halloween:not(.theme-light-red) .profile-bestdrop-src.is-link:hover .profile-bestdrop-src-text b { color: #FFC27A !important; }
.hw-shrine .hw-sheet { width: 120px; background-image: url("/season/halloween/candles-sheet.png"); animation: hw-candles .6s steps(3) infinite; }
.hw-shrine.r .hw-sheet { animation-delay: -.3s; }
.hw-shrine::before {
    content: ""; position: absolute; left: -14px; right: -14px; top: -14px; bottom: -8px;
    background: radial-gradient(closest-side, rgba(255, 176, 48, .22), rgba(255, 176, 48, 0));
}
/* раскрывашки (колесо недели, активность): тыквенная стрелка и лунная кромка слева */
body.season-halloween #profileView .profile-history-toggle { box-shadow: inset 3px 0 0 rgba(140, 110, 220, .45) !important; }
body.season-halloween #profileView .profile-history-toggle-caret { color: #FFA048 !important; }

/* ── окно батла: ночная арена, ограды над барабанами, VS — светящаяся тыква ── */
body.season-halloween .battle-overlay-shell { position: relative; overflow: hidden; background: none !important; }
body.season-halloween .battle-overlay-shell > *:not(.hw-scene) { position: relative; z-index: 2; }
.hw-scene.arena::after { display: none; }
.hw-scene.arena .hw-moon { left: 50%; margin-left: -60px; bottom: auto; top: 22px; }   /* по центру над тыквой: не на тексте раунда */
.hw-scene.arena .hw-witch { left: auto; right: 30%; bottom: auto; top: 40px; }
body.season-halloween .battle-overlay-reel { background: rgba(10, 7, 18, .72) !important; }
body.season-halloween .battle-overlay-vs {
    width: 64px; height: 60px; display: grid; place-items: center; padding-top: 6px;
    background: url("/season/halloween/pumpkin-icon.png") center / 64px 64px no-repeat !important;
    image-rendering: pixelated; color: #1F0E02 !important; font-size: 15px !important;
    text-shadow: 0 0 6px rgba(255, 216, 74, .9), 0 0 2px #FFD84A;
}
body.season-halloween .battle-overlay-player-name { color: #F1ECFF !important; text-shadow: 0 2px 0 #0B0912; }
body.season-halloween .battle-overlay-result { color: #FFC07A !important; text-shadow: 0 0 14px rgba(232, 118, 26, .5); }
body.season-halloween #battleOverlay .battle-overlay-kicker { background: #E07012 !important; color: #1B0D02 !important; border-color: transparent !important; }

/* ── апгрейдер: свечи у колеса, слоты вклада и цели — каменные алтари ── */
body.season-halloween .upg-wheel-outer { position: relative; }
body.season-halloween .upg-slot-card {
    border-style: solid !important; border-color: transparent !important; border-width: 28px 16px 16px !important;
    border-image: url("/season/halloween/stone9n-round.png") 14 14 8 fill / 28px 28px 16px round !important;   /* надгробие с выемкой: текст в нише читается */
    image-rendering: pixelated; background: none !important; border-radius: 0 !important; box-shadow: none !important;
}
body.season-halloween .upg-slot:last-child .upg-slot-card { border-image-source: url("/season/halloween/stone9n-shoulder.png") !important; }
body.season-halloween .upg-slot-card img { image-rendering: auto; }

/* ── дайсы: свечи по углам стола ── */
body.season-halloween .dice-card > .hw-shrine { bottom: 10px; }

/* ── скелетный налёт на рулетке (рисует halloween-raid.js, canvas живёт только на время сцены) ── */
.hw-raid { position: fixed; z-index: 40; pointer-events: none; image-rendering: pixelated; }

/* ── шапка профиля: семейный склеп игрока ── */
body.season-halloween #profileView .profile-hero { padding-bottom: 200px !important; }
.hw-scene.pscene {
    background:
        radial-gradient(circle at calc(46% + 40px) 60px, rgba(200, 255, 160, .12) 0, rgba(200, 255, 160, 0) 160px),
        linear-gradient(180deg, #08161A 0%, #0E1A26 40%, #1A1236 78%, #24163E 100%);
}
.hw-scene.pscene::after { inset: 0 45% 200px 0; }
.hw-crescent { position: absolute; left: 46%; top: 18px; width: 80px; height: 80px; background: url("/season/halloween/crescent.png") 0 0 / 80px 80px; }
.hw-crypt { position: absolute; right: 6%; bottom: 18px; width: 320px; height: 176px; background: url("/season/halloween/crypt-big.png") 0 0 / 320px 176px; }
.hw-brazier { position: absolute; bottom: 14px; width: 40px; height: 36px; }
.hw-brazier.l { left: 2%; } .hw-brazier.r { right: 2%; }
.hw-brazier .hw-sheet { width: 120px; background-image: url("/season/halloween/candles-sheet.png"); animation: hw-candles .6s steps(3) infinite; }
.hw-brazier.r .hw-sheet { animation-delay: -.3s; }
.hw-brazier::before { content: ""; position: absolute; inset: -16px -16px -6px; background: radial-gradient(closest-side, rgba(255, 176, 48, .28), rgba(255, 176, 48, 0)); }
.hw-wisp {                                           /* огоньки-призраки облетают склеп по своим орбитам */
    position: absolute; left: 50%; top: 40%; width: 24px; height: 32px; margin: -16px 0 0 -12px;
    background: url("/season/halloween/wisp.png") 0 0 / 24px 32px;
    animation: hw-orbit 9s linear infinite;
}
.hw-wisp.w1 { animation-duration: 12s; animation-delay: -4s; } .hw-wisp.w2 { animation-duration: 15s; animation-delay: -9s; }
@keyframes hw-orbit {
    0%   { transform: translate(-190px, 10px) scale(.8); opacity: .3; }
    25%  { transform: translate(-60px, -70px) scale(1); opacity: .95; }
    50%  { transform: translate(170px, -20px) scale(.9); opacity: .7; }
    75%  { transform: translate(60px, 40px) scale(.6); opacity: .25; }
    100% { transform: translate(-190px, 10px) scale(.8); opacity: .3; }
}

/* ── карточки кейсов: туман у подножия на наведении и новые жильцы ── */
.hw-cclip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.hw-cfog {                                           /* туман стелется у подножия кейса, только пока на карточку смотрят */
    position: absolute; left: 0; top: 44%; width: 512px; height: 56px; opacity: 0;
    background: url("/season/halloween/fog.png?v=s1") 0 100% / 256px 28px repeat-x;
    transition: opacity .35s ease;
}
.case-card:hover .hw-cfog, .case-card:focus-within .hw-cfog { opacity: .85; animation: hw-cfog 7s linear infinite; }   /* анимация есть только на наведении: у 49 карточек не висят слои */
@keyframes hw-cfog { from { transform: translateX(-256px); } to { transform: translateX(0); } }
.hw-eyes { position: absolute; left: 12px; top: 14px; width: 24px; height: 10px; z-index: 3; }   /* глаза в тёмном углу, моргают */
.hw-eyes .hw-sheet { width: 48px; background-image: url("/season/halloween/eyes-sheet.png"); animation: hw-eyeblink 4.6s steps(1) infinite; }
@keyframes hw-eyeblink { 0%, 88%, 94%, 100% { transform: translateX(0); } 90%, 92%, 96% { transform: translateX(-24px); } }
.case-card:hover .hw-eyes .hw-sheet { animation: none; transform: translateX(-24px); }        /* навёл — зажмурились, спрятались */
.hw-gclip { position: absolute; right: 0; top: 0; width: 44px; height: 44px; overflow: hidden; }
.hw-cghost {                                          /* призрак выглядывает из-за верхнего правого угла */
    position: absolute; right: -32px; top: 6px; width: 32px; height: 36px;
    background: url("/season/halloween/ghost.png") 0 0 / 32px 36px;
    transform: translateX(0) rotate(-12deg); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1);
}
.case-card:hover .hw-cghost { transform: translateX(-30px) rotate(-6deg); }
.hw-hclip { position: absolute; left: 14px; top: calc(44% - 6px); width: 36px; height: 48px; overflow: hidden; pointer-events: none; z-index: 3; }   /* рука вылезает из тумана у кейса, не на тексте */
.hw-chand { position: absolute; left: 0; top: 0; width: 36px; height: 48px; transform: translateY(100%); transition: transform .4s cubic-bezier(.3, 1.3, .5, 1); }
.hw-chand .hw-sheet { width: 144px; background-image: url("/season/halloween/hand-sheet.png"); }
.case-card:hover .hw-chand { transform: translateY(18%); }
.case-card:hover .hw-chand .hw-sheet { animation: hw-hand 4s steps(1) infinite; }

/* ── профиль другого игрока: его склеп, портрет в кольце слева на фоне сцены ── */
.hw-pbanner { position: relative; height: 230px; overflow: hidden; margin: 4px auto 0; border: 1px solid rgba(120, 100, 200, .28); }   /* по центру и по ширине содержимого (ширину ставит halloween.js) */
.hw-pbanner .hw-scene::after { display: none; }
/* у самого сайта этот ряд вылезает за ширину страницы (статистика висит справа на 175 px) — укладываем в ширину */
body.season-halloween #publicProfileContent .profile-top-row { display: flex !important; flex-wrap: wrap !important; gap: 14px !important; }
body.season-halloween #publicProfileContent .profile-top-row > * { flex: 1 1 100% !important; min-width: 0 !important; max-width: 100% !important; }   /* друг под другом: длинные названия дропа не наезжают на статистику */
body.season-halloween #publicProfileAvatar { position: relative; overflow: visible !important; z-index: 3; margin: -176px 0 96px 52px !important; }
@media (max-width: 760px) {
    .hw-pbanner { height: 130px; }
    body.season-halloween #publicProfileAvatar { margin: -116px 0 40px 24px !important; }
}

/* ── лента живых дропов (слева и полоской сверху на узких экранах): маленькие могилки ── */
body.season-halloween .live-card {
    background: url("/season/halloween/grass-mound.png") 0 100% / 48px 10px repeat-x, linear-gradient(180deg, rgba(34, 25, 52, .95), rgba(13, 10, 21, .95)) !important;
    border-color: rgba(150, 120, 230, .2) !important;
}
body.season-halloween .live-card-best {                 /* лучший за сутки: тёплый свет свечей по нижним углам */
    background:
        radial-gradient(40px 30px at 0% 100%, rgba(255, 176, 48, .28), transparent 70%),
        radial-gradient(40px 30px at 100% 100%, rgba(255, 176, 48, .28), transparent 70%),
        url("/season/halloween/grass-mound.png") 0 100% / 48px 10px repeat-x,
        linear-gradient(180deg, rgba(48, 32, 20, .95), rgba(18, 12, 16, .95)) !important;
    border-color: rgba(255, 176, 48, .45) !important;
}
body.season-halloween .live-card-incoming { box-shadow: 0 0 0 1px rgba(140, 255, 58, .7), 0 0 18px rgba(140, 255, 58, .35) !important; }
body.season-halloween .sidebar-live {
    background: linear-gradient(180deg, rgba(20, 14, 32, .6), rgba(10, 8, 16, .2)), url("/season/halloween/bat-pattern.png") 0 0 / 320px 320px !important;
}

/* ── розыгрыши ── */
body.season-halloween .rf-jackpot-podium { position: relative; background-image: radial-gradient(120px 140px at 50% 0%, rgba(246, 238, 219, .14), transparent 70%) !important; }
.hw-orbit { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.hw-obat { position: absolute; left: -16px; top: -8px; width: 32px; height: 16px; overflow: hidden; animation: hw-obat 5s linear infinite; }
.hw-obat .hw-sheet { width: 64px; background-image: url("/season/halloween/bat2-sheet.png"); animation: hw-flap .24s steps(1) infinite; }
.hw-obat.o1 { animation-delay: -1.7s; } .hw-obat.o2 { animation-delay: -3.4s; animation-duration: 6s; }
@keyframes hw-obat {                                 /* облёт приза по эллипсу: впереди крупнее, сзади мельче */
    0%   { transform: translate(-90px, 0) scale(1); }
    25%  { transform: translate(0, -46px) scale(.7); }
    50%  { transform: translate(90px, 0) scale(1) scaleX(-1); }
    75%  { transform: translate(0, 30px) scale(1.2) scaleX(-1); }
    100% { transform: translate(-90px, 0) scale(1); }
}
.hw-guard.hw-tenant { left: auto; right: 14px; bottom: auto; top: 8px; margin-left: 0; z-index: 3; }
.rf-podium > .hw-mound { display: none; }   /* имя приза стоит прямо под подиумом: холмик ложился на него при любом сдвиге */

/* ── бонусы ── */
body.season-halloween .bonus-zone-staking { position: relative; }
.bonus-zone-staking > .hw-guard.hw-tenant { top: 12px; right: 70px; }

/* ── настройки: земля с рукой внизу панели ── */
.hw-graves.mini { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; margin: 0; }

/* ── окна: своя подвеска у каждого семейства (у крестика, не на заголовке) ── */
.hw-hang2 { position: absolute; top: 0; right: 64px; z-index: 3; pointer-events: none; }
.hw-hang2::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 18px; background: rgba(220, 214, 240, .5); }
.hw-hang2.bat::before, .hw-hang2.candles::before, .hw-hang2.ghost::before { display: none; }
.hw-hang2 .hw-sleeper { position: relative; left: 0; top: -4px; margin: 0; display: block; }
.hw-lamp2 { position: relative; display: block; top: 16px; width: 20px; height: 52px; margin-left: -10px; transform-origin: 10px -16px; animation: hw-sway 3s ease-in-out infinite alternate; }
.hw-lamp2 .hw-sheet { width: 40px; background-image: url("/season/halloween/lantern-sheet.png"); animation: hw-lamp .7s steps(1) infinite; }
.hw-lamp2 .hw-win { overflow: hidden; }
@keyframes hw-lamp2 { 50% { transform: translateX(-20px); } }
.hw-lamp2 .hw-sheet { animation-name: hw-lamp2; }
.hw-mghost { display: block; width: 32px; height: 36px; margin-left: -16px; background: url("/season/halloween/ghost.png") 0 0 / 32px 36px; animation: hw-mghost 4s ease-in-out infinite; }
@keyframes hw-mghost { 0%, 100% { transform: translateY(-14px); } 50% { transform: translateY(-4px); } }
.hw-mspider { display: block; position: relative; top: 18px; width: 22px; height: 18px; margin-left: -11px; background: url("/season/halloween/spider.png") 0 0 / 22px 18px; animation: hw-mspider 3.2s ease-in-out infinite; }
@keyframes hw-mspider { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
.hw-hang2 .hw-shrine { position: relative; display: block; top: 6px; margin-left: -20px; }
@media (max-width: 760px) { .hw-hang2 { right: 52px; } }

/* ── пасхалки: эти жители декора нажимаются (мышью и пальцем) ── */
.hw-moon, .hw-crescent, .hw-hp, .hw-dancer, .hw-graves .hand, .hw-tenant, .hw-ghost-clip, .hw-sleeper, .hw-badge, .hw-cghost { pointer-events: auto; cursor: pointer; }
.hw-scene { pointer-events: none; }
.hw-boo { position: absolute; left: 50%; bottom: 30px; width: 32px; height: 36px; background: url("/season/halloween/ghost.png") 0 0 / 32px 36px; opacity: 0; }

/* ── апгрейдер: конфетка ── */
body.season-halloween .upg-spin-row { margin-top: 22px !important; }   /* нижний череп кольца не садится на кнопку */
.hw-wring {                                          /* кованое кольцо с черепами и тыквами вокруг колеса; верх свободен под стрелку */
    position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; z-index: 2; pointer-events: none;
    background: url("/season/halloween/wheel-ring.png") 0 0 / 320px 320px;
}
.hw-wcore {                                          /* тёплое сердце колеса, как свеча в тыкве */
    position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; z-index: 1; pointer-events: none; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 150, 50, .22), rgba(255, 150, 50, 0));
}
body.season-halloween:not(#hw0):not(#hw1) .upg-spin-btn:not(:disabled) {   /* «Прокачать» — светящееся ядовитое зелье */
    background: linear-gradient(180deg, #C8FF7A 0%, #8CFF3A 44%, #4FB216 100%) !important;
    color: #0E1F04 !important; text-shadow: 0 1px 0 rgba(230, 255, 200, .5);
    box-shadow: inset 0 1px 0 rgba(240, 255, 220, .8), inset 0 -3px 0 rgba(20, 60, 0, .45), 0 0 0 1px rgba(140, 255, 58, .35), 0 10px 26px -8px rgba(140, 255, 58, .7) !important;
    border-color: transparent !important;
}
body.season-halloween:not(#hw0):not(#hw1) .upg-spin-btn:not(:disabled):hover { filter: brightness(1.06) !important; box-shadow: inset 0 1px 0 rgba(240, 255, 220, .9), inset 0 -3px 0 rgba(20, 60, 0, .45), 0 0 0 1px rgba(160, 255, 90, .6), 0 12px 32px -6px rgba(140, 255, 58, .85) !important; }
body.season-halloween:not(#hw0):not(#hw1) .upg-fast-spin-btn {
    background: linear-gradient(180deg, #221A30, #15101E) !important; border: 1px solid rgba(255, 160, 72, .45) !important; color: #FFA048 !important;
}
/* быстрые ставки — настоящие конфеты: закруглённые, полосы во всю высоту, все одной ширины. Множители — конфеты-
   кукурузки (белая верхушка, оранжевая середина, жёлтое основание), проценты — «ведьмины» (сиреневая и лаймовая).
   Тёмный текст лежит на средней полосе. Форма — clip-path: углы сайт принудительно делает квадратными. */
body.season-halloween .upg-quick-row { display: flex !important; gap: 8px !important; justify-content: center; }
body.season-halloween:not(#hw0):not(#hw1) .upg-quick-btn {
    flex: 0 0 58px !important; height: 30px !important; padding: 0 !important;
    clip-path: inset(0 round 15px);
    border: 0 !important; color: #3A1A04 !important; font-weight: 800 !important;
    background: linear-gradient(180deg, #FFF6DE 0 28%, #FF9A2E 28% 70%, #FFD84A 70% 100%) !important;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(150, 70, 0, .35) !important;
    text-shadow: 0 1px 0 rgba(255, 230, 190, .6);
    transition: transform .15s ease, filter .15s ease !important;
}
body.season-halloween:not(#hw0):not(#hw1) .upg-quick-btn--pct {
    color: #1E0C36 !important; text-shadow: 0 1px 0 rgba(240, 225, 255, .6);
    background: linear-gradient(180deg, #F0E2FF 0 28%, #B48CFF 28% 70%, #9CF05A 70% 100%) !important;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(40, 90, 10, .35) !important;
}
body.season-halloween:not(#hw0):not(#hw1) .upg-quick-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
body.season-halloween:not(#hw0):not(#hw1) .upg-quick-btn:active { transform: translateY(1px); }
body.season-halloween:not(#hw0):not(#hw1) .upg-quick-btn.is-active, body.season-halloween:not(#hw0):not(#hw1) .upg-quick-btn.active { filter: brightness(1.12) saturate(1.2); transform: translateY(-2px); }

/* колесо: эктоплазма вместо плоского зелёного, тёмное вино вместо красного, ночная сердцевина с жаром, кованый обод */
body.season-halloween #upgWheelWin { fill: url(#hwWin) !important; }
body.season-halloween #upgWheelLose { fill: url(#hwLose) !important; }
body.season-halloween .upg-wheel-outer svg circle[r="93"][fill^="url"] { fill: url(#hwHub) !important; }
body.season-halloween .upg-wheel-outer svg circle[r="146"] { fill: url(#hwRim) !important; }
body.season-halloween .upg-wheel-outer svg circle[r="141"] { fill: #0B0812 !important; }
/* слоты отходят от кольца, чтобы черепа не упирались в камень (только на широком экране: на телефоне они под колесом) */
@media (min-width: 761px) {
    /* left, а не transform: transform создал бы слой, и картинка слота (у сайта она с z-index:-1) ушла бы под камень */
    body.season-halloween .upg-slot:first-of-type { position: relative; left: -26px; }
    body.season-halloween .upg-slot:last-of-type { position: relative; left: 26px; }
}
.upg-slot-card > .hw-shrine.top { width: 20px; height: 18px; bottom: calc(100% + 26px); }   /* маленькая свеча на внешнем углу кромки, подпись над слотом не задевает */
.upg-slot-card > .hw-shrine.top .hw-sheet { width: 60px; }
.upg-slot-card > .hw-shrine.top::before { inset: -10px -10px -4px; }
.upg-slot:first-of-type .upg-slot-card > .hw-shrine.top { left: -2px; right: auto; }
.upg-slot:last-of-type .upg-slot-card > .hw-shrine.top { right: -2px; left: auto; }
body.season-halloween .upg-slot-card { overflow: visible !important; }   /* иначе карточка обрезает свечу на своей кромке */

body.season-halloween .upg-slot-title, body.season-halloween .upg-slot-label, body.season-halloween .upg-slot > div:first-child { color: #FFB866 !important; }

/* ── фьюз: мыши вокруг дома, ведьма у луны, слоты-ниши ── */
.hw-orbit.wide .hw-obat { animation-name: hw-obat-wide; }
@keyframes hw-obat-wide {
    0%   { transform: translate(-170px, 0) scale(1); }
    25%  { transform: translate(0, -120px) scale(.7); }
    50%  { transform: translate(170px, 0) scale(1) scaleX(-1); }
    75%  { transform: translate(0, 90px) scale(1.2) scaleX(-1); }
    100% { transform: translate(-170px, 0) scale(1); }
}
.hw-fwitch { bottom: auto; top: 40px; left: 10%; z-index: 2; pointer-events: none; }
body.season-halloween #hfzSlots > * {
    border-style: solid !important; border-color: transparent !important; border-width: 14px 8px 8px !important;
    border-image: url("/season/halloween/stone9n-round.png") 14 14 8 fill / 14px 14px 8px round !important;
    image-rendering: pixelated; background: none !important; border-radius: 0 !important; box-shadow: none !important;
}
.hfz-how-card > .hw-shrine { right: 8px; bottom: 6px; }

/* ── окна, которым сайт задаёт синий прямо в разметке (выбор языка и подобные): скин их не видит ── */
body.season-halloween #langPickModal .modal-card {
    background: linear-gradient(180deg, #1E1729 0%, #110D19 100%) !important;
    border-color: rgba(255, 160, 72, .45) !important;
}
body.season-halloween #langPickModal svg[stroke] { stroke: #FFA048 !important; }
body.season-halloween [style*="#58A6FF" i], body.season-halloween [style*="88, 166, 255"], body.season-halloween [style*="88,166,255"] {
    color: #FFB866 !important; border-color: rgba(255, 160, 72, .45) !important;
}

/* ══ Компоненты сайта ══════════════════════════════════════════════════════════════════════════════════════════
   Цвета всех режимов перекрашивает halloween-skin.css (собран из стилей сайта): синий бренд стал тыквенным,
   слабые синие подсветки и тёмно-синие панели — ночными фиолетовыми. Здесь — то, что руками: поверхности,
   «резные» тыквенные кнопки, поля, вкладки. Цвета редкости, зелёный «забрать» и золото не трогаются. */
body.season-halloween.palette-blue.theme-dark-blue, body.season-halloween.palette-blue.theme-carnage, body.season-halloween {
    --bg: #0F0C16;
    --panel: #17131F;
    --panel-2: #1F1A2A;
    --line: rgba(180, 150, 240, .12);
    --muted: #8D82A8;                                /* 5.6:1 на --panel */
    --text: #F1ECFF;
}
body.season-halloween.theme-dark-blue, body.season-halloween.theme-carnage {
    background:
        radial-gradient(ellipse 60% 40% at 80% -10%, rgba(120, 70, 200, .14) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 10% 110%, rgba(224, 112, 18, .06) 0%, transparent 60%),
        linear-gradient(180deg, #110D19 0%, #0B0911 60%, #08070C 100%) !important;
}

/* Главные кнопки: вырезаны из тыквы. Светлый срез сверху, тёмная корка снизу, тёмный текст
   (#1F0E02 на #E8761A — 6.2:1, на нижнем краю #C85E0C — 4.6:1). Наведение — свеча внутри разгорается.
   :not(#hw0):not(#hw1) поднимает вес селектора: у сайта есть правила с id, иначе фон оставался их, тёмный. */
body.season-halloween:not(#hw0):not(#hw1) .primary-btn:not(:disabled):not(.is-inactive),
body.season-halloween:not(#hw0):not(#hw1) .crash-action-btn:not(.is-cashout):not(:disabled),
body.season-halloween:not(#hw0):not(#hw1) #openSelectedCaseBtn, body.season-halloween:not(#hw0):not(#hw1) #createBattleBtn, body.season-halloween:not(#hw0):not(#hw1) #startFuseBtn,
body.season-halloween:not(#hw0):not(#hw1) #openLadderModeBtn, body.season-halloween:not(#hw0):not(#hw1) .deposit-terminal-pay-btn, body.season-halloween:not(#hw0):not(#hw1) .ghost-btn.active,
body.season-halloween:not(#hw0):not(#hw1) .open-count-btn.active,
body.season-halloween:not(#hw0):not(#hw1) .nav-btn.active {
    background: linear-gradient(180deg, #FFA048 0%, #E8761A 46%, #C85E0C 100%) !important;
    color: #1F0E02 !important;
    border-color: transparent !important;
    text-shadow: 0 1px 0 rgba(255, 210, 160, .35);
    box-shadow: inset 0 1px 0 rgba(255, 228, 190, .7), inset 0 -3px 0 rgba(110, 40, 0, .45), 0 8px 22px -8px rgba(232, 118, 26, .7) !important;
    transition: box-shadow .25s ease, transform .15s ease, filter .2s ease !important;
}
body.season-halloween:not(#hw0):not(#hw1) .primary-btn:not(:disabled):not(.is-inactive):hover,
body.season-halloween:not(#hw0):not(#hw1) .crash-action-btn:not(.is-cashout):not(:disabled):hover,
body.season-halloween:not(#hw0):not(#hw1) #openSelectedCaseBtn:hover, body.season-halloween:not(#hw0):not(#hw1) #createBattleBtn:hover, body.season-halloween:not(#hw0):not(#hw1) #startFuseBtn:hover,
body.season-halloween:not(#hw0):not(#hw1) #openLadderModeBtn:hover, body.season-halloween:not(#hw0):not(#hw1) .deposit-terminal-pay-btn:hover {
    filter: brightness(1.06) !important;
    box-shadow: inset 0 1px 0 rgba(255, 236, 205, .8), inset 0 -3px 0 rgba(110, 40, 0, .45), 0 0 0 1px rgba(255, 170, 80, .45), 0 10px 30px -6px rgba(255, 140, 40, .8) !important;
}
body.season-halloween:not(#hw0):not(#hw1) .primary-btn:not(:disabled):not(.is-inactive):active,
body.season-halloween:not(#hw0):not(#hw1) .crash-action-btn:not(.is-cashout):not(:disabled):active {
    box-shadow: inset 0 2px 4px rgba(110, 40, 0, .5), 0 4px 12px -6px rgba(232, 118, 26, .6) !important;
}
body.season-halloween:not(#hw0):not(#hw1) .primary-btn:not(:disabled):not(.is-inactive) img.solar-icon,
body.season-halloween:not(#hw0):not(#hw1) #createBattleBtn img.solar-icon, body.season-halloween:not(#hw0):not(#hw1) #startFuseBtn img.solar-icon,
body.season-halloween:not(#hw0):not(#hw1) .ghost-btn.active img.solar-icon, body.season-halloween:not(#hw0):not(#hw1) .nav-btn.active img.solar-icon { filter: brightness(0) opacity(.8) !important; }

/* Второстепенные кнопки: тонкая лунная обводка, при наведении фиолетовый туман */
body.season-halloween .ghost-btn:not(.active) {
    border-color: rgba(190, 165, 255, .2) !important;
    background: rgba(28, 22, 40, .45) !important;
}
body.season-halloween .ghost-btn:not(.active):hover {
    border-color: rgba(255, 160, 72, .45) !important;
    background: rgba(120, 80, 200, .14) !important;
}

/* Видимый фокус с клавиатуры: тыквенное кольцо */
body.season-halloween button:focus-visible, body.season-halloween a:focus-visible, body.season-halloween [role="button"]:focus-visible {
    outline: 2px solid #FFA048 !important; outline-offset: 2px !important;
}

/* Поля ввода: тёмные, как вода в лунную ночь; фокус — тёплое свечение */
body.season-halloween input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), body.season-halloween select, body.season-halloween textarea {
    background-color: rgba(12, 9, 20, .72) !important;
    border-color: rgba(180, 150, 240, .16) !important;
}
body.season-halloween input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, body.season-halloween select:focus, body.season-halloween textarea:focus {
    border-color: rgba(255, 160, 72, .6) !important;
    box-shadow: 0 0 0 3px rgba(232, 118, 26, .16) !important;
}
body.season-halloween input::placeholder, body.season-halloween textarea::placeholder { color: #6E6488 !important; }

/* Аватарки в ленте дропов (заглушка без фото) — ночные, чтобы лента не рябила оранжевым */
body.season-halloween .live-card-avatar {          /* без фото: черепок вместо пустого квадрата (фото, если есть, ложится сверху) */
    background: url("/season/halloween/avatar-skull.png") center / 11px 11px no-repeat, linear-gradient(135deg, #3A2A5C, #241A3A) !important;
    image-rendering: pixelated;
}

/* Полоса прокрутки */
body.season-halloween *::-webkit-scrollbar-thumb { background: rgba(150, 110, 220, .28) !important; }
body.season-halloween *::-webkit-scrollbar-thumb:hover { background: rgba(232, 118, 26, .5) !important; }

@media (max-width: 760px) {
    body.season-halloween #homeView .hero-banner { padding-bottom: 92px !important; }
    .hw-moon { width: 60px; height: 60px; background-size: 60px 60px; bottom: 26px; left: 6%; }   /* ниже кнопок, не наезжает */
    .hw-stars { background-size: 200px 90px; bottom: 92px; }
    .hw-scene::after { bottom: 92px !important; }
    .hw-scene { background: radial-gradient(circle at calc(6% + 30px) calc(100% - 56px), rgba(246, 238, 219, .14) 0, rgba(246, 238, 219, 0) 90px), linear-gradient(180deg, var(--hw-night) 0%, #120F30 45%, var(--hw-dusk) 78%, #2C1A4A 100%); }
    .hw-clouds { top: 30px; } .hw-clouds.b, .hw-witch { display: none; }
    .hw-far { bottom: 26px; height: 64px; background-size: 320px 64px; }
    .hw-mid { bottom: 16px; width: 300px; height: 84px; background-size: 300px 84px; }
    .hw-glow { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
    .hw-hp { width: 20px; height: 30px; margin-left: -10px; background-size: 20px 30px; transform-origin: 10px 0; }
    .hw-dancer, .hw-dshadow { display: none; }
    .hw-ground { height: 26px; background-size: 192px 26px; }
    .hw-fog { height: 28px; background-size: 256px 28px; width: calc(100% + 256px); animation-name: hw-drift-fog-s; }
    @keyframes hw-drift-fog-s { from { transform: translateX(-256px); } to { transform: translateX(0); } }
    .hw-scene::after { inset: 0; background: linear-gradient(180deg, rgba(8, 10, 24, .7) 0%, rgba(8, 10, 24, .35) 60%, rgba(8, 10, 24, 0) 100%); }
    .hw-candy, .hw-graves .pile, .hw-orn .bone { display: none; }
    body.season-halloween .upg-wheel-outer { margin-bottom: 22px !important; }   /* нижний череп кольца не наезжает на подписи слотов */
    body.season-halloween:not(#hw0):not(#hw1) .upg-quick-btn { flex: 1 1 0 !important; min-width: 0 !important; max-width: 58px; }   /* шесть конфет помещаются в ширину */
    body.season-halloween .upg-quick-row { gap: 5px !important; padding: 0 8px; }
    .upg-slot-card > .hw-shrine.top { display: none; }   /* на узком экране свечам некуда встать: подписи над слотами во всю ширину */
    body.season-halloween #profileView .profile-hero { padding-bottom: 104px !important; }
    .hw-crypt { width: 160px; height: 88px; background-size: 160px 88px; right: 4%; bottom: 10px; }
    .hw-crescent { width: 40px; height: 40px; background-size: 40px 40px; left: auto; right: 8%; top: 10px; }
    .hw-brazier, .hw-wisp { display: none; }
    .hw-scene.pscene::after { inset: 0 0 104px 0; }
    .hw-plaque { font-size: 6px; line-height: 8px; }
    .hw-bunting { height: 18px; top: -2px; background-size: 96px 18px; }   /* 1x: на телефоне у баннера мало места сверху */
    .hw-web { width: 28px; height: 28px; background-size: 28px 28px; }
    body.season-halloween #caseShowcase > .hw-gate { width: 144px; height: 128px; background-size: 144px 128px; }
    .hw-cmoon { width: 60px; height: 60px; background-size: 60px 60px; }
    .hw-planet { width: 56px; height: 36px; background-size: 56px 36px; }
}

/* слабое устройство (мало памяти или ядер — решает halloween.js): самое тяжёлое движение выключено, картинка остаётся */
body.hw-lite .hw-dancer, body.hw-lite .hw-dshadow, body.hw-lite .hw-witch, body.hw-lite .hw-fog.b, body.hw-lite .hw-clouds.b, body.hw-lite .hw-z { display: none !important; }
body.hw-lite .hw-fog, body.hw-lite .hw-clouds, body.hw-lite .hw-stars, body.hw-lite .hw-bunting, body.hw-lite .hw-glow { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
    .hw-planet { animation: none !important; }
    .hw-obat, .hw-lamp2, .hw-mghost, .hw-mspider { animation: none !important; }
    .hw-burst { display: none !important; }
    .hw-scene *, .hw-stars, .hw-bunting, .hw-hp, .hw-hang, .hw-sheet, .hw-sleeper, .hw-candy, .hw-ghost { animation: none !important; }
    .hw-z, .hw-ghost-clip { display: none !important; }
    .hw-witch, .hw-bat { display: none !important; }
}

/* Логотип в шапке (brand-wordmark.css): плоский тыквенный, без тени и без фона из скина. */
body.season-halloween .topbar .brand-btn.brand-btn { background: none !important; border: 0 !important; box-shadow: none !important; }
body.season-halloween .topbar .brand-btn.brand-btn .brand-word { color: #FFA048 !important; text-shadow: none !important; }

/* ══ раунд 2: живые мелочи ══ */
/* главная: призрак катит телегу с тыквами по дороге раз в ~30 с. Дорожка = ширина сцены; едет вся дорожка (transform),
   телега стоит у её левого края, так что она выезжает из-за левого края и уезжает за правый. Колёса и призрак — кадры. */
.hw-cart { position: absolute; left: 0; right: 0; bottom: 30px; height: 68px; pointer-events: none;
    animation: hw-cart-road 30s linear infinite; transform: translateX(-100%); }
.hw-cart .hw-win { right: auto; width: 128px; height: 68px; }
.hw-cart .hw-sheet { width: 1024px; background-image: url("/season/halloween/cart-sheet.png?v=hw83"); animation: hw-cart-roll .67s steps(8) infinite; }
@keyframes hw-cart-roll { to { transform: translateX(-1024px); } }
@keyframes hw-cart-road { 0% { transform: translateX(-100%); } 34% { transform: translateX(calc(100% + 0px)); } 100% { transform: translateX(calc(100% + 0px)); } }

/* топ-дроп за 24 часа: корона съехала на левый верхний угол и висит криво, по ободу пробегает блик */
/* v2 (crown2-sheet, _dev/halloween_art10.py): раз в 6 с корона подпрыгивает (кадры подъёма на 1-2-3 px и обратно),
   потом блик пробегает по шарикам зубцов, у среднего вспыхивает искра, следом блик по ободу. Всё кадрами 22×19 (44×38),
   лист едет translateX по шагам. Кадр выше прежнего на 4 ряда (запас под прыжок) и шире на 2: низ и левый край короны
   стоят там же, где раньше. */
.hw-crown { position: absolute; left: -14px; top: -25px; width: 44px; height: 38px; z-index: 3; pointer-events: none; transform: rotate(-15deg); }
.hw-crown .hw-sheet { width: 484px; background-image: url("/season/halloween/crown2-sheet.png?v=hw124"); animation: hw-crown-live 6s steps(1) infinite; }
@keyframes hw-crown-live {
    0%, 48% { transform: translateX(0); }
    49.4% { transform: translateX(-44px); } 50.8% { transform: translateX(-88px); } 52.2%, 54.9% { transform: translateX(-132px); }
    56.3% { transform: translateX(-88px); } 57.7% { transform: translateX(-44px); } 59.1% { transform: translateX(0); }
    66% { transform: translateX(-176px); } 67.4%, 70.2% { transform: translateX(-220px); } 71.6% { transform: translateX(-264px); } 73% { transform: translateX(0); }
    78% { transform: translateX(-308px); } 79.4% { transform: translateX(-352px); } 80.8% { transform: translateX(-396px); } 82.2% { transform: translateX(-440px); }
    83.6%, 100% { transform: translateX(0); }
}
#liveFeedBest > .hw-crown { left: 28px; top: -17px; transform: rotate(-12deg); }   /* колонку слева режет край, сверху на широких экранах её перекрывает шапка: корона лежит на кромке карточки между аватаром и картинкой предмета */
#homeLiveFeedBestMobile > .hw-crown { left: -12px; top: -23px; }

/* колесо недели: пиксельная иконка-конфетное колесо (кадры поворота, пиксели не размываются) */
body.season-halloween .ww-fab .ww-fab-wheel { position: relative; width: 44px; height: 44px; background: none !important; border: 0 !important; box-shadow: none !important; animation: none !important; }
body.season-halloween .ww-fab .ww-fab-wheel::after { display: none !important; }
.hw-wwicon { position: absolute; left: 0; top: 0; width: 44px; height: 44px; pointer-events: none; }
/* лист v2 (ww-icon2-sheet): диск ровно по центру кадра 22×22, стрелка внутри обода; старый сидел на 1 px правее и ниже */
.hw-wwicon .hw-sheet { width: 528px; background-image: url("/season/halloween/ww-icon2-sheet.png?v=hw124"); animation: hw-wwicon 2.4s steps(12) infinite; }
.ww-fab.is-ready .hw-wwicon .hw-sheet { animation-duration: .9s; }
@keyframes hw-wwicon { to { transform: translateX(-528px); } }
body.season-halloween #profileWeeklyWheelBtn svg { display: none !important; }
#profileWeeklyWheelBtn .hw-wwicon { position: relative; flex: none; display: block; margin: -8px 0; }
@media (max-width: 760px) { body.season-halloween .ww-fab .ww-fab-wheel { width: 44px; height: 44px; } }

/* вкладка колеса: гирлянда из конфет-кукурузок между верхними углами карточки, кот на пьедестале, разлёты */
.hw-garland { position: absolute; left: 14px; right: 14px; top: 2px; height: 28px; z-index: 1; pointer-events: none;
    background: url("/season/halloween/garland-corn.png?v=hw83") 0 0 / 80px 28px repeat-x; }
.hw-wwcat { position: absolute; left: calc(50% - 124px); bottom: 54px; width: 52px; height: 48px; z-index: 2; pointer-events: none; }
.hw-wwcat .hw-sheet { width: 832px; background-image: url("/season/halloween/ww-cat-sheet.png?v=hw83"); animation: hw-wwcat 2.6s steps(16) infinite; }
@keyframes hw-wwcat { to { transform: translateX(-832px); } }
@media (max-width: 760px) { .hw-wwcat { left: calc(50% - 110px); bottom: 44px; } }

.hw-fx { position: absolute; left: 50%; top: 42%; width: 0; height: 0; z-index: 6; pointer-events: none; }
.hw-fx > i { position: absolute; left: -12px; top: -8px; width: 24px; height: 12px; opacity: 0; animation: hw-fx-fly 1.4s cubic-bezier(.2, .7, .4, 1) forwards; }
.hw-fx.bats > i { background: url("/season/halloween/bat2-sheet.png") 0 0 / 48px 12px; }
.hw-fx.candy > i { width: 16px; height: 16px; left: -8px; background: url("/season/halloween/candy-confetti.png?v=hw83") 0 0 / 48px 16px; animation-name: hw-fx-candy; animation-duration: 1.6s; }
.hw-fx.candy > i.p1 { background-position: -16px 0; } .hw-fx.candy > i.p2 { background-position: -32px 0; }
@keyframes hw-fx-fly { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.15); } }
@keyframes hw-fx-candy { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 10% { opacity: 1; } 75% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); } }

/* краш: тыква-планета растёт с множителем (обёртка — scale, внутри прежний дрейф), на крахе клуб призрачного дыма */
.hw-planet-wrap { position: absolute; right: 7%; bottom: 9%; width: 112px; height: 72px; transform-origin: 70% 70%; transition: transform .35s ease-out; pointer-events: none; }
.hw-planet-wrap > .hw-planet { right: 0; bottom: 0; }
.hw-puff { position: absolute; width: 96px; height: 96px; z-index: 4; pointer-events: none; }
.hw-puff .hw-sheet { width: 1152px; background-image: url("/season/halloween/crash-puff-sheet.png?v=hw83"); animation: hw-puff .5s steps(12) forwards; }
@keyframes hw-puff { to { transform: translateX(-1152px); } }

/* лента дропов: особый дроп приносит призрак — спускается с карточкой, отпускает и улетает */
.hw-feedghost { position: absolute; left: 50%; top: -8px; width: 48px; height: 44px; margin-left: -24px; z-index: 4; pointer-events: none;   /* лента обрезает всё выше карточки: призрак держит её за верхний край */
    opacity: 0; animation: hw-feedghost 1.3s ease-in-out forwards; }
.hw-feedghost .hw-sheet { width: 384px; background-image: url("/season/halloween/feed-ghost-sheet.png?v=hw83"); animation: hw-feedghost-f .5s steps(8) infinite; }
@keyframes hw-feedghost-f { to { transform: translateX(-384px); } }
@keyframes hw-feedghost { 0% { opacity: 0; transform: translateY(-34px); } 18% { opacity: 1; transform: translateY(0); } 55% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-46px) translateX(10px); } }

@media (max-width: 560px) {
    .hw-cart { bottom: 15px; height: 34px; }
    .hw-cart .hw-win { width: 64px; height: 34px; }
    .hw-cart .hw-sheet { width: 512px; animation-name: hw-cart-roll-s; }
    @keyframes hw-cart-roll-s { to { transform: translateX(-512px); } }
    .hw-planet-wrap { width: 56px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .hw-cart, .hw-fx, .hw-puff, .hw-feedghost { display: none !important; }
    .hw-crown .hw-sheet, .hw-wwicon .hw-sheet, .hw-wwcat .hw-sheet { animation: none !important; }
    .hw-planet-wrap { transition: none; }
}

/* Дайсы: радужный текст («выигрыш x10», «Радуга!») — скин красит фон градиентом, без обрезки по тексту
   получалась сплошная полоса. Возвращаем градиент внутрь букв. */
body.season-halloween .dice-rules-list li.is-scatter-rule .dice-rule-action .dice-rule-win,
body.season-halloween .dice-result .dice-result-scatter {
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ══ раунд 3 ══ */
/* шапка: Диги в ведьминой шляпе, нарисован в родном размере 26×26 — показываем ровно 1x, без размытия */

/* батл в ожидании v2: камень с материалом, «RIP» с тенью резьбы, мох, трещина, свеча на земле с ореолом */
.hw-bwait { width: 60px !important; height: 60px !important; right: 14px !important; bottom: 10px !important; }
.hw-bwait .hw-sheet { width: 120px !important; background-image: url("/season/halloween/battle-wait2-sheet.png?v=hw91") !important; animation-name: hw-bwait2 !important; }
@keyframes hw-bwait2 { 0%, 45%, 55%, 100% { transform: translateX(0); } 50%, 80% { transform: translateX(-60px); } }
.hw-rip { width: 52px !important; height: 56px !important; }
.hw-rip.sm { width: 26px !important; height: 28px !important; }

/* инвентарь профиля: на телефоне три в ряд, картинка ~62 % ширины карточки (вписана в квадрат, не обрезается),
   цена заметной плашкой под именем, кнопки компактнее, но не ниже 36 px */
body.season-halloween #profileView #profileInventoryGrid.inventory-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)) !important; }
@media (max-width: 760px) {
    body.season-halloween #profileView #profileInventoryGrid.inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
}
@media (max-width: 760px) {   /* окно инвентаря на телефоне: у сайта 46vh (300 px на 640), в него не влезала даже одна наша карточка */
    body.season-halloween #profileView .profile-split-pane.profile-split-inventory { height: clamp(440px, 74vh, 640px) !important; max-height: clamp(440px, 74vh, 640px) !important; }
}
@media (max-width: 360px) {   /* 320–360: в три ряда карточка уже 90 px, «Продать» и имя не влезают, поэтому два в ряд */
    body.season-halloween #profileView #profileInventoryGrid.inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
body.season-halloween #profileInventoryGrid .inventory-card { min-width: 0; padding-left: 6px !important; padding-right: 6px !important; container-type: inline-size; }   /* картинка считается от ширины самой карточки */
body.season-halloween #profileInventoryGrid .inventory-card .inventory-card-top { width: 100% !important; align-items: center; }
body.season-halloween #profileInventoryGrid .inventory-card .item-emoji.big {
    position: relative; width: 82cqi !important; height: auto !important; aspect-ratio: 1; min-height: 0 !important; max-width: 132px !important;   /* cqi — ширина без полей: 82 % от неё ≈ 70 % всей карточки */
    margin: 4px auto 2px !important; overflow: visible;
}
/* картинка вписана в квадрат абсолютно: высокие брейнроты не растягивают карточку, имена стоят в ряд */
body.season-halloween #profileInventoryGrid .inventory-card .item-emoji.big .inventory-image {
    position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain !important;
}
body.season-halloween #profileInventoryGrid .inventory-card .item-name {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; font-size: 11px !important; line-height: 1.25 !important;
}
body.season-halloween #profileView #profileInventoryGrid .inventory-card .item-value {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 3px; margin: 4px auto 0 !important; padding: 2px 7px 2px 6px !important;
    font-size: 12px !important; font-weight: 900 !important; line-height: 1.2 !important; opacity: 1 !important; letter-spacing: 0 !important;
    color: #FFD84A !important; background: #120E1C !important; border: 1px solid rgba(255, 160, 72, .55) !important;
    box-shadow: inset 0 -2px 0 rgba(224, 112, 18, .35); font-variant-numeric: tabular-nums; white-space: nowrap;
}
body.season-halloween #profileInventoryGrid .inventory-card .item-value img { width: 13px !important; height: 13px !important; }
body.season-halloween #profileInventoryGrid .inventory-card .inventory-actions .primary-btn,
body.season-halloween #profileInventoryGrid .inventory-card .inventory-actions button {
    min-height: 36px !important; padding: 0 4px !important; font-size: 11px !important; letter-spacing: .04em !important; white-space: nowrap;
}
body.season-halloween #profileInventoryGrid .inventory-card .item-source { font-size: 9px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* все кнопки и плашка источника — одной ширины внутри карточки, с одинаковыми отступами по бокам */
body.season-halloween #profileInventoryGrid .inventory-card .inventory-actions { width: 100% !important; padding: 0 !important; box-sizing: border-box; }
body.season-halloween #profileInventoryGrid .inventory-card .inventory-actions .inv-action-btns { width: 100% !important; margin: 0 !important; padding: 0 !important; gap: 4px !important; display: flex !important; flex-direction: column !important; }
body.season-halloween #profileInventoryGrid .inventory-card .inventory-actions .item-source,
body.season-halloween #profileInventoryGrid .inventory-card .inventory-actions .inv-action-btns > * {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin: 0 !important; box-sizing: border-box !important;
}

/* статистика (главная и профиль): резная каменная плита v3 — скошенная кромка, утопленное поле под цифры, мох, трава */
body.season-halloween .site-stat {
    border-width: 32px 32px 24px !important;
    border-image: url("/season/halloween/stone10-a.png?v=hw96") 16 16 12 fill / 32px 32px 24px round !important;
    padding: 0 2px 2px !important;
}
body.season-halloween .site-stat:nth-child(3n + 2) { border-image-source: url("/season/halloween/stone10-b.png?v=hw96") !important; }
body.season-halloween .site-stat:nth-child(3n) { border-image-source: url("/season/halloween/stone10-c.png?v=hw96") !important; }
body.season-halloween .site-stat-value { color: #221C30 !important; text-shadow: 0 1px 0 rgba(220, 214, 238, .65) !important; font-weight: 900 !important; }
body.season-halloween .site-stat-label, body.season-halloween .site-stat span:not(.site-stat-value) { color: #3A3350 !important; text-shadow: none !important; }
body.season-halloween .profile-stats-body > div {
    border-width: 16px 16px 12px !important;
    border-image: url("/season/halloween/stone10-a.png?v=hw96") 16 16 12 fill / 16px 16px 12px round !important;
    padding: 2px 8px 4px !important;
}
body.season-halloween .profile-stats-body > div:nth-child(2n) { border-image-source: url("/season/halloween/stone10-c.png?v=hw96") !important; }
body.season-halloween .profile-stats-body > div:nth-child(3) { border-image-source: url("/season/halloween/stone10-b.png?v=hw96") !important; }

/* окна: у каждого семейства свой облик — цвет рамки, тёплое свечение сверху и полоска-акцент по верхнему краю */
body.season-halloween [data-hw-kind] { --hwk: 255 160 72; }
body.season-halloween [data-hw-kind="gold"] { --hwk: 255 206 84; }
body.season-halloween [data-hw-kind="bat"] { --hwk: 170 130 255; }
body.season-halloween [data-hw-kind="toxic"] { --hwk: 140 255 58; }
body.season-halloween [data-hw-kind="ghost"] { --hwk: 200 220 255; }
body.season-halloween [data-hw-kind="moon"] { --hwk: 246 238 219; }
body.season-halloween [data-hw-kind="ember"] { --hwk: 255 120 60; }
body.season-halloween [data-hw-kind="bone"] { --hwk: 232 72 90; }
body.season-halloween:not(#hw0) [data-hw-kind] {
    border: 1px solid rgb(var(--hwk) / .42) !important;
    background:
        linear-gradient(90deg, rgb(var(--hwk) / 0), rgb(var(--hwk) / .85) 30%, rgb(var(--hwk) / .85) 70%, rgb(var(--hwk) / 0)) 0 0 / 100% 2px no-repeat,
        radial-gradient(120% 70% at 50% 0%, rgb(var(--hwk) / .13), rgb(var(--hwk) / 0) 62%),
        linear-gradient(180deg, #1B1526 0%, #0F0B17 100%) !important;
    box-shadow: 0 0 0 1px rgba(18, 14, 28, .9), 0 26px 70px rgba(0, 0, 0, .72), 0 0 46px rgb(var(--hwk) / .12) !important;
}
/* плита v3: трава и трещина уже нарисованы в камне — старые накладки прячем; жильцы стоят на новой верхней кромке (32 px) */
body.season-halloween .site-stat > .hw-mound, body.season-halloween .site-stat > .hw-crack { display: none !important; }
body.season-halloween .site-stat > .hw-tenant, body.season-halloween .site-stat > .hw-ghost-clip { bottom: calc(100% + 29px) !important; }
/* очень широкий экран: шапка сайта лежит поверх верха боковой колонки до самой карточки — корону опускаем на её кромку изнутри */
@media (min-width: 1500px) { #liveFeedBest > .hw-crown { top: -7px; left: 28px; } }   /* кадр v2 выше на 8 px: низ короны там же */

/* ══ бургер-меню: стена склепа ══
   Штора — кладка тёмного склепа, правый край — ребро открытой дубовой двери с железной полосой. Пункты меню — деревянные
   таблички на гвоздях; текущий раздел — табличка, освещённая тыквенным фонарём. Сверху тёплый отсвет фонаря.
   DOM не трогаем: всё через фон, border-image и псевдоэлементы самой шторы. */
@media (max-width: 1599px) {
    body.season-halloween #mainNav.main-nav {
        background: url("/season/halloween/door-edge.png?v=hw107") 100% 0 / 20px 64px repeat-y,
                    radial-gradient(160px 120px at 60% 0, rgba(255, 160, 72, .10), rgba(255, 160, 72, 0) 100%),   /* тёплый отсвет фонаря сверху */
                    linear-gradient(180deg, rgba(10, 6, 16, .25), rgba(10, 6, 16, .75)),
                    url("/season/halloween/crypt-wall.png?v=hw107") 0 0 / 64px 64px repeat !important;
        image-rendering: pixelated;
        border-right: 0 !important;
        padding-right: 34px !important;                 /* ребро двери 20 px + те же 14 px воздуха, что слева: таблички стоят симметрично */
    }
    /* таблички v2 (_dev/halloween_art10.py): четыре разные доски в 2x — свой рисунок волокон, сучок, трещина, сколотый
       угол, гвозди в разных местах. Вариант привязан к пункту (data-nav), а не к номеру: скрытые пункты не ставят две
       одинаковые доски рядом. Срез 8/20, середина 42 px картинки = 84 px: доска 244 px ровно в две плитки, без растяжения.
       Всё, что нельзя тянуть, нарисовано в верхних и нижних 8 рядах; середина — ровное поле, она тянется под высоту. */
    body.season-halloween #mainNav .nav-btn { --hwp: url("/season/halloween/nav-plank-a.png?v=hw124"); --hwp-on: url("/season/halloween/nav-plank-a-on.png?v=hw124"); }
    body.season-halloween #mainNav .nav-btn:is([data-nav="event"], [data-nav="ladder"], [data-nav="crash"], [data-nav="bonus"], [data-nav="eggs"]) { --hwp: url("/season/halloween/nav-plank-b.png?v=hw124"); --hwp-on: url("/season/halloween/nav-plank-b-on.png?v=hw124"); }
    body.season-halloween #mainNav .nav-btn:is([data-nav="fuse"], [data-nav="dice"], [data-nav="faq"]) { --hwp: url("/season/halloween/nav-plank-c.png?v=hw124"); --hwp-on: url("/season/halloween/nav-plank-c-on.png?v=hw124"); }
    body.season-halloween #mainNav .nav-btn:is([data-nav="upgrader"], [data-nav="quests"]) { --hwp: url("/season/halloween/nav-plank-d.png?v=hw124"); --hwp-on: url("/season/halloween/nav-plank-d-on.png?v=hw124"); }
    body.season-halloween #mainNav .nav-btn {
        border-style: solid !important; border-color: transparent !important; border-width: 9px 10px !important;   /* поровну сверху и снизу: иконка и текст встают в середину доски */
        border-image: var(--hwp) 8 20 fill / 16px 40px round stretch !important;
        image-rendering: pixelated;
        background: none !important; box-shadow: none !important; border-radius: 0 !important;
        padding: 2px 6px !important; min-height: 46px; color: #F1E6D6 !important; text-shadow: 0 1px 0 rgba(0, 0, 0, .6);
        gap: 10px !important;                           /* одинаковый отступ от иконки до текста на всех табличках */
        transform: rotate(-.6deg);                      /* таблички висят чуть вразнобой */
    }
    body.season-halloween #mainNav .nav-btn:nth-of-type(2n) { transform: rotate(.5deg); }
    body.season-halloween #mainNav .nav-btn:nth-of-type(3n) { transform: rotate(-.2deg); }
    body.season-halloween #mainNav .nav-btn.active,
    body.season-halloween[class] #mainNav .nav-btn.nav-btn-event.active {
        border-image-source: var(--hwp-on) !important;
        color: #3A1A04 !important; text-shadow: 0 1px 0 rgba(255, 220, 170, .5);
        box-shadow: 0 0 22px rgba(255, 160, 72, .35) !important;
    }
    body.season-halloween #mainNav .nav-btn .solar-icon { filter: none; }
    body.season-halloween #mainNav > .hw-web { right: 20px; }
    /* иконки табличек: пиксельные 12×12, в 2x = 24 px, один лист на все пункты; старые svg и тыква ивента прячутся */
    body.season-halloween #mainNav .nav-btn > .hw-nicon {
        display: block; flex: none; width: 24px; height: 24px; margin: -3px 0;   /* -3: иконка 24 px не раздувает табличку (на 1024 она 40 px, как раньше) */
        background: url("/season/halloween/nav-icons.png?v=hw124") calc(var(--i) * -24px) 0 / 288px 24px no-repeat;
    }
    body.season-halloween #mainNav .nav-btn > .hw-nicon ~ img.solar-icon,
    body.season-halloween #mainNav .nav-btn > .hw-nicon ~ svg { display: none !important; }
    body.season-halloween #mainNav #navEventBtn:has(> .hw-nicon)::before { display: none !important; }
    body.season-halloween #mainNav #navEventBtn > .nav-event-label { display: contents; font-family: inherit !important; }   /* подпись ивента тем же шрифтом и в строку, как текст других табличек (рантайм шрифтов красил её в Chakra Petch, доска была на 2 px выше) */
}
.hw-nicon { display: none; }   /* на широком экране меню — строка сверху, там остаются иконки сайта */
/* компактное меню на невысоких экранах: все пункты (с OPS у сотрудников) помещаются в одну штору; если всё же не влезли —
   штора прокручивается сама, а не обрезает последний пункт */
@media (max-width: 1599px) {
    body.season-halloween #mainNav.main-nav { overflow-y: auto !important; overscroll-behavior: contain; scrollbar-width: none; }
    body.season-halloween #mainNav.main-nav::-webkit-scrollbar { display: none; }
    body.season-halloween #mainNav .nav-btn:not(:has(> .hw-nicon)) { padding-left: 40px !important; }   /* пункт без иконки (OPS): текст в одну линию с остальными */
}
@media (max-width: 1599px) and (max-height: 900px) {
    body.season-halloween #mainNav .nav-btn { min-height: 40px; border-width: 7px 10px !important; padding: 0 6px !important; }
    body.season-halloween #mainNav.main-nav { gap: 3px !important; }
}
@media (max-width: 1599px) and (max-height: 720px) {
    body.season-halloween #mainNav .nav-btn { min-height: 36px; font-size: 13px !important; }
    body.season-halloween #mainNav .topbar-user-wrap { padding-bottom: 6px !important; }
    body.season-halloween #mainNav .topbar-user-wrap .user-box { padding-top: 8px !important; padding-bottom: 8px !important; }
}

/* бонусы на узком экране: спящая мышь висела поверх подписи у заголовка — на телефоне её место над правым краем шапки зоны */
@media (max-width: 560px) { .bonus-zone-ref > .hw-sleeper { display: none; } }
/* череп на кнопке поддержки: сидит на самой кнопке, наружу не торчит (раньше закрывал цифры под кнопкой) */
body.season-halloween .hw-skull { right: 0; top: 0; width: 20px; height: 20px; background-size: 20px 20px; }   /* внутри кнопки поддержки: за её край не выходит */
/* лента дропов: подпись «откуда выпало» в превью карточки не шире карточки (на 320–390 вылезала на 3–14 px) */
body.season-halloween .live-card-preview-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ══ кнопка поддержки v2: пузырь чата с призраком-оператором в гарнитуре ══
   Котёл не читался как «поддержка». Теперь главный элемент — оранжевый пузырь чата, внутри призрак в гарнитуре:
   говорит (рот открывается), моргает, огонёк микрофона мигает (8 кадров 20×18 в 2x = 40×36, _dev/halloween_art10.py).
   Круг прежнего размера (58/62 px), тёмный, с тыквенным ободом внутри круга. Наружу ничего не торчит. */
body.season-halloween #supportFloatingBtn.support-floating-btn {
    background: radial-gradient(circle 30px at 50% 50%, #2E2440 0 14px, #251D34 14px 22px, #1C1626 22px) !important;
    border-color: #120E1C !important;
    box-shadow: inset 0 0 0 2px #120E1C, inset 0 0 0 4px #E07012, inset 0 0 0 5px #120E1C, 0 8px 22px rgba(0, 0, 0, .5) !important;
}
body.season-halloween #supportFloatingBtn:has(> .hw-oper) > .support-floating-icon { visibility: hidden; }
.hw-oper { position: absolute; left: calc(50% - 20px); top: calc(50% - 17px); width: 40px; height: 36px; pointer-events: none; }   /* -17: рисунок занимает ряды 0..16 кадра, так он ровно по центру круга */
.hw-oper .hw-sheet { width: 320px; background-image: url("/season/halloween/support-operator-sheet.png?v=hw140"); animation: hw-oper 1.6s steps(8) infinite; }
@keyframes hw-oper { to { transform: translateX(-320px); } }
@media (prefers-reduced-motion: reduce) { .hw-oper .hw-sheet { animation: none !important; } }

/* ══ две плавающие кнопки справа снизу на одной линии ══
   Было: колесо стояло на 4 px выше поддержки на компьютере, а при прокрутке, когда поддержка пряталась над кнопкой
   страницы (body.fab-over-cta), колесо уезжало вниз на 8 px с пружинным перелётом, поддержка оставалась на месте.
   Теперь обе кнопки: один нижний отступ с учётом safe-area, общий центр по вертикали, одинаково гаснут (только
   прозрачность, без сдвига), на сенсорных экранах не прыгают от «залипшего» hover. */
body.season-halloween #supportFloatingBtn { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
body.season-halloween .bb2.ww-fab { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); animation: hw-fab-in .2s ease backwards; transition: opacity .2s ease, visibility .2s ease, box-shadow .2s ease; }   /* пилюля 58 px: центр 20 + 29 = 18 + 31 */
@keyframes hw-fab-in { from { opacity: 0; } to { opacity: 1; } }
body.season-halloween.fab-over-cta .bb2.ww-fab { transform: none !important; visibility: hidden; }
body.season-halloween .bb2.ww-fab:hover { transform: scale(1.03); }
@media (max-width: 760px) {
    body.season-halloween #supportFloatingBtn { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
    body.season-halloween .bb2.ww-fab { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); right: 84px; }   /* 721–760: пилюля 58 px, центр 14 + 29, как у круга 58 px */
}
@media (max-width: 720px) {
    body.season-halloween .bb2.ww-fab { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: 80px; }   /* значок 50 px: центр 18 + 25 = 14 + 29 */
}
@media (hover: none) {
    body.season-halloween .bb2.ww-fab:hover, body.season-halloween #supportFloatingBtn:hover { transform: none !important; }
}
/* строка «Колесо недели» в окне пополнения: иконка-колесо в 2x (44 px) не помещалась в кружок 22 px сайта и торчала
   вправо и вниз на 22 px. Место под неё 44 px, а лишнюю высоту съедает отрицательный отступ: строка не растёт. */
body.season-halloween .ww-dephint .ww-dephint-icon:has(> .hw-wwicon) { position: relative; width: 44px; height: 44px; margin: -8px 0; background: none !important; box-shadow: none !important; border-radius: 0 !important; }

/* ══ топ-дроп за 24 часа: премиум ══
   Тонкая золотая кромка и тёплое свечение ступенями (тени без размытия), золотой отблеск сверху ступенями, раз в 6 с
   по карточке проходит блик (полоса едет translateX по шагам), у короны и у цены вспыхивают пиксельные искры
   (top-spark-sheet, _dev/halloween_art10.py). Раскладка и размеры блока прежние, на текст ничего не заходит. */
body.season-halloween #liveFeedBest > .live-card-best,
body.season-halloween #homeLiveFeedBestMobile.live-best-banner-mobile {
    border-color: #E8B23A !important;
    background: linear-gradient(180deg, rgba(255, 196, 80, .16) 0 18%, rgba(255, 196, 80, .10) 18% 40%, rgba(255, 196, 80, .05) 40% 70%, rgba(255, 196, 80, .02) 70%), #17131F !important;
    box-shadow: inset 0 0 0 1px #6A4208, inset 0 2px 0 1px rgba(255, 224, 140, .22),
                0 0 0 1px #120E1C, 0 0 0 3px rgba(255, 176, 60, .26), 0 0 0 5px rgba(255, 140, 30, .12) !important;
}
body.season-halloween #liveFeedBest > .live-card-best { position: relative; overflow: hidden; }
/* блик: полоса из трёх ступеней света, наклонена; раз в 6 с проезжает карточку за 10 кадров */
.hw-tshine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.hw-tshine > i { position: absolute; top: -10%; bottom: -10%; left: 0; width: 22%;
    background: linear-gradient(90deg, rgba(255, 240, 200, 0) 0 15%, rgba(255, 240, 200, .10) 15% 32%, rgba(255, 244, 214, .22) 32% 68%, rgba(255, 240, 200, .10) 68% 85%, rgba(255, 240, 200, 0) 85%);
    transform: translateX(-140%) skewX(-18deg); animation: hw-tshine 6s infinite; }
@keyframes hw-tshine {
    0%, 70% { transform: translateX(-140%) skewX(-18deg); animation-timing-function: steps(10, end); }
    80%, 100% { transform: translateX(560%) skewX(-18deg); }
}
#homeLiveFeedBestMobile > .hw-tshine > i { animation-delay: -2s; }
/* искры: 7×7 в 2x, у короны и у цены (на компьютере у пилюли «24Ч»), каждая раз в несколько секунд */
.hw-tspark { position: absolute; width: 14px; height: 14px; z-index: 4; pointer-events: none; }
.hw-tspark .hw-sheet { width: 112px; background-image: url("/season/halloween/top-spark-sheet.png?v=hw142"); animation: hw-tspark 2.8s steps(8) infinite; }
.hw-tspark.b .hw-sheet { animation-duration: 3.6s; animation-delay: -1.3s; }
@keyframes hw-tspark { to { transform: translateX(-112px); } }
#liveFeedBest > .hw-crown, #homeLiveFeedBestMobile > .hw-crown { z-index: 5; }   /* карточка теперь со своим слоем (блик внутри): корона и искры над ней */
#homeLiveFeedBestMobile > .hw-tspark.a { left: 34px; top: -10px; }     /* за короной, над кромкой: на подписи не заходит */
#homeLiveFeedBestMobile > .hw-tspark.b { right: 6px; top: 12px; }       /* на верхнем правом углу ценника, над текстом цены */
#liveFeedBest > .hw-tspark.a { left: 76px; top: -2px; }
#liveFeedBest > .hw-tspark.b { right: 2px; top: -2px; }
/* корона топ-дропа на компьютере убрана (владелец 23.10), только на телефоне */
/* цена: золотая плашка в два тона металла, кегль на 1 px крупнее */
body.season-halloween #homeLiveFeedBestMobile .live-best-banner-mobile-value {
    background: linear-gradient(180deg, #FFE27A 0 50%, #FFC93C 50%) !important;
    box-shadow: inset 0 1px 0 #FFF6C8, inset 0 -2px 0 #D49A12, 0 0 0 1px #6A4208 !important;
    color: #2A1600 !important; font-size: 13px !important; text-shadow: 0 1px 0 rgba(255, 246, 200, .55);
}
@media (prefers-reduced-motion: reduce) { .hw-tshine, .hw-tspark { display: none !important; } }

/* ── события при наведении на кейсы (22.10) ──
   halloween.js (блок «события при наведении») раздаёт карточкам без «жильцов» одно событие по хэшу названия кейса,
   без повторов рядом, редкие реже. Слои создаются только на время события и сразу убираются: в покое на карточке нет
   ни одного лишнего узла и ни одной картинки. Одновременно идёт одно событие. Кадры: _dev/case_events_art.py, 1x,
   показ 2x целым масштабом, лист едет translateX по шагам (24 к/с). Пути тоже по шагам 24 к/с. Слой обрезан по низу
   картинки кейса (--vb), поэтому название и цена никогда не закрыты. */
.hw-ev { position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; pointer-events: none; z-index: 2; }
.hw-evb { position: absolute; overflow: hidden; pointer-events: none; }                 /* за картинкой кейса */
.hw-ev .hw-px, .hw-evb .hw-px { position: absolute; image-rendering: pixelated; }
.hw-ev .hw-sheet, .hw-evb .hw-sheet { animation-fill-mode: forwards; }
.hw-ev-run { position: absolute; left: 0; bottom: 0; height: 0; }                       /* дорожка: едет весь путь */
.hw-ev-run > * { position: absolute; }

/* 1. тыква выпрыгивает из-за кейса, подмигивает и ныряет обратно */
.hw-ev-pk { left: calc(var(--vl) + 2px); bottom: 0; width: 44px; height: 60px; }
.hw-ev-pk .hw-sheet { width: 1584px; background-image: url("/season/halloween/case-ev/ev-pumpkin.png?v=ce1"); animation: hw-ev-pk 1.5s steps(36) forwards; }
@keyframes hw-ev-pk { to { transform: translateX(-1584px); } }

/* 2. скелет выглядывает снизу и показывает большой палец */
.hw-ev-sk { right: calc(var(--vl) - 2px); bottom: 0; width: 56px; height: 56px; }
.hw-ev-sk .hw-sheet { width: 2240px; background-image: url("/season/halloween/case-ev/ev-skel.png?v=ce1"); animation: hw-ev-sk 1.667s steps(40) forwards; }
@keyframes hw-ev-sk { to { transform: translateX(-2240px); } }

/* 3. три летучие мыши вылетают из кейса веером */
.hw-ev-bats { position: absolute; left: calc(var(--vl) + var(--vw) / 2 - 14px); top: calc(var(--vt) + var(--vh) * .45); width: 0; height: 0; }
.hw-ev-bat { left: 0; top: 0; width: 28px; height: 22px; opacity: 0; animation: hw-ev-bat1 1.25s forwards; }
.hw-ev-bat .hw-sheet { width: 112px; background-image: url("/season/halloween/case-ev/ev-bat.png?v=ce1"); animation: hw-ev-flap .1667s steps(4) infinite; }
.hw-ev-bat.b { animation-name: hw-ev-bat2; animation-delay: .12s; }
.hw-ev-bat.c { animation-name: hw-ev-bat3; animation-delay: .25s; }
.hw-ev-bat.b .hw-sheet { animation-delay: -.08s; }
@keyframes hw-ev-flap { to { transform: translateX(-112px); } }
@keyframes hw-ev-bat1 {
    0% { opacity: 0; transform: none; animation-timing-function: steps(1); }
    4% { opacity: 1; transform: translate(-4px, -4px); animation-timing-function: steps(10); }
    40% { opacity: 1; transform: translate(-46px, -40px); animation-timing-function: steps(18); }
    100% { opacity: 1; transform: translate(-130px, -150px); }
}
@keyframes hw-ev-bat2 {
    0% { opacity: 0; transform: none; animation-timing-function: steps(1); }
    4% { opacity: 1; transform: translate(2px, -6px); animation-timing-function: steps(10); }
    40% { opacity: 1; transform: translate(-10px, -52px); animation-timing-function: steps(18); }
    100% { opacity: 1; transform: translate(24px, -170px); }
}
@keyframes hw-ev-bat3 {
    0% { opacity: 0; transform: none; animation-timing-function: steps(1); }
    4% { opacity: 1; transform: translate(4px, -4px); animation-timing-function: steps(10); }
    40% { opacity: 1; transform: translate(52px, -30px); animation-timing-function: steps(18); }
    100% { opacity: 1; transform: translate(150px, -120px); }
}

/* 4. Чикен-Зомби пробегает по нижнему краю картинки (на узкой карточке телефона — 1x, чтобы не закрыть кейс целиком) */
.hw-evl-chick .hw-ev-run { width: calc(100% + 68px); margin-left: -68px; animation: hw-ev-path 1.7s steps(41) forwards; }
.hw-ev-ck { left: 0; bottom: 0; width: 68px; height: 80px; }
.hw-ev-ck .hw-sheet { width: 680px; background-image: url("/season/halloween/case-ev/ev-chick.png?v=ce1"); animation: hw-ev-ck .4167s steps(10) infinite; }
.hw-ev.s1.hw-evl-chick .hw-ev-run { width: calc(100% + 34px); margin-left: -34px; }
.hw-ev.s1 .hw-ev-ck { width: 34px; height: 40px; }
.hw-ev.s1 .hw-ev-ck .hw-sheet { width: 340px; animation-name: hw-ev-ck1; }
@keyframes hw-ev-ck { to { transform: translateX(-680px); } }
@keyframes hw-ev-ck1 { to { transform: translateX(-340px); } }
@keyframes hw-ev-path { from { transform: translateX(0); } to { transform: translateX(100%); } }

/* 5. ведьма на метле пролетает за кейсом */
.hw-evb.hw-evl-witch .hw-ev-run { top: 10%; bottom: auto; width: calc(100% + 68px); margin-left: -68px; animation: hw-ev-path 2.3s steps(55) forwards; }
.hw-ev-wt { left: 0; top: 0; width: 68px; height: 36px; animation: hw-ev-bob 2.3s forwards; }
.hw-ev-wt .hw-sheet { width: 408px; background-image: url("/season/halloween/case-ev/ev-witch.png?v=ce1"); animation: hw-ev-wt .25s steps(6) infinite; }
@keyframes hw-ev-wt { to { transform: translateX(-408px); } }
@keyframes hw-ev-bob {
    0% { transform: translateY(14px); animation-timing-function: steps(14); }
    25% { transform: translateY(2px); animation-timing-function: steps(14); }
    50% { transform: translateY(-4px); animation-timing-function: steps(14); }
    75% { transform: translateY(2px); animation-timing-function: steps(13); }
    100% { transform: translateY(10px); }
}

/* 6. чёрный кот на метле проносится низко, с нырком */
.hw-evl-cat .hw-ev-run { top: calc(var(--vt) + var(--vh) * .3); bottom: auto; width: calc(100% + 56px); margin-left: -56px; animation: hw-ev-path 1.9s steps(46) forwards; }
.hw-ev-ct { left: 0; top: 0; width: 56px; height: 36px; animation: hw-ev-dip 1.9s forwards; }
.hw-ev-ct .hw-sheet { width: 448px; background-image: url("/season/halloween/case-ev/ev-cat.png?v=ce1"); animation: hw-ev-ct .333s steps(8) infinite; }
@keyframes hw-ev-ct { to { transform: translateX(-448px); } }
@keyframes hw-ev-dip {
    0% { transform: translateY(-14px); animation-timing-function: steps(18); }
    40% { transform: translateY(12px); animation-timing-function: steps(14); }
    70% { transform: translateY(2px); animation-timing-function: steps(14); }
    100% { transform: translateY(-20px); }
}

/* 7. призрак проходит сквозь карточку справа налево, посередине пугает «бу» */
.hw-evl-ghost .hw-ev-run { top: calc(var(--vt) + var(--vh) * .5 - 24px); bottom: auto; width: calc(100% + 44px); margin-left: -44px; animation: hw-ev-thru 1.5s forwards; }
.hw-ev-gh { left: 0; top: 0; width: 44px; height: 48px; opacity: .82; }
.hw-ev-gh .hw-sheet { width: 1584px; background-image: url("/season/halloween/case-ev/ev-ghost.png?v=ce1"); animation: hw-ev-gh 1.5s steps(36) forwards; }
@keyframes hw-ev-gh { to { transform: translateX(-1584px); } }
@keyframes hw-ev-thru {
    0% { transform: translateX(100%); animation-timing-function: steps(16); }
    44% { transform: translateX(50%); animation-timing-function: steps(1); }
    67% { transform: translateX(50%); animation-timing-function: steps(12); }
    100% { transform: translateX(0); }
}

/* 8. кейс подпрыгивает, из-под крышки валит пар */
.case-card.hw-ev-hop .case-visual { transform-origin: 50% 100%; animation: hw-ev-hop .75s forwards; }
@keyframes hw-ev-hop {
    0% { transform: none; animation-timing-function: steps(2); }
    11% { transform: scale(1.05, .9); animation-timing-function: steps(3); }
    22% { transform: translateY(-9px) scale(.96, 1.06); animation-timing-function: steps(4); }
    39% { transform: translateY(-13px); animation-timing-function: steps(4); }
    55% { transform: scale(1.07, .88); animation-timing-function: steps(3); }
    67% { transform: scale(.98, 1.03); animation-timing-function: steps(2); }
    78% { transform: translateY(-3px); animation-timing-function: steps(2); }
    89% { transform: scale(1.02, .98); animation-timing-function: steps(1); }
    100% { transform: none; }
}
.hw-ev-st { left: calc(50% - 34px); top: calc(var(--vt) + var(--vh) * .42 - 60px); width: 68px; height: 60px; }
.hw-ev-st .hw-sheet { width: 1360px; background-image: url("/season/halloween/case-ev/ev-steam.png?v=ce1"); animation: hw-ev-st .833s steps(20) .13s both; }
@keyframes hw-ev-st { from { transform: translateX(0); } to { transform: translateX(-1360px); } }

/* 9. свечение-пульс у дорогих кейсов (полоса цены золотая): ступени золота за кейсом и искры по углам */
.hw-ev-glow { left: var(--vl); top: var(--vt); width: var(--vw); height: var(--vh); opacity: 0;
    background: radial-gradient(closest-side, rgba(255, 226, 140, .62) 0 34%, rgba(255, 206, 84, .40) 34% 58%, rgba(255, 196, 64, .22) 58% 80%, rgba(255, 196, 64, 0) 80%);
    animation: hw-ev-pulse 1.7s forwards; }
@keyframes hw-ev-pulse {
    0% { opacity: 0; animation-timing-function: steps(4); }
    18% { opacity: 1; animation-timing-function: steps(6); }
    42% { opacity: .45; animation-timing-function: steps(6); }
    66% { opacity: 1; animation-timing-function: steps(8); }
    100% { opacity: 0; }
}
.hw-ev-sp { width: 14px; height: 14px; }
.hw-ev-sp .hw-sheet { width: 112px; background-image: url("/season/halloween/case-ev/ev-spark.png?v=ce1"); animation: hw-ev-sp .333s steps(8) 4 both; }
.hw-ev-sp.a { left: calc(var(--vl) + 8%); top: calc(var(--vt) + 10%); }
.hw-ev-sp.b { left: calc(var(--vl) + var(--vw) - 12%); top: calc(var(--vt) + 22%); }
.hw-ev-sp.c { left: calc(var(--vl) + 18%); top: calc(var(--vt) + var(--vh) - 30px); }
.hw-ev-sp.d { left: calc(var(--vl) + var(--vw) - 24%); top: calc(var(--vt) + var(--vh) - 22px); }
.hw-ev-sp.b .hw-sheet { animation-delay: .17s; } .hw-ev-sp.c .hw-sheet { animation-delay: .33s; } .hw-ev-sp.d .hw-sheet { animation-delay: .5s; }
@keyframes hw-ev-sp { to { transform: translateX(-112px); } }

/* 10. конфеты сыплются сверху, подпрыгивают на краю и гаснут */
.hw-ev-cd { top: -22px; width: 22px; height: 22px; animation: hw-ev-fall 1.6s both; }
.hw-ev-cd .hw-sheet { width: 88px; background-image: url("/season/halloween/case-ev/ev-candy.png?v=ce1"); animation: hw-ev-spin .333s steps(4) 3 forwards; }
.hw-ev-cd.corn .hw-sheet { background-image: url("/season/halloween/case-ev/ev-corn.png?v=ce1"); }
@keyframes hw-ev-spin { to { transform: translateX(-88px); } }
@keyframes hw-ev-fall {
    0% { transform: translateY(0); opacity: 1; animation-timing-function: steps(16); }
    44% { transform: translateY(var(--fall)); opacity: 1; animation-timing-function: steps(4); }
    56% { transform: translateY(calc(var(--fall) - 10px)); opacity: 1; animation-timing-function: steps(4); }
    66% { transform: translateY(var(--fall)); opacity: 1; animation-timing-function: steps(1); }
    86% { transform: translateY(var(--fall)); opacity: 1; animation-timing-function: steps(3); }
    100% { transform: translateY(var(--fall)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hw-ev, .hw-evb { display: none !important; } .case-card.hw-ev-hop .case-visual { animation: none !important; } }

#liveFeedBest > .hw-crown { display: none !important; }
@media (min-width: 1500px) { body.season-halloween .app-shell > .sidebar-live { padding-top: 118px !important; } }
