/* Battle game feel and announcer ("Illuminated Aerie" tokens from theme.css). Banners, numbers and overlays sit at z-index 12. */
#juice-root{position:fixed;inset:0;pointer-events:none;z-index:12;overflow:hidden}
.juice-num{position:fixed;left:0;top:0;font:700 17px/1 var(--ui-body,monospace);color:var(--ui-gold-hi,#ffe2a3);letter-spacing:.02em;white-space:nowrap;text-shadow:1px 1px 0 var(--ui-ink,#231a2e),-1px -1px 0 var(--ui-ink,#231a2e),1px -1px 0 var(--ui-ink,#231a2e),-1px 1px 0 var(--ui-ink,#231a2e),2px 2px 0 var(--ui-ink,#231a2e);will-change:transform,opacity;pointer-events:none}
.juice-num.taken{color:var(--ui-bad,#ff8a7a);font-size:15px}
.juice-num[hidden],#juice-hurt i[hidden]{display:none}
/* Directional hurt arc: the <i> sits on the player and is rotated toward the shooter; the crescent is drawn at a fixed radius. */
#juice-hurt i{position:fixed;left:0;top:0;width:0;height:0;will-change:transform,opacity}
/* Both are pre-pixelated: a 4px-cell crescent with a checker-dithered fringe, and a dithered edge frame (50% checker at the very
   edge, thinning inward). The frame is its own layer (#juice-lowhp, z 9) under the HUD roots (z 10), so HUD text stays clear. */
#juice-hurt i::before{content:'';position:absolute;left:calc(max(96px,min(30vw,30vh)) - 160px);top:-80px;width:160px;height:160px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' shape-rendering='crispEdges'%3E%3Cpath fill='%23c4183c' fill-opacity='.85' d='M120 8h4v4h-4zM116 12h4v4h-4zM124 12h4v4h-4zM112 16h4v4h-4zM120 16h4v4h-4zM116 20h4v4h-4zM124 20h4v4h-4zM120 24h4v4h-4zM128 24h4v4h-4zM132 28h4v4h-4zM144 32h4v4h-4zM132 36h4v4h-4zM148 36h4v4h-4zM136 40h4v4h-4zM152 40h4v4h-4zM140 44h4v4h-4zM156 52h4v4h-4zM144 56h4v4h-4zM156 60h4v4h-4zM148 68h4v4h-4zM148 76h4v4h-4zM148 84h4v4h-4zM148 92h4v4h-4zM144 96h4v4h-4zM156 100h4v4h-4zM144 104h4v4h-4zM140 108h4v4h-4zM156 108h4v4h-4zM152 112h4v4h-4zM136 120h4v4h-4zM132 124h4v4h-4zM148 124h4v4h-4zM128 128h4v4h-4zM144 128h4v4h-4zM124 132h4v4h-4zM140 132h4v4h-4zM120 136h4v4h-4zM136 136h4v4h-4zM116 140h4v4h-4zM132 140h4v4h-4zM128 144h4v4h-4zM124 148h4v4h-4z'/%3E%3Cpath fill='%23ff5f73' fill-opacity='.95' d='M116 8h4v4h-4zM120 12h4v4h-4zM124 16h8v4h-8zM128 20h8v4h-8zM132 24h8v4h-8zM136 28h8v4h-8zM136 32h8v4h-8zM140 36h8v4h-8zM140 40h12v4h-12zM144 44h8v4h-8zM144 48h12v4h-12zM148 52h8v4h-8zM148 56h8v4h-8zM148 60h8v4h-8zM152 64h8v4h-8zM152 68h8v4h-8zM152 72h8v4h-8zM152 76h8v4h-8zM152 80h8v4h-8zM152 84h8v4h-8zM152 88h8v4h-8zM152 92h8v4h-8zM148 96h8v4h-8zM148 100h8v4h-8zM148 104h8v4h-8zM144 108h12v4h-12zM144 112h8v4h-8zM140 116h12v4h-12zM140 120h8v4h-8zM136 124h8v4h-8zM136 128h8v4h-8zM132 132h8v4h-8zM128 136h8v4h-8zM124 140h8v4h-8zM120 144h4v4h-4zM116 148h4v4h-4z'/%3E%3C/svg%3E") center/160px 160px no-repeat;image-rendering:pixelated}
#juice-lowhp{position:fixed;inset:0;z-index:9;pointer-events:none;display:none;box-sizing:border-box;border:24px solid transparent;border-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' shape-rendering='crispEdges'%3E%3Cdefs%3E%3Cpattern id='p0' width='8' height='8' patternUnits='userSpaceOnUse'%3E%3Cg fill='%23c4183c'%3E%3Crect width='8' height='8'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='p1' width='8' height='8' patternUnits='userSpaceOnUse'%3E%3Cg fill='%23c4183c'%3E%3Cpath d='M0 0h2v2H0zM4 0h2v2H4zM2 2h2v2H2zM6 2h2v2H6zM0 4h2v2H0zM4 4h2v2H4zM2 6h2v2H2zM6 6h2v2H6z'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='p2' width='8' height='8' patternUnits='userSpaceOnUse'%3E%3Cg fill='%23c4183c'%3E%3Cpath d='M0 0h2v2H0zM4 4h2v2H4zM4 0h2v2H4zM0 4h2v2H0z'/%3E%3C/g%3E%3C/pattern%3E%3Cpattern id='p3' width='8' height='8' patternUnits='userSpaceOnUse'%3E%3Cg fill='%23c4183c'%3E%3Cpath d='M0 0h2v2H0zM4 4h2v2H4z'/%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Cg fill-opacity='.7'%3E%3Cpath fill='url(%23p1)' fill-rule='evenodd' d='M0 0H56V56H0zM6 6V50H50V6z'/%3E%3Cpath fill='url(%23p1)' fill-rule='evenodd' d='M6 6H50V50H6zM12 12V44H44V12z'/%3E%3Cpath fill='url(%23p2)' fill-rule='evenodd' d='M12 12H44V44H12zM18 18V38H38V18z'/%3E%3Cpath fill='url(%23p3)' fill-rule='evenodd' d='M18 18H38V38H18zM24 24V32H32V24z'/%3E%3C/g%3E%3C/svg%3E") 24 repeat;animation:juice-lowhp .9s steps(1,end) infinite}
body.juice-lowhp #juice-lowhp{display:block}
@keyframes juice-lowhp{0%,100%{opacity:.5}18%{opacity:1}36%{opacity:.65}54%{opacity:.9}}
body.player-down #world{filter:saturate(.35) brightness(.85)}
/* The respawn card says it all while downed: the 'Downed. Returning…' toast would only collide with it. */
body.in-battle.player-down #message{visibility:hidden}
#juice-respawn{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%);z-index:12;display:grid;gap:4px;justify-items:center;padding:10px 26px 12px;background:#231a2ed9;border:2px solid var(--ui-gold-lo,#b98a45);box-shadow:var(--ui-drop,6px 6px 0 #231a2e88);pointer-events:none;text-align:center;white-space:nowrap}
#juice-respawn[hidden]{display:none}
#juice-respawn small{font:400 14px/1.2 var(--ui-body,monospace);letter-spacing:.06em;color:var(--ui-bad,#ff8a7a);text-transform:uppercase}
#juice-respawn b{font:700 32px/1.1 var(--ui-body,monospace);letter-spacing:.08em;color:var(--ui-parchment,#fff3cd);text-shadow:3px 3px 0 var(--ui-ink,#231a2e)}
#juice-respawn .juice-spawn{pointer-events:auto;margin-top:6px;min-height:36px;padding:0 12px;display:flex;align-items:center;gap:8px;font:12px/1 var(--ui-body,monospace);letter-spacing:.04em;text-transform:uppercase;color:var(--ui-ink,#231a2e);background:linear-gradient(var(--ui-gold-hi,#ffe2a3),var(--ui-gold,#f4c67b));border:2px solid var(--ui-ink,#231a2e);border-radius:0;box-shadow:inset 0 -2px 0 var(--ui-gold-lo,#b98a45),2px 2px 0 #231a2e88;cursor:pointer}
#juice-respawn .juice-spawn[hidden]{display:none}
#juice-respawn .juice-spawn b{font:12px/1 var(--ui-label,monospace);letter-spacing:0;color:var(--ui-gold-hi,#ffe2a3);background:var(--ui-ink,#231a2e);padding:2px 3px;text-shadow:none}
#juice-respawn .juice-spawn:hover{background:var(--ui-gold-hi,#ffe2a3)}
#juice-respawn .juice-spawn:focus-visible{outline:2px solid var(--ui-gold-hi,#ffe2a3);outline-offset:2px}
@media (pointer:coarse){#juice-respawn .juice-spawn{min-height:44px;font-size:14px}#juice-respawn .juice-spawn b{font:700 12px/1 var(--ui-body,monospace);padding:2px 4px}}
/* Reticle hit / kill confirmation (battle.css positions it with translate(-50%,-50%)). */
#battle-reticle{transition:transform .08s ease-out,color .08s}
#battle-reticle.hit{transform:translate(-50%,-50%) scale(1.3);color:#fff;text-shadow:1px 1px var(--ui-ink,#231a2e),-1px -1px var(--ui-ink,#231a2e),0 0 6px var(--ui-gold,#f4c67b)}
#battle-reticle.kill{transform:translate(-50%,-50%) rotate(45deg) scale(1.6);color:var(--ui-bad,#ff8a7a);text-shadow:1px 1px var(--ui-ink,#231a2e),-1px -1px var(--ui-ink,#231a2e),0 0 8px #ff5f73}
.in-battle.reticle-on #world{cursor:none}
/* Kill feed lines (battle-feedback.js): killer and victim in team colours, environmental causes in stone. */
#combat-feed .feed-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#combat-feed .feed-line.you{background:linear-gradient(90deg,#ffe29c33,transparent)}
#combat-feed .feed-line b{font-weight:700}
#combat-feed .feed-line i{font-style:normal;color:var(--ui-gold,#f4c67b);padding:0 2px}
#combat-feed .team-0:not(.feed-line){color:var(--ui-dawn,#80eee2)}
#combat-feed .team-1:not(.feed-line){color:var(--ui-dusk,#f49bc7)}
#combat-feed .team-env:not(.feed-line){color:var(--ui-stone,#dac9a3);font-style:italic}
/* Announcer banner: blackletter Title Case title, Silkscreen caps subline, team-tinted gilt rules. */
/* Stacking (top centre): objective pill inside the first lane, then the banner, then the #message toast (battle.css moves it
   below the banner, or hides it on compact layouts, while body.announcing); while evacuating the banner sits under the box. */
#announce-banner{--tint:var(--ui-gold,#f4c67b);position:fixed;left:50%;top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px) + 4px);transform:translateX(-50%);z-index:12;min-width:min(440px,86vw);max-width:calc(100vw - 32px);box-sizing:border-box;padding:4px 32px 9px;text-align:center;pointer-events:none;background:linear-gradient(90deg,transparent,#231a2ee6 16%,#231a2ee6 84%,transparent);border-top:2px solid;border-bottom:2px solid;border-image:linear-gradient(90deg,transparent,var(--tint) 20%,var(--ui-gold-hi,#ffe2a3) 50%,var(--tint) 80%,transparent) 1}
#announce-banner[hidden]{display:none}
/* Over your own fighter (battle-announcer.js measures it): a ghost of the banner, so the fighter and what hits it stay visible. */
#announce-banner.over-player{filter:opacity(.35);transition:filter .2s steps(3)}
body.hud-evacuating #announce-banner{top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px) + 60px)}
#announce-banner[data-team="0"]{--tint:var(--ui-dawn,#80eee2)}
#announce-banner[data-team="1"]{--tint:var(--ui-dusk,#f49bc7)}
#announce-banner.show{animation:announce-in .28s ease-out}
@keyframes announce-in{from{opacity:0;transform:translateX(-50%) translateY(8px) scale(.96)}to{opacity:1;transform:translateX(-50%)}}
.announce-title{font:400 46px/1.05 var(--ui-display,serif);letter-spacing:.02em;color:var(--ui-parchment,#fff3cd);text-shadow:3px 3px 0 var(--ui-ink,#231a2e);white-space:nowrap;font-variant-ligatures:none}
/* In-match titles (and anything with digits): Silkscreen caps on its 8px grid (Pixelify's C reads as O, blackletter's E as C),
   ink outline and an ink drop (a gilt drop showed through the 4px letter counters: O read as a slashed O); the gilt lives in
   the banner rules. Blackletter stays for the finish banner. */
.announce-title[data-face="plain"]{font:400 32px/40px var(--ui-label,monospace);text-transform:uppercase;letter-spacing:.04em;text-shadow:2px 0 0 var(--ui-ink,#231a2e),-2px 0 0 var(--ui-ink,#231a2e),0 2px 0 var(--ui-ink,#231a2e),0 -2px 0 var(--ui-ink,#231a2e),2px 2px 0 var(--ui-ink,#231a2e),4px 4px 0 var(--ui-ink,#231a2e)}
#announce-banner[data-tone="good"] .announce-title{color:var(--ui-gold-hi,#ffe2a3)}
#announce-banner[data-tone="bad"] .announce-title{color:#ffc2b8}
.announce-sub{margin-top:2px;font:400 16px/1.25 var(--ui-label,monospace);text-transform:uppercase;letter-spacing:.06em;color:var(--tint);text-shadow:2px 2px 0 var(--ui-ink,#231a2e)}
/* Objective line under the HUD strip. */
#battle-objective{position:fixed;left:50%;top:calc(var(--hud-top-h,48px) + 1px);transform:translateX(-50%);z-index:12;box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(var(--hud-lane,28px) - 3px);padding:3px 12px 4px 10px;font:400 14px/16px var(--ui-body,monospace);color:var(--ui-parchment,#fff3cd);background:#231a2ed0;border:1px solid var(--ui-gold-lo,#b98a45);border-left:4px solid var(--ui-gold,#f4c67b);box-shadow:2px 2px 0 var(--ui-ink,#231a2e);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
#battle-objective[hidden]{display:none}
#battle-objective[data-state="protectors"]{border-left-color:var(--ui-dusk,#f49bc7)}
#battle-objective[data-state="core"]{border-left-color:var(--ui-bad,#ff8a7a)}
#battle-objective[data-state="secured"]{border-left-color:var(--ui-good,#9fe8a6);color:var(--ui-gold-hi,#ffe2a3)}
#battle-objective[data-state="escape"]{border-left-color:var(--ui-bad,#ff8a7a);color:#ffc2b8;animation:objective-alarm 1s steps(2) infinite}
@keyframes objective-alarm{50%{border-color:var(--ui-bad,#ff8a7a)}}
@media (max-width:560px){
 .announce-title{font-size:32px}
 .announce-sub{white-space:normal}
 #announce-banner{padding:3px 18px 7px;min-width:0;width:calc(100vw - 32px);top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px) + 136px)}
 /* During evacuation the banner takes the evacuation box's place for its two seconds (battle.css hides the box while
    body.announcing) instead of stacking under it, down over the fighter at the centre of the screen. */
 body.hud-evacuating #announce-banner{top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px) + 136px)}
 .announce-title[data-face="plain"]{font-size:24px;line-height:28px;white-space:normal}
 /* Downed card sits low so the banner (and evacuation box) above it stay readable; on touch it takes the hotbar's band
    (battle.css hides the hotbar while downed there: nothing to fire). */
 #juice-respawn{top:auto;bottom:calc(var(--hud-bottom-h,84px) + 12px);transform:translateX(-50%);padding:8px 16px 10px}
 #battle-objective{padding:2px 8px 3px 6px;font-size:12px;line-height:14px}
 .juice-num{font-size:14px}.juice-num.taken{font-size:13px}
 #juice-respawn b{font-size:26px}#juice-respawn small{font-size:12px}
}
@media (max-width:560px) and (pointer:coarse){#juice-respawn{bottom:calc(144px + env(safe-area-inset-bottom,0px))}}
@media (max-height:500px){
 /* Short landscape: a compact banner (about 48px) that ends above the fighter band at the screen centre; during evacuation it
    takes the evacuation box's place (battle.css hides the box while body.announcing) instead of stacking under it. */
 .announce-title{font-size:32px}.announce-title[data-face="plain"]{font-size:24px;line-height:26px}.announce-sub{margin-top:0;font:700 12px/14px var(--ui-body,monospace);letter-spacing:.06em}
 #announce-banner{padding:1px 24px 3px;min-width:min(360px,60vw);max-width:calc(100vw - 340px)}
 body.hud-evacuating #announce-banner{top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px) + 2px)}
 #juice-respawn{top:auto;bottom:calc(var(--hud-bottom-h,84px) + 8px);transform:translateX(-50%);padding:4px 18px 6px;gap:2px}#juice-respawn b{font-size:24px}#juice-respawn .juice-spawn{margin-top:2px}
}
/* r27 Thrill surge (thrill-surge.js): when health first drops under 25%, one 0.9 s red vignette pulse on its own layer (z 9,
   under the HUD like the low-HP frame). Reduced motion: a still, fainter frame instead of the pulse. Low-spec mode never
   shows it (the script also skips it). */
#juice-surge{position:fixed;inset:0;z-index:9;pointer-events:none;display:none;background:radial-gradient(ellipse at center,transparent 52%,#b0102488 82%,#6a0010cc 100%)}
#juice-surge.on{display:block}
#juice-surge.pulse{animation:juice-surge .9s ease-out both}
#juice-surge.still{opacity:.45}
@keyframes juice-surge{0%{opacity:0}15%{opacity:1}40%{opacity:.55}60%{opacity:.85}100%{opacity:0}}
html[data-lowspec="on"] #juice-surge{display:none!important}
html[data-motion="reduce"] #juice-surge.pulse{animation:none;opacity:.45}
@media (prefers-reduced-motion:reduce){
 html:not([data-motion="full"]) #juice-surge.pulse{animation:none;opacity:.45}
 #juice-lowhp,#announce-banner.show,#battle-objective[data-state="escape"]{animation:none}
 #juice-lowhp{opacity:.7}
 #battle-reticle{transition:none}
}
/* r33 (bug pass r32pre11 LOWs): the respawn card sat over the silo tags (T2/T3, 1280) and over the red "Banished by ... back
   in 4" banner (844x390); in Last Light the banner said "back in 4" under "NO RESPAWN". The card hangs under the top cluster
   and its silo strip (--mh-below, match-hud.js), and while it shows it is the one knockout notice: the banner steps aside. */
#juice-respawn{top:max(calc(var(--mh-below,112px) + 56px),28%);bottom:auto;transform:translate(-50%,0);width:max-content}
body:has(#juice-respawn:not([hidden])) .h2-killed{display:none}
/* r34pre2 (playtester LOW, r33pre2 and r33pre3 bp/ll-390x844-en-down.png): on portrait phones the rule above set top while the
   phone rules set bottom, so the card stretched between them (about 460 px at 390x844) over the player card, and its TAP button
   (158 px tall) stuck out of it: left:50% left the card half the screen to fit in. The card is now as wide as its content.
   Portrait phones keep it low and compact (content height, about 110 px), just above the chat buttons (touch) or the weapon row
   (a mouse in a narrow window; the chat buttons sit under that row), the button still 44 px tall; Last Light's rally card steps aside while it shows (the knockout card is the one notice
   then, as with the banner above). Short landscape keeps the top rule, at content height, and stays clear of the player card at the left (a long translation wraps,
   as on portrait phones when a line is wider than the screen). */
@media (max-width:560px){
 #juice-respawn{top:auto;bottom:256px;transform:translateX(-50%);padding:6px 12px 8px;gap:2px;width:max-content;max-width:calc(100vw - 24px);box-sizing:border-box;white-space:normal}
 #juice-respawn b{font-size:24px}#juice-respawn small{font-size:12px}#juice-respawn .juice-spawn{margin-top:4px;text-align:start}
 body:has(#juice-respawn:not([hidden])) #match-hud .h2-rally{display:none}
}
@media (max-width:560px) and (pointer:coarse){#juice-respawn{bottom:calc(196px + env(safe-area-inset-bottom,0px))}}
@media (max-height:500px){#juice-respawn{max-width:max(240px,calc(100vw - 520px));box-sizing:border-box;white-space:normal}#juice-respawn .juice-spawn{text-align:start}}
