/* The cast (Regions 1 to 3): a Boss's intro caption and the gallery where Aurelian watches. */
.cast-caption { position: absolute; z-index: 6; left: 30%; top: 62px; width: 16%; min-width: 190px; box-sizing: border-box; padding: 8px 12px;   /* the open ground between the hero and the foes */
  text-align: center; font-style: italic; font-size: 13px; line-height: 1.3; color: #2a2118; background: rgba(239, 230, 210, .93); border: 2px solid #3a2c1c;
  border-radius: 4px; box-shadow: 0 2px 0 var(--ink-35); pointer-events: none; }
.cast-caption[hidden] { display: none; }
.cast-gallery {
  position: absolute; z-index: 3; right: 2%; top: 2px; height: 112px; pointer-events: none; width: 168px;
}
.cast-gallery[hidden] { display: none; }
.cast-gallery .cg-fig {
  position: absolute; bottom: 14px; height: 92px; right: auto; width: 84px; left: 0;
}
.cast-gallery .cg-fig .sprite { position: absolute; left: 50%; bottom: 0; width: 84px; height: 92px; transform: translateX(-50%); }
.cast-gallery .cg-rail { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; border: 2px solid #3a2c1c; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #8a8576 0 6px, #6c6857 6px 9px), #7d7868; box-shadow: 0 -5px 0 #a9a391 inset; }
.cast-gallery .cg-fig.steward { left: 78px; right: auto; }
.cast-gallery .cg-fig.steward .sprite { width: 76px; height: 88px; }
.cast-decree { position: absolute; z-index: 6; left: 50%; top: 8px; transform: translateX(-50%); display: flex; gap: 10px; padding: 5px 12px; font-size: 13px; color: #2a2118;
  background: rgba(239, 230, 210, .94); border: 2px solid #3a2c1c; border-radius: 4px; box-shadow: 0 2px 0 var(--ink-35); }
.cast-decree[hidden] { display: none; }
.cast-split { position: absolute; z-index: 5; top: 0; bottom: 0; left: 66.6%; width: 0; border-left: 3px double #3a2c1c; pointer-events: none; opacity: .75; }
.cast-split[hidden] { display: none; }
@keyframes castRunIn { from { transform: translateX(-26px); } to { transform: translateX(0); } }
.ambush-a:not(.ambush-in) #partnerPanel .portrait-wrap { opacity: .6; animation: castRunIn .9s ease-out infinite alternate; }
.ambush-a.ambush-in #playerPanel .portrait-wrap { opacity: .6; animation: castRunIn .9s ease-out infinite alternate; }

/* a foe that has slipped away (Quell, not today): it fades and drifts off instead of toppling */
.sprite.fled { opacity: 0; transform: translateX(40px); transition: opacity .9s ease, transform .9s ease; pointer-events: none; }

/* The final fight (cast-data-final.js): the last caption on the end screens, and the Lantern Chain on the monster it holds */
.final-caption { max-width: 560px; margin: 4px auto 8px; padding: 8px 14px; font-style: italic; font-size: 14px; line-height: 1.35; color: #2a2118; background: rgba(239, 230, 210, .93);
  border: 2px solid #3a2c1c; border-radius: 4px; box-shadow: 0 2px 0 var(--ink-35); }
.final-caption p { margin: 0; } .final-caption p + p { margin-top: 5px; }
.lantern-chain { position: absolute; left: 50%; bottom: 6%; width: 78%; height: 74%; transform: translateX(-50%); pointer-events: none; z-index: 4; }
.lantern-chain i { position: absolute; left: 0; right: 0; height: 22%; border-radius: 50%; border: 4px dotted #ffd56a; border-top-color: rgba(255, 213, 106, .25);
  box-shadow: 0 0 10px 2px rgba(255, 205, 90, .55), inset 0 0 8px rgba(255, 240, 190, .5); animation: lanternChain 1.6s ease-in-out infinite alternate; }
.lantern-chain i:nth-child(1) { top: 16%; } .lantern-chain i:nth-child(2) { top: 40%; animation-delay: -.5s; } .lantern-chain i:nth-child(3) { top: 64%; animation-delay: -1s; }
.lantern-chain::before { content: ""; position: absolute; left: 50%; top: -30%; width: 3px; height: 50%; transform: translateX(-50%); background: linear-gradient(#fff1c4, rgba(255, 213, 106, 0)); opacity: .7; }
@keyframes lanternChain { from { transform: scaleX(.94) translateY(-2px); opacity: .75; } to { transform: scaleX(1.04) translateY(2px); opacity: 1; } }
.cast-phase { position: absolute; z-index: 6; left: 12px; top: 8px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: #2a2118; }
.cast-phase[hidden] { display: none; }
.cast-phase span { padding: 4px 10px; white-space: nowrap; background: rgba(239, 230, 210, .94); border: 2px solid #3a2c1c; border-radius: 4px; box-shadow: 0 2px 0 var(--ink-35); }
.cast-phase .final-chain.mine { border-color: #b8860b; background: rgba(255, 236, 170, .96); }
/* his spells (vfx.js): the Flare's wash of light, the Ward's seal, the lamps, a conjuring's ink */
.vfx.flare-wash { position: absolute; inset: 0; transform: none; pointer-events: none; background: radial-gradient(circle at var(--fx, 70%) var(--fy, 40%), rgba(255, 244, 200, .95) 0%, rgba(255, 213, 106, .55) 22%, rgba(255, 190, 80, .18) 48%, rgba(255, 190, 80, 0) 72%); mix-blend-mode: screen; }
.vfx.flare-rays { position: absolute; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 236, 170, .9) 0 6deg, rgba(255, 236, 170, 0) 6deg 20deg); -webkit-mask-image: radial-gradient(circle, var(--black) 0%, var(--black) 30%, transparent 70%); mask-image: radial-gradient(circle, var(--black) 0%, var(--black) 30%, transparent 70%); }
.vfx.ward-seal { position: absolute; transform: translate(-50%, -50%); pointer-events: none; border-radius: 50%; border: 4px double #e9c66a; box-shadow: 0 0 16px 3px rgba(233, 198, 106, .6), inset 0 0 22px rgba(120, 160, 255, .45);
  background: radial-gradient(circle, rgba(140, 175, 255, .22) 0%, rgba(140, 175, 255, .08) 60%, rgba(140, 175, 255, 0) 72%); }
.vfx.lamp-light { position: absolute; width: 14px; height: 18px; transform: translate(-50%, -50%); pointer-events: none; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 50% 60%, var(--white) 0%, #ffe9a8 38%, #ffb84a 70%, rgba(255, 184, 74, 0) 100%); box-shadow: 0 0 14px 5px rgba(255, 205, 90, .7); }
.vfx.ink-pool { position: absolute; transform: translate(-50%, -50%); pointer-events: none; border-radius: 50%; background: radial-gradient(ellipse, #101736 0%, var(--royal-mid) 55%, rgba(28, 42, 90, 0) 75%); box-shadow: 0 0 12px 2px rgba(233, 198, 106, .55); }
.vfx.chain-link { position: absolute; transform: translate(-50%, -50%); pointer-events: none; border-radius: 50%; border: 5px dotted #ffd56a; box-shadow: 0 0 14px 3px rgba(255, 205, 90, .7); }
.vfx.puff { position: absolute; pointer-events: none; }
