/* ASTERVEIL Arcane Command V3 — preview visual shell.
   Original live game assets and server-owned game.js untouched.
   Layout adapts to available width, while keeping scene and controls separate. */
:root{--av3-gold:#efcf92;--av3-ink:#09182d;--av3-violet:#b398ec;--av3-ivory:#fff0d3;--av3-mist:#b8c3df}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.av-ui-ready:has(#play:not(.hide)){background:radial-gradient(ellipse at 45% -20%,#263761,#0b1429 64%,#0a1124);}
body.av-ui-ready:has(#play:not(.hide))>section.hero{display:none!important}
body.av-ui-ready:has(#play:not(.hide))>footer.footer{display:none!important}
body.av-ui-ready:has(#play:not(.hide)) main.wrap{max-width:1450px;width:100%;padding:14px clamp(9px,2.5vw,26px) 36px}
body.av-ui-ready #play:not(.hide){display:block!important}
body.av-ui-ready #play:not(.hide)>div{min-width:0}
body.av-ui-ready #play:not(.hide)>aside{display:none!important}
body.av-ui-ready #play:not(.hide)>div>.panel{border:0;box-shadow:none;background:transparent;padding:0!important;min-width:0}
body.av-ui-ready #play:not(.hide)>div>.panel>.row.between{
 display:flex;gap:12px;min-height:56px;align-items:center;margin:0 0 6px;padding:0 4px;
}
body.av-ui-ready #play:not(.hide)>div>.panel>.row.between h2{
 font:700 clamp(19px,2.6vw,28px)/1.1 Georgia,serif;color:#ffe2ac;margin:0;text-shadow:0 2px 11px #15102a;
}
body.av-ui-ready #play:not(.hide)>div>.panel>.row.between .eyebrow{font-size:10px;letter-spacing:.14em}
body.av-ui-ready #play:not(.hide)>div>.panel>#modeHint{display:none}
body.av-ui-ready #play:not(.hide)>div>.panel>.row.between #round{
 flex:none;border-radius:99px;background:rgba(13,27,51,.84);border-color:#b5965d;
}
body.av-ui-ready #arena{margin:0;min-width:0;}
body.av-ui-ready #arena>.arena-theme-picker{display:none!important}
body.av-ui-ready #arena>.arena-theme-picker.av-in-dialog{display:block!important}
body.av-ui-ready #battleStage.battle-command-v3.battle-stage.hd2d-stage{
 container:av3-stage/inline-size;display:flex!important;flex-direction:column!important;
 position:relative;overflow:hidden;width:100%;height:auto!important;min-height:0!important;
 border:1.5px solid #f2cc82!important;border-radius:18px!important;
 background:#09172d!important;
 box-shadow:0 0 0 1px rgba(255,235,185,.19),0 20px 44px rgba(1,7,22,.55)!important;
}
body.av-ui-ready #battleStage.battle-command-v3:before{display:none!important}
body.av-ui-ready #battleStage.battle-command-v3.arena-art-ready{background-image:none!important}
body.av-ui-ready #battleStage.battle-command-v3 .battle-arena-scene{
 position:relative!important;flex:0 0 auto!important;width:100%;height:clamp(365px,48cqw,615px)!important;
 min-height:0!important;overflow:hidden;isolation:isolate;
 background:linear-gradient(180deg,rgba(3,12,31,.1),rgba(3,12,31,.03) 72%,rgba(4,13,31,.15)),
 url('/game/asterveil/assets/arenas/wildwood.webp') center 54%/cover no-repeat!important;
}
body.av-ui-ready #battleStage.battle-command-v3.arena-art-ready .battle-arena-scene{
 background-image:linear-gradient(180deg,rgba(3,12,31,.07),rgba(3,12,31,0) 72%,rgba(4,13,31,.17)),var(--arena-art)!important;
 background-size:cover!important;background-position:center 54%!important;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-arena-scene:after{
 height:16px!important;background:linear-gradient(0deg,#141f42be,transparent)!important;z-index:2!important;
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-backdrop,
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-platform,
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-tactical-tiles,
body.av-ui-ready #battleStage.battle-command-v3 .stage-ground{display:none!important}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-motes{opacity:.28}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-topline{
 display:flex!important;position:absolute;top:10px;left:14px;right:14px;z-index:11;
 justify-content:space-between;pointer-events:none;font:800 clamp(10px,1.05cqw,13px)/1.1 Georgia,serif;
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-topline span{
 padding:7px 11px;max-width:46%;border-radius:9px;
 color:#fce7bb;text-shadow:0 2px 6px #000;
 background:linear-gradient(90deg,rgba(8,24,49,.86),rgba(10,23,44,.58));
 border:1px solid rgba(247,209,136,.71);
 box-shadow:inset 0 1px rgba(255,252,233,.12);
 backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-battle-hud{
 position:absolute;top:55px;left:14px;right:14px;z-index:13;
 display:flex;align-items:flex-start;justify-content:space-between;gap:clamp(25px,15cqw,220px);
 pointer-events:none;
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit{
 max-width:385px;min-width:0;width:33%;flex:0 1 33%;padding:9px 12px;
 color:var(--av3-ivory);border:1px solid rgba(244,203,130,.82);
 border-radius:12px;background:linear-gradient(135deg,rgba(9,25,48,.85),rgba(11,27,52,.66));
 box-shadow:0 5px 25px rgba(3,10,32,.36),inset 0 1px rgba(255,252,225,.17);
 backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit.hd2d-hud-hero{
 display:flex;align-items:center;flex-wrap:nowrap;gap:11px;
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hero-portrait{
 flex:0 0 clamp(45px,6cqw,77px);width:clamp(45px,6cqw,77px);
 height:clamp(45px,6cqw,77px);border:1px solid #e7b96b;border-radius:9px;
 box-shadow:0 0 0 2px rgba(14,26,52,.7),0 0 13px rgba(234,183,112,.15);
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit strong{
 font:700 clamp(14px,1.9cqw,23px)/1.2 Georgia,serif;color:#ffe4b1;
 min-width:0;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit small{font:700 9px/1.4 system-ui,sans-serif;color:#ddc68e;letter-spacing:.08em}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-track{height:8px;margin-top:7px;border:1px solid rgba(229,186,125,.55);border-radius:99px;background:rgba(5,13,31,.67)}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit .hd2d-hud-track span{border-radius:99px}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit>span,
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hero-hud-details>span{font:700 11px/1.3 system-ui,sans-serif;color:#fff0d0}
body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants{
 inset:clamp(132px,12cqw,150px) 2% 14px!important;
 z-index:6!important;align-items:flex-end;justify-content:space-around;
}
body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant{width:43%;height:100%;align-items:center;justify-content:flex-end;}
body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant.ally .hero-sprite{
 width:clamp(158px,24cqw,295px)!important;
 height:clamp(210px,31cqw,365px)!important;max-height:calc(100% - 24px)!important;
}
body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant.enemy-unit .monster-sprite{
 width:clamp(185px,27cqw,355px)!important;
 height:clamp(205px,31cqw,360px)!important;max-height:calc(100% - 24px)!important;
}
body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant small{
 display:block;padding:4px 13px;font:700 11px/1.2 system-ui,sans-serif;
 background:linear-gradient(130deg,rgba(8,19,42,.92),rgba(11,19,39,.75));
 border:1px solid #d8af68;border-radius:99px;color:#fff4de;
}
body.av-ui-ready #battleStage.battle-command-v3 .hd2d-versus{
 top:45%;font:italic 700 clamp(26px,4cqw,60px)/1 Georgia,serif;
 color:#fff0c0;text-shadow:0 0 28px #ffe8a3bc,0 3px 10px #01071b;
 opacity:.85;
}
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam{
 position:relative;z-index:4;display:flex;justify-content:center;align-items:center;
 flex:0 0 17px;height:17px;width:100%;
 border-top:1px solid #fce1ac;
 background:linear-gradient(90deg,#0a1936,#282354 22%,#1b214b 50%,#282354 78%,#0a1936);
 box-shadow:0 -3px 15px #bd97ed85,inset 0 1px 0 #fff1c855;
}
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam:before,
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam:after{
 content:"";position:absolute;top:7px;height:1px;width:33%;
 background:linear-gradient(90deg,transparent,#dbb97e);
}
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam:before{right:calc(50% + 27px)}
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam:after{left:calc(50% + 27px);transform:scaleX(-1)}
body.av-ui-ready #battleStage.battle-command-v3 .av-arcane-seam>span{
 position:relative;z-index:1;margin-top:-3px;display:grid;place-items:center;
 width:39px;height:26px;font:23px/1 Georgia,serif;color:#ffe1a1;
 text-shadow:0 0 9px #eec58b,0 0 20px #9a64fe;
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz.battle-question-overlay{
 display:flex;flex-direction:column;position:relative!important;inset:auto!important;
 width:100%!important;max-width:none!important;max-height:none!important;
 padding:14px clamp(15px,2.4cqw,36px) 23px!important;margin:0!important;
 transform:none!important;overflow:visible!important;
 background:
 radial-gradient(ellipse at 50% 0%,rgba(108,76,175,.27),transparent 56%),
 radial-gradient(circle at 8% 86%,rgba(66,71,139,.25),transparent 35%),
 radial-gradient(circle at 97% 82%,rgba(63,74,156,.24),transparent 33%),
 linear-gradient(180deg,rgba(12,24,55,.97),rgba(9,22,50,.985))!important;
 border:0!important;border-top:1px solid rgba(254,218,146,.65)!important;
 border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;
 color:var(--av3-ivory);isolation:isolate;
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:before{
 content:"";position:absolute;inset:5px 8px 10px;z-index:-1;pointer-events:none;
 border:1px solid rgba(210,159,113,.25);border-radius:18px;
 background:
 radial-gradient(circle at 15px 15px,#d7b46a 0 2px,transparent 3px),
 radial-gradient(circle at calc(100% - 15px) 15px,#d7b46a 0 2px,transparent 3px),
 radial-gradient(ellipse at 50% 50%,rgba(90,68,136,.08),transparent 66%);
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:after{
 content:"";position:absolute;pointer-events:none;inset:15px 18px;z-index:-1;
 border-left:1px solid rgba(223,170,111,.2);border-right:1px solid rgba(223,170,111,.2);
 border-radius:19px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-heading{
 display:flex;flex-direction:column;gap:12px;margin:0 auto 6px;max-width:980px;
 width:100%;min-height:0;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{
 order:-1;display:flex;align-items:center;justify-content:space-between;
 flex-wrap:wrap;gap:8px;margin:0 0 4px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-tools{
 display:flex;gap:7px;align-items:center;flex:0 1 auto;min-width:0;
 padding:0;border:0;background:none;box-shadow:none;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-stock{
 display:flex;align-items:center;gap:8px;padding:9px 14px;min-height:41px;
 border-radius:99px;border:1px solid rgba(236,199,133,.65);
 background:linear-gradient(100deg,rgba(47,42,86,.87),rgba(25,32,69,.69));
 color:#f6dfa7;font:700 12px/1 system-ui,sans-serif;white-space:nowrap;
 box-shadow:inset 0 1px #d2bdea30,0 2px 11px #0005;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-caption{display:inline;font:700 11px/1 system-ui,sans-serif;letter-spacing:.04em;color:#ead7b6}
body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-icon{font-size:18px}
body.av-ui-ready #battleStage.battle-command-v3 #potionCount{font:800 12px/1 system-ui,sans-serif;color:#fff2c8}
body.av-ui-ready #battleStage.battle-command-v3 #usePotion.battle-potion-use.choice{
 min-height:42px!important;padding:8px 16px!important;
 background:linear-gradient(145deg,rgba(118,67,162,.82),rgba(80,53,125,.72))!important;
 color:#ffefce!important;border:1px solid #dabb80!important;border-radius:99px!important;
 box-shadow:inset 0 1px #fff8ec2b,0 3px 14px #7651bc45!important;
 font:700 12px/1.1 system-ui,sans-serif;white-space:nowrap;
}
body.av-ui-ready #battleStage.battle-command-v3 #usePotion:disabled{opacity:.5;cursor:not-allowed}
body.av-ui-ready #battleStage.battle-command-v3 .battle-sound-slot{display:flex;margin-left:auto;min-width:0}
body.av-ui-ready #battleStage.battle-command-v3 #soundToggle.sound-toggle,
body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{
 display:inline-flex!important;align-items:center;justify-content:center;gap:8px;
 min-width:112px!important;width:auto!important;min-height:42px!important;
 padding:8px 16px!important;border:1px solid #d4a970!important;border-radius:99px!important;
 background:linear-gradient(145deg,rgba(28,47,79,.83),rgba(21,31,61,.85))!important;
 color:#f8e7cb!important;white-space:nowrap;
 box-shadow:inset 0 1px rgba(255,245,203,.13),0 4px 15px rgba(1,7,24,.2)!important;
 font:700 12px/1 system-ui,sans-serif;cursor:pointer;touch-action:manipulation;
}
body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{min-width:100px!important}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels{
 display:flex;align-items:center;justify-content:center;gap:12px;
 flex-wrap:wrap;min-height:26px;
}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels>.eyebrow{
 font:700 12px/1.1 Georgia,serif;color:#f4d69e;letter-spacing:.15em;text-align:center;
 padding:4px 20px;border:1px solid rgba(247,207,137,.5);border-radius:99px;
 background:linear-gradient(90deg,transparent,rgba(15,34,69,.65),transparent);
}
body.av-ui-ready #battleStage.battle-command-v3 #battleStep.battle-quiz-progress{
 font:700 11px/1.1 system-ui,sans-serif;color:#f8e4c2;white-space:normal;
 background:rgba(18,29,61,.75);border:1px solid rgba(231,191,119,.55);
 border-radius:99px;padding:6px 10px;
}
body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz .battleword{
 display:block!important;grid-column:auto;grid-row:auto;
 max-width:980px;width:100%;margin:0 auto 13px!important;
 padding:8px 12px 6px!important;border:0!important;
 background:transparent!important;box-shadow:none!important;text-align:center;
}
body.av-ui-ready #battleStage.battle-command-v3 #pattern{
 font:700 clamp(18px,2.1cqw,28px)/1.3 Georgia,"Times New Roman",serif!important;
 color:#fff1d5!important;letter-spacing:0!important;
 overflow-wrap:anywhere;word-break:normal;text-shadow:0 2px 12px #0009;
}
body.av-ui-ready #battleStage.battle-command-v3 #wordHint{
 margin:5px 0 0;color:#becbe2;font:500 11px/1.3 system-ui,sans-serif;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices.answers{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px;
 max-width:950px;width:100%;min-width:0;margin:0 auto;grid-column:auto;grid-row:auto;
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{
 position:relative;display:flex!important;align-items:center;justify-content:center;
 min-width:0;min-height:62px;padding:12px 16px;
 border:1px solid rgba(248,204,143,.88)!important;border-radius:14px!important;
 background:
 radial-gradient(circle at 15% 50%,rgba(141,94,181,.19),transparent 35%),
 linear-gradient(160deg,rgba(57,44,106,.74),rgba(35,52,101,.73))!important;
 color:#fff1d8!important;font:700 clamp(15px,1.6cqw,21px)/1.24 Georgia,serif!important;
 box-shadow:inset 0 1px rgba(255,252,230,.27),inset 0 -1px rgba(183,141,246,.32),0 4px 13px rgba(2,7,23,.28)!important;
 text-align:center;overflow-wrap:anywhere;word-break:normal;white-space:normal;
 backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);
 cursor:pointer;touch-action:manipulation;
 transition:background .16s,box-shadow .16s,border-color .16s,transform .16s;
}
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{
 background:linear-gradient(160deg,rgba(106,76,156,.88),rgba(42,67,118,.83))!important;
 box-shadow:0 0 18px rgba(180,132,238,.36),inset 0 1px #fff8cf47!important;
 border-color:#ffe7aa!important;transform:translateY(-1px);
}
body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice:disabled{transform:none!important;opacity:.73}
body.av-ui-ready #battleStage.battle-command-v3 #feedback{
 max-width:950px;margin:12px auto 0;padding:10px 14px;border-radius:10px;
 background:rgba(25,73,65,.87);border:1px solid rgba(100,225,172,.8);color:#ecfff3;
}
body.av-ui-ready #battleStage.battle-command-v3 #feedback.bad{background:rgba(91,30,64,.88);border-color:#ee93bc;color:#fff1f7}
body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-actions{margin:10px auto 0;max-width:950px}
body.av-ui-ready #battleStage.battle-command-v3 #next.btn{
 min-height:44px;color:#202442;border:1px solid #fff0c4;border-radius:99px;
 background:linear-gradient(135deg,#fff0c4,#d7ac68);
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav.av-command-nav{
 position:relative;z-index:4;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
 gap:9px;align-items:stretch;padding:12px clamp(15px,3cqw,54px) 14px;
 background:
 radial-gradient(ellipse at 50% 0,rgba(108,78,159,.32),transparent 60%),
 linear-gradient(180deg,#0d1b3a,#0b1530);
 border-top:1px solid #edcb8a;
 box-shadow:inset 0 3px 13px rgba(172,111,223,.2);
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav:before,
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav:after{
 content:"✧";position:absolute;top:20px;font:26px/1 Georgia,serif;color:#d9af6a;opacity:.75;
}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav:before{left:5px}
body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav:after{right:5px}
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button{
 display:flex;align-items:center;justify-content:center;gap:7px;
 width:100%;min-width:0;min-height:47px;padding:8px 7px;
 color:#ffe7ba;background:linear-gradient(165deg,rgba(33,46,85,.92),rgba(25,34,68,.86));
 border:1px solid rgba(237,193,126,.75);border-radius:99px;
 box-shadow:inset 0 1px rgba(255,244,219,.15),0 3px 12px rgba(1,5,19,.2);
 font:700 clamp(10px,1.13cqw,13px)/1.2 system-ui,sans-serif;white-space:nowrap;
 cursor:pointer;touch-action:manipulation;
}
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button.av-character{
 background:linear-gradient(150deg,rgba(121,60,157,.9),rgba(70,42,109,.92));
 border-color:#edd29e;box-shadow:0 0 12px rgba(173,124,239,.37),inset 0 1px rgba(255,240,221,.2);
}
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button:hover,
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button:focus-visible{
 background:linear-gradient(150deg,rgba(104,70,162,.93),rgba(42,55,99,.91));border-color:#fff0c7;
}
body.av-ui-ready #battleStage.battle-command-v3 .av-nav-icon{
 color:#ffd78f;font-size:clamp(17px,1.8cqw,22px);line-height:1;
}
body.av-ui-ready #battleStage.battle-command-v3 button:focus-visible{outline:2px solid #f9e4ad;outline-offset:2px}
/* Dialog portals the ORIGINAL profile/gear/quest/ranking/theme nodes, retaining listeners and server state */
.av-command-dialog[hidden]{display:none!important}
.av-command-dialog{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:clamp(10px,3vw,22px);color:var(--av3-ivory);isolation:isolate}
.av-command-dialog .av-dialog-scrim{position:absolute;inset:0;background:rgba(3,8,24,.78);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.av-command-dialog .av-dialog-window{
 position:relative;z-index:2;width:min(720px,100%);max-height:min(88dvh,880px);
 display:flex;flex-direction:column;overflow:hidden;
 border:1.5px solid #e6c088;border-radius:19px;
 background:radial-gradient(ellipse at top,#373368,#121e3e 53%,#0b162c 100%);
 box-shadow:0 30px 85px #000b,0 0 0 1px #ffe4bb24,inset 0 1px #ffe6ae49;
}
.av-command-dialog .av-dialog-heading{
 display:flex;align-items:center;justify-content:space-between;gap:10px;
 padding:15px clamp(14px,2vw,25px);border-bottom:1px solid rgba(235,202,140,.55);
}
.av-command-dialog .av-dialog-kicker{font:700 10px/1.2 system-ui,sans-serif;letter-spacing:.14em;color:#e9ce94}
.av-command-dialog .av-dialog-heading h2{margin:4px 0 0;font:700 25px/1.1 Georgia,serif;color:#ffe9bc}
.av-command-dialog .av-dialog-close{
 width:43px;height:43px;flex:0 0 43px;border:1px solid #e9c88c;
 border-radius:50%;background:#25345e;color:#fff2d8;cursor:pointer;font-size:19px;
}
.av-command-dialog .av-dialog-body{
 padding:clamp(12px,2vw,21px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;
}
.av-command-dialog .av-dialog-body>.panel,.av-command-dialog .av-dialog-body>.arena-theme-picker{
 display:block!important;position:relative!important;
 margin:0 0 12px!important;min-width:0!important;width:100%!important;
 background:linear-gradient(145deg,rgba(22,42,72,.89),rgba(15,27,54,.91))!important;
 border:1px solid rgba(236,200,141,.43)!important;border-radius:14px!important;
 box-shadow:none!important;color:#fff0d1;
}
.av-command-dialog .av-dialog-body .panel h2{font:700 24px Georgia,serif;color:#ffe9bb}
.av-command-dialog .av-dialog-body #profile .figure{max-width:350px;margin:auto}
.av-command-dialog .av-dialog-body .arena-theme-options button{color:#ffeacb}
.av-command-dialog .av-dialog-menu{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;
}
.av-command-dialog .av-dialog-menu button{
 min-height:83px;display:flex;align-items:center;gap:13px;padding:13px;
 border:1px solid rgba(228,186,120,.75);border-radius:14px;
 background:linear-gradient(130deg,rgba(57,58,106,.8),rgba(28,50,81,.85));
 color:#f6e6cf;cursor:pointer;font:700 16px Georgia,serif;text-align:left;
}
.av-command-dialog .av-dialog-menu button:hover,.av-command-dialog .av-dialog-menu button:focus-visible{
 border-color:#f9dcaa;background:#453f82;outline:none;
}
.av-command-dialog .av-dialog-menu .av-menu-glyph{display:grid;place-items:center;flex:none;width:48px;height:48px;border:1px solid #e5bd7a;border-radius:12px;background:#182448;color:#fbd89d;font-size:25px}
.av-command-dialog .av-dialog-menu small{display:block;font:500 11px/1.45 system-ui,sans-serif;color:#b8c9da;margin-top:4px}
.av-command-dialog .av-settings-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;justify-content:space-between;padding:12px;margin-bottom:12px;background:#182c50;border:1px solid #b68b63;border-radius:12px}
.av-command-dialog .av-settings-row label{font-weight:700;color:#f2dfb8}
.av-command-dialog .av-settings-row select{max-width:230px;min-height:43px;padding:7px 12px;background:#172747;color:#fff1d2;border:1px solid #e5c080;border-radius:10px;font:inherit}
.av-command-dialog .av-dialog-submenu{margin:0 0 12px;padding:9px 12px;border:1px solid #b68b63;border-radius:10px;background:#1b2e52;color:#fae6bd;cursor:pointer;font:700 12px system-ui,sans-serif}
@container av3-stage (max-width:780px){
 body.av-ui-ready #battleStage.battle-command-v3 .battle-arena-scene{height:clamp(340px,58cqw,465px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants{inset:120px 8px 15px!important}
 body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant.ally .hero-sprite{width:clamp(125px,27cqw,200px)!important;height:clamp(180px,39cqw,280px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant.enemy-unit .monster-sprite{width:clamp(158px,31cqw,245px)!important;height:clamp(190px,38cqw,274px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz{padding:12px 14px 17px!important}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-caption{display:none!important}
 body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav{grid-template-columns:repeat(3,minmax(0,1fr));padding:11px 22px;gap:7px}
 body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button{min-height:45px;font-size:12px}
}
@container av3-stage (max-width:500px){
 body.av-ui-ready #battleStage.battle-command-v3 .battle-arena-scene{height:clamp(275px,76cqw,365px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-topline{left:5px;right:5px;top:6px;gap:5px;font-size:9px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-topline span{padding:5px 6px;max-width:49%}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-battle-hud{top:38px;left:6px;right:6px;gap:6px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit{width:48%;flex-basis:48%;padding:6px 7px;border-radius:8px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit.hd2d-hud-hero{gap:5px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hero-portrait{width:36px;height:36px;flex-basis:36px;border-radius:6px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit strong{font-size:12px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit small{font-size:8px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-track{height:6px;margin-top:5px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hud-unit>span,
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-hero-hud-details>span{font-size:9px}
 body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants{inset:105px 1px 13px!important}
 body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant.ally .hero-sprite{width:clamp(110px,34cqw,155px)!important;height:clamp(165px,50cqw,200px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant.enemy-unit .monster-sprite{width:clamp(127px,42cqw,186px)!important;height:clamp(166px,51cqw,214px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 .stage-combatants .combatant small{font-size:9px;padding:3px 9px}
 body.av-ui-ready #battleStage.battle-command-v3 .hd2d-versus{top:45%;font-size:25px}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz{padding:10px 9px 12px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:before{inset:5px 4px}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz:after{inset:8px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-heading{gap:8px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar{flex-wrap:nowrap;gap:4px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-tools{gap:4px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-stock{padding:7px;gap:3px;min-height:43px;font-size:10px}
 body.av-ui-ready #battleStage.battle-command-v3 #potionCount{font-size:10px}
 body.av-ui-ready #battleStage.battle-command-v3 #usePotion.battle-potion-use.choice{min-height:43px!important;min-width:0;padding:7px 8px!important;font-size:10px}
 body.av-ui-ready #battleStage.battle-command-v3 #soundToggle.sound-toggle,
 body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{
  min-width:0!important;min-height:43px!important;padding:7px 9px!important;font-size:11px;
 }
 body.av-ui-ready #battleStage.battle-command-v3 .battle-sound-slot{margin-left:auto}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels{gap:6px}
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-labels>.eyebrow{font-size:10px;padding:5px 8px;letter-spacing:.06em}
 body.av-ui-ready #battleStage.battle-command-v3 #battleStep{font-size:9px!important;padding:5px 7px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #battleQuiz .battleword{padding:7px 3px 5px!important;margin-bottom:8px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #pattern{font-size:clamp(16px,4.6cqw,19px)!important}
 body.av-ui-ready #battleStage.battle-command-v3 #wordHint{font-size:10px}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices{gap:7px}
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{min-height:52px;padding:9px 6px;font-size:clamp(12px,3.8cqw,15px)!important;border-radius:10px!important}
 body.av-ui-ready #battleStage.battle-command-v3 #avCommandNav{padding:9px 13px;gap:6px}
 body.av-ui-ready #battleStage.battle-command-v3 .av-nav-button{min-height:46px;gap:5px;padding:7px 3px;font-size:11px}
 body.av-ui-ready #battleStage.battle-command-v3 .av-nav-icon{font-size:17px}
}
@media(max-width:375px){
 body.av-ui-ready #battleStage.battle-command-v3 .battle-potion-stock{padding:6px 5px}
 body.av-ui-ready #battleStage.battle-command-v3 #usePotion.battle-potion-use.choice{padding:5px!important;font-size:9px}
 body.av-ui-ready #battleStage.battle-command-v3 #soundToggle.sound-toggle,
 body.av-ui-ready #battleStage.battle-command-v3 #avOpenMenu.av-utility-menu{padding:5px 7px!important;font-size:10px}
 .av-command-dialog .av-dialog-menu{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
 body.av-ui-ready #battleStage.battle-command-v3 #answerChoices .choice{transition:none}
}
@media(prefers-reduced-transparency:reduce){
 body.av-ui-ready #battleStage.battle-command-v3 .battle-quiz-toolbar button{background:#1e3053!important}
}
