/* The arsenal's character effects follow each reward into the event. */
.event-item-art { isolation: isolate; }
.event-item-art img { animation: eventCharacterFloat 4.8s ease-in-out infinite; }
.event-fx {
  --particle: #ffb463;
  --particle-soft: #ff6d28;
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}
.event-fx-aura {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 42%, var(--particle-soft) 77%, transparent 82%);
  filter: blur(12px);
  animation: eventCharacterPulse 3.2s ease-in-out infinite;
}
.event-fx-ring {
  position: absolute;
  inset: 7%;
  border: 1px solid var(--particle);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--particle-soft), inset 0 0 15px var(--particle-soft);
  animation: eventCharacterRing 4s ease-in-out infinite;
}
.event-fx i {
  position: absolute;
  display: block;
  width: 8px;
  height: 8px;
  background: var(--particle);
  box-shadow: 0 0 8px 2px var(--particle-soft);
  opacity: 0;
  will-change: transform, opacity;
}
.event-fx i:nth-of-type(1) { left: 17%; top: 66%; animation-delay: -.2s; }
.event-fx i:nth-of-type(2) { left: 32%; top: 24%; animation-delay: -.7s; }
.event-fx i:nth-of-type(3) { left: 47%; top: 58%; animation-delay: -1.3s; }
.event-fx i:nth-of-type(4) { left: 63%; top: 19%; animation-delay: -1.9s; }
.event-fx i:nth-of-type(5) { left: 79%; top: 74%; animation-delay: -2.4s; }
.event-fx i:nth-of-type(6) { left: 23%; top: 44%; animation-delay: -2.9s; }
.event-fx i:nth-of-type(7) { left: 72%; top: 42%; animation-delay: -3.3s; }
.event-fx i:nth-of-type(8) { left: 52%; top: 82%; animation-delay: -3.8s; }

.event-fx--flame { --particle: #ffd063; --particle-soft: #ff6b1e; }
.event-fx--flame .event-fx-aura { filter: blur(16px); }
.event-fx--flame i { width: 6px; height: 12px; border-radius: 65% 5% 65% 40%; background: linear-gradient(#fff3a4, #ff902b 60%, #f84b19); animation: eventEmberRise 3s ease-out infinite; }
.event-fx--witch { --particle: #e3a2ff; --particle-soft: #a948ef; }
.event-fx--witch .event-fx-ring { border-style: dashed; animation-duration: 5s; }
.event-fx--witch i { width: 9px; height: 9px; clip-path: polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%); background: #f4c8ff; animation: eventWitchSpark 3s ease-in-out infinite; }
.event-fx--ice { --particle: #b0eeff; --particle-soft: #3298ed; }
.event-fx--ice .event-fx-aura { background: radial-gradient(circle,transparent 40%,#79d9ff7a 74%,transparent 83%); }
.event-fx--ice i { width: 8px; height: 8px; background: #d2f8ff; clip-path: polygon(50% 0,58% 38%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%); animation: eventIceDrift 3s linear infinite; }
.event-fx--forest { --particle: #d5ff8c; --particle-soft: #57e782; }
.event-fx--forest .event-fx-aura { background: radial-gradient(circle,#a6ff5c22 15%,transparent 46%,#6def8e8a 75%,transparent 83%); }
.event-fx--forest i { width: 7px; height: 7px; border-radius: 50%; background: #ddff9d; box-shadow: 0 0 7px 3px #b0ff71,0 0 19px 5px #55d5808c; animation: eventForestFirefly 3s ease-in-out infinite; }
.event-fx--sakura { --particle: #ffd3ee; --particle-soft: #ec79c7; }
.event-fx--sakura i { width: 12px; height: 8px; border-radius: 75% 0 75% 0; background: linear-gradient(135deg,#fff3fa,#ee83c0); box-shadow: 0 0 9px #ffb7df; animation: eventSakuraPetal 3s ease-in-out infinite; }
.event-fx--wraith { --particle: #9bfff3; --particle-soft: #24c9d0; }
.event-fx--wraith .event-fx-aura { filter: blur(19px); }
.event-fx--wraith .event-fx-ring { border-color: #70ffec; box-shadow: 0 0 19px #32d5db,inset 0 0 21px #32d5db; }
.event-fx--wraith i { width: 9px; height: 20px; border-radius: 80% 20% 65% 35%; background: linear-gradient(transparent,#56f5ea 44%,#cbfff8); filter: blur(1px); box-shadow: 0 0 13px 5px #2ed9d699; animation: eventWraithWisp 3s ease-in-out infinite; }
.event-fx--storm { --particle: #b2f3ff; --particle-soft: #308eff; }
.event-fx--storm .event-fx-aura { background: radial-gradient(circle,#42cfff1a 15%,transparent 42%,#278bff99 74%,transparent 84%); }
.event-fx--storm .event-fx-ring { border-color: #7bdfff; border-style: dashed; box-shadow: 0 0 18px #1eacff,inset 0 0 23px #2f8eff; animation-duration: 2.6s; }
.event-fx--storm i { width: 11px; height: 17px; background: linear-gradient(#eaffff,#31bfff); clip-path: polygon(48% 0,100% 0,62% 43%,88% 43%,18% 100%,38% 57%,13% 57%); box-shadow: 0 0 12px 3px #3dbdff; animation: eventStormFlash 3s steps(1,end) infinite; }
.event-fx--ghoul { --particle: #ff7b87; --particle-soft: #b52242; }
.event-fx--ghoul .event-fx-ring { border-style: dashed; box-shadow: 0 0 20px #d22b59,inset 0 0 20px #a51e43; }
.event-fx--ghoul i { width: 8px; height: 15px; border-radius: 50%; background: linear-gradient(#ffced1,#dd244d); animation: eventWraithWisp 3.2s ease-in-out infinite; }
.event-fx--aurora { --particle: #a2ffe3; --particle-soft: #4cc8c9; }
.event-fx--aurora .event-fx-aura { background: conic-gradient(from 30deg,#55e9bb22,#5b92f67a,#be7af260,#55e9bb22); filter: blur(17px); }
.event-fx--aurora .event-fx-ring { box-shadow: 0 0 20px #51ddbb,inset 0 0 18px #8d7af2; }
.event-fx--aurora i { width: 6px; height: 19px; border-radius: 90% 10% 90% 20%; background: linear-gradient(#b8ffdf,#72aaf9); animation: eventWraithWisp 3.8s ease-in-out infinite; }
.event-fx--neon { --particle: #ff9be2; --particle-soft: #56deef; }
.event-fx--neon .event-fx-aura { background: radial-gradient(circle,transparent 36%,#ff58c675 67%,#54e1eb65 80%,transparent 86%); }
.event-fx--neon .event-fx-ring { border-style: dashed; box-shadow: 0 0 18px #ff61ca,inset 0 0 19px #49d9e6; }
.event-fx--neon i { width: 8px; height: 8px; border: 1px solid #fff1fa; background: #ff70c9; box-shadow: 0 0 10px #fa54d6,0 0 15px #40d9e9; animation: eventWitchSpark 3s ease-in-out infinite; }

.event-fx--harvest { --particle: #ffcf7a; --particle-soft: #e86a1e; }
.event-fx--harvest .event-fx-aura { background: radial-gradient(circle,#ffb34722 15%,transparent 44%,#e8762a7a 74%,transparent 83%); }
.event-fx--harvest i { width: 11px; height: 9px; border-radius: 75% 0 75% 0; background: linear-gradient(135deg,#ffd27a,#e0541e); box-shadow: 0 0 8px #ff9b45; animation: eventSakuraPetal 3.4s ease-in-out infinite; }
.event-fx--harvest i:nth-of-type(even) { width: 7px; height: 7px; border-radius: 50%; background: #fff1a8; box-shadow: 0 0 7px 3px #ffd26a,0 0 16px 5px #ff9b458c; animation: eventForestFirefly 3s ease-in-out infinite; }
.event-fx--hollow { --particle: #ffb15c; --particle-soft: #3a7bff; }
.event-fx--hollow .event-fx-aura { background: radial-gradient(circle,transparent 38%,#ff6a2a6e 66%,#3a8bff66 80%,transparent 86%); filter: blur(14px); }
.event-fx--hollow .event-fx-ring { border-color: #ff8a3d; box-shadow: 0 0 18px #ff6a2a,inset 0 0 20px #2f7bff; }
.event-fx--hollow i { width: 6px; height: 12px; border-radius: 65% 5% 65% 40%; background: linear-gradient(#fff3a4,#ff902b 60%,#f84b19); animation: eventEmberRise 3s ease-out infinite; }
.event-fx--hollow i:nth-of-type(even) { background: linear-gradient(#e9f5ff,#5aa8ff 60%,#2050e0); box-shadow: 0 0 8px 2px #3a8bff; }
.event-fx--banshee { --particle: #f0d4ff; --particle-soft: #b07ae8; }
.event-fx--banshee .event-fx-aura { filter: blur(18px); }
.event-fx--banshee .event-fx-ring { border-style: dashed; border-color: #e3c4ff; box-shadow: 0 0 18px #b07ae8,inset 0 0 20px #e08ad0; }
.event-fx--banshee i { width: 9px; height: 20px; border-radius: 80% 20% 65% 35%; background: linear-gradient(transparent,#c9a2ff 44%,#f6eaff); filter: blur(1px); box-shadow: 0 0 13px 5px #b07ae899; animation: eventWraithWisp 3.4s ease-in-out infinite; }
.event-fx--banshee i:nth-of-type(even) { width: 12px; height: 8px; border-radius: 75% 0 75% 0; background: linear-gradient(135deg,#fff3fa,#ee83c0); filter: none; box-shadow: 0 0 9px #ffb7df; animation: eventSakuraPetal 3s ease-in-out infinite; }
.event-fx--pumpking { --particle: #ffc56b; --particle-soft: #9b4dff; }
.event-fx--pumpking .event-fx-aura { background: radial-gradient(circle,#ff8a3d22 15%,transparent 42%,#ff6a2a88 70%,#9b4dff66 80%,transparent 86%); }
.event-fx--pumpking .event-fx-ring { border-style: dashed; border-color: #ffb15c; box-shadow: 0 0 20px #ff6a2a,inset 0 0 22px #9b4dff; animation-duration: 3.2s; }
.event-fx--pumpking i { width: 6px; height: 12px; border-radius: 65% 5% 65% 40%; background: linear-gradient(#fff3a4,#ff902b 60%,#f84b19); animation: eventEmberRise 2.8s ease-out infinite; }
.event-fx--pumpking i:nth-of-type(even) { width: 9px; height: 9px; border-radius: 0; clip-path: polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%); background: #d9b8ff; animation: eventWitchSpark 3s ease-in-out infinite; }
.event-fx--balloon { --particle: #ff6b6b; --particle-soft: #c4161c; }
.event-fx--balloon .event-fx-ring { border-color: #ff4d4d; box-shadow: 0 0 18px #e3121b,inset 0 0 20px #8a0a10; }
.event-fx--balloon i { width: 12px; height: 15px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 35% 30%,#ffc2c2,#e3121b 55%,#7a0a0f); box-shadow: 0 0 10px #ff2d2d88; animation: eventEmberRise 4.2s ease-in infinite; }
.event-fx--balloon i::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 11px; background: #ffffff8c; }
.event-fx--joker { --particle: #7dff8a; --particle-soft: #8b2fd6; }
.event-fx--joker .event-fx-aura { background: conic-gradient(from 20deg,#3dff5a33,#8b2fd688,#3dff5a55,#c77dff66,#3dff5a33); filter: blur(17px); }
.event-fx--joker .event-fx-ring { border-style: dashed; border-color: #7dff8a; box-shadow: 0 0 20px #3dff5a,inset 0 0 20px #8b2fd6; animation-duration: 3s; }
.event-fx--joker i { width: auto; height: auto; background: none; box-shadow: none; color: #7dff8a; font: 700 15px/1 Georgia,serif; text-shadow: 0 0 8px #3dff5a; animation: eventWitchSpark 3s ease-in-out infinite; }
.event-fx--joker i::before { content: "♣"; }
.event-fx--joker i:nth-of-type(even) { color: #c77dff; text-shadow: 0 0 8px #9b3dff; }
.event-fx--joker i:nth-of-type(even)::before { content: "♦"; }
.event-fx--joker i:nth-of-type(3n)::before { content: "♠"; }

.event-reel-card .event-fx i:nth-of-type(n+5),
.event-inventory-card .event-fx i:nth-of-type(n+5) { display: none; }
.event-reel-card .event-fx i,
.event-inventory-card .event-fx i { scale: .7; }
.event-reel-card .event-item-art img,
.event-inventory-card .event-item-art img { animation-duration: 5.6s; }
.event-rarity-rare { border-color: #c680e6 !important; box-shadow: 0 0 0 1px #dc9cf13b,0 0 22px #b866c529; }
.event-rarity-very { border-color: #5fe07a !important; box-shadow: 0 0 0 1px #8ef2a03b,0 0 24px #4fd06a33; }
.event-rarity-very .event-item-art { box-shadow: inset 0 0 0 2px #5fe07a9c; }
.event-shop-card.event-rarity-very:hover { box-shadow: 0 16px 30px #0005,0 0 32px #5fe07a6b; }
.event-rarity-mythic { border-color: #f4c779 !important; box-shadow: 0 0 0 1px #ffe5a455,0 0 26px #daa94f44; }
.event-rarity-rare .event-item-art { box-shadow: inset 0 0 0 2px #c680e68c; }
.event-rarity-mythic .event-item-art { box-shadow: inset 0 0 0 2px #f4c779ac; }
.event-shop-card { transition: transform .22s ease,box-shadow .22s ease; }
.event-shop-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px #0005; }
.event-shop-card.event-rarity-rare:hover { box-shadow: 0 16px 30px #0005,0 0 30px #c680e66b; }
.event-theme-art { overflow: hidden; }
.event-theme-art:after { animation: eventThemeBars 3.6s ease-in-out infinite; }
.event-effect-art { animation: eventEffectPulse 2.8s ease-in-out infinite; }
.event-effect-art:before,
.event-effect-art:after { content: ""; position: absolute; inset: -25px; border: 1px solid #f8b05e; border-radius: 50%; animation: eventEffectRing 2.8s ease-out infinite; }
.event-effect-art:after { animation-delay: -1.4s; }
.event-chest-art { animation: eventHauntFloat 5s ease-in-out infinite,eventChestFlicker 4.5s ease-in-out infinite; }
.event-chest-embers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.event-chest-embers i { position: absolute; left: 15%; top: 78%; width: 5px; height: 5px; border-radius: 50%; background: #8bfff0; box-shadow: 0 0 9px 3px #4de8d4; opacity: 0; animation: eventChestEmber 4s ease-out infinite; }
.event-chest-embers i:nth-child(2) { left: 27%; top: 38%; background: #ffc875; box-shadow: 0 0 9px 3px #ff9b45; animation-delay: -.8s; }
.event-chest-embers i:nth-child(3) { left: 75%; top: 66%; animation-delay: -1.5s; }
.event-chest-embers i:nth-child(4) { left: 88%; top: 42%; background: #ffc875; box-shadow: 0 0 9px 3px #ff9b45; animation-delay: -2.3s; }
.event-chest-embers i:nth-child(5) { left: 44%; top: 84%; animation-delay: -3s; }
.event-chest-embers i:nth-child(6) { left: 62%; top: 22%; background: #ffc875; box-shadow: 0 0 9px 3px #ff9b45; animation-delay: -3.6s; }
.event-reveal-art { position: relative; display: grid; place-items: center; width: min(420px,75vw); height: min(45vh,380px); isolation: isolate; }
.event-reveal-art img { width: 100%; height: 100%; object-fit: contain; }
.event-reveal-art .event-fx { inset: -8%; }
.event-fight-art { display: grid; place-items: center; position: relative; overflow: hidden; }
.event-fight-art:before { content: ""; position: absolute; inset: 0; background: #110c1b55; backdrop-filter: blur(14px); }
.event-fight-focus { position: relative; width: min(100%,300px); aspect-ratio: 1; background: url('/events/images/event/halloween-quest-bosses.png') no-repeat; background-size: 200% 200%; box-shadow: 0 0 0 1px #ffffff22,0 0 45px #0d081a8c; }

/* The quest atlases contain square cells: switch the crop axis when a modal stacks. */
@media (max-width: 800px) {
  .event-fight-art { background-size: auto 200% !important; }
  .event-fight-art.atlas-left-top { background-position: 15% 0% !important; }
  .event-fight-art.atlas-right-top { background-position: 85% 0% !important; }
  .event-fight-art.atlas-left-bottom { background-position: 15% 100% !important; }
  .event-fight-art.atlas-right-bottom { background-position: 85% 100% !important; }
  .event-story-art.atlas-left-bottom { background-size: 200% auto !important; background-position: 0% 90% !important; }
  .event-story-art.atlas-right-bottom { background-size: 200% auto !important; background-position: 100% 90% !important; }
}

@keyframes eventCharacterFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes eventCharacterPulse { 0%,100% { transform: scale(.85); opacity: .15; } 50% { transform: scale(1.2); opacity: .58; } }
@keyframes eventCharacterRing { 0%,100% { transform: scale(.85) rotate(0); opacity: .2; } 50% { transform: scale(1.08) rotate(35deg); opacity: .55; } }
@keyframes eventEmberRise { 0% { transform: translate(0,17px) rotate(-22deg) scale(.45); opacity: 0; } 23% { opacity: 1; } 75% { opacity: .9; } 100% { transform: translate(11px,-35px) rotate(24deg) scale(.15); opacity: 0; } }
@keyframes eventWitchSpark { 0%,100% { transform: translate(-8px,10px) rotate(0) scale(.35); opacity: 0; } 45% { transform: translate(9px,-10px) rotate(180deg) scale(1.2); opacity: 1; } 70% { opacity: .8; } }
@keyframes eventIceDrift { 0% { transform: translate(-9px,-17px) rotate(0) scale(.6); opacity: 0; } 25% { opacity: .9; } 80% { opacity: .85; } 100% { transform: translate(15px,35px) rotate(145deg) scale(.3); opacity: 0; } }
@keyframes eventForestFirefly { 0%,100% { transform: translate(-12px,9px) scale(.4); opacity: 0; } 40% { transform: translate(5px,-12px) scale(1.3); opacity: 1; } 70% { transform: translate(13px,-6px) scale(.6); opacity: .5; } }
@keyframes eventSakuraPetal { 0% { transform: translate(-20px,-23px) rotate(0) scale(.7); opacity: 0; } 18% { opacity: 1; } 80% { opacity: .95; } 100% { transform: translate(27px,29px) rotate(290deg) scale(.6); opacity: 0; } }
@keyframes eventWraithWisp { 0%,100% { transform: translate(-8px,18px) rotate(-20deg) scale(.5); opacity: 0; } 35% { opacity: .95; } 75% { opacity: .7; } 100% { transform: translate(13px,-24px) rotate(22deg) scale(1.25); opacity: 0; } }
@keyframes eventStormFlash { 0%,11%,18%,100% { opacity: 0; transform: translate(-8px,7px) rotate(-20deg) scale(.5); } 12%,17% { opacity: 1; transform: translate(2px,-4px) rotate(12deg) scale(1.2); } 34%,38% { opacity: .8; transform: translate(9px,-13px) rotate(28deg) scale(.8); } }
@keyframes eventThemeBars { 0%,100% { opacity: .4; transform: translateX(-2px); } 50% { opacity: .9; transform: translateX(3px); } }
@keyframes eventEffectPulse { 0%,100% { text-shadow: 0 0 8px #e8a46a; } 50% { text-shadow: 0 0 25px #ffd18c,0 0 42px #e8a46a; } }
@keyframes eventEffectRing { from { opacity: .8; transform: scale(.3); } to { opacity: 0; transform: scale(2.3); } }
@keyframes eventHauntFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes eventChestFlicker { 0%,100% { filter: drop-shadow(0 18px 22px #000a) drop-shadow(0 0 14px #4be1d04d); } 45% { filter: drop-shadow(0 18px 22px #000a) drop-shadow(0 0 27px #69f6df96); } 51% { filter: drop-shadow(0 18px 22px #000a) drop-shadow(0 0 9px #fa9f5670); } 56% { filter: drop-shadow(0 18px 22px #000a) drop-shadow(0 0 26px #58e7dba8); } }
@keyframes eventChestEmber { 0% { transform: translate(0,12px) scale(.4); opacity: 0; } 25% { opacity: 1; } 75% { opacity: .9; } 100% { transform: translate(15px,-25px) scale(.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .event-item-art img,.event-fx-aura,.event-fx-ring,.event-fx i,.event-theme-art:after,.event-effect-art,.event-effect-art:before,.event-effect-art:after,.event-chest-art,.event-chest-embers i { animation: none !important; }
  .event-fx-aura { opacity: .34; }
  .event-fx-ring { opacity: .36; }
  .event-fx i,.event-chest-embers i { opacity: .7; }
}

/* Мобилка (до 760px, как трактир на лендинге): ивент и его модалки скрыты, вместо них — заглушка «Откройте на компьютере». */
.events-mobile-gate { display: none; }
@media (max-width: 760px) {
  #dc-root { display: none !important; }
  .events-mobile-gate {
    display: flex;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
    text-align: center;
    background: radial-gradient(circle at 50% 35%, #3a2414 0%, #1c1a17 62%);
    color: #ede6dc;
    font-family: 'Onest', system-ui, sans-serif;
  }
  .events-mobile-gate-card {
    width: 100%;
    max-width: 384px;
    padding: 40px 24px;
    border: 1px solid #e8a46a33;
    border-radius: 16px;
    background: #140c06cc;
    box-shadow: 0 24px 80px #00000094;
  }
  .events-mobile-gate-kicker {
    font: 500 10px 'JetBrains Mono', monospace;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: #e8a46a73;
  }
  .events-mobile-gate-icon {
    display: flex;
    width: 64px;
    height: 64px;
    margin: 24px auto;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8a46a33;
    border-radius: 50%;
    background: #e8a46a0d;
    font-size: 30px;
    color: #e8a46aa6;
  }
  .events-mobile-gate h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 800; color: #f3e2c8; }
  .events-mobile-gate p { max-width: 30ch; margin: 16px auto 0; font-size: 15px; line-height: 1.6; color: #ede6dc94; }
  .events-mobile-gate a {
    display: inline-flex;
    min-height: 44px;
    margin-top: 28px;
    padding: 0 20px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8a46a40;
    border-radius: 10px;
    font-size: 14px;
    color: #ede6dcb8;
  }
  .events-mobile-gate a:hover { border-color: #e8a46a8c; color: #fff4e6; }
}

