/* RAID-1117 (Phil 17/11 13:36): the beast raid on the town. js/views/raid.js. Symbols only, no frame, no sentence. */
.raid-alert { position: fixed; z-index: 45; left: 50%; top: 104px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer; }
.raid-alert[hidden] { display: none; }
.raid-alert { width: max-content; max-width: calc(100vw - 112px); }   /* fixed at left 50 %: without it the box got half the screen and '115' broke in two */
.scene-hud > .raid-alert { position: static; transform: none; pointer-events: auto; max-width: calc(100% - 16px); }
.raid-count, .raid-foe { white-space: nowrap; }
/* POWER-EVERYWHERE (18/11): beasts standing + their power, symbols beside the countdown; gone once the raid has ended */
.raid-foe { display: inline-flex; align-items: center; gap: 3px; color: #fff; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000, 0 0 2px #000, 0 0 8px rgba(0, 0, 0, .7); }
.raid-foe .ico, .raid-foe img { width: 18px; height: 18px; }
.raid-foe .raid-foe-p { color: #ffd479; }
.raid-alert[data-state="won"] .raid-foe, .raid-alert[data-state="lost"] .raid-foe { display: none; }
.raid-bang { display: block; width: 50px; height: 50px; border-radius: 50%; background: #d3261c; color: #fff; font-size: 34px; line-height: 50px; font-weight: 900; text-align: center; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 4px 14px rgba(0, 0, 0, .65); animation: raid-pulse .8s ease-in-out infinite; }
.raid-count { color: #ff3b30; font-weight: 900; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 3px #000, 0 2px 5px #000, 0 0 2px #000, 0 0 10px rgba(0, 0, 0, .8); }
.raid-alert[data-state="won"] .raid-bang { background: #2e9d48; animation: none; }
.raid-alert[data-state="lost"] .raid-bang { background: #6b2a25; animation: none; }
.raid-alert[data-state="won"] .raid-count, .raid-alert[data-state="lost"] .raid-count { display: flex; flex-wrap: wrap; gap: 4px 10px; max-width: 220px; font-size: 15px; color: #fff; }
@keyframes raid-pulse { 50% { transform: scale(1.18); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 22px 6px rgba(211, 38, 28, .8); } }

.raid-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.raid-layer[hidden], .raid-bar[hidden] { display: none; }
.raid-beast { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity .45s; }
/* RAID-HEADS (17/11): a round token, the beast's head in it (the disc hides where the head was cut from the body) */
.raid-disc { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 38%, #4a3a33, #1d1614 72%);
  box-shadow: 0 0 0 2px #b8291f, 0 0 0 3.5px rgba(0, 0, 0, .55), 0 5px 9px rgba(0, 0, 0, .55); }
.raid-beast img { display: block; width: 100%; height: 100%; object-fit: cover; }
.raid-beast.body .raid-disc { overflow: visible; background: none; box-shadow: none; }
.raid-beast.body img { object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .6)); }
.raid-beast.slow .raid-disc { box-shadow: 0 0 0 2px #7fd4ff, 0 0 10px 2px #7fd4ff, 0 5px 9px rgba(0, 0, 0, .55); }
.raid-beast.slow img { filter: saturate(.5) brightness(1.2) hue-rotate(170deg); }
.raid-beast.poison .raid-disc { box-shadow: 0 0 0 2px #8ee05a, 0 0 10px 2px #8ee05a, 0 5px 9px rgba(0, 0, 0, .55); }
.raid-beast.poison img { filter: sepia(.7) hue-rotate(55deg) saturate(1.8); }
.raid-bit { position: absolute; left: 0; top: 0; border-radius: 1px; pointer-events: none; box-shadow: 0 0 1px rgba(0, 0, 0, .6); }
.raid-bit.blood { border-radius: 50%; }
.raid-ring { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; }
.raid-ring polygon { fill: rgba(255, 236, 190, .07); stroke: rgba(255, 236, 190, .85); stroke-width: 2; stroke-dasharray: 7 6; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
.raid-stat.range .raid-rg { width: 20px; height: 20px; flex: none; fill: none; stroke: #ffecbe; stroke-width: 2.2; stroke-dasharray: 4 3; filter: drop-shadow(0 1px 2px #000); }
.raid-stat.range .raid-rg circle + circle { fill: #ffecbe; stroke: none; }
.raid-tip .raid-rg { fill: none; stroke: #ffecbe; stroke-width: 2.2; }
.raid-beast.hit img { animation: raid-hit .22s; }
.raid-beast.dead { opacity: 0; }
.raid-hp { position: absolute; left: 18%; right: 18%; top: -7px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .7); overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.raid-hp i { display: block; height: 100%; width: 100%; background: #e5392f; }
@keyframes raid-hit { 40% { transform: translateX(4px) scale(.94); filter: brightness(2.2); } }
.raid-shot { position: absolute; left: 0; top: 0; width: 20px; height: 3px; margin: -1.5px 0 0 -10px; border-radius: 2px; background: #f1e6c8; box-shadow: 0 0 3px rgba(0, 0, 0, .8); }
.raid-shot.frost { background: #9fe2ff; box-shadow: 0 0 7px #7fd4ff; }
.raid-shot.poison { background: #a6ee6c; box-shadow: 0 0 7px #8ee05a; }
.raid-shot.fire { background: #ffb347; box-shadow: 0 0 9px 2px #ff7a3d; height: 4px; }

.raid-bar { position: absolute; z-index: 7; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.raid-slots { display: flex; gap: 14px; align-items: flex-start; }
/* TOWER-STATS: symbol + number floating, no frame, no background */
.raid-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; align-items: center; white-space: nowrap; max-width: calc(100vw - 16px); }
/* ARROW-DETAIL (17/11 16:47): each symbol is a tap (44 px target) that floats its line of words; still no frame, no background */
button.raid-stat, button.raid-fx { appearance: none; -webkit-appearance: none; margin: 0; padding: 0 2px; min-height: 44px; border: 0; background: transparent; box-shadow: none; cursor: pointer; }
.raid-fx { display: inline-flex; align-items: center; gap: 3px; color: #fff; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000, 0 0 2px #000, 0 0 8px rgba(0, 0, 0, .7); transition: opacity .2s; }
.raid-fx .raid-gi { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px #000); }
.raid-fx.frost { --c: #7fd4ff; } .raid-fx.poison { --c: #8ee05a; } .raid-fx.fire { --c: #ff7a3d; }
.raid-fx.frost b { color: #bfeaff; } .raid-fx.poison b { color: #c9f5a4; } .raid-fx.fire b { color: #ffc49a; }
.raid-fx.dim { opacity: .45; }
/* RAID-FX-FRAME (18/11, Phil: no frame, no bgcolor): the generic button.on outline (style.css) drew a white frame around the lit effect; keyboard focus lights the glyph instead */
button.raid-fx, button.raid-fx.on, button.raid-fx:focus, button.raid-stat, button.raid-stat:focus { outline: none; }
button.raid-fx:focus-visible .raid-gi, button.raid-stat:focus-visible svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 1px 2px #000); }
.raid-fx.on .raid-gi { filter: drop-shadow(0 0 6px var(--c)) drop-shadow(0 1px 2px #000); }
.raid-tip { display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: min(92vw, 520px); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center;
  text-shadow: 0 1px 3px #000, 0 0 2px #000, 0 0 10px rgba(0, 0, 0, .9); pointer-events: none; }
.raid-tip[hidden] { display: none; }
.raid-tip > div { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; }
.raid-tip b { font-weight: 800; }
.raid-tip i { font-style: normal; color: var(--gold, #e9c46a); }
.raid-tip svg { width: 16px; height: 16px; flex: none; filter: drop-shadow(0 1px 2px #000); }
.raid-gi.g-normal { --c: #e8dcc0; } .raid-gi.g-frost { --c: #7fd4ff; } .raid-gi.g-poison { --c: #8ee05a; } .raid-gi.g-fire { --c: #ff7a3d; }
.raid-tip-next { opacity: .92; }
.raid-stat { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000, 0 0 2px #000, 0 0 8px rgba(0, 0, 0, .7); }
.raid-stat > svg { width: 20px; height: 20px; flex: none; filter: drop-shadow(0 1px 2px #000); }
.raid-stat.hp > svg { color: #ff5a4e; fill: #ff5a4e; }
.raid-stat.dmg > svg { color: #ffc93c; fill: #ffc93c; }
.raid-stat.arrows .raid-gi { --c: #e8dcc0; width: 20px; height: 20px; }
.raid-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.raid-arrow { display: flex; align-items: center; justify-content: center; width: 52px; min-width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); background: #20282c; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); transition: transform .15s; }
.raid-arrow.normal { --c: #e8dcc0; } .raid-arrow.frost { --c: #7fd4ff; } .raid-arrow.poison { --c: #8ee05a; } .raid-arrow.fire { --c: #ff7a3d; }
.raid-arrow.on { border-color: #fff; box-shadow: 0 0 0 3px var(--c), 0 0 16px var(--c), 0 2px 10px rgba(0, 0, 0, .6); transform: scale(1.12); }
.raid-arrow.off { opacity: .55; filter: saturate(.25); }
.raid-gi { width: 28px; height: 28px; fill: var(--c); }
.raid-gi.line { fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.raid-lv { position: absolute; top: -7px; right: -9px; display: flex; align-items: center; gap: 1px; min-width: 18px; height: 20px; padding: 0 5px 0 3px; box-sizing: border-box; border-radius: 9px; background: var(--gold); color: #171a1c; font-size: 12px; line-height: 20px; text-align: center; font-weight: 800; pointer-events: none; }
.raid-lv svg, .raid-lv .ico { width: 11px; height: 11px; flex: none; }
.raid-under { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 14px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000, 0 0 2px #000; white-space: nowrap; pointer-events: none; }
.raid-under > .gi { width: 13px; height: 13px; fill: #fff; }
.raid-cost { display: inline-flex; align-items: center; gap: 2px; }
.raid-cost img, .raid-cost .gi { width: 14px; height: 14px; }
#city-pane.raid-blink::after { content: ''; position: absolute; inset: 0; z-index: 8; pointer-events: none; box-shadow: inset 0 0 90px 30px rgba(211, 38, 28, .8); animation: raid-blink .55s ease-out forwards; }
@keyframes raid-blink { to { opacity: 0; } }
html[data-motion="calm"] .raid-bang, html[data-motion="calm"] .raid-beast.hit img { animation: none; }
html[data-motion="calm"] #city-pane.raid-blink::after { display: none; }
.raid-tip-fx { font-weight: 600; opacity: .95; }
.raid-tip svg:not(.raid-gi) { color: #ffc93c; }

/* RAID-WAVES-1119: wave n/N under the countdown; the boss = a bigger token ringed in red-gold */
.raid-wave { display: block; margin-top: 2px; color: #ffd27a; font-weight: 900; font-size: 15px; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 3px #000, 0 1px 3px #000; }
.raid-alert.boss-wave .raid-wave { color: #ff6a3d; }
.raid-beast.boss .raid-disc { box-shadow: 0 0 0 3px #ffb347, 0 0 14px 4px rgba(255, 70, 40, .7), 0 6px 12px rgba(0, 0, 0, .6); }
.raid-beast.boss .raid-hp i { background: linear-gradient(90deg, #ff3b30, #ffb347); }
@media (prefers-reduced-motion: no-preference) { .raid-beast.boss .raid-disc { animation: raid-boss-throb 1.6s ease-in-out infinite; } }
@keyframes raid-boss-throb { 50% { box-shadow: 0 0 0 3px #ffb347, 0 0 22px 7px rgba(255, 70, 40, .85), 0 6px 12px rgba(0, 0, 0, .6); } }
.raid-order { font: 700 12px/1.15 system-ui; color: #fff2eb; background: #461923f0; padding: 4px 6px; max-width: 105px; }

.raid-alert:has(.raid-order:not([hidden])) { width: max-content; max-width: 92vw; }
.raid-bang, .raid-count { flex-shrink: 0; white-space: nowrap; }
.raid-bat { display: block; width: 88%; height: 85%; margin: 8% auto; background: linear-gradient(#ffd4bb, #d06b7a 60%, #7d3849);
  clip-path: polygon(0 9%, 18% 20%, 37% 49%, 41% 45%, 40% 25%, 48% 35%, 53% 35%, 61% 25%, 59% 46%, 64% 49%, 82% 20%, 100% 9%, 92% 46%, 100% 58%, 85% 54%, 75% 60%, 72% 75%, 61% 69%, 51% 94%, 40% 69%, 28% 75%, 24% 60%, 15% 54%, 0 58%, 8% 44%); }

button.raid-disc::after { content: ""; position: absolute; inset: min(0px, calc((100% - 44px) / 2)); border-radius: 50%; }
button.raid-disc { pointer-events: auto; min-width: 0; min-height: 0; padding: 0; border: 0; }
button.raid-disc[aria-pressed=true] { outline: 3px dashed #ffdd82; outline-offset: 3px; }
