/* Radiance pass: special runes read as living light at a glance; the battlefield breathes with embers. */

/* ---------------------------------------------------------------- special rune idle light (behind the gem) */
.tile.blast::after {
  content:''; position:absolute; inset:-14%; z-index:0; pointer-events:none; border-radius:50%; mix-blend-mode:screen; }
.tile.charged_h .gem,.tile.charged_v .gem,.tile.blast .gem,.tile.cross .gem,.tile.world .gem { z-index:1; }
.tile.charged_h,.tile.charged_v,.tile.blast,.tile.cross,.tile.world { z-index:2; }

/* Blast idle light is defined once in viking.css, against the painted gem's alpha.
   Do not animate the gem container: selection, hints and creation own its motion. */

/* World uses its painted prism silhouette and contained light in viking.css.
   Leave the gem wrapper free for lock, hint, selection and forge transitions. */

/* A freshly forged special lands with a flare (decorate keeps the class while the tile is new). */
.tile.spawn.charged_h .gem,.tile.spawn.charged_v .gem,.tile.spawn.blast .gem,.tile.spawn.cross .gem,.tile.spawn.world .gem { animation:specialForged .5s cubic-bezier(.2,1.6,.4,1) !important; }
@keyframes specialForged { 0% { transform:scale(.3); filter:brightness(3); } 60% { transform:scale(1.18); } }

/* ---------------------------------------------------------------- battlefield atmosphere */
/* Slow embers drifting up through the scene; two parallax layers built from gradients (no DOM churn). */
.battle-art::before,.battle-art::after { content:''; position:absolute; inset:-20% 0 0; pointer-events:none; mix-blend-mode:screen; opacity:.55;
  background-image:radial-gradient(1.5px 1.5px at 12% 80%,#ffb46a,transparent),radial-gradient(1px 1px at 33% 64%,#ffd59a,transparent),radial-gradient(2px 2px at 58% 88%,#ff9a4a,transparent),
    radial-gradient(1px 1px at 76% 70%,#ffe2b0,transparent),radial-gradient(1.5px 1.5px at 90% 92%,#ffb46a,transparent),radial-gradient(1px 1px at 45% 40%,#ffd59a,transparent);
  background-size:100% 50%; animation:emberRise 16s linear infinite; }
.battle-art::after { background-size:70% 38%; opacity:.35; animation-duration:26s; animation-delay:-9s; filter:blur(.6px); }
@keyframes emberRise { from { transform:translateY(0); } to { transform:translateY(-50%); } }
#screen-battle.has-art .battle-art { opacity:1; }

/* Board rim: a cold forge glow that warms with the chain. */
.b-board-wrap .board { transition:box-shadow .4s; }
.board.rune-impact { animation:boardFlare .5s ease-out; }
@keyframes boardFlare { 0% { box-shadow:0 0 0 1px #fff3cf, 0 0 40px 6px #ffcf6a99, inset 0 0 40px #ffcf6a55; } 100% { box-shadow:none; } }

@media (prefers-reduced-motion:reduce) {
  .tile.blast::after,.tile.world::after,.tile .gem::after,.tile.blast .gem,.battle-art::before,.battle-art::after,.board.rune-impact { animation:none !important; }
}
