@import url('./heraldaCombatVfx.css?v=heralda-cinema-3');
/* =======================================
   HERALDA (heroId 76) – KOZMIKUS LÉNYEK
   =======================================
   Paletta-szerepek (skin szerint, a JS írja felül inline változókkal):
   Alap:          deep #040105, main #8953C4, glow #EB80C7, soft #FFFCFF, accent #A081C6 – éjfekete űr.
   Rém Akadémia:  deep #301B70, main #511DD0, glow #9A5AED, soft #5B6FD3, accent #461D7F – kripta-ibolya.
   Féregszínek: --hr-worm-body / plate / rim / glow / accent / eye / spike.
   --hr-fill: fészek-töltöttség 0..1. Normál lény: halvány lila; Felemésztő
   Lény: erősen izzó, tüskés, nagyobb. */

/* Alapértékek a :root-on: a skin-téma inline változói a konténeren (kártya,
   tooltip, műhely, VFX) öröklődnek a beágyazott .hr-worm elemekre is. */
:root {
    --hr-deep: #040105; --hr-main: #8953C4; --hr-glow: #EB80C7; --hr-soft: #FFFCFF; --hr-accent: #A081C6;
    --hr-worm-body: #120616; --hr-worm-plate: #2A1236; --hr-worm-rim: #A081C6; --hr-worm-glow: #8953C4;
    --hr-worm-accent: #EB80C7; --hr-worm-eye: #FFFCFF; --hr-worm-spike: #EB80C7;
}
.heralda-cosmic-meter, .heralda-cosmic-tooltip, #heralda-cosmic-workshop { --hr-fill: 0; }

/* ---------------------------------------
   Statikus vektoros féreg (tooltip, műhely, repülő lények)
   --------------------------------------- */
.hr-worm { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 2px color-mix(in srgb, var(--hr-worm-glow) 70%, transparent)); }
.hr-worm__body { fill: var(--hr-worm-body); stroke: color-mix(in srgb, var(--hr-worm-rim) 55%, transparent); stroke-width: .7; }
.hr-worm__plate { fill: none; stroke: color-mix(in srgb, var(--hr-worm-rim) 60%, transparent); stroke-width: .8; stroke-linecap: round; }
.hr-worm__glint { fill: color-mix(in srgb, var(--hr-worm-accent) 45%, transparent); }
.hr-worm__mandible { fill: var(--hr-worm-plate); stroke: color-mix(in srgb, var(--hr-worm-rim) 60%, transparent); stroke-width: .5; }
.hr-worm__eye { fill: var(--hr-worm-eye); filter: drop-shadow(0 0 1.4px var(--hr-worm-accent)); }
.hr-worm__eye.is-third { fill: var(--hr-worm-accent); }
.hr-worm__spike, .hr-worm__crest { fill: var(--hr-worm-spike); filter: drop-shadow(0 0 1.5px var(--hr-worm-spike)); }
.hr-worm__seg { animation: hrSlither 1.1s ease-in-out infinite; animation-delay: calc(var(--s-i) * -.11s); transform-box: fill-box; }
.hr-worm__seg { translate: 0 0; }
/* Felemésztő: erős izzás, élénk perem. */
.hr-worm.is-devourer { filter: drop-shadow(0 0 2px var(--hr-worm-accent)) drop-shadow(0 0 5px var(--hr-worm-glow)); }
.hr-worm.is-devourer .hr-worm__body { fill: color-mix(in srgb, var(--hr-worm-plate) 70%, var(--hr-worm-glow)); stroke: var(--hr-worm-rim); stroke-width: .9; }
.hr-worm.is-devourer .hr-worm__plate { stroke: var(--hr-worm-accent); }
.hr-worm.is-devourer .hr-worm__glint { fill: var(--hr-worm-eye); }

/* ---------------------------------------
   Mechanika-ikon a kártyán: skin-függő féreg + fészek-jelölők
   --------------------------------------- */
.heralda-cosmic-meter {
    position: absolute; left: 40px; bottom: 5px; z-index: 19;
    width: 96px; height: 84px; padding: 0; border: 0;
    background: transparent; color: #fff; cursor: pointer; isolation: isolate;
    filter: drop-shadow(0 7px 9px #000d);
}
.heralda-cosmic-meter:focus-visible { outline: 2px solid var(--hr-glow); outline-offset: 2px; border-radius: 16px; }
/* Kozmikus háttérfény (töltöttséggel erősödik). */
.heralda-cosmic-meter__halo {
    position: absolute; left: 50%; top: 31px; z-index: -2; width: 72px; height: 72px; border-radius: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle, color-mix(in srgb, var(--hr-glow) calc(22% + var(--hr-fill) * 40%), transparent), color-mix(in srgb, var(--hr-main) 30%, transparent) 42%, transparent 70%);
    opacity: calc(.55 + var(--hr-fill) * .45);
    animation: hrHaloPulse 2.4s ease-in-out infinite alternate;
}
/* Örvénylő űr-korong a féreg mögött. */
.heralda-cosmic-meter__ring {
    position: absolute; left: 50%; top: 31px; z-index: -1; width: 54px; height: 54px; border-radius: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--hr-deep) 40%, #000) 32%, transparent 33%),
        conic-gradient(from 0deg, color-mix(in srgb, var(--hr-main) 70%, transparent), transparent 25%, color-mix(in srgb, var(--hr-glow) 55%, transparent) 50%, transparent 75%, color-mix(in srgb, var(--hr-main) 70%, transparent));
    box-shadow: inset 0 0 12px #000c, 0 0 10px color-mix(in srgb, var(--hr-main) 45%, transparent);
    animation: hrSpin 9s linear infinite;
}
.heralda-cosmic-meter__stars { position: absolute; left: 50%; top: 31px; z-index: 0; width: 0; height: 0; pointer-events: none; }
.heralda-cosmic-meter__stars i {
    position: absolute; left: -1.5px; top: -1.5px; width: 3px; height: 3px; border-radius: 50%;
    background: var(--hr-soft); box-shadow: 0 0 5px var(--hr-glow);
    --st-angle: calc(var(--st-i) * 60deg);
    animation: hrStarOrbit 4.2s linear infinite;
    animation-delay: calc(var(--st-i) * -.7s);
}
.heralda-cosmic-meter__icon {
    position: absolute; left: 50%; top: 31px; z-index: 3; width: 46px; height: 46px; object-fit: contain;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 3px #fff5) drop-shadow(0 0 calc(5px + var(--hr-fill) * 9px) var(--hr-glow));
    animation: hrIconSway 3s ease-in-out infinite;
}
.heralda-cosmic-meter__count {
    position: absolute; right: 0; top: 0; z-index: 6; display: flex; align-items: baseline; gap: 2px;
    padding: 3px 6px;
    border: 1px solid color-mix(in srgb, var(--hr-glow) 60%, transparent); border-radius: 9px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--hr-deep) 70%, #000), color-mix(in srgb, var(--hr-deep) 95%, #000));
    box-shadow: 0 0 8px color-mix(in srgb, var(--hr-glow) 30%, transparent);
    pointer-events: none;
}
.heralda-cosmic-meter__count b { color: var(--hr-soft); font: 900 14px/1 Montserrat, sans-serif; text-shadow: 0 0 6px var(--hr-glow); }
.heralda-cosmic-meter__count small { color: #fff; font: 800 8px/1 Montserrat, sans-serif; opacity: .8; }
/* 6 fészek-jelölő: üres / normál (halvány) / Felemésztő (izzó, tüskés). */
.heralda-cosmic-meter__pips {
    position: absolute; left: 50%; bottom: 3px; z-index: 5; display: flex; gap: 3px; justify-content: center;
    padding: 3px 5px; transform: translateX(-50%);
    border: 1px solid color-mix(in srgb, var(--hr-glow) 45%, transparent); border-radius: 8px;
    background: color-mix(in srgb, var(--hr-deep) 88%, #000);
    pointer-events: none;
}
.heralda-cosmic-meter__pips i {
    display: block; width: 9px; height: 9px; border-radius: 50%;
    background: #ffffff18; border: 1px solid #ffffff22;
    transition: background .3s, box-shadow .3s, transform .3s;
}
.heralda-cosmic-meter__pips i.is-normal {
    background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--hr-accent) 70%, #fff), var(--hr-main) 70%);
    border-color: color-mix(in srgb, var(--hr-accent) 60%, transparent); opacity: .8;
}
.heralda-cosmic-meter__pips i.is-devourer {
    background: radial-gradient(circle at 40% 35%, #fff, var(--hr-glow) 45%, var(--hr-main));
    border-color: var(--hr-glow);
    box-shadow: 0 0 6px var(--hr-glow);
    clip-path: polygon(50% 0, 62% 30%, 100% 50%, 62% 70%, 50% 100%, 38% 70%, 0 50%, 38% 30%);
    transform: scale(1.3);
}
.heralda-cosmic-meter__swarm {
    position: absolute; z-index: 7; left: 50%; top: -12px; padding: 2px 8px; white-space: nowrap;
    border: 1px solid var(--hr-glow); border-radius: 8px;
    background: linear-gradient(90deg, var(--hr-deep), var(--hr-main), var(--hr-glow), var(--hr-main), var(--hr-deep));
    background-size: 200% 100%;
    color: #fff; font: 900 7.5px/1.2 Montserrat, sans-serif; letter-spacing: .14em;
    text-shadow: 0 0 3px #000, 0 1px 2px #000;
    opacity: 0; transform: translate(-50%, 4px) scale(.8);
    transition: opacity .3s, transform .3s cubic-bezier(.2,1.6,.4,1);
    pointer-events: none;
}
.heralda-cosmic-meter.is-swarm .heralda-cosmic-meter__swarm { opacity: 1; transform: translate(-50%, 0) scale(1); animation: hrShimmer 2.4s linear infinite; }
.heralda-cosmic-meter.is-maxed .heralda-cosmic-meter__icon { animation: hrIconSway 3s ease-in-out infinite, hrMaxGlow 1.3s ease-in-out infinite alternate; }
.heralda-cosmic-meter.is-gain .heralda-cosmic-meter__count { animation: hrCountPop .7s cubic-bezier(.2,1.6,.4,1); }
.heralda-cosmic-meter.is-gain .heralda-cosmic-meter__halo,
.heralda-cosmic-meter.is-evolve .heralda-cosmic-meter__halo { animation: hrGainFlash .9s ease-out; }
.heralda-cosmic-meter.is-evolve .heralda-cosmic-meter__pips { animation: hrCountPop .7s cubic-bezier(.2,1.6,.4,1); }
.v3-card.heralda-maxed-active { box-shadow: 0 0 0 1px color-mix(in srgb, var(--hr-glow) 55%, transparent), 0 0 22px color-mix(in srgb, var(--hr-main) 45%, transparent); }

/* ---------------------------------------
   Kúszó férgek a kártyán kívül (szelvényenként mozgatva)
   --------------------------------------- */
.heralda-card-fx {
    position: absolute; z-index: 31; pointer-events: none;
    transform: translate(-50%, -50%); overflow: visible;
}
.heralda-card-fx__aura {
    position: absolute; inset: 30px; border-radius: 14px; opacity: 0;
    box-shadow: 0 0 20px color-mix(in srgb, var(--hr-glow) 45%, transparent), 0 0 38px color-mix(in srgb, var(--hr-main) 30%, transparent);
    transition: opacity .4s;
}
.heralda-card-fx.is-maxed .heralda-card-fx__aura,
.heralda-card-fx.is-swarm .heralda-card-fx__aura { opacity: 1; animation: hrAuraBreath 1.8s ease-in-out infinite alternate; }
.heralda-card-fx__worms { position: absolute; inset: 0; }
.heralda-card-fx__worm { position: absolute; inset: 0; display: block; }
.heralda-card-fx__seg {
    position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px;
    will-change: transform;
}
.heralda-card-fx__seg svg { display: block; width: 100%; height: 100%; overflow: visible; }
.heralda-card-fx__seg.is-head { z-index: 2; }
.hr-seg__body { fill: var(--hr-worm-body); stroke: color-mix(in srgb, var(--hr-worm-rim) 45%, transparent); stroke-width: .8; }
.hr-seg__plate { fill: none; stroke: color-mix(in srgb, var(--hr-worm-rim) 50%, transparent); stroke-width: .9; stroke-linecap: round; }
.hr-seg__glint { fill: color-mix(in srgb, var(--hr-worm-accent) 35%, transparent); }
.hr-seg__mandible { fill: var(--hr-worm-plate); stroke: color-mix(in srgb, var(--hr-worm-rim) 55%, transparent); stroke-width: .5; }
.hr-seg__eye { fill: var(--hr-worm-eye); }
.hr-seg__eye.is-third { fill: var(--hr-worm-accent); }
.hr-seg__spike { display: none; fill: var(--hr-worm-spike); }
/* Normál lény: halvány lila, áttetszőbb. */
.heralda-card-fx__worm:not(.is-devourer) { opacity: .78; filter: drop-shadow(0 0 2px color-mix(in srgb, var(--hr-worm-glow) 55%, transparent)); }
/* Felemésztő Lény: erősen izzó, tüskés, nagyobb (a JS 1.28× skálát ad). */
.heralda-card-fx__worm.is-devourer { filter: drop-shadow(0 0 2px var(--hr-worm-accent)) drop-shadow(0 0 6px var(--hr-worm-glow)); }
.heralda-card-fx__worm.is-devourer .hr-seg__spike { display: block; filter: drop-shadow(0 0 1.5px var(--hr-worm-spike)); }
.heralda-card-fx__worm.is-devourer .hr-seg__body { fill: color-mix(in srgb, var(--hr-worm-plate) 70%, var(--hr-worm-glow)); stroke: var(--hr-worm-rim); }
.heralda-card-fx__worm.is-devourer .hr-seg__plate { stroke: var(--hr-worm-accent); }
.heralda-card-fx__worm.is-devourer .hr-seg__glint { fill: var(--hr-worm-eye); }
.heralda-card-fx__worm.is-devourer .hr-seg__eye { filter: drop-shadow(0 0 1.5px var(--hr-worm-accent)); }
.heralda-card-fx__worm.is-devourer .heralda-card-fx__seg:not(.is-head) svg { animation: hrSegPulse 1.4s ease-in-out infinite; animation-delay: calc(var(--s-i) * -.1s); }
.heralda-card-fx__worm.is-born { animation: hrWormBorn 1.3s ease-out; }
.heralda-card-fx__worm.is-evolving { animation: hrWormEvolve 1.3s ease-out; }
/* Rém Akadémia: sötétebb ibolya test, hidegebb izzás. */
.heralda-card-fx[data-hr-theme="rem"] .heralda-card-fx__worm.is-devourer { filter: drop-shadow(0 0 2px var(--hr-worm-spike)) drop-shadow(0 0 7px var(--hr-worm-glow)); }
.heralda-card-fx.is-fallen { opacity: .5; filter: saturate(.6); }

/* ---------------------------------------
   Témafüggő lebegő motívumok
   --------------------------------------- */
.hr-motif { position: absolute; display: block; width: 14px; height: 14px; opacity: 0; pointer-events: none; }
.hr-motif svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hr-motif.is-star { width: 11px; height: 11px; }
.hr-motif.is-star svg path { fill: var(--hr-soft); filter: drop-shadow(0 0 3px var(--hr-glow)); }
.hr-motif.is-nebula { width: 18px; height: 18px; }
.hr-motif.is-nebula svg circle { fill: color-mix(in srgb, var(--hr-glow) 55%, transparent); }
.hr-motif.is-nebula svg .is-ring { fill: none; stroke: color-mix(in srgb, var(--hr-accent) 70%, transparent); stroke-width: 1.2; }
.hr-motif.is-spider { width: 14px; height: 18px; }
.hr-motif.is-spider svg circle, .hr-motif.is-spider svg ellipse { fill: var(--hr-soft); }
.hr-motif.is-spider svg .is-legs { fill: none; stroke: var(--hr-soft); stroke-width: 1.3; stroke-linecap: round; }
.hr-motif.is-spider svg .is-thread { fill: none; stroke: #ffffff66; stroke-width: .7; }
.hr-motif.is-bat { width: 22px; height: 11px; }
.hr-motif.is-bat svg path { fill: var(--hr-glow); filter: drop-shadow(0 0 3px var(--hr-glow)); }
.hr-motif.is-worm { width: 30px; height: 10px; }
.hr-motif.is-pumpkin { width: 15px; height: 14px; }
.hr-motif.is-pumpkin svg .is-body { fill: var(--hr-glow); filter: drop-shadow(0 0 3px var(--hr-glow)); }
.hr-motif.is-pumpkin svg .is-face { fill: var(--hr-soft); stroke: var(--hr-soft); stroke-width: .5; stroke-linejoin: round; }
.hr-motif.is-pumpkin svg .is-stem { fill: none; stroke: var(--hr-soft); stroke-width: 1.5; stroke-linecap: round; }
[data-hr-theme="halloween"].heralda-cosmic-tooltip,
#heralda-cosmic-workshop[data-hr-theme="halloween"] {
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--hr-glow) 24%, transparent), transparent 34%),
        radial-gradient(circle at 88% 90%, color-mix(in srgb, var(--hr-soft) 18%, transparent), transparent 44%),
        linear-gradient(150deg, var(--hr-deep), #0d0513 55%, #062a22);
}

/* ---------------------------------------
   Prémium tooltip (full-bleed, saját körvonal)
   --------------------------------------- */
body.v3-body > .item-tooltip-floating:has(.heralda-cosmic-tooltip),
body.v3-body > .v3-floating-tooltip:has(.heralda-cosmic-tooltip) {
    width: min(480px, calc(100vw - 20px)) !important; max-width: 480px !important; max-height: none !important;
    padding: 0 !important; border: 0 !important; border-radius: 20px;
    background: transparent !important; box-shadow: none !important; overflow: visible !important;
}
.item-tooltip-floating .item-tooltip-desc:has(.heralda-cosmic-tooltip) { margin: 0 !important; color: inherit; font-size: inherit; line-height: inherit; }
.heralda-cosmic-tooltip {
    position: relative; isolation: isolate; box-sizing: border-box; display: block; width: 100%;
    padding: 17px; overflow: hidden;
    border: 2px solid var(--hr-main); border-radius: 20px;
    outline: 1px solid color-mix(in srgb, var(--hr-glow) 50%, transparent); outline-offset: -6px;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--hr-glow) 18%, transparent), transparent 34%),
        radial-gradient(circle at 92% 88%, color-mix(in srgb, var(--hr-main) 30%, transparent), transparent 46%),
        radial-gradient(ellipse at 60% 40%, color-mix(in srgb, var(--hr-accent) 10%, transparent), transparent 60%),
        linear-gradient(150deg, color-mix(in srgb, var(--hr-deep) 92%, #000), #07020b 55%, color-mix(in srgb, var(--hr-main) 24%, #030006));
    box-shadow: 0 24px 70px #000e, 0 0 26px color-mix(in srgb, var(--hr-glow) 38%, transparent), inset 0 0 48px #0008;
    color: #fff; font-family: Outfit, sans-serif; text-align: left;
}
/* Alap: csillagpor a háttérben. */
.heralda-cosmic-tooltip[data-hr-theme="alap"]::before,
#heralda-cosmic-workshop[data-hr-theme="alap"]::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .22;
    background:
        radial-gradient(1px 1px at 12% 22%, #fff, transparent 60%),
        radial-gradient(1px 1px at 38% 70%, #fff, transparent 60%),
        radial-gradient(1.5px 1.5px at 64% 18%, var(--hr-glow), transparent 60%),
        radial-gradient(1px 1px at 82% 56%, #fff, transparent 60%),
        radial-gradient(1.5px 1.5px at 24% 86%, var(--hr-accent), transparent 60%),
        radial-gradient(1px 1px at 92% 12%, #fff, transparent 60%);
    background-size: 180px 140px;
}
/* Rém Akadémia: pókháló-sarok. */
.heralda-cosmic-tooltip[data-hr-theme="rem"]::before,
#heralda-cosmic-workshop[data-hr-theme="rem"]::before {
    content: ""; position: absolute; right: 0; top: 0; z-index: 0; width: 150px; height: 150px; pointer-events: none; opacity: .16;
    background:
        repeating-radial-gradient(circle at 100% 0, transparent 0 16px, var(--hr-soft) 16px 17px),
        repeating-conic-gradient(from 180deg at 100% 0, var(--hr-soft) 0 1deg, transparent 1deg 15deg);
    -webkit-mask: radial-gradient(circle at 100% 0, #000 40%, transparent 72%);
    mask: radial-gradient(circle at 100% 0, #000 40%, transparent 72%);
}
.heralda-cosmic-tooltip[data-hr-theme="rem"] {
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--hr-glow) 24%, transparent), transparent 34%),
        radial-gradient(circle at 88% 90%, color-mix(in srgb, var(--hr-main) 34%, transparent), transparent 46%),
        radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--hr-soft) 20%, transparent), transparent 55%),
        linear-gradient(150deg, color-mix(in srgb, var(--hr-deep) 92%, #000), #07041a 55%, color-mix(in srgb, var(--hr-accent) 60%, #03010c));
}
.heralda-cosmic-tooltip.is-maxed, .heralda-cosmic-tooltip.is-swarm {
    border-color: var(--hr-glow);
    box-shadow: 0 24px 70px #000e, 0 0 40px color-mix(in srgb, var(--hr-glow) 55%, transparent), inset 0 0 48px #000a;
}
.heralda-cosmic-tooltip > * { position: relative; z-index: 2; }
.heralda-cosmic-tooltip > .heralda-cosmic-tooltip__vfx { position: absolute; z-index: 0; inset: 0; pointer-events: none; overflow: hidden; }
.heralda-cosmic-tooltip__vfx .hr-motif { top: 104%; animation: hrMotifRise 9s linear infinite; animation-delay: calc(var(--m-i) * -1.1s); left: calc(4% + var(--m-i) * 12%); }
.heralda-cosmic-tooltip__vfx b {
    position: absolute; inset: -45%; border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--hr-glow) 18%, transparent);
    animation: hrSpin 30s linear infinite;
}
.heralda-cosmic-tooltip__vfx b:nth-of-type(2) { inset: -20%; border-style: dotted; border-color: color-mix(in srgb, var(--hr-accent) 26%, transparent); animation-direction: reverse; animation-duration: 18s; }
.heralda-cosmic-tooltip__vfx em {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--hr-glow) 11%, transparent) 49%, transparent 68%);
    animation: hrScan 7s linear infinite;
}
.heralda-cosmic-tooltip header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 11px; padding-bottom: 11px;
    border-bottom: 1px solid color-mix(in srgb, var(--hr-glow) 28%, transparent);
}
.heralda-cosmic-tooltip__crest, .heralda-cosmic-workshop__crest { position: relative; flex: 0 0 64px; width: 64px; height: 60px; }
.heralda-cosmic-tooltip__crest img, .heralda-cosmic-workshop__crest img {
    position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; object-fit: contain;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 4px #fff6) drop-shadow(0 0 11px var(--hr-glow));
    animation: hrIconSway 3s ease-in-out infinite;
}
.heralda-cosmic-tooltip__crest .hr-worm, .heralda-cosmic-workshop__crest .hr-worm {
    position: absolute; left: 50%; top: 50%; width: 26px; height: 9px; margin: -4.5px 0 0 -13px;
    animation: hrCrestOrbit 4.4s linear infinite;
}
.heralda-cosmic-tooltip__crest .hr-worm.is-orbit-b, .heralda-cosmic-workshop__crest .hr-worm.is-orbit-b { animation-delay: -2.2s; width: 30px; height: 11px; margin: -5.5px 0 0 -15px; }
.heralda-cosmic-tooltip header > div { display: grid; flex: 1; gap: 2px; min-width: 0; }
.heralda-cosmic-tooltip header small { color: var(--hr-glow); font: 800 9px/1 Montserrat, sans-serif; letter-spacing: .16em; }
.heralda-cosmic-tooltip header strong { font: 900 21px/1.1 Montserrat, sans-serif; text-shadow: 0 0 15px var(--hr-main); }
.heralda-cosmic-tooltip header em { color: var(--hr-accent); font: 700 10px/1.2 Outfit, sans-serif; font-style: normal; letter-spacing: .06em; }
.heralda-cosmic-tooltip.is-maxed header em {
    background: linear-gradient(90deg, var(--hr-soft), var(--hr-glow), var(--hr-accent));
    -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900;
}
.heralda-cosmic-tooltip header > b { display: grid; justify-items: center; gap: 2px; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--hr-glow) 45%, transparent); border-radius: 11px; background: #0006; }
.heralda-cosmic-tooltip header > b span { color: var(--hr-soft); font: 900 22px/1 Montserrat, sans-serif; text-shadow: 0 0 10px var(--hr-glow); }
.heralda-cosmic-tooltip header > b small { color: #fff; font: 800 7.5px/1 Montserrat, sans-serif; letter-spacing: .1em; }
/* Fészek: 6 hely, bennük a tényleges lények (szegmentált, kígyózó SVG). */
.heralda-cosmic-tooltip__nest { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin-bottom: 9px; }
.heralda-cosmic-tooltip__nest span {
    display: grid; place-items: center; height: 30px; padding: 3px;
    border: 1px solid #ffffff14; border-radius: 9px; background: #0006;
}
.heralda-cosmic-tooltip__nest span .hr-worm { width: 100%; height: 16px; }
.heralda-cosmic-tooltip__nest span.is-normal { border-color: color-mix(in srgb, var(--hr-accent) 40%, transparent); }
.heralda-cosmic-tooltip__nest span.is-normal .hr-worm { opacity: .8; }
.heralda-cosmic-tooltip__nest span.is-devourer {
    border-color: var(--hr-glow);
    background: radial-gradient(circle, color-mix(in srgb, var(--hr-main) 30%, transparent), #0007 75%);
    box-shadow: inset 0 0 10px color-mix(in srgb, var(--hr-glow) 30%, transparent), 0 0 8px color-mix(in srgb, var(--hr-glow) 35%, transparent);
}
.heralda-cosmic-tooltip__nest span.is-devourer .hr-worm { height: 20px; }
.heralda-cosmic-tooltip__nest em { width: 12px; height: 12px; border-radius: 50%; border: 1px dashed #ffffff33; }
.heralda-cosmic-tooltip__pack { margin: 0 0 9px; color: color-mix(in srgb, var(--hr-accent) 45%, #fff); font: 500 11px/1.4 Outfit, sans-serif; }
.heralda-cosmic-tooltip__synergy, .heralda-cosmic-tooltip__status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.heralda-cosmic-tooltip__status { grid-template-columns: 1fr; margin-top: 6px; }
.heralda-cosmic-tooltip__synergy span, .heralda-cosmic-tooltip__status span {
    display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; align-items: center; gap: 2px 7px;
    padding: 7px; border: 1px solid #ffffff11; border-radius: 9px; background: #0005; opacity: .58;
}
.heralda-cosmic-tooltip__synergy span.is-active, .heralda-cosmic-tooltip__status span.is-active {
    opacity: 1; border-color: var(--hr-glow);
    background: color-mix(in srgb, var(--hr-main) 18%, #0006);
    box-shadow: 0 0 12px color-mix(in srgb, var(--hr-glow) 34%, transparent);
}
.heralda-cosmic-tooltip__synergy img, .heralda-cosmic-tooltip__status img { grid-row: 1 / 3; width: 28px; height: 28px; object-fit: contain; border-radius: 6px; filter: drop-shadow(0 0 4px var(--hr-glow)); }
.heralda-cosmic-tooltip__synergy b, .heralda-cosmic-tooltip__status b { font: 800 9px/1.15 Montserrat, sans-serif; }
.heralda-cosmic-tooltip__synergy small, .heralda-cosmic-tooltip__status small { color: color-mix(in srgb, var(--hr-accent) 50%, #fff); font: 500 8.5px/1.25 Outfit, sans-serif; }
.heralda-cosmic-tooltip__hint { display: block; margin-top: 9px; color: var(--hr-glow); font: 700 8px/1.3 Montserrat, sans-serif; text-align: center; letter-spacing: .06em; }

/* ---------------------------------------
   Mélységi Fészek-popup (dialog)
   --------------------------------------- */
#heralda-cosmic-workshop {
    position: fixed; width: min(1140px, 95vw); max-width: 95vw; max-height: 92vh; padding: 0; overflow: hidden;
    border: 1px solid var(--hr-glow); border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0, color-mix(in srgb, var(--hr-glow) 14%, transparent), transparent 34%),
        radial-gradient(circle at 90% 100%, color-mix(in srgb, var(--hr-main) 26%, transparent), transparent 45%),
        linear-gradient(145deg, color-mix(in srgb, var(--hr-deep) 94%, #000), #06010a 60%, color-mix(in srgb, var(--hr-main) 22%, #020005));
    box-shadow: 0 30px 100px #000f, 0 0 45px color-mix(in srgb, var(--hr-glow) 34%, transparent);
    color: #fff;
}
#heralda-cosmic-workshop[data-hr-theme="rem"] {
    background:
        radial-gradient(circle at 12% 0, color-mix(in srgb, var(--hr-glow) 20%, transparent), transparent 34%),
        radial-gradient(circle at 90% 100%, color-mix(in srgb, var(--hr-main) 30%, transparent), transparent 45%),
        linear-gradient(145deg, color-mix(in srgb, var(--hr-deep) 94%, #000), #06031a 60%, color-mix(in srgb, var(--hr-accent) 55%, #03010c));
}
#heralda-cosmic-workshop.is-maxed { box-shadow: 0 30px 100px #000f, 0 0 60px color-mix(in srgb, var(--hr-glow) 50%, transparent); }
#heralda-cosmic-workshop::backdrop { background: rgba(4, 1, 8, .86); backdrop-filter: blur(8px); }
.heralda-cosmic-workshop__vfx { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.heralda-cosmic-workshop__vfx .hr-motif {
    top: auto; bottom: -24px; left: calc(2% + var(--m-i) * 7%);
    animation: hrWorkshopRise 14s linear infinite;
    animation-delay: calc(var(--m-i) * -.97s);
}
#heralda-cosmic-workshop > header, .heralda-cosmic-workshop__content { position: relative; z-index: 1; }
#heralda-cosmic-workshop > header { display: flex; align-items: center; gap: 14px; padding: 16px 25px 12px; border-bottom: 1px solid color-mix(in srgb, var(--hr-glow) 28%, transparent); }
.heralda-cosmic-workshop__title { flex: 1; }
.heralda-cosmic-workshop__title small { color: var(--hr-glow); font: 800 9px/1 Montserrat, sans-serif; letter-spacing: .2em; }
.heralda-cosmic-workshop__title h2 { margin: 5px 0 0; font: 900 25px/1 Montserrat, sans-serif; text-shadow: 0 0 16px var(--hr-main); }
#heralda-cosmic-workshop > header button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--hr-glow); border-radius: 50%; background: #0007; color: #fff; font-size: 22px; cursor: pointer; }
.heralda-cosmic-workshop__content { display: grid; grid-template-columns: minmax(380px, .9fr) minmax(460px, 1.1fr); gap: 15px; max-height: calc(92vh - 86px); padding: 18px 22px 24px; overflow: auto; }
.heralda-cosmic-workshop__overview h3 { margin: 14px 0 0; color: var(--hr-glow); font: 900 11px/1 Montserrat, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.heralda-cosmic-workshop__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.heralda-cosmic-workshop__stats span { display: grid; justify-items: center; gap: 3px; padding: 8px 5px; border: 1px solid color-mix(in srgb, var(--hr-glow) 22%, transparent); border-radius: 10px; background: #0006; text-align: center; }
.heralda-cosmic-workshop__stats b { color: var(--hr-soft); font: 900 16px/1 Montserrat, sans-serif; text-shadow: 0 0 8px var(--hr-glow); }
.heralda-cosmic-workshop__stats small { color: color-mix(in srgb, var(--hr-accent) 45%, #fff); font: 600 8.5px/1.2 Outfit, sans-serif; }
.heralda-cosmic-workshop__summary { margin: 10px 0 0; color: color-mix(in srgb, var(--hr-accent) 40%, #fff); font: 500 10.5px/1.45 Outfit, sans-serif; }
.heralda-cosmic-workshop__rules { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.heralda-cosmic-workshop__rules li, .heralda-cosmic-workshop__basic li { padding: 6px 9px; border-left: 2px solid var(--hr-main); border-radius: 0 8px 8px 0; background: #0005; color: color-mix(in srgb, var(--hr-accent) 40%, #fff); font: 500 10px/1.35 Outfit, sans-serif; }
.heralda-cosmic-workshop__rules b, .heralda-cosmic-workshop__basic li b { color: #fff; }
.heralda-cosmic-workshop__gallery { display: grid; gap: 6px; margin-top: 9px; }
.heralda-cosmic-workshop__gallery article { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--hr-glow) 16%, transparent); border-radius: 11px; background: #0005; opacity: .66; }
.heralda-cosmic-workshop__gallery article.is-current { opacity: 1; border-color: var(--hr-glow); box-shadow: inset 0 0 16px color-mix(in srgb, var(--hr-main) 22%, transparent), 0 0 12px color-mix(in srgb, var(--hr-glow) 32%, transparent); }
.heralda-cosmic-workshop__gallery img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 0 6px var(--hr-glow)); }
.heralda-cosmic-workshop__worm { display: grid; place-items: center; width: 56px; height: 40px; }
.heralda-cosmic-workshop__worm .hr-worm { width: 56px; height: 20px; }
.heralda-cosmic-workshop__gallery small { color: var(--hr-glow); font: 800 8px/1 Montserrat, sans-serif; letter-spacing: .12em; }
.heralda-cosmic-workshop__gallery strong { display: block; margin-top: 2px; font: 900 14px/1.1 Montserrat, sans-serif; }
.heralda-cosmic-workshop__gallery p { margin: 3px 0 0; color: color-mix(in srgb, var(--hr-accent) 45%, #fff); font: 500 9.5px/1.3 Outfit, sans-serif; }
.heralda-cosmic-workshop__gallery.is-effects article.is-current { animation: hrStatusGlow 1.4s ease-in-out infinite alternate; }
.heralda-cosmic-workshop__overview .heralda-cosmic-tooltip { box-shadow: 0 0 18px color-mix(in srgb, var(--hr-glow) 30%, transparent), inset 0 0 40px #0008; }
.heralda-cosmic-workshop__overview .heralda-cosmic-tooltip__hint { display: none; }
.heralda-cosmic-workshop__abilities { display: grid; align-content: start; gap: 9px; }
.heralda-cosmic-workshop__abilities article { display: grid; grid-template-columns: 68px 1fr; align-items: start; gap: 11px; padding: 11px; border: 1px solid color-mix(in srgb, var(--hr-glow) 22%, transparent); border-radius: 13px; background: #ffffff07; }
.heralda-cosmic-workshop__abilities article > img { width: 66px; height: 66px; object-fit: cover; border: 1px solid var(--hr-glow); border-radius: 11px; box-shadow: 0 0 13px color-mix(in srgb, var(--hr-main) 45%, transparent); }
.heralda-cosmic-workshop__basic > img { object-fit: contain !important; background: radial-gradient(circle, color-mix(in srgb, var(--hr-glow) 30%, transparent), #0008 70%); }
.heralda-cosmic-workshop__basic small { color: var(--hr-glow); font: 800 8px/1 Montserrat, sans-serif; letter-spacing: .14em; }
.heralda-cosmic-workshop__basic strong { display: block; margin-top: 3px; font: 900 15px/1.1 Montserrat, sans-serif; }
.heralda-cosmic-workshop__basic p { margin: 4px 0 6px; color: color-mix(in srgb, var(--hr-accent) 40%, #fff); font: 500 10.5px/1.4 Outfit, sans-serif; }
.heralda-cosmic-workshop__basic ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.heralda-cosmic-workshop__abilities .ability-progression { margin-top: 7px; }

/* ---------------------------------------
   Harci napló: Lény chip
   --------------------------------------- */
.v3-log-stat-heralda {
    border-color: #A081C699 !important;
    background: linear-gradient(135deg, #8953C44d, #040105e6) !important;
    color: #F3E6FF !important;
    box-shadow: 0 0 8px #EB80C755;
}

/* ---------------------------------------
   Kulcsszó-ikonok (csak Heralda szövegeiben)
   --------------------------------------- */
.ability-inline-icon.is-heralda-keyword {
    width: 1.45em; height: 1.45em; margin: -.3em .14em -.28em 0;
    filter: drop-shadow(0 0 3px #A081C6aa);
}
.ability-inline-icon.is-heralda-keyword[data-heralda-keyword="felemesztoleny"],
.ability-inline-icon.is-heralda-keyword[data-heralda-keyword="felemesztoraj"] { filter: drop-shadow(0 0 2px #fff9) drop-shadow(0 0 4px #EB80C7dd); }
.ability-inline-icon.is-heralda-keyword[data-heralda-keyword="keltes"] { filter: drop-shadow(0 0 3px #8953C4dd); }
.heralda-cosmic-tooltip .ability-inline-icon.is-heralda-keyword { width: 1.5em; height: 1.5em; }

/* Részletező leírás-lista (ability tooltip, Fészek-popup): a Felemésztő
   Lény-küszöbök sorai. Elért küszöb világosabb címkével, az aktuális kiemelve. */
.ability-progression.is-heralda-details .ability-progression-step {
    grid-template-columns: 124px minmax(0, 1fr);
}
.ability-progression.is-heralda-details .ability-progression-step.is-wide-label {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
}
.ability-progression.is-heralda-details .ability-progression-step.is-wide-label .ability-progression-label {
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(160, 129, 198, .32);
}
.ability-progression.is-heralda-details .ability-progression-step.is-reached .ability-progression-label { color: #eadcff; }
.ability-progression.is-heralda-details .ability-progression-step.is-current {
    background: linear-gradient(100deg, rgba(137, 83, 196, .32), rgba(0, 0, 0, .42) 62%, rgba(235, 128, 199, .16));
    border-color: rgba(160, 129, 198, .7);
    box-shadow: inset 0 0 14px rgba(137, 83, 196, .34), 0 0 10px rgba(235, 128, 199, .28);
}
.ability-progression.is-heralda-details .ability-progression-step.is-current .ability-progression-label {
    color: #fff4fd;
    text-shadow: 0 0 8px rgba(235, 128, 199, .85);
}
body.v3-body > .ability-tooltip-floating .ability-progression.is-heralda-details .ability-progression-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 8px 10px 9px;
    border-radius: 10px;
}

/* ---------------------------------------
   Harci VFX (képernyő-fix overlay)
   --------------------------------------- */
/* ---------------------------------------
   Animációk
   --------------------------------------- */
@keyframes hrSlither { 0%, 100% { translate: 0 -1.6px; } 50% { translate: 0 1.6px; } }
@keyframes hrSegPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes hrSpin { to { transform: rotate(360deg); } }
@keyframes hrHaloPulse { from { transform: translate(-50%, -50%) scale(.88); } to { transform: translate(-50%, -50%) scale(1.12); } }
@keyframes hrIconSway { 0%, 100% { translate: 0 0; rotate: -5deg; } 50% { translate: 0 -3px; rotate: 5deg; } }
@keyframes hrStarOrbit {
    0% { opacity: 0; transform: rotate(var(--st-angle)) translateX(20px) scale(.5); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: rotate(calc(var(--st-angle) + 200deg)) translateX(34px) scale(1); }
}
@keyframes hrShimmer { from { background-position: 0 0; } to { background-position: 200% 0; } }
@keyframes hrMaxGlow { from { filter: drop-shadow(0 0 3px #fff6) drop-shadow(0 0 10px var(--hr-glow)); } to { filter: brightness(1.2) drop-shadow(0 0 5px #fff) drop-shadow(0 0 18px var(--hr-glow)); } }
@keyframes hrCountPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); box-shadow: 0 0 16px var(--hr-glow); } 100% { transform: scale(1); } }
@keyframes hrGainFlash { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.5); filter: brightness(1.6); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes hrAuraBreath { from { opacity: .6; } to { opacity: 1; } }
@keyframes hrWormBorn { 0% { opacity: 0; filter: brightness(2.2) drop-shadow(0 0 8px var(--hr-glow)); } 100% { opacity: .78; } }
@keyframes hrWormEvolve { 0% { filter: brightness(2.6) drop-shadow(0 0 12px var(--hr-worm-spike)); } 100% { filter: drop-shadow(0 0 2px var(--hr-worm-accent)) drop-shadow(0 0 6px var(--hr-worm-glow)); } }
@keyframes hrCrestOrbit {
    0% { transform: rotate(0deg) translateX(30px) rotate(90deg); }
    100% { transform: rotate(360deg) translateX(30px) rotate(90deg); }
}
@keyframes hrMotifRise {
    0% { opacity: 0; transform: translate(0, 0) rotate(0); }
    12% { opacity: .75; }
    50% { transform: translate(12px, -260px) rotate(30deg); }
    100% { opacity: 0; transform: translate(-10px, -540px) rotate(-24deg); }
}
@keyframes hrScan { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
@keyframes hrStatusGlow { to { box-shadow: 0 0 20px color-mix(in srgb, var(--hr-glow) 60%, transparent); } }
@keyframes hrWorkshopRise { 0% { opacity: 0; transform: translate(0, 0) scale(1.3) rotate(0); } 10% { opacity: .6; } 100% { opacity: 0; transform: translate(40px, -95vh) scale(1.3) rotate(120deg); } }

@media (max-width: 900px) {
    .heralda-cosmic-workshop__content { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .heralda-cosmic-tooltip__synergy { grid-template-columns: 1fr; }
    .heralda-cosmic-workshop__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .heralda-cosmic-meter, .heralda-cosmic-meter *,
    .heralda-card-fx, .heralda-card-fx *,
    .heralda-cosmic-tooltip *, #heralda-cosmic-workshop *,
    .hr-worm, .hr-worm * { animation: none !important; transition: none !important; }
    .heralda-combat-vfx { display: none; }
}
/* Kikapcsolt VFX: a lények információt hordoznak, ezért láthatók maradnak,
   csak mozdulatlanul (a JS statikusan helyezi el őket). */
body.v3-vfx-disabled .heralda-card-fx *, body.v3-vfx-disabled .heralda-cosmic-meter * { animation: none !important; }
body.v3-vfx-disabled .heralda-combat-vfx { display: none; }

/* ---------------------------------------
   Fejlesztett Halloween: cukorkacsíkos, összevarrt féreg szemgolyó-fejjel.
   A rétegek minden féregben ott vannak; a --hr-worm-upgraded (0/1) téma-
   változó kapcsolja be őket, így a kártya, a tooltip, a műhely, a kódex és
   a Vásárcsarnok jelvénye is ugyanazt a rajzot mutatja.
   --------------------------------------- */
.hr-worm__candy, .hr-worm__stitch, .hr-worm__eyeball { opacity: var(--hr-worm-upgraded, 0); }
.hr-worm__candy { fill: none; stroke: var(--hr-worm-stripe, #fff); stroke-width: .75; stroke-linecap: round; }
.hr-worm__stitch { fill: none; stroke: var(--hr-worm-glow); stroke-width: .45; stroke-linecap: round; }
.hr-worm__eye { opacity: calc(1 - var(--hr-worm-upgraded, 0)); }
.hr-worm__eyeball-white { fill: var(--hr-worm-eye); stroke: var(--hr-worm-rim); stroke-width: .35; filter: drop-shadow(0 0 1.2px var(--hr-worm-glow)); }
.hr-worm__eyeball-vein { fill: none; stroke: #e0356b; stroke-width: .28; }
.hr-worm__eyeball-iris { fill: var(--hr-worm-glow); }
.hr-worm__eyeball-pupil { fill: #0b0610; }
.hr-worm__eyeball-glint { fill: #fff; }
.hr-worm.is-devourer .hr-worm__candy { stroke: var(--hr-worm-spike); }
.hr-motif .is-hw { overflow: visible; }
.hr-motif.is-candy, .hr-motif.is-eyeball, .hr-motif.is-brain { width: 15px; height: 15px; }
.hr-motif.is-candy svg path:first-child { fill: var(--hr-soft); stroke: var(--hr-glow); stroke-width: 1.6; }
.hr-motif.is-candy svg path:nth-child(2) { fill: var(--hr-glow); stroke: var(--hr-main); stroke-width: 1.6; }
.hr-motif.is-candy svg path:nth-child(3) { stroke: var(--hr-main); }
.hr-motif.is-brain svg path { fill: var(--hr-glow); stroke: var(--hr-main); stroke-width: 1.6; }
.hr-motif.is-brain svg path:nth-child(2) { fill: none; }
.hr-motif.is-eyeball svg { filter: drop-shadow(0 0 3px var(--hr-soft)); }
[data-hr-theme="fhalloween"].heralda-cosmic-tooltip,
#heralda-cosmic-workshop[data-hr-theme="fhalloween"] {
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--hr-glow) 24%, transparent), transparent 34%),
        radial-gradient(circle at 88% 90%, color-mix(in srgb, var(--hr-soft) 18%, transparent), transparent 44%),
        linear-gradient(150deg, var(--hr-deep), #0d0719 55%, #12302d);
}
