/* Arcane Command Visual Polish v4 — VECTOR ornaments, responsive UI, NO game logic edits */
:root{--av4-gold:#f6dca2;--av4-gold-soft:#e2b876;--av4-purple:#bda0ff;--av4-deep:#101c45;}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz.battle-question-overlay{
  position:relative!important;
  padding:30px clamp(21px,4cqw,68px) 26px!important;
  background:
    radial-gradient(ellipse at 50% 5%,rgba(138,98,216,.30),transparent 47%),
    radial-gradient(ellipse at 12% 75%,rgba(78,71,177,.32),transparent 39%),
    radial-gradient(ellipse at 88% 75%,rgba(81,71,189,.32),transparent 39%),
    linear-gradient(155deg,#101d47 0%,#172550 50%,#0b193b 100%)!important;
  border-top:1px solid #fae5b0!important;
  box-shadow:inset 0 8px 22px rgba(194,139,244,.17),inset 0 -6px 27px rgba(91,70,145,.16)!important;
  isolation:isolate;
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:before{
  content:"";position:absolute;inset:0;display:block;
  width:100%;height:100%;z-index:0;border:0!important;border-radius:0!important;
  background:url('/game/asterveil/assets/arcane-command-ornament.svg') center center / 100% 100% no-repeat!important;
  pointer-events:none;
  opacity:.89;
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:after{
 content:"";position:absolute;inset:12px 18px 12px;z-index:0;
 pointer-events:none;opacity:.66;border:1px solid rgba(243,198,143,.29);
 border-radius:26px!important;
 box-shadow:inset 0 0 32px rgba(140,91,201,.12);
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz>*{
 position:relative;z-index:1;
}
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam{
  flex-basis:22px;height:22px;
  background:linear-gradient(90deg,#0c1c38,#37295f 23%,#272053 50%,#37295f 77%,#0c1c38)!important;
  border-top:1px solid #ffe5a1;
  box-shadow:0 -6px 19px rgba(155,117,239,.31),inset 0 1px rgba(255,255,255,.19);
}
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam>span{
 font-size:27px;color:#fff0be;text-shadow:0 0 15px #d397ff,0 0 32px #f7e0af;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-heading{
  gap:11px;max-width:1070px;margin-bottom:7px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{
 gap:10px;flex-wrap:wrap;margin-bottom:6px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-stock,
body.av-ui-ready #battleStage.battle-command-v3 #usePotion.battle-potion-use.choice,
body.av-ui-ready #battleStage.battle-command-v3 #soundToggle.sound-toggle,
body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{
 border-radius:999px!important;
 background:
  linear-gradient(160deg,rgba(78,63,137,.78),rgba(25,35,83,.88))!important;
 border:1px solid rgba(250,217,158,.85)!important;
 color:#fff0cf!important;
 box-shadow:inset 0 1px rgba(255,250,216,.28),inset 0 -2px rgba(149,105,236,.24),0 4px 15px #050b267a!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #usePotion.battle-potion-use.choice{
 background:linear-gradient(170deg,rgba(151,88,182,.9),rgba(80,52,136,.94))!important;
 border-color:#ffdfab!important;
 box-shadow:inset 0 2px rgba(255,241,255,.21),0 0 13px rgba(166,99,237,.33)!important;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels{
 margin:0 auto;gap:10px 16px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels>.eyebrow{
 display:inline-flex;min-height:28px;align-items:center;justify-content:center;
 border:1px solid rgba(241,190,112,.79);border-radius:99px;
 background:linear-gradient(90deg,rgba(5,15,37,.21),rgba(15,32,68,.94),rgba(5,15,37,.21));
 color:#fce1a9;letter-spacing:.14em;
 padding:5px 24px;box-shadow:inset 0 1px rgba(255,245,208,.17);
}
body.av-ui-ready #battleStage.battle-command-v3 #battleStep.battle-quiz-progress{
 background:linear-gradient(130deg,rgba(32,40,85,.82),rgba(15,28,65,.94));
 border:1px solid #ddba81;border-radius:99px;
 color:#fff3d5;padding:6px 12px;
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz .battleword{
 padding:12px 12px 10px!important;margin-bottom:12px!important;
}
body.av-ui-ready #battleStage.battle-command-v3 #pattern{
 font-size:clamp(18px,1.82cqw,24px)!important;line-height:1.32!important;
 font-weight:700!important;color:#fff1dc!important;
 text-shadow:0 2px 12px #050e2d;
}
body.av-ui-ready #battleStage.battle-command-v3 #wordHint{
 font:500 11px/1.5 system-ui,sans-serif;color:#c8cce4;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices.answers{
 max-width:1010px;gap:11px 14px;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{
 position:relative;
 min-height:65px;padding:11px 29px;
 background:
  linear-gradient(160deg,rgba(107,81,165,.56),rgba(46,55,110,.78) 55%,rgba(39,44,99,.79))!important;
 border:1.5px solid #e8bfa0!important;
 border-radius:19px!important;
 color:#fff3d6!important;
 box-shadow:
  inset 0 1px rgba(255,253,218,.55),
  inset 0 -2px rgba(180,138,247,.35),
  0 0 0 3px rgba(91,65,151,.25),
  0 7px 19px rgba(0,5,19,.42)!important;
 text-shadow:0 1px 6px rgba(6,12,37,.8);
 font:700 clamp(15px,1.48cqw,19px)/1.3 Georgia,serif!important;
 transition:transform .16s,filter .16s,border-color .16s,background .16s;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:before,
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:after{
 content:"✧";position:absolute;top:50%;translate:0 -50%;
 color:#ffd69f;opacity:.9;font:22px/1 Georgia,serif;
 text-shadow:0 0 11px rgba(241,186,149,.87);
 pointer-events:none;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:before{left:10px}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:after{right:10px}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:hover:not(:disabled){
 background:linear-gradient(160deg,rgba(143,108,200,.86),rgba(59,73,133,.9))!important;
 filter:brightness(1.13);
 border-color:#fff1c9!important;transform:translateY(-2px);
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav.av-command-nav{
 position:relative;isolation:isolate;
 padding:17px clamp(22px,5cqw,76px) 16px;
 border-top:1px solid #ffde9e;
 background:
  radial-gradient(ellipse at 50% -50%,rgba(148,101,220,.29),transparent 62%),
  linear-gradient(175deg,#152046,#0e1a3c 72%,#0c1632);
 box-shadow:inset 0 1px rgba(253,222,179,.2),inset 0 -2px rgba(154,99,190,.16);
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav:before,
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav:after{
 color:#fae0aa;text-shadow:0 0 10px #bd8cff;
}
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button{
 min-height:49px;
 border:1px solid #e8c08d;
 color:#ffefcf;
 background:linear-gradient(170deg,rgba(60,59,107,.81),rgba(27,40,83,.94));
 box-shadow:inset 0 1px rgba(255,247,209,.22),0 4px 16px rgba(2,8,23,.42);
}
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button.av-character{
 background:linear-gradient(160deg,rgba(150,78,188,.82),rgba(77,52,134,.93));
 box-shadow:inset 0 1px #fff3d83d,0 0 15px #a76de655;
}
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button:hover{
 background:linear-gradient(150deg,#664e97,#283f83);border-color:#fff2be;
}
@container av3-stage (max-width:780px){
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz{padding:26px 22px 19px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{min-height:58px;padding:11px 24px;font-size:15px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav{padding:14px 22px}
}
@container av3-stage (max-width:500px){
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz{padding:16px 10px 13px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:before{opacity:.48;background-size:auto 100%!important}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:after{inset:6px 6px;border-radius:16px!important}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{margin-bottom:0;gap:5px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels>.eyebrow{font-size:10px;padding:5px 10px}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz .battleword{padding:8px 5px 5px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #pattern{font-size:clamp(16px,4.4cqw,18px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices{gap:8px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{
  min-height:52px;padding:9px 13px;
  border-radius:12px!important;
  font-size:clamp(12px,3.5cqw,14px)!important;
  box-shadow:inset 0 1px #fff5d533,0 4px 11px #050a244d!important;
 }
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:before,
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:after{font-size:12px}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:before{left:3px}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:after{right:3px}
 body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav{padding:10px 14px}
}
/* Answer pop-up is only dismissable by the original Next button. */
.av-answer-reveal[hidden]{display:none!important}
.av-answer-reveal{
 position:fixed;inset:0;z-index:100002;
 display:grid;place-items:center;padding:clamp(12px,3vw,28px);
 isolation:isolate;color:#ffefd3;
}
.av-answer-backdrop{position:absolute;inset:0;background:rgba(3,9,26,.81);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}
.av-answer-reveal .av-answer-card{
 position:relative;z-index:2;display:flex;flex-direction:column;
 width:min(680px,100%);max-height:min(88dvh,740px);
 border:2px solid #f3d49c;border-radius:24px;overflow:hidden;
 background:
  radial-gradient(ellipse at 50% 0,rgba(152,105,225,.32),transparent 64%),
  linear-gradient(165deg,#17274f,#162044 58%,#0b1d40);
 box-shadow:0 24px 100px #020a1dc9,0 0 36px rgba(148,109,216,.29),inset 0 1px #fff0ba66;
}
.av-answer-reveal .av-answer-card:before{
 content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:url('/game/asterveil/assets/arcane-command-ornament.svg') center / 100% 100% no-repeat;
 opacity:.55;
}
.av-answer-reveal .av-answer-header{
 display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;
 padding:25px 28px 16px;border-bottom:1px solid rgba(255,215,148,.47);
 background:linear-gradient(180deg,#212b61a3,#1a25594d);
}
.av-answer-reveal .av-answer-eyebrow{
 letter-spacing:.17em;font:800 11px/1.2 system-ui,sans-serif;color:#e9cfa2;
}
.av-answer-reveal .av-answer-symbol{
 display:grid;place-items:center;width:52px;height:52px;margin-bottom:3px;
 border:1px solid #dfbd83;border-radius:50%;
 background:radial-gradient(circle,#374e76,#1c2853);
 font:30px/1 Georgia,serif;color:#b0ffda;text-shadow:0 0 16px #7cf5d5;
}
.av-answer-reveal.av-answer-wrong .av-answer-symbol{color:#ffd1e0;text-shadow:0 0 16px #f4a4bd}
.av-answer-reveal .av-answer-number{font:700 11px/1.2 system-ui,sans-serif;color:#e2cbab}
.av-answer-reveal .av-answer-header h2{
 margin:0;color:#fff0ca;
 font:700 clamp(24px,4vw,35px)/1.15 Georgia,serif;
}
.av-answer-reveal .av-answer-body{
 display:flex;flex-direction:column;gap:9px;
 padding:22px clamp(17px,4vw,38px) 12px;
 overflow-y:auto;scrollbar-width:thin;min-height:0;overscroll-behavior:contain;
}
.av-answer-reveal #feedback.feedback{
 display:flex!important;flex-direction:column;gap:10px;margin:0;padding:0;
 background:transparent!important;border:0!important;
 color:#fff2d9!important;box-shadow:none!important;
 font:500 15px/1.55 system-ui,sans-serif;
}
.av-answer-reveal #feedback.feedback>div:first-child{
 text-align:center;padding:8px 12px;border:1px solid #a1e3c6;border-radius:99px;
 background:rgba(30,84,73,.46);font-weight:750;color:#d9ffed;
}
.av-answer-reveal.av-answer-wrong #feedback.feedback>div:first-child{
 color:#ffe1e7;border-color:#e6a4c1;background:rgba(103,43,76,.49);
}
.av-answer-reveal #feedback.feedback>div:nth-child(2){
 font:700 clamp(18px,3.4vw,25px)/1.4 Georgia,serif;
 text-align:center;padding:10px 15px;color:#fff5d5;
 border-radius:12px;background:rgba(39,55,99,.69);
 border:1px solid rgba(241,206,147,.47);
}
.av-answer-reveal #feedback.feedback>div:nth-child(3){
 color:#d6e3f7;text-align:center;white-space:pre-wrap;
}
.av-answer-reveal #feedback.feedback>div:nth-child(4){
 background:rgba(13,30,62,.72);border:1px solid rgba(222,192,146,.34);
 border-radius:12px;padding:13px 16px;color:#e8e5f5;
}
.av-answer-reveal #feedback.feedback>div:nth-child(4):empty{display:none}
.av-answer-reveal #feedback.feedback>small{
 display:block;text-align:center;font:700 11px/1.45 system-ui,sans-serif;
 color:#e3cca3;
}
.av-answer-reveal .av-answer-bottom{
 padding:13px clamp(16px,3vw,30px) 23px;
 flex:none;box-shadow:inset 0 1px rgba(239,197,132,.32);
}
.av-answer-reveal .av-answer-hint{
 margin:0 0 13px;text-align:center;color:#cbd2e7;
 font:500 12px/1.5 system-ui,sans-serif;
}
.av-answer-reveal .av-answer-footer{display:flex;justify-content:center}
.av-answer-reveal #next.btn{
 display:flex!important;align-items:center;justify-content:center;
 min-height:52px;width:min(340px,100%);padding:11px 22px;
 color:#1d2344!important;font:800 16px/1.2 system-ui,sans-serif!important;
 border:1px solid #fff0bb;border-radius:999px!important;
 background:linear-gradient(135deg,#fff2ca,#edcf9e 55%,#d5a767)!important;
 box-shadow:0 0 20px rgba(243,195,136,.28),inset 0 1px #fff5dc!important;
 cursor:pointer;touch-action:manipulation;
}
.av-answer-reveal #next.btn:hover{filter:brightness(1.08)}
.av-answer-reveal #next.btn:focus-visible{outline:3px solid #c69aff;outline-offset:3px}
@media(max-width:480px){
 .av-answer-reveal{padding:11px}
 .av-answer-reveal .av-answer-card{max-height:92dvh;border-radius:17px}
 .av-answer-reveal .av-answer-header{padding:20px 14px 13px}
 .av-answer-reveal .av-answer-body{padding:14px 15px 10px}
 .av-answer-reveal #feedback.feedback{font-size:13px}
 .av-answer-reveal #feedback.feedback>div:nth-child(2){font-size:18px}
 .av-answer-reveal .av-answer-bottom{padding:11px 14px 18px}
}