/* A bounded painting on an atmospheric dark canvas. The native loading dialog
   owns input; every layer here is decorative and disappears with its lease. */
dialog.loading-overlay.battle-loading-view{padding:0;background:transparent}
dialog.loading-overlay.battle-loading-view[open]{display:block}
dialog.loading-overlay.battle-loading-view::backdrop{background:transparent;backdrop-filter:none}
.battle-loading-view>.loading-overlay-panel[hidden]{display:none}
.battle-loading-cover{position:absolute;inset:0;overflow:hidden;background:#0d0c0a;color:#f6eacb;isolation:isolate;pointer-events:none;will-change:opacity;--portrait-width:min(90vw,52svh,560px,var(--loading-art-limit,512px))}
.battle-loading-atmosphere{position:absolute;inset:0;background:radial-gradient(ellipse at 45% 38%,#50626735,transparent 53%),radial-gradient(ellipse at 66% 59%,#254c5826,transparent 57%),linear-gradient(135deg,#15212655,transparent 65%)}
.battle-loading-atmosphere::before{content:'';position:absolute;inset:-8%;background:conic-gradient(from 142deg at 24% 0%,transparent 0deg,#d7cda20c 11deg,transparent 22deg,#97bab307 29deg,transparent 36deg);opacity:.75;animation:battle-loading-light 11s ease-in-out infinite alternate}
/* The static SVG mask roughens ONLY the feathered perimeter. Its white core
   protects faces, hands and weapons; it neither warps nor blurs the painting.
   SVG is inline (no pending network material); only atmosphere opacity/transform
   animates. Keep the image itself stationary for crisp high-density texturing. */
.battle-loading-portrait{position:absolute;left:50%;top:44%;width:var(--portrait-width);aspect-ratio:2/3;transform:translate(-50%,-50%);isolation:isolate}
.battle-loading-art{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-select:none;
 --loading-ink-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 900'%3E%3Cdefs%3E%3ClinearGradient id='v' x2='0' y2='1'%3E%3Cstop stop-color='white' stop-opacity='0'/%3E%3Cstop offset='.09' stop-color='white' stop-opacity='.8'/%3E%3Cstop offset='.17' stop-color='white'/%3E%3Cstop offset='.72' stop-color='white'/%3E%3Cstop offset='.92' stop-color='white' stop-opacity='.3'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='h'%3E%3Cstop stop-color='white' stop-opacity='0'/%3E%3Cstop offset='.13' stop-color='white' stop-opacity='.88'/%3E%3Cstop offset='.22' stop-color='white'/%3E%3Cstop offset='.78' stop-color='white'/%3E%3Cstop offset='.92' stop-color='white' stop-opacity='.55'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='wash'%3E%3CfeGaussianBlur stdDeviation='14'/%3E%3C/filter%3E%3Cmask id='crest'%3E%3Cpath d='M-40 224 C30 193 61 116 128 111 C183 111 213 31 280 42 C333 61 345 111 411 72 C474 24 534 85 640 184 L640 960 L-40 960 Z' fill='white' filter='url(%23wash)'/%3E%3C/mask%3E%3Cmask id='edge'%3E%3Crect width='600' height='900' fill='url(%23h)'/%3E%3C/mask%3E%3Cfilter id='ink' x='-.2' y='-.2' width='1.4' height='1.4' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.023 .017' numOctaves='3' seed='12' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='22' xChannelSelector='R' yChannelSelector='G'/%3E%3CfeGaussianBlur stdDeviation='3'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23ink)'%3E%3Cg mask='url(%23crest)'%3E%3Crect x='6' y='4' width='588' height='892' fill='url(%23v)' mask='url(%23edge)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
 -webkit-mask-image:var(--loading-ink-mask);mask-image:var(--loading-ink-mask);
 -webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.battle-loading-mist{position:absolute;left:50%;top:44%;width:min(130vw,850px);height:min(85svh,900px);transform:translate(-50%,-50%);pointer-events:none}
.battle-loading-mist::before,.battle-loading-mist::after{content:'';position:absolute;inset:-7%;background:radial-gradient(ellipse at 16% 78%,#78959b16,transparent 38%),radial-gradient(ellipse at 76% 87%,#91a6a51a,transparent 39%);animation:battle-loading-mist 10s ease-in-out infinite alternate;opacity:.65}
.battle-loading-mist::after{background:radial-gradient(ellipse at 75% 13%,#09131e77,transparent 38%),radial-gradient(ellipse at 24% 69%,#09141dc9,transparent 32%);animation-duration:13s;animation-delay:-6s;animation-direction:alternate-reverse}
/* Sparse foreground dust gives depth without a busy particle emitter. */
.battle-loading-motes{position:absolute;left:50%;top:44%;width:var(--portrait-width);height:calc(var(--portrait-width) * 1.5);transform:translate(-50%,-50%)}
.battle-loading-motes::before,.battle-loading-motes::after{content:'';position:absolute;left:12%;top:38%;width:2px;height:2px;border-radius:50%;background:#e6d4a9;box-shadow:34px 92px #c9d7c485,152px 16px #d8caad80,210px 166px #c9d7c49c,57px 231px #ddcda070,240px 62px #d6c69a80,-9px 148px #c9d7c475;opacity:0;animation:battle-loading-dust 8s ease-in-out infinite}
.battle-loading-motes::after{left:28%;top:21%;width:1px;height:1px;animation-delay:-4s;animation-duration:11s}
.battle-loading-veil{position:absolute;inset:-1px;background:radial-gradient(ellipse at 50% 42%,transparent 27%,#08080659 62%,#050504e8 100%);opacity:.68;animation:battle-loading-breathe 6.8s ease-in-out infinite alternate}
.battle-loading-copy{position:absolute;left:24px;right:24px;bottom:max(7.5svh,calc(env(safe-area-inset-bottom) + 24px));display:grid;justify-items:center;gap:16px;text-align:center;text-shadow:0 2px 9px #070705}
.battle-loading-label{margin:0;font:550 14px/1.5 var(--font-ui);letter-spacing:.2em;color:#ddd1b7}
.battle-loading-seal{position:relative;display:grid;place-items:center;width:46px;height:46px}
.battle-loading-seal::before,.battle-loading-seal::after{content:'';position:absolute;top:50%;width:56px;height:1px;background:linear-gradient(90deg,transparent,#a99b6d66)}
.battle-loading-seal::before{right:calc(100% + 15px)}
.battle-loading-seal::after{left:calc(100% + 15px);transform:rotate(180deg)}
.battle-loading-seal .loading-overlay-spinner{position:absolute;inset:0;width:auto;height:auto;border-width:1px;border-color:#cfba8324;border-top-color:#e7d3a0;border-right-color:#cfba8370;animation-duration:2.4s}
.battle-loading-mark{display:block;width:21px;height:17px;background:linear-gradient(#eddbac,#a79a6b);clip-path:polygon(0 12%,27% 35%,50% 0,73% 35%,100% 12%,89% 77%,11% 77%,0 12%,12% 87%,88% 87%,87% 100%,13% 100%,12% 87%)}
@keyframes battle-loading-breathe{from{opacity:.54}to{opacity:.96}}
@keyframes battle-loading-light{from{opacity:.4;transform:rotate(-2deg)}to{opacity:.9;transform:rotate(2deg)}}
@keyframes battle-loading-mist{from{opacity:.45;transform:translate(-10px,9px)}to{opacity:.9;transform:translate(12px,-8px)}}
@keyframes battle-loading-dust{0%,100%{opacity:0;transform:translate(0,18px)}22%{opacity:.4}75%{opacity:.24}95%{opacity:0;transform:translate(13px,-27px)}}
.battle-loading-cover[data-suspended="true"] *,.battle-loading-cover[data-suspended="true"] *::before,.battle-loading-cover[data-suspended="true"] *::after{animation-play-state:paused!important}
@media(orientation:landscape) and (max-height:540px){.battle-loading-cover{--portrait-width:min(60vw,calc((100svh - 105px) * 2 / 3),560px,var(--loading-art-limit,512px))}.battle-loading-portrait,.battle-loading-mist,.battle-loading-motes{top:42%}.battle-loading-copy{bottom:max(16px,env(safe-area-inset-bottom));gap:8px}.battle-loading-seal{width:32px;height:32px}.battle-loading-mark{width:16px;height:13px}.battle-loading-label{font-size:12px}}
@media(prefers-reduced-motion:reduce){.battle-loading-cover *,.battle-loading-cover *::before,.battle-loading-cover *::after{animation:none!important}.battle-loading-motes{display:none}.battle-loading-veil{opacity:.7}}
