/* ASTERVEIL Arcane Command — Final Polish v5
   Refines the V4 approved direction. Decorative SVG is masked away from text,
   live quiz/audio/potion/game/navigation DOM remains unchanged. */
:root{--av5-filigree:#ebc58a;--av5-light:#fff1d4;--av5-orchid:#bb92f9;--av5-night:#101a3e}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz.battle-question-overlay{
 border-top:1px solid #ffe9b9!important;
 background:
  radial-gradient(ellipse 53% 80% at 50% 6%,rgba(127,87,202,.26),transparent 87%),
  radial-gradient(ellipse 31% 73% at 4% 72%,rgba(87,71,166,.34),transparent 100%),
  radial-gradient(ellipse 31% 73% at 96% 72%,rgba(87,71,166,.34),transparent 100%),
  linear-gradient(162deg,#131e48 0%,#1a2755 42%,#111c46 69%,#0b1637 100%)!important;
 padding:24px clamp(21px,3.3cqw,48px) 25px!important;
 box-shadow:inset 0 1px 0 rgba(255,238,187,.36),inset 0 -13px 28px rgba(7,14,47,.35),0 0 32px rgba(166,107,220,.07)!important;
}
/* Keep intricately drawn side ornaments, but never project lines across sentences or answer buttons. */
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:before{
 inset:0!important;opacity:.71!important;
 background:url('/game/asterveil/assets/arcane-command-ornament.svg') center/100% 100% no-repeat!important;
 -webkit-mask-image:linear-gradient(to right,#000 0%,#000 12%,transparent 24%,transparent 76%,#000 88%,#000 100%);
 mask-image:linear-gradient(to right,#000 0%,#000 12%,transparent 24%,transparent 76%,#000 88%,#000 100%);
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:after{
 inset:10px 13px!important;border:1px solid rgba(255,218,154,.31)!important;
 border-radius:24px!important;
 box-shadow:inset 0 0 1px #fff1c075,0 0 0 1px rgba(80,52,145,.25);
}
/* Legible question and a real horizontal toolbar, not centered or visually crowded. */
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-heading{
 width:100%;max-width:none;margin:0 auto 9px;gap:9px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{
 display:grid!important;width:min(1230px,100%);margin-inline:auto;
 grid-template-columns:minmax(0,1fr) auto auto;
 align-items:center;gap:10px;justify-content:normal!important;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-tools{
 justify-self:start;display:flex!important;align-items:center;gap:9px;min-width:0;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-sound-slot{
 justify-self:end;margin-left:0!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{justify-self:end}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels{
 display:flex;justify-content:center;align-items:center;
 margin:1px auto 0;max-width:990px;gap:9px 16px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels>.eyebrow{
 min-height:30px;background:
 linear-gradient(100deg,rgba(18,30,70,.66),rgba(32,39,95,.91),rgba(18,30,70,.66));
 border-color:rgba(251,215,147,.85);
 box-shadow:inset 0 1px rgba(255,250,211,.27),0 1px 12px rgba(124,69,170,.2);
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz .battleword{
 position:relative;max-width:1000px;padding:11px 10px 9px!important;margin-bottom:13px!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #pattern{
 font-size:clamp(17px,1.83cqw,24px)!important;
 color:var(--av5-light)!important;line-height:1.36!important;
 text-wrap:pretty;
}
body.av-ui-ready #battleStage.battle-command-v3 #wordHint{
 margin-top:7px!important;color:#d5d2e8!important;font-size:11px;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices.answers{
 max-width:1000px;gap:11px 14px;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{
 min-height:65px;padding:11px 28px;
 border:1px solid rgba(249,210,150,.88)!important;border-radius:17px!important;
 background:
  radial-gradient(circle at 50% -30%,rgba(178,132,244,.23),transparent 76%),
  linear-gradient(165deg,rgba(85,66,150,.87),rgba(36,53,106,.92) 70%,rgba(34,48,97,.89))!important;
 box-shadow:inset 0 1px rgba(255,240,202,.37),inset 0 -2px rgba(135,105,206,.26),0 7px 20px rgba(1,7,24,.36)!important;
 font:700 clamp(14px,1.47cqw,19px)/1.34 Georgia,serif!important;
 color:#fff0d4!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:hover:not(:disabled),
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:focus-visible{
 border-color:#fff0c6!important;
 background:linear-gradient(165deg,rgba(142,105,202,.94),rgba(58,79,142,.96))!important;
 box-shadow:inset 0 1px #ffffff5d,0 0 16px rgba(191,134,252,.36),0 10px 24px rgba(2,7,31,.39)!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:active:not(:disabled){
 transform:translateY(1px) scale(.997)!important;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-stock,
body.av-ui-ready #battleStage.battle-command-v3 #usePotion.choice.battle-potion-use,
body.av-ui-ready #battleStage.battle-command-v3 #soundToggle.sound-toggle,
body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{
 min-height:43px!important;
 border:1px solid rgba(245,211,156,.79)!important;
 box-shadow:inset 0 1px rgba(255,253,219,.27),0 4px 14px rgba(7,9,36,.35)!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #usePotion.choice.battle-potion-use:not(:disabled):hover{
 filter:brightness(1.12);
 box-shadow:0 0 15px rgba(197,126,240,.34),inset 0 1px #fff6d76a!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav.av-command-nav{
 padding:15px clamp(20px,4.1cqw,65px) 16px;
 gap:10px;
 background:radial-gradient(ellipse at 50% -40%,rgba(139,90,210,.28),transparent 70%),
 linear-gradient(180deg,#18214b,#0f1b40 72%,#0a1734);
 border-top:1px solid #ffe2a5;
 box-shadow:inset 0 1px #fff1c429,inset 0 -3px #7268b019;
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav .av-nav-button{
 min-height:49px;border:1px solid #e8c58c;border-radius:999px;
 background:linear-gradient(165deg,rgba(49,56,105,.89),rgba(24,35,78,.96));
 box-shadow:inset 0 1px rgba(254,242,210,.2),0 5px 12px rgba(1,5,24,.3);
 color:#fff0d8;letter-spacing:.01em;
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav .av-nav-button.av-character{
 background:linear-gradient(155deg,#8755ba,#5f438f 65%,#4a377b)!important;
 box-shadow:inset 0 1px #fff4e045,0 0 18px rgba(176,109,235,.31);
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav .av-nav-button:hover,
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav .av-nav-button:focus-visible{
 border-color:#ffe5af;background:linear-gradient(155deg,rgba(105,74,167,.96),rgba(42,59,116,.96));
 box-shadow:inset 0 1px #ffedca6b,0 0 15px #a76ce344;
}
/* Amethyst crystal at the scene/command join. Subtle glimmer, never over the question. */
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam>span{
 filter:drop-shadow(0 0 5px #dfbbff);
 animation:av5-crystal-pulse 4.8s ease-in-out infinite;
}
@keyframes av5-crystal-pulse{
 0%,100%{opacity:.85;filter:drop-shadow(0 0 3px #e9c3ff)}
 50%{opacity:1;filter:drop-shadow(0 0 11px #ca8fff)}
}
@container av3-stage (max-width:780px){
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz.battle-question-overlay{
  padding:18px 14px 18px!important;
 }
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{gap:7px}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{min-height:57px;font-size:14px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav.av-command-nav{padding:12px 16px;gap:8px}
}
@container av3-stage (max-width:500px){
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz.battle-question-overlay{padding:13px 10px 14px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:before{opacity:.33!important}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:after{inset:7px 6px!important;border-radius:14px!important}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-heading{gap:7px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{gap:5px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-tools{gap:4px}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz .battleword{padding:8px 5px 7px!important;margin-bottom:9px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #pattern{font-size:clamp(16px,4.3cqw,18px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices.answers{gap:7px}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{min-height:52px;padding:9px 14px;border-radius:11px!important;font-size:clamp(12px,3.55cqw,14px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav.av-command-nav{padding:10px 13px;gap:6px}
 body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav .av-nav-button{min-height:46px}
}
@container av3-stage (max-width:360px){
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{
  grid-template-columns:minmax(0,1fr) auto;row-gap:8px;
 }
 body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-tools{
  grid-column:1/-1;width:100%;justify-content:space-between;
 }
 body.av-ui-ready #battleStage.battle-command-v3 .battle-sound-slot{
  grid-column:1;justify-self:start;
 }
 body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{
  grid-column:2;justify-self:end;
 }
}
@media(prefers-reduced-motion:reduce){
 body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam>span{animation:none}
}
