/* Reference battle composition. All coordinates belong to one bounded stage. */
body.reference-ui.battle-toolbar-active{background:#030912!important;overflow:hidden!important}
body.reference-ui.battle-toolbar-active .arena-wallpaper,body.reference-ui.battle-toolbar-active .topbar,body.reference-ui.battle-toolbar-active .app>footer{display:none!important}
body.reference-ui.battle-toolbar-active .app{position:fixed!important;display:block!important;width:min(100vw,177.7778dvh)!important;height:min(100dvh,56.25vw)!important;max-width:none!important;min-height:0!important;padding:0!important;margin:0!important;left:50%;top:50%;transform:translate(-50%,-50%);overflow:visible!important}
body.reference-ui :is(#gameShell,#battle){position:relative!important;display:block!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;padding:0!important;overflow:visible!important;container-type:inline-size;--retro-font:ui-monospace,'Cascadia Mono','Courier New',monospace;--retro-cyan:#4edcff;--retro-gold:#ffdb68}
body.reference-ui :is(#gameShell,#battle)[hidden]{display:none!important}
body.reference-ui :is(#gameShell,#battle) .battle-card{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;border:0!important;background:#05101e url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/arenas/reference-court.png') center/cover no-repeat!important;overflow:hidden!important;isolation:isolate}
body.reference-ui :is(#gameShell,#battle) :is(.weather-stage,.arena){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;margin:0!important;border:0!important;background:transparent!important;overflow:hidden!important;flex:none!important}
body.reference-ui :is(#gameShell,#battle) .arena{z-index:1}
body.reference-ui :is(#gameShell,#battle) .weather-stage{z-index:1}
body.reference-ui :is(#gameShell,#battle) :is(.arena:before,.arena:after,.platform,.crowd,.moon,.field-glow){display:none!important}
body.reference-ui :is(#gameShell,#battle) :is(.sidebar,.feed-card){display:none!important}
body.reference-ui #gameShell .unit{max-width:none!important;max-height:none!important;z-index:3}
body.reference-ui #gameShell .unit img{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;image-rendering:pixelated;filter:drop-shadow(0 6px 2px #0008)}
body.reference-ui #gameShell .player-unit{left:6%!important;right:auto!important;top:auto!important;bottom:24%!important;width:40%!important;height:58%!important}
body.reference-ui #gameShell .enemy-unit{left:auto!important;right:9%!important;top:23%!important;bottom:auto!important;width:31%!important;height:35%!important}
body.reference-ui :is(#gameShell,#battle) :is(.enemy-huds,.ally-huds){position:absolute!important;display:grid!important;margin:0!important;padding:0!important;z-index:5;gap:.6cqw!important;background:none!important;border:0!important;pointer-events:none}
body.reference-ui #gameShell .enemy-huds{top:8%!important;right:2%!important;left:auto!important;bottom:auto!important;width:25%!important;height:14%!important}
body.reference-ui #gameShell .ally-huds{left:1.3%!important;right:auto!important;top:auto!important;bottom:10.4%!important;width:39%!important;height:23%!important}
body.reference-ui :is(#gameShell,#battle) .hud{position:relative!important;inset:auto!important;display:grid!important;width:100%!important;height:100%!important;min-height:0!important;max-width:none!important;margin:0!important;padding:.7cqw!important;gap:.25cqw .6cqw!important;border:2px solid var(--retro-cyan)!important;border-radius:0!important;background:linear-gradient(110deg,#031628f5,#010b15f5)!important;box-shadow:inset 0 0 0 3px #102b42,0 0 0 2px #020c16!important;clip-path:polygon(10px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px)!important;grid-template-columns:27% minmax(0,1fr)!important;grid-template-rows:1fr .8fr .8fr .9fr .7fr!important;font-family:var(--retro-font)!important;pointer-events:auto}
body.reference-ui :is(#gameShell,#battle) .hud .hud-mon-portrait{grid-column:1!important;grid-row:1/-1!important;width:100%!important;height:100%!important;min-height:0!important;border:2px solid #55d9fa!important;border-radius:0!important;box-shadow:inset 0 0 0 3px #051522!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-name-row{display:flex!important;grid-column:2!important;grid-row:1!important;min-width:0;align-items:center!important;gap:.4cqw!important;flex-wrap:nowrap!important;line-height:1.1!important}
body.reference-ui :is(#gameShell,#battle) .hud :is(.hud-name,.hud-name-row>b){font:700 clamp(11px,1.7cqw,28px)/1.05 var(--retro-font)!important;letter-spacing:.025em!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
body.reference-ui :is(#gameShell,#battle) .hud .lvl{font:700 clamp(10px,1.25cqw,22px)/1 var(--retro-font)!important;white-space:nowrap!important;margin-left:auto!important;color:#e6edff!important}
body.reference-ui :is(#gameShell,#battle) .hud :is(.hud-tamer,.scrolls){display:none!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-finishers{display:contents!important}
body.reference-ui :is(#gameShell,#battle) .hud .hp{grid-column:2!important;grid-row:2!important;position:relative!important;height:100%!important;min-height:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#04111e!important;overflow:visible!important;box-shadow:none!important;padding:0!important}
body.reference-ui :is(#gameShell,#battle) .hud :is(.hp-fill,.hp>i){position:absolute!important;left:15%!important;top:25%!important;height:52%!important;max-width:100%!important;scale:.57 1;transform-origin:left;min-width:0!important;border:1px solid #b4ffb0!important;border-radius:3px!important;background:linear-gradient(#56ff64,#00c841 65%,#008838)!important;box-shadow:none!important}
body.reference-ui :is(#gameShell,#battle) .hud .meter-copy{position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;font:700 clamp(10px,1.32cqw,23px)/1 var(--retro-font)!important;pointer-events:none}
body.reference-ui :is(#gameShell,#battle) .hud :is(.meter-name,.meter-copy b){font:inherit!important;color:var(--retro-gold)!important}
body.reference-ui :is(#gameShell,#battle) .hud :is(.meter-hp,.hp-numbers){font:inherit!important;color:white!important;position:static!important;white-space:nowrap!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter{grid-column:2!important;grid-row:3!important;position:relative!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#04111e!important;box-shadow:none!important;font:700 clamp(10px,1.1cqw,19px)/1.4 var(--retro-font)!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter>i{left:15%!important;top:25%!important;height:52%!important;max-width:100%!important;scale:.57 1;transform-origin:left;border:1px solid #69e9ff;border-radius:3px;background:linear-gradient(#02ccff,#0677eb)!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter>span{display:flex;align-items:center;justify-content:space-between;height:100%;font:inherit!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-types{display:flex!important;align-items:center;grid-column:2!important;grid-row:4!important;gap:.5cqw!important}
body.reference-ui :is(#gameShell,#battle) .hud .type-emblem{font:700 clamp(9px,1.1cqw,19px)/1 var(--retro-font)!important;padding:.2cqw .5cqw!important;border-radius:2px!important}
body.reference-ui :is(#gameShell,#battle) .hud .finisher-meter{display:none!important}
body.reference-ui :is(#gameShell,#battle) .hud .reference-ability{grid-column:2;grid-row:5;color:#ffdb68;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:700 clamp(9px,1.15cqw,19px)/1.2 var(--retro-font)}
body.reference-ui :is(#gameShell,#battle) .hud .hud-owner{position:absolute!important;left:.5cqw;bottom:100%;font:700 clamp(9px,1cqw,16px)/1.2 var(--retro-font)!important;margin:0!important;padding:0!important}
body.reference-ui #gameShell .enemy-hud{grid-template-columns:1fr!important;grid-template-rows:1fr 1fr .7fr!important}
body.reference-ui #gameShell .enemy-hud :is(.hud-mon-portrait,.hud-types,.stamina-meter){display:none!important}
body.reference-ui #gameShell .enemy-hud :is(.hud-name-row,.hp){grid-column:1!important}
body.reference-ui #gameShell .enemy-hud .hp-fill{max-width:100%!important;scale:.8 1}
body.reference-ui #gameShell .enemy-hud .meter-hp{align-self:end!important}
body.reference-ui #gameShell .enemy-hud .hp{grid-row:2/4!important}
/* Commands and move list share one footprint; menu changes cannot resize it. */
body.reference-ui #gameShell .controls{position:absolute!important;left:51.5%!important;right:1.3%!important;top:auto!important;bottom:10.4%!important;width:auto!important;height:27.5%!important;min-height:0!important;max-height:none!important;padding:0!important;border:0!important;background:none!important;display:grid!important;grid-template-columns:36% minmax(0,1fr)!important;grid-template-rows:1fr!important;gap:.8cqw!important;overflow:visible!important;z-index:8}
body.reference-ui #gameShell :is(#backBtn,#finishBtn,#mainActions small){display:none!important}
body.reference-ui #gameShell #mainActions{display:grid!important;grid-column:1!important;grid-row:1!important;grid-template-columns:1fr!important;grid-template-rows:repeat(4,minmax(0,1fr))!important;gap:0!important;padding:.5cqw!important;margin:0!important;min-height:0!important;height:100%!important;border:2px solid var(--retro-gold)!important;background:#021221f5!important;box-shadow:inset 0 0 0 3px #234153!important;clip-path:polygon(10px 0,100% 0,100% 100%,10px 100%,0 calc(100% - 10px),0 10px)}
body.reference-ui #gameShell #mainActions .action{width:100%!important;height:auto!important;min-height:0!important;padding:.3cqw .55cqw!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;border:1px solid #244257!important;background:transparent!important;box-shadow:none!important;text-align:left!important;border-radius:2px!important;color:#bbc8d5!important}
body.reference-ui #gameShell #mainActions .action b{font:700 clamp(12px,1.85cqw,31px)/1 var(--retro-font)!important;text-transform:none!important}
body.reference-ui #gameShell #fightBtn{order:0;border:2px solid var(--retro-gold)!important;color:#fff5da!important;background:linear-gradient(100deg,#5c411336,#000)!important;box-shadow:inset 0 0 12px #ffd44a40!important}
body.reference-ui #gameShell #partyBtn{order:1}body.reference-ui #gameShell #restBtn{order:2}body.reference-ui #gameShell #forfeitBtn{order:3}
body.reference-ui #gameShell #mainActions #finishBtn{display:none!important}
body.reference-ui #gameShell #moveGrid{display:grid!important;position:relative!important;grid-column:2!important;grid-row:1!important;grid-template-columns:1fr!important;grid-template-rows:repeat(4,minmax(0,1fr)) 1.35fr!important;gap:0!important;height:100%!important;min-height:0!important;width:100%!important;padding:1.5cqw .7cqw .5cqw!important;margin:0!important;border:2px solid var(--retro-cyan)!important;background:#021221f5!important;overflow:visible!important;box-shadow:inset 0 0 0 3px #173c51}
body.reference-ui #gameShell #moveGrid:before{content:'MOVES';position:absolute;top:.2cqw;left:1.2cqw;color:#40dfff;font:700 clamp(9px,1.15cqw,20px)/1 var(--retro-font);letter-spacing:.08em}
body.reference-ui #gameShell #moveGrid .move{position:relative!important;display:grid!important;grid-template-columns:2.1cqw minmax(0,1fr) auto!important;grid-template-rows:1fr!important;align-items:center!important;gap:.45cqw!important;width:100%!important;height:auto!important;min-height:0!important;padding:.1cqw .35cqw!important;margin:0!important;border:1px solid #1a3b51!important;border-radius:0!important;background:#031320!important;box-shadow:none!important;text-align:left!important;color:#f1f4ff!important;overflow:visible!important;opacity:1!important}
body.reference-ui #gameShell #moveGrid .move-label{min-width:0!important}
body.reference-ui #gameShell #moveGrid .move-label b{font:700 clamp(10px,1.35cqw,24px)/1.1 var(--retro-font)!important;letter-spacing:0!important;display:block!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
body.reference-ui #gameShell #moveGrid .move-cost{font:700 clamp(9px,1.05cqw,18px)/1 var(--retro-font)!important;color:#8fcede!important;white-space:nowrap}
body.reference-ui #gameShell #moveGrid .move-symbol{display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--move-color);font-size:1.7cqw}
body.reference-ui #gameShell #moveGrid .move-symbol .type-emblem{font-size:0!important;border:0!important;padding:0!important;background:color-mix(in srgb,var(--move-color) 22%,transparent)!important;border-radius:3px!important}
body.reference-ui #gameShell #moveGrid .move-symbol :is(svg,.type-icon){width:1.8cqw!important;height:1.8cqw!important;font-size:1.8cqw!important}
body.reference-ui #gameShell #moveGrid .move:disabled{color:#8895a4!important;background:#05111adf!important;cursor:not-allowed}
body.reference-ui #gameShell #moveGrid .move:disabled .move-label b{color:#8895a4!important}
body.reference-ui #gameShell #moveGrid .finisher-choice{margin-top:.35cqw!important;border:2px solid var(--retro-gold)!important;background:#130f10f5!important}
body.reference-ui #gameShell #moveGrid .move-label em{display:block;font:700 clamp(9px,.92cqw,16px)/1 var(--retro-font);font-style:normal;color:var(--retro-gold)}
body.reference-ui #gameShell #moveGrid .move-detail{display:none;position:absolute;bottom:calc(100% + 8px);left:0;right:0;padding:10px;background:#021221;border:1px solid #51dfff;box-shadow:0 4px 20px #000;z-index:30;color:#e8f1ff;font:13px/1.35 Arial,sans-serif;pointer-events:none}
@media(hover:hover){body.reference-ui #gameShell #moveGrid .move:is(:hover,:focus-visible) .move-detail{display:block}}
body.reference-ui :is(#gameShell,#battle) button:focus-visible{outline:2px solid #ffdb68!important;outline-offset:-4px!important}
body.reference-ui #gameShell #moveGrid .finish-ready{animation:reference-ready 1.5s infinite!important}
@keyframes reference-ready{0%,85%,100%{filter:drop-shadow(0 0 5px #ffd34a66);translate:0}88%,94%{translate:-1px 0}91%,97%{translate:1px 0}}
/* Stable bottom narration and a small, separate utility strip. */
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar{position:absolute!important;left:0!important;right:0!important;top:auto!important;bottom:0!important;width:100%!important;height:8.6%!important;min-height:0!important;max-height:none!important;display:block!important;padding:0!important;background:#02101df5!important;border:2px solid #b89656!important;box-shadow:inset 0 0 0 4px #122c3d!important;z-index:15!important;overflow:visible!important}
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar .toolbar-dialogue{position:absolute!important;inset:.3cqw 13% .3cqw 2%!important;display:flex!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important;overflow:hidden!important;align-items:center!important;gap:.6cqw!important}
body.reference-ui :is(#gameShell,#battle) .toolbar-dialogue :is(.tamer-mugshot,b){display:none!important}
body.reference-ui :is(#gameShell,#battle) .toolbar-dialogue p{font:500 clamp(11px,1.45cqw,25px)/1.2 var(--retro-font)!important;white-space:normal!important;margin:0!important;padding:0!important;max-height:100%;overflow:hidden!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar:after{content:'MOJUMON\a — ARENA —';white-space:pre;position:absolute;right:1.5%;top:20%;color:#b88a49;font:900 1.5cqw/.95 var(--retro-font);text-align:center}
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar>span{display:none!important}
body.reference-ui :is(#gameShell,#battle) .battle-toolbar-actions{position:absolute!important;left:1cqw!important;bottom:calc(100% + 49cqw)!important;right:auto!important;top:auto!important;display:flex!important;gap:4px!important;width:auto!important;margin:0!important;padding:0!important;opacity:.8}
body.reference-ui :is(#gameShell,#battle) .battle-toolbar-actions :is(button,.action){display:block!important;width:auto!important;min-width:0!important;min-height:24px!important;height:auto!important;margin:0!important;padding:4px 6px!important;font:700 clamp(9px,.7cqw,12px)/1 var(--retro-font)!important;background:#041424d9!important;border:1px solid #28506a!important;color:#b9d5e2!important;white-space:nowrap!important}
body.reference-ui :is(#gameShell,#battle) .battle-toolbar-actions :is(small,.command-icon){display:none!important}
body.reference-ui :is(#gameShell,#battle) .battle-toolbar-actions b{font:inherit!important}
body.reference-ui #gameShell #prompt{position:fixed!important;left:2%!important;bottom:9.2%!important;width:43%!important;height:auto!important;min-height:0!important;padding:0!important;margin:0!important;background:none!important;border:0!important;font:700 clamp(10px,.85cqw,15px)/1 var(--retro-font)!important;color:#c0e0ee!important;opacity:0;pointer-events:none}
body.reference-ui :is(#gameShell,#battle) .turn-banner{top:3%!important;left:48%!important;font-size:1cqw!important}
body.reference-ui :is(#gameShell,#battle) .result.show{position:fixed!important;inset:0!important;z-index:1000!important;display:grid!important;place-items:center!important;background:#020813db!important}
body.reference-ui :is(#gameShell,#battle) .result-box{max-width:80vw!important;max-height:90dvh!important;padding:3cqw!important;background:#031423!important;border:2px solid #ffdb68!important}
/* Team battles retain actor, target, objective and lock controls. */
body.reference-ui #battle .enemy-huds{top:8%!important;right:2%!important;width:44%!important;height:15%!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.reference-ui #battle .ally-huds{left:1%!important;bottom:11%!important;width:39%!important;height:27%!important;grid-template-columns:1fr!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
body.reference-ui #battle .hud{grid-template-columns:20% minmax(0,1fr)!important;grid-template-rows:1fr 1fr 1fr!important;padding:.5cqw!important}
body.reference-ui #battle .hud .hud-types{display:none!important}
body.reference-ui #battle .hud :is(.hud-name-row>b){font-size:1.2cqw!important}
body.reference-ui #battle .enemy-huds .hud{grid-template-columns:1fr!important}
body.reference-ui #battle .enemy-huds .hud .hud-mon-portrait{display:none!important}
body.reference-ui #battle .enemy-huds .hud :is(.hud-name-row,.hp,.stamina-meter){grid-column:1!important}
body.reference-ui #battle .field-unit{width:27%!important;height:38%!important;max-width:none!important;max-height:none!important}
body.reference-ui #battle :is(#unit-a0,#unit-a1){top:auto!important;bottom:27%!important;left:6%!important;right:auto!important}
body.reference-ui #battle #unit-a1{left:24%!important;bottom:34%!important;width:22%!important;height:32%!important}
body.reference-ui #battle :is(#unit-e0,#unit-e1){top:24%!important;right:8%!important;left:auto!important;bottom:auto!important;width:24%!important;height:32%!important}
body.reference-ui #battle #unit-e1{right:27%!important;top:28%!important;width:22%!important}
body.reference-ui #battle .field-unit img{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important}
body.reference-ui #battle .controls{position:absolute!important;left:43%!important;right:1%!important;bottom:10%!important;top:auto!important;height:31%!important;width:auto!important;min-height:0!important;max-height:none!important;padding:.5cqw!important;border:2px solid #4edcff!important;background:#031321f5!important;display:flex!important;flex-direction:column!important;gap:.3cqw!important;overflow:visible!important;z-index:8}
body.reference-ui #battle #controlStatus{font:500 clamp(9px,.85cqw,15px)/1.1 var(--retro-font)!important;min-height:0!important;margin:0!important;padding:0!important}
body.reference-ui #battle #actionPanel{flex:1!important;min-height:0!important;display:flex!important;flex-direction:column!important;gap:.2cqw!important;overflow:visible!important}
body.reference-ui #battle :is(.command-mon,.partner-active,.actor-chip){display:none!important}
body.reference-ui #battle .action-row{flex:1!important;min-height:0!important;height:auto!important;padding:0!important;margin:0!important;display:flex!important;flex-wrap:wrap!important;gap:.3cqw!important;border:0!important;background:none!important;overflow:visible!important}
body.reference-ui #battle .command-options{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:.3cqw!important;width:100%!important;height:100%!important;min-height:0!important}
body.reference-ui #battle :is(.command-action,.action-row>button){min-height:0!important;height:auto!important;padding:.3cqw .5cqw!important;gap:.4cqw!important;border:1px solid #32607c!important;background:#071b2c!important;box-shadow:none!important;color:#d4e4ef!important;font:700 clamp(10px,1.2cqw,21px)/1.05 var(--retro-font)!important}
body.reference-ui #battle .command-action b{font:inherit!important}
body.reference-ui #battle .command-action small{font:500 clamp(9px,.8cqw,14px)/1.1 var(--retro-font)!important}
body.reference-ui #battle .command-icon{width:2cqw!important;height:2cqw!important;font-size:1.4cqw!important;border:0!important;background:none!important;flex:none!important}
body.reference-ui #battle .fight-command{border-color:#ffdb68!important;color:#ffdb68!important}
body.reference-ui #battle :is(.actor-tabs,.control-footer){display:flex!important;gap:.4cqw!important;padding:0!important;margin:0!important;min-height:0!important;flex:0 0 auto!important}
body.reference-ui #battle :is(.actor-tabs,.control-footer)>button{padding:.3cqw .7cqw!important;height:auto!important;min-height:0!important;border:1px solid #3b667e!important;background:#071b2c!important;font:700 clamp(9px,.95cqw,17px)/1.1 var(--retro-font)!important}
body.reference-ui #battle .actor-tabs>button.selected,body.reference-ui #battle #lockTurn:not(:disabled){border-color:#ffdb68!important;color:#ffdb68!important}
body.reference-ui #battle .move-choices{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:.25cqw!important;flex:1!important;width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important}
body.reference-ui #battle .move-choice{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:.2cqw!important;height:auto!important;min-height:0!important;padding:.35cqw!important;background:#051727!important;border:1px solid #325e78!important;overflow:visible!important;font:500 clamp(9px,.9cqw,15px)/1.1 var(--retro-font)!important}
body.reference-ui #battle .move-choice b{font:700 clamp(10px,1.1cqw,19px)/1.1 var(--retro-font)!important}
body.reference-ui #battle .move-choice small{font:inherit!important}
body.reference-ui #battle .move-choice :is(.move-description,.move-facts){display:none!important}
body.reference-ui #battle .move-choice .type-emblem{font-size:.8cqw!important;padding:1px!important}
body.reference-ui #battle .control-footer{justify-content:space-between!important}
body.reference-ui #battle :is(.throne-tell,.graveyard-hud,.pearl-objective){font-size:clamp(10px,1cqw,17px)!important;padding:.3cqw!important;margin:0!important}
@media(prefers-reduced-motion:reduce){body.reference-ui #gameShell #moveGrid .finish-ready{animation:none!important}}
/* Portrait retains the art above the dock, with horizontal move swiping. */
@media(max-aspect-ratio:1/1){
 body.reference-ui.battle-toolbar-active .app{left:0;top:0;transform:none;width:100vw!important;height:100dvh!important}
 body.reference-ui :is(#gameShell,#battle) .battle-card{background-position:48% 30%!important}
 body.reference-ui #gameShell .enemy-huds{top:9%!important;right:3%!important;width:60%!important;height:10%!important}
 body.reference-ui #gameShell .player-unit{left:0!important;bottom:43%!important;width:72%!important;height:43%!important}
 body.reference-ui #gameShell .enemy-unit{right:0!important;top:24%!important;width:50%!important;height:23%!important}
 body.reference-ui #gameShell .ally-huds{left:3%!important;bottom:32%!important;width:94%!important;height:16%!important}
 body.reference-ui :is(#gameShell,#battle) .hud :is(.hud-name,.hud-name-row>b){font-size:4cqw!important}
 body.reference-ui :is(#gameShell,#battle) .hud :is(.lvl,.meter-copy){font-size:3.2cqw!important}
 body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter{font-size:3cqw!important}
 body.reference-ui :is(#gameShell,#battle) .hud :is(.reference-ability,.type-emblem){font-size:2.7cqw!important}
 body.reference-ui #gameShell .controls{left:3%!important;right:3%!important;bottom:10%!important;height:21%!important;grid-template-columns:1fr!important;grid-template-rows:38% minmax(0,1fr)!important;gap:1.5cqw!important}
 body.reference-ui #gameShell #mainActions{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:1fr!important;grid-row:1!important;padding:1cqw!important}
 body.reference-ui #gameShell #mainActions .action{justify-content:center!important}
 body.reference-ui #gameShell #mainActions .action b{font-size:3.1cqw!important}
 body.reference-ui #gameShell #moveGrid{grid-column:1!important;grid-row:2!important;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;gap:1.5cqw!important;padding:4cqw 1cqw 1cqw!important}
 body.reference-ui #gameShell #moveGrid:before{font-size:2.8cqw;top:.5cqw}
 body.reference-ui #gameShell #moveGrid .move{flex:0 0 78%!important;grid-template-columns:8cqw minmax(0,1fr) auto!important;scroll-snap-align:start;padding:1cqw!important}
 body.reference-ui #gameShell #moveGrid .move-label b{font-size:3.8cqw!important;white-space:normal!important}
 body.reference-ui #gameShell #moveGrid .move-cost{font-size:3cqw!important}
 body.reference-ui #gameShell #moveGrid .move-label em{font-size:2.8cqw}
 body.reference-ui #gameShell #moveGrid .move-symbol :is(svg,.type-icon){width:6cqw!important;height:6cqw!important;font-size:6cqw!important}
 body.reference-ui :is(#gameShell,#battle) .battle-toolbar-actions{position:fixed!important;left:2cqw!important;top:1cqw!important;bottom:auto!important;max-width:96cqw;flex-wrap:wrap!important}
 body.reference-ui :is(#gameShell,#battle) .toolbar-dialogue p{font-size:3.6cqw!important}
 body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar:after{font-size:2.4cqw;top:35%}
 body.reference-ui #battle .enemy-huds{top:9%!important;width:94%!important;height:13%!important}
 body.reference-ui #battle .ally-huds{left:3%!important;bottom:37%!important;width:94%!important;height:19%!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:1fr!important}
 body.reference-ui #battle .hud{grid-template-columns:1fr!important}
 body.reference-ui #battle .hud .hud-mon-portrait{display:none!important}
 body.reference-ui #battle .hud :is(.hud-name-row,.hp,.stamina-meter){grid-column:1!important}
 body.reference-ui #battle .hud .hud-name-row>b{font-size:2.8cqw!important}
 body.reference-ui #battle .controls{left:3%!important;right:3%!important;bottom:10%!important;height:26%!important;padding:1cqw!important;gap:1cqw!important}
 body.reference-ui #battle :is(#controlStatus,.command-action small){font-size:2.5cqw!important}
 body.reference-ui #battle :is(.command-action,.action-row>button,.actor-tabs>button,.control-footer>button){font-size:2.8cqw!important;padding:1cqw!important}
 body.reference-ui #battle .move-choices{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory}
 body.reference-ui #battle .move-choice{flex:0 0 85%!important;scroll-snap-align:start}
 body.reference-ui #battle .move-choice b{font-size:3.4cqw!important}
 body.reference-ui #battle .move-choice small{font-size:2.8cqw!important}
 body.reference-ui #battle :is(#unit-a0,#unit-a1){bottom:50%!important;width:43%!important;height:25%!important}
 body.reference-ui #battle #unit-a1{left:26%!important}
 body.reference-ui #battle :is(#unit-e0,#unit-e1){top:25%!important;width:35%!important;height:20%!important}
}

body.reference-ui #gameShell #moveGrid .move-symbol .type-emblem>span{display:none!important}
body.reference-ui #battle .action-row.command-menu{display:grid!important;grid-template-columns:32% minmax(0,1fr)!important;grid-template-rows:1fr!important;gap:.6cqw!important}
body.reference-ui #battle .command-menu .command-options{grid-template-columns:1fr!important;grid-template-rows:repeat(4,minmax(0,1fr))!important;border:1px solid #ffdb68;padding:.2cqw!important}
body.reference-ui #battle .command-menu .command-options .finish-command{display:none!important}
body.reference-ui #battle .command-menu .command-action small{display:none!important}
body.reference-ui #battle .reference-team-moves{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,minmax(0,1fr)) 1.3fr;min-height:0;gap:1px}
body.reference-ui #battle .reference-team-move{display:grid!important;grid-template-columns:1.8cqw minmax(0,1fr) auto!important;align-items:center;gap:.4cqw!important;min-height:0!important;height:auto!important;padding:.15cqw .3cqw!important;border:1px solid #275068!important;background:#031322!important;text-align:left!important;color:#edf5ff;font:700 clamp(10px,1.2cqw,20px)/1.05 var(--retro-font)!important}
body.reference-ui #battle .reference-team-move b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:inherit!important}
body.reference-ui #battle .reference-team-move>span{min-width:0}
body.reference-ui #battle .reference-team-move small{white-space:nowrap;color:#8fcce3;font:700 clamp(9px,.9cqw,16px)/1 var(--retro-font)!important}
body.reference-ui #battle .reference-team-move em{display:block;color:#ffdb68;font:700 .8cqw/1 var(--retro-font);font-style:normal}
body.reference-ui #battle .reference-team-type .type-emblem{border:0;padding:0;background:none;font-size:0}
body.reference-ui #battle .reference-team-type .type-emblem>span{display:none}
body.reference-ui #battle .reference-team-type svg{width:1.6cqw;height:1.6cqw}
body.reference-ui #battle .reference-team-move.finisher-choice{border-color:#ffdb68!important;background:#211a0c!important}
body.reference-ui #battle .reference-team-move.finish-ready{animation:reference-ready 1.5s infinite}
body.reference-ui #battle :is(#throneObjective,#graveyardHud,#battleObjective){position:absolute!important;left:0;right:0;bottom:calc(100% + .7cqw);font:700 clamp(10px,1cqw,17px)/1.25 var(--retro-font)!important;padding:.5cqw!important;border:1px solid #e6c66b;background:#081625ed;max-height:5cqw;overflow:auto}
body.reference-ui :is(#gameShell,#battle) .battle-card{background-image:var(--reference-scenery,url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/arenas/reference-court.png'))!important}
body.reference-ui>#result.show{position:fixed!important;inset:0!important;z-index:1000!important;display:grid!important;place-items:center!important;background:#020813db!important}
body.reference-ui>#result .result-box{max-width:92vw!important;max-height:90dvh!important;padding:20px!important;background:#031423!important;border:2px solid #ffdb68!important}
@media(max-aspect-ratio:1/1){
 body.reference-ui #battle .action-row.command-menu{grid-template-columns:1fr!important;grid-template-rows:32% minmax(0,1fr)!important}
 body.reference-ui #battle .command-menu .command-options{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:1fr!important}
 body.reference-ui #battle .reference-team-moves{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;gap:2cqw}
 body.reference-ui #battle .reference-team-move{flex:0 0 85%;scroll-snap-align:start;grid-template-columns:6cqw minmax(0,1fr) auto!important;font-size:3.2cqw!important;padding:1cqw!important}
 body.reference-ui #battle .reference-team-move small{font-size:2.5cqw!important}
 body.reference-ui #battle .reference-team-move em{font-size:2.2cqw}
 body.reference-ui #battle .reference-team-type svg{width:5cqw;height:5cqw}
 body.reference-ui #battle :is(#throneObjective,#graveyardHud,#battleObjective){font-size:2.5cqw!important;max-height:14cqw;padding:1.5cqw!important}
}
@media(prefers-reduced-motion:reduce){body.reference-ui #battle .reference-team-move.finish-ready{animation:none!important}}

body.reference-ui #gameShell .reference-role{margin-left:auto;color:#ff7354;font:700 clamp(9px,1.05cqw,18px)/1 var(--retro-font);text-transform:uppercase}
body.reference-ui .reference-log :is(.log,.feed){max-height:60dvh;overflow:auto}
/* Pixel reference finish: bundled type, filled emblems and stepped frame edges. */
@font-face{font-family:'Moju Pixel';src:url('fonts/PixelifySans.ttf') format('truetype');font-style:normal;font-weight:400 700;font-display:swap}
body.reference-ui{--retro-font:'Moju Pixel',monospace}
body.reference-ui :is(#gameShell,#battle){--retro-font:'Moju Pixel',monospace}
body.reference-ui :is(#gameShell,#battle) :is(.hud,.hud *,.controls,.controls *,.compact-battle-toolbar,.compact-battle-toolbar *){font-family:'Moju Pixel',monospace!important;font-synthesis:none;letter-spacing:.025em;text-shadow:none!important}
body.reference-ui :is(#gameShell,#battle) .hud{border:12px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-cyan.svg') 14 / 12px / 0 stretch!important;clip-path:none!important;box-shadow:none!important;background:linear-gradient(110deg,#031628fa,#010b15fa)!important;background-clip:padding-box!important;padding:.25cqw!important;align-items:stretch!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-name-row{flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;align-self:stretch!important;flex-wrap:nowrap!important;text-align:left!important;width:100%!important;margin:0!important;padding:0!important;gap:.5cqw!important;border-bottom:1px solid #244b68}
body.reference-ui :is(#gameShell,#battle) .hud :is(.hud-name,.hud-name-row>b){font-size:clamp(14px,1.8cqw,36px)!important;font-weight:500!important;line-height:1!important;display:block!important;flex:1 1 auto!important;min-width:0!important;text-align:left!important;margin:0!important;padding:0!important;letter-spacing:.04em!important}
body.reference-ui :is(#gameShell,#battle) .hud .lvl{flex:0 0 auto!important;font-size:clamp(12px,1.32cqw,27px)!important;font-weight:400!important;align-self:center!important;margin-left:auto!important;padding:0!important}
body.reference-ui #gameShell :is(#playerBoost,#enemyBoost):not(:empty){position:absolute;bottom:calc(100% + 8px);right:0}
body.reference-ui :is(#gameShell,#battle) .hud .hud-mon-portrait{border:7px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-cyan.svg') 14 / 7px / 0 stretch!important;background-color:#061724!important;border-radius:0!important;box-shadow:none!important;clip-path:polygon(7px 0,calc(100% - 7px) 0,100% 7px,100% calc(100% - 7px),calc(100% - 7px) 100%,7px 100%,0 calc(100% - 7px),0 7px)!important}
body.reference-ui :is(#gameShell,#battle) .hud .hp{min-height:0!important;background:none!important}
body.reference-ui :is(#gameShell,#battle) .hud .hp:before{content:'';position:absolute;left:13%;top:26%;width:57%;height:48%;border:1px solid #507373;background:#071c26;border-radius:3px;box-sizing:border-box}
body.reference-ui :is(#gameShell,#battle) .hud .hp:after{display:none!important}
body.reference-ui :is(#gameShell,#battle) .hud :is(.hp-fill,.hp>i){left:13%!important;top:26%!important;height:48%!important;max-width:100%!important;border:1px solid #aaffae!important;scale:.57 1!important;background:linear-gradient(#6dff77 0 12%,#00e346 14% 70%,#029938 72%)!important}
body.reference-ui :is(#gameShell,#battle) .hud .meter-copy{padding:0!important;gap:0!important;font-size:clamp(12px,1.35cqw,28px)!important;font-weight:500!important;line-height:1!important;align-items:center!important;flex-wrap:nowrap!important}
body.reference-ui :is(#gameShell,#battle) .hud .meter-copy .meter-name{flex:0 0 13%!important;font-size:inherit!important;font-weight:400!important}
body.reference-ui :is(#gameShell,#battle) .hud .meter-hp{flex:0 0 28%!important;text-align:right!important;font-weight:500!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter{overflow:visible!important;font-size:clamp(12px,1.35cqw,28px)!important;line-height:1!important;background:none!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter:before{content:'';position:absolute;left:13%;top:26%;width:57%;height:48%;border:1px solid #365377;background:#061828;border-radius:3px;box-sizing:border-box}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter>i{left:13%!important;top:26%!important;height:48%!important;background:linear-gradient(#47e9ff 0 12%,#029eff 14% 70%,#035bac 72%)!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter>span{font:inherit!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter>span>b{font-size:inherit!important;font-weight:400!important;color:#87e7ff!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-types{flex-wrap:nowrap!important;gap:.5cqw!important;min-width:0!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-types>.type-emblem{font-size:clamp(11px,1.2cqw,24px)!important;font-weight:400!important;text-transform:uppercase!important;letter-spacing:.04em!important;min-width:5.3cqw;text-align:center;justify-content:center;padding:.17cqw .6cqw!important;border:2px solid var(--type-color)!important;clip-path:polygon(4px 0,calc(100% - 4px) 0,100% 4px,100% calc(100% - 4px),calc(100% - 4px) 100%,4px 100%,0 calc(100% - 4px),0 4px);background:color-mix(in srgb,var(--type-color) 14%,#041322)!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-types>.type-emblem svg{display:none!important}
body.reference-ui #gameShell .reference-role{display:flex;align-items:center;gap:.45cqw;font-size:clamp(11px,1.25cqw,26px)!important;font-weight:400!important}
body.reference-ui .retro-emblem{display:block;width:1.85cqw;height:1.85cqw;object-fit:contain;image-rendering:pixelated;flex:none;filter:none!important}
body.reference-ui #gameShell .reference-role .retro-emblem{width:1.8cqw;height:1.8cqw}
body.reference-ui #gameShell .reference-ability{font-size:clamp(11px,1.25cqw,26px)!important;font-weight:400!important;letter-spacing:.045em!important;align-self:center}
body.reference-ui #gameShell .enemy-huds{height:12%!important}
body.reference-ui #gameShell .enemy-hud{grid-template-rows:1fr 1.2fr!important}
body.reference-ui #gameShell .enemy-hud .hp{grid-row:2!important}
body.reference-ui #gameShell .enemy-hud .hp:before{width:83%;left:13%;top:4%;height:40%}
body.reference-ui #gameShell .enemy-hud .hp-fill{scale:.83 1!important;top:4%!important;height:40%!important}
body.reference-ui #gameShell .enemy-hud .meter-hp{align-self:flex-end!important}
body.reference-ui #gameShell .enemy-hud .meter-name{align-self:flex-start!important}
body.reference-ui #gameShell #mainActions{border:10px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-gold.svg') 14 / 10px / 0 stretch!important;clip-path:none!important;box-shadow:none!important;background-clip:padding-box!important;padding:.2cqw!important}
body.reference-ui #gameShell #mainActions .action b{display:flex!important;align-items:center!important;gap:.9cqw!important;font-size:clamp(14px,1.95cqw,39px)!important;font-weight:400!important;letter-spacing:.025em!important;width:100%}
body.reference-ui #gameShell #mainActions .action .retro-emblem{width:2.1cqw;height:2.1cqw}
body.reference-ui #gameShell #mainActions #fightBtn{border:6px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-gold.svg') 14 / 6px / 0 stretch!important;background:linear-gradient(105deg,#41320e80,#01090e)!important;color:#fff2cc!important;box-shadow:inset 0 0 14px #ffcf4420!important}
body.reference-ui #gameShell #mainActions #fightBtn .retro-emblem{filter:drop-shadow(0 0 4px #e5b44350)!important}
body.reference-ui #gameShell #moveGrid{border:9px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-cyan.svg') 14 / 9px / 0 stretch!important;box-shadow:none!important;padding:1.4cqw .3cqw .2cqw!important;background-clip:padding-box!important}
body.reference-ui #gameShell #moveGrid:before{font:400 clamp(12px,1.15cqw,23px)/1 'Moju Pixel'!important;left:1cqw;top:0;letter-spacing:.075em}
body.reference-ui #gameShell #moveGrid .move{grid-template-columns:2.25cqw minmax(0,1fr) auto!important;padding:0 .35cqw!important;gap:.65cqw!important;border-color:#16374b!important;align-items:center!important}
body.reference-ui #gameShell #moveGrid .move-label b{font-size:clamp(12px,1.4cqw,28px)!important;font-weight:400!important;line-height:1.05!important;letter-spacing:.025em!important}
body.reference-ui #gameShell #moveGrid .move-cost{font-size:clamp(11px,1.2cqw,24px)!important;font-weight:400!important}
body.reference-ui #gameShell #moveGrid .move-symbol{background:#401922;border-radius:0!important;align-self:stretch;margin:1px 0;padding:1px}
body.reference-ui #gameShell #moveGrid .move-symbol .retro-emblem{width:2cqw!important;height:2cqw!important;max-height:100%}
body.reference-ui #gameShell #moveGrid .finisher-choice{border:6px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-gold.svg') 14 / 6px / 0 stretch!important;background:#03111e!important;grid-template-columns:3.3cqw minmax(0,1fr) auto!important;margin-top:.45cqw!important;padding:0 .25cqw!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .move-symbol{background:none!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .retro-emblem{width:3cqw!important;height:2.8cqw!important}
body.reference-ui #gameShell #moveGrid .move-label em{font-size:clamp(10px,1.05cqw,21px)!important;font-weight:400!important;line-height:1.1!important;letter-spacing:.07em}
body.reference-ui #gameShell #moveGrid .move:disabled .move-label b{color:#a7b3bf!important}
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar{border:2px solid #b89656!important;box-shadow:inset 0 0 0 4px #071b2b!important;background:repeating-linear-gradient(0deg,#03101e 0 3px,#041220 3px 6px)!important}
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar:before{content:'';position:absolute;left:0;top:0;bottom:0;width:3.6cqw;background:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/dialogue-edge.svg') left center/100% 100% no-repeat;pointer-events:none}
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar .toolbar-dialogue{left:5.4%!important;right:15%!important}
body.reference-ui :is(#gameShell,#battle) .toolbar-dialogue p{font-size:clamp(14px,1.6cqw,32px)!important;font-weight:400!important;letter-spacing:.055em!important}
body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar:after{font-family:'Moju Pixel'!important;font-weight:500!important;font-size:1.7cqw!important;letter-spacing:.06em;right:0;top:0;bottom:0;width:13%;padding:1cqw .25cqw 0 1.2cqw;border-left:2px solid #b89656;background:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/dialogue-edge.svg') left center/1.2cqw 100% no-repeat;box-sizing:border-box}
body.reference-ui #battle :is(.reference-team-move,.reference-team-move small,.reference-team-move b,.command-action,.command-action b){font-family:'Moju Pixel'!important;font-weight:400!important}
body.reference-ui #battle .reference-team-move .retro-emblem{width:1.8cqw;height:1.8cqw}
body.reference-ui #battle .command-icon .retro-emblem{width:2cqw;height:2cqw}
body.reference-ui #battle .hud .hud-name-row>b{font-size:1.35cqw!important}
@media(max-aspect-ratio:1/1){
 body.reference-ui :is(#gameShell,#battle) .hud{border-width:7px!important;border-image-width:7px!important;padding:1cqw!important}
 body.reference-ui #gameShell .enemy-huds{height:10%!important}
 body.reference-ui :is(#gameShell,#battle) .hud :is(.hud-name,.hud-name-row>b){font-size:4.3cqw!important}
 body.reference-ui :is(#gameShell,#battle) .hud :is(.lvl,.meter-copy,.stamina-meter){font-size:3.6cqw!important}
 body.reference-ui :is(#gameShell,#battle) .hud .hud-types>.type-emblem{font-size:3cqw!important;min-width:14cqw}
 body.reference-ui #gameShell :is(.reference-role,.reference-ability){font-size:3cqw!important}
 body.reference-ui #gameShell .reference-role .retro-emblem{width:4cqw;height:4cqw}
 body.reference-ui #gameShell #mainActions .action b{font-size:3.5cqw!important;gap:1cqw!important}
 body.reference-ui #gameShell #mainActions .action .retro-emblem{width:4cqw;height:4cqw}
 body.reference-ui #gameShell #moveGrid{padding:4cqw 1cqw 1cqw!important}
 body.reference-ui #gameShell #moveGrid:before{font-size:3cqw!important}
 body.reference-ui #gameShell #moveGrid .move{grid-template-columns:8cqw minmax(0,1fr) auto!important;padding:1cqw!important}
 body.reference-ui #gameShell #moveGrid .move-symbol .retro-emblem{width:7cqw!important;height:7cqw!important}
 body.reference-ui #gameShell #moveGrid .move-label b{font-size:4cqw!important}
 body.reference-ui #gameShell #moveGrid .move-cost,body.reference-ui #gameShell #moveGrid .move-label em{font-size:3cqw!important}
 body.reference-ui :is(#gameShell,#battle) .toolbar-dialogue p{font-size:3.8cqw!important}
 body.reference-ui :is(#gameShell,#battle) .compact-battle-toolbar:after{font-size:2.5cqw!important;padding-top:5cqw}
 body.reference-ui #battle .hud .hud-name-row>b{font-size:3cqw!important}
 body.reference-ui #battle :is(.reference-team-move,.command-icon) .retro-emblem{width:5cqw;height:5cqw}
}

/* Compact HUDs: the fill is a child of its clipped track, never a scaled sibling. */
body.reference-ui :is(#gameShell,#battle) .hud :is(.hp,.stamina-meter):before{display:none!important}
body.reference-ui :is(#gameShell,#battle) .hud .retro-meter-track{position:absolute!important;display:block!important;left:13%!important;right:auto!important;top:24%!important;bottom:auto!important;width:56%!important;height:52%!important;overflow:hidden!important;border:1px solid #609aa3!important;border-radius:3px!important;background:#071c26!important;box-sizing:border-box!important;pointer-events:none}
body.reference-ui :is(#gameShell,#battle) .hud .retro-meter-track>:is(i,.hp-fill){position:absolute!important;display:block!important;left:0!important;top:0!important;bottom:0!important;right:auto!important;height:100%!important;min-height:0!important;max-width:100%!important;min-width:0!important;scale:1!important;transform:none!important;border:0!important;border-radius:0!important;margin:0!important;box-sizing:border-box!important;background:linear-gradient(#6dff77 0 12%,#00e346 14% 70%,#029938 72%)!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter .retro-meter-track>i{background:linear-gradient(#47e9ff 0 12%,#029eff 14% 70%,#035bac 72%)!important}
body.reference-ui :is(#gameShell,#battle) .hud .stamina-meter>span:not(.retro-meter-track){position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:space-between!important;z-index:1;white-space:nowrap}
body.reference-ui :is(#gameShell,#battle) .hud .meter-copy :is(.meter-hp,.meter-name){align-self:center!important}
body.reference-ui :is(#gameShell,#battle) .reference-ability{cursor:help!important;pointer-events:auto!important}
body.reference-ui :is(#gameShell,#battle) .reference-ability:focus-visible{outline:1px solid #ffdb68;outline-offset:1px}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .hud{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:1.15fr 1fr 1fr .8fr!important;gap:.15cqw!important}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .hud :is(.hp,.stamina-meter,.finisher-meter){grid-column:1!important}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .hud .hp{grid-row:2!important}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .hud .stamina-meter{display:block!important;grid-row:3!important}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .hud .finisher-meter{display:block!important;grid-row:4!important;position:relative!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:1px solid #665992!important;background:#101229!important;overflow:hidden!important;font-size:clamp(9px,.9cqw,18px)!important;line-height:1!important}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .finisher-meter>span{position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;z-index:1!important;white-space:nowrap!important;font:inherit!important}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .finisher-meter>i{position:absolute!important;left:0!important;top:0!important;height:100%!important;background:#6350a1!important}
body.reference-ui :is(#gameShell,#battle) .enemy-huds .reference-ability{display:none!important}
body.reference-ui #battle .ally-huds .hud{grid-template-rows:1fr 1fr 1fr .8fr!important}
body.reference-ui #battle .ally-huds .reference-ability{grid-row:4!important;font-size:clamp(9px,.9cqw,17px)!important}
@media(min-aspect-ratio:1/1){
 body.reference-ui #gameShell .ally-huds{width:36%!important;height:20%!important}
 body.reference-ui #gameShell #controls{height:24%!important}
 body.reference-ui #gameShell .enemy-huds{width:27%!important;height:15%!important}
 body.reference-ui #battle .enemy-huds{height:17%!important}
 body.reference-ui #gameShell .hud :is(.hud-name,.hud-name-row>b){font-size:1.55cqw!important}
 body.reference-ui :is(#gameShell,#battle) .enemy-huds .hud :is(.meter-copy,.stamina-meter){font-size:1.15cqw!important}
 body.reference-ui #battle .hud .lvl{font-size:1cqw!important}
}
@media(max-aspect-ratio:1/1){
 body.reference-ui #gameShell .enemy-huds{height:14%!important}
 body.reference-ui #battle .enemy-huds{height:16%!important}
 body.reference-ui :is(#gameShell,#battle) .enemy-huds .hud .finisher-meter{font-size:2.3cqw!important}
 body.reference-ui #battle .hud .lvl{font-size:2.4cqw!important}
 body.reference-ui #battle .ally-huds .reference-ability{font-size:2.2cqw!important}
}
/* Accents share the panel's painted edge instead of floating over the arena. */
body.reference-ui #gameShell #mainActions{padding:0!important;border-width:5px!important;border-image-width:5px!important;background:#021221!important;background-clip:border-box!important;box-sizing:border-box!important}
body.reference-ui #gameShell #mainActions .action{margin:0!important;border-radius:0!important;box-sizing:border-box!important}
body.reference-ui #gameShell #mainActions #fightBtn{border-width:3px!important;border-image-width:3px!important;background-clip:border-box!important}
body.reference-ui :is(#gameShell,#battle) .hud,body.reference-ui #gameShell #moveGrid{background-clip:border-box!important}
/* One optional detail panel; the command menu stays in place. */
body.reference-ui #gameShell #moveGrid[hidden]{display:none!important}
body.reference-ui #gameShell #moveGrid:not([hidden]),body.reference-ui #gameShell #partyModal[open],body.reference-ui #battle :is(.reference-team-moves,.reference-choice-dock){animation:reference-panel-open .18s ease-out;transform-origin:left center}
@keyframes reference-panel-open{from{opacity:0;transform:translateX(-8px) scaleX(.94)}to{opacity:1;transform:none}}
body.reference-ui #gameShell #partyModal{position:relative!important;inset:auto!important;grid-column:2!important;grid-row:1!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;max-width:none!important;margin:0!important;padding:.3cqw!important;box-sizing:border-box!important;border:7px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-cyan.svg') 14 / 7px / 0 stretch!important;background:#021221!important;color:#edf5ff!important;overflow:hidden!important}
body.reference-ui #gameShell #partyModal:not([open]){display:none!important}
body.reference-ui #gameShell #partyModal[open]{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:.25cqw!important}
body.reference-ui #gameShell #partyModal .modal-head{padding:0!important;min-height:0!important;display:flex;justify-content:space-between;align-items:center}
body.reference-ui #gameShell #partyModal h2{font:400 1.2cqw 'Moju Pixel'!important;margin:0!important;color:#40dfff}
body.reference-ui #gameShell #partyModal .close{position:static!important;font:400 1.4cqw 'Moju Pixel'!important;padding:0 .4cqw!important;min-height:0!important}
body.reference-ui #gameShell #partyList{display:grid!important;grid-template-columns:1fr!important;grid-auto-rows:minmax(0,1fr)!important;gap:.2cqw!important;padding:0!important;overflow:hidden!important}
body.reference-ui #gameShell #partyList .party-slot{display:grid!important;grid-template-columns:2.5cqw minmax(0,1fr) auto!important;gap:.4cqw!important;padding:.15cqw!important;min-height:0!important;background:#041726!important;border:1px solid #24485f!important;align-items:center!important}
body.reference-ui #gameShell #partyList img{width:2.5cqw!important;height:2.5cqw!important;object-fit:contain}
body.reference-ui #gameShell #partyList h3{font:400 1.05cqw 'Moju Pixel'!important;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.reference-ui #gameShell #partyList p,body.reference-ui #gameShell #partyModal .modal-foot{font:400 .85cqw 'Moju Pixel'!important;margin:0!important;padding:0!important}
body.reference-ui #gameShell #partyList button{font:400 .9cqw 'Moju Pixel'!important;padding:.3cqw!important;min-height:0!important}
body.reference-ui #gameShell #partyList .switch-matchup{display:none!important}
body.reference-ui #battle .reference-choice-dock{display:flex;flex-direction:column;min-height:0;overflow:auto;border:2px solid #51dfff;background:#021221;padding:.4cqw;gap:.3cqw}
body.reference-ui #battle .reference-choice-dock button{font:400 1.1cqw 'Moju Pixel';min-height:0;padding:.25cqw;color:#edf5ff;background:#051727;border:1px solid #32607c}
body.reference-ui #battle .reference-choice-dock .switch-reserve{flex:1;display:flex;align-items:center;gap:.5cqw}
body.reference-ui #battle .reference-choice-dock img{width:3cqw;height:3cqw;object-fit:contain}
@media(max-aspect-ratio:1/1){
 body.reference-ui #gameShell #partyModal{grid-column:1!important;grid-row:2!important}
 body.reference-ui #gameShell #partyModal h2,body.reference-ui #gameShell #partyModal .close{font-size:3cqw!important}
 body.reference-ui #gameShell #partyList .party-slot{grid-template-columns:8cqw minmax(0,1fr) auto!important}
 body.reference-ui #gameShell #partyList img{width:8cqw!important;height:8cqw!important}
 body.reference-ui #gameShell #partyList h3{font-size:2.8cqw!important}
 body.reference-ui #gameShell #partyList :is(p,button),body.reference-ui #gameShell #partyModal .modal-foot{font-size:2.4cqw!important}
 body.reference-ui #battle .reference-choice-dock button{font-size:3cqw}
}
@media(prefers-reduced-motion:reduce){body.reference-ui #gameShell #moveGrid,body.reference-ui #gameShell #partyModal,body.reference-ui #battle :is(.reference-team-moves,.reference-choice-dock){animation:none!important}}
/* Doubles shares the singles camera and sprite scale, with staggered partners. */
@media(min-aspect-ratio:1/1){
 body.reference-ui #battle :is(#unit-a0,#unit-a1){top:auto!important;right:auto!important;width:40%!important;height:58%!important;bottom:24%!important;left:10%!important}
 body.reference-ui #battle #unit-a1{left:0%!important;bottom:36%!important;z-index:2!important}
 body.reference-ui #battle #unit-a0{z-index:3!important}
 body.reference-ui #battle :is(#unit-e0,#unit-e1){left:auto!important;bottom:auto!important;top:23%!important;right:3%!important;width:31%!important;height:35%!important}
 body.reference-ui #battle #unit-e1{right:22%!important;top:20%!important;z-index:2!important}
 body.reference-ui #battle #unit-e0{z-index:3!important}
 body.reference-ui #battle .controls{left:47%!important;right:1.3%!important;bottom:10.4%!important;height:27%!important;padding:.25cqw!important;background:transparent!important;border:0!important}
 body.reference-ui #battle .action-row.command-menu{grid-template-columns:32% minmax(0,1fr)!important}
 body.reference-ui #battle .reference-team-moves{border:5px solid transparent;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-cyan.svg') 14 / 5px / 0 stretch;background:#021221}
 body.reference-ui #battle .command-menu .command-options{border:5px solid transparent!important;border-image:url('https://mojumon-artwork.senseicjdojo.workers.dev/assets/ui/frame-gold.svg') 14 / 5px / 0 stretch!important;padding:0!important;background:#021221}
}
@media(max-aspect-ratio:1/1){
 body.reference-ui #battle :is(#unit-a0,#unit-a1){width:72%!important;height:43%!important;top:auto!important;bottom:43%!important;left:4%!important;right:auto!important}
 body.reference-ui #battle #unit-a1{left:-10%!important;bottom:52%!important;z-index:2!important}
 body.reference-ui #battle #unit-a0{z-index:3!important}
 body.reference-ui #battle :is(#unit-e0,#unit-e1){width:50%!important;height:23%!important;top:24%!important;right:-2%!important;left:auto!important;bottom:auto!important}
 body.reference-ui #battle #unit-e1{right:26%!important;top:22%!important;z-index:2!important}
 body.reference-ui #battle #unit-e0{z-index:3!important}
}
/* Reserve a bounded action area above the footer; contents cannot size its rows. */
body.reference-ui #battle #actionPanel{flex:1 1 0!important;height:0!important;min-height:0!important;min-width:0!important}
body.reference-ui #battle #actionPanel>.action-row{flex:1 1 0!important;height:0!important;min-height:0!important;min-width:0!important}
body.reference-ui #battle .action-row.command-menu{grid-template-rows:minmax(0,1fr)!important;align-items:stretch!important}
body.reference-ui #battle .command-menu>:is(.command-options,.reference-team-moves,.reference-choice-dock){height:100%!important;min-height:0!important;max-height:100%!important;min-width:0!important;box-sizing:border-box!important}
body.reference-ui #battle .reference-team-moves{grid-template-rows:repeat(4,minmax(0,1fr)) minmax(0,1.35fr)!important}
body.reference-ui #battle .reference-team-move{min-width:0!important;box-sizing:border-box!important;line-height:1!important}
body.reference-ui #battle .reference-choice-dock{overflow:hidden!important;display:flex!important;flex-direction:column!important}
body.reference-ui #battle .reference-choice-dock>button{flex:0 0 auto!important;margin:0!important;line-height:1.05!important;padding:.25cqw!important}
body.reference-ui #battle .reference-choice-dock>.switch-reserve{flex:1 1 0!important;min-height:0!important;display:grid!important;grid-template-columns:3cqw minmax(0,1fr)!important;align-items:center!important;text-align:left!important;gap:.5cqw!important}
body.reference-ui #battle .reference-choice-dock .switch-details{display:flex!important;flex-direction:column!important;min-width:0!important;gap:.15cqw!important;font-size:1.05cqw!important;line-height:1.05!important}
body.reference-ui #battle .reference-choice-dock .switch-details b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.reference-ui #battle .reference-choice-dock .switch-details small{font:inherit!important}
body.reference-ui #battle .reference-choice-dock .reserve-types{color:#9acddd!important}
@media(min-aspect-ratio:1/1){body.reference-ui #battle .controls{height:30%!important;bottom:11.4%!important}}
@media(max-aspect-ratio:1/1){
 body.reference-ui #battle .action-row.command-menu{grid-template-rows:minmax(0,32%) minmax(0,1fr)!important}
 body.reference-ui #battle .reference-choice-dock .switch-details{font-size:2.8cqw!important}
 body.reference-ui #battle .reference-choice-dock>.switch-reserve{grid-template-columns:8cqw minmax(0,1fr)!important}
 body.reference-ui #battle .reference-choice-dock img{width:8cqw!important;height:8cqw!important}
}

/* Enemy slot e1 stands left of e0; match the HUD order to those slots. */
body.reference-ui #battle #enemyHuds>[data-hud="e1"]{order:-1!important}
/* Doubles: lead in the rear position, partner forward; shift the pair right. */
@media(min-aspect-ratio:1/1){
 body.reference-ui #battle #unit-a0{left:10%!important;bottom:36%!important;z-index:2!important}
 body.reference-ui #battle #unit-a1{left:20%!important;bottom:24%!important;z-index:3!important}
}
@media(max-aspect-ratio:1/1){
 body.reference-ui #battle #unit-a0{left:0%!important;bottom:52%!important;z-index:2!important}
 body.reference-ui #battle #unit-a1{left:14%!important;bottom:43%!important;z-index:3!important}
}
/* Compact team cards retain name, types and ability without a role label. */
body.reference-ui #gameShell .reference-role{display:none!important}
body.reference-ui #battle .ally-huds .hud{grid-template-columns:24% minmax(0,1fr)!important;grid-template-rows:1fr .8fr .8fr .85fr .7fr!important;gap:.12cqw .5cqw!important}
body.reference-ui #battle .ally-huds .hud .hud-types{display:flex!important;grid-column:2!important;grid-row:4!important;gap:.4cqw!important}
body.reference-ui #battle .ally-huds .hud .reference-ability{grid-column:2!important;grid-row:5!important}
body.reference-ui #battle .ally-huds .hud .hud-types>.type-emblem{font-size:.85cqw!important;min-width:0!important;padding:.06cqw .35cqw!important;border-width:1px!important}
body.reference-ui #battle .ally-huds .hud .hud-types>.type-emblem svg{display:none!important}
body.reference-ui #battle .ally-huds .hud .hud-name-row>b{font-size:1.2cqw!important}
body.reference-ui #battle .ally-huds .hud :is(.meter-copy,.stamina-meter){font-size:1.15cqw!important}
@media(min-aspect-ratio:1/1){
 body.reference-ui #battle .ally-huds{height:30%!important;width:40%!important}
 body.reference-ui #battle #unit-a0{left:3%!important;bottom:36%!important}
 body.reference-ui #battle #unit-a1{left:13%!important;bottom:24%!important}
}
@media(max-aspect-ratio:1/1){
 body.reference-ui #battle #unit-a0{left:-7%!important;bottom:52%!important}
 body.reference-ui #battle #unit-a1{left:7%!important;bottom:43%!important}
 body.reference-ui #battle .ally-huds .hud .hud-types>.type-emblem{font-size:2.3cqw!important}
 body.reference-ui #battle .ally-huds .hud .hud-name-row>b{font-size:2.9cqw!important}
 body.reference-ui #battle .ally-huds .hud :is(.meter-copy,.stamina-meter){font-size:2.7cqw!important}
}
/* Team cards use the singles card proportions instead of long, flattened strips. */
@media(min-aspect-ratio:1/1){
 body.reference-ui #battle .ally-huds{width:32%!important;height:35%!important;gap:.5cqw!important}
 body.reference-ui #battle .ally-huds .hud{grid-template-columns:27% minmax(0,1fr)!important;grid-template-rows:1fr .8fr .8fr .9fr .7fr!important}
 body.reference-ui #battle .ally-huds .hud .hud-types>.type-emblem{font-size:1.05cqw!important;padding:.08cqw .4cqw!important}
 body.reference-ui #battle .ally-huds .hud .reference-ability{font-size:1.05cqw!important}
}
body.reference-ui :is(#gameShell,#battle) .hud .lvl{font-family:Arial,Helvetica,sans-serif!important;font-size:clamp(11px,1cqw,20px)!important;font-weight:700!important;letter-spacing:.035em!important;line-height:1.15!important;white-space:nowrap!important}
body.reference-ui :is(#gameShell,#battle) .hud .reference-ability{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;text-align:left!important;min-height:0!important;min-width:0!important;width:100%!important;color:#ffdb68!important;cursor:pointer!important}
body.reference-ui .reference-ability-help{box-sizing:border-box;width:min(460px,90vw);max-height:80dvh;overflow:auto;padding:22px;color:#edf5ff;background:#041522;border:2px solid #4edcff;border-radius:5px;box-shadow:0 12px 60px #0009;font:16px/1.5 Arial,sans-serif}
body.reference-ui .reference-ability-help::backdrop{background:#0009}
body.reference-ui .reference-ability-help h2{margin:14px 0 10px;color:#ffdb68;font:600 24px/1.15 'Moju Pixel',monospace}
body.reference-ui .reference-ability-help p{margin:0}
body.reference-ui .reference-ability-help>button{display:block;margin-left:auto;background:#0b283b;color:#fff;border:1px solid #4edcff;border-radius:3px;padding:8px 14px;font:16px Arial,sans-serif;cursor:pointer}
@media(max-aspect-ratio:1/1){body.reference-ui :is(#gameShell,#battle) .hud .lvl{font-size:clamp(11px,2.5cqw,16px)!important}}

/* Readable numbers, inline boosts and compact party rows. */
body.reference-ui :is(#gameShell,#battle) .hud :is(.meter-hp,.hp-numbers,.stamina-meter>span:not(.retro-meter-track)>span){font-family:Arial,Helvetica,sans-serif!important;font-weight:700!important;font-variant-numeric:tabular-nums!important;letter-spacing:0!important;font-size:clamp(12px,1.3cqw,24px)!important;line-height:1!important}
body.reference-ui #gameShell :is(#playerBoost,#enemyBoost):not(:empty){position:static!important;flex:none!important;order:0!important}
body.reference-ui :is(#gameShell,#battle) .hud .attack-boost{position:static!important;font:700 clamp(11px,1cqw,18px)/1.15 Arial,sans-serif!important;padding:2px 4px!important;flex-shrink:0!important}
body.reference-ui :is(#gameShell,#battle) .hud .lvl{margin-left:auto!important}
body.reference-ui :is(#gameShell,#battle) .hud :is(.role-badge,.reference-role){display:none!important}
body.reference-ui #gameShell #partyList .party-slot>div{min-width:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:1px 5px!important}
body.reference-ui #gameShell #partyList h3{grid-column:1/-1!important;line-height:1.05!important}
body.reference-ui #gameShell #partyList .party-level{font:700 .9em/1 Arial,sans-serif!important;white-space:nowrap!important}
body.reference-ui #gameShell #partyList .switch-types{display:flex!important;gap:3px!important;min-width:0!important;align-items:center!important}
body.reference-ui #gameShell #partyList .switch-types .type-emblem{font:700 clamp(9px,.7cqw,14px)/1 Arial,sans-serif!important;padding:1px 3px!important;min-width:0!important;margin:0!important}
body.reference-ui #gameShell #partyList .switch-types svg{width:1em!important;height:1em!important}
body.reference-ui #gameShell #partyList p{font:400 clamp(10px,.85cqw,16px)/1.15 Arial,sans-serif!important;white-space:nowrap!important}
body.reference-ui #gameShell #moveGrid .move-detail,body.reference-ui #gameShell #moveGrid .move-detail *{font:400 16px/1.35 Arial,Helvetica,sans-serif!important;letter-spacing:0!important;white-space:normal!important}
body.reference-ui #gameShell #moveGrid .move-detail .move-facts{display:flex!important;flex-wrap:wrap!important;gap:5px 12px!important;margin-top:5px!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts{display:none!important}
@media(hover:none),(pointer:coarse){
 body.reference-ui :is(#gameShell,#battle) .touch-move-facts{display:block!important;margin-top:2px!important}
 body.reference-ui :is(#gameShell,#battle) .touch-move-facts *{font:400 clamp(10px,.85cqw,14px)/1.1 Arial,Helvetica,sans-serif!important;white-space:normal!important;letter-spacing:0!important}
 body.reference-ui :is(#gameShell,#battle) .touch-move-facts .move-facts{display:flex!important;flex-wrap:wrap!important;gap:1px 6px!important}
 body.reference-ui :is(#gameShell,#battle) .touch-move-facts .strong{color:#77efb5!important}
 body.reference-ui :is(#gameShell,#battle) .touch-move-facts .weak{color:#ffacb6!important}
 body.reference-ui #battle .reference-team-move{padding:0 .3cqw!important}
}
@media(max-aspect-ratio:1/1){
 body.reference-ui :is(#gameShell,#battle) .hud :is(.meter-hp,.hp-numbers,.stamina-meter>span:not(.retro-meter-track)>span){font-size:clamp(12px,3cqw,20px)!important}
 body.reference-ui #gameShell #partyList p{font-size:clamp(10px,2.2cqw,14px)!important}
}


/* Every move shows its current target matchup without hover or selection. */
body.reference-ui :is(#gameShell,#battle) .enemy-huds{top:4%!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts{display:block!important;margin-top:3px!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts,body.reference-ui :is(#gameShell,#battle) .touch-move-facts *{font:400 clamp(11px,.92cqw,16px)/1.18 Arial,Helvetica,sans-serif!important;white-space:normal!important;letter-spacing:0!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts .preview-matchup{display:block!important;color:#d0e1ef!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts .strong{color:#77efb5!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts .weak{color:#ffacb6!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts strong{font-weight:700!important;color:#fff!important;margin-left:5px!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts .preview-target{font-weight:700!important}
body.reference-ui #battle .reference-team-move{grid-template-columns:1.8cqw minmax(0,1fr) auto!important}
/* Fight uses the same command-panel height as the main options. */
@media(max-aspect-ratio:1/1){body.reference-ui :is(#gameShell,#battle) .enemy-huds{top:6%!important}}

body.reference-ui #battle #controlStatus:empty{display:none!important}

body.reference-ui :is(#gameShell,#battle) .touch-move-facts .move-facts{display:block!important;margin:0!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts .base-power{display:block!important;color:#ffdc7b!important;font-weight:700!important}
body.reference-ui :is(#gameShell,#battle) .touch-move-facts .move-matchup{display:block!important}

body.reference-ui #gameShell .touch-move-facts .base-power,body.reference-ui #gameShell .touch-move-facts .move-matchup{display:inline!important;margin-right:8px!important}

/* The move dock can extend upward without changing the command menu's geometry. */
@media(min-aspect-ratio:1/1){
 body.reference-ui #battle .command-menu>.reference-team-moves{height:100%!important;min-height:0!important;max-height:100%!important;grid-template-rows:repeat(4,minmax(0,1fr)) minmax(0,1.25fr)!important;align-self:stretch!important}
}

/* Target choices share the available row instead of overflowing a fixed-height stack. */
body.reference-ui #battle .reference-choice-dock.reference-target-dock{display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:.35cqw!important}
body.reference-ui #battle .reference-target-dock .target-description{min-height:0!important;min-width:0!important;margin:0!important;padding:0!important;flex-basis:auto!important}
body.reference-ui #battle .reference-target-dock .target-description,body.reference-ui #battle .reference-target-dock .target-description *{font:400 clamp(11px,.95cqw,16px)/1.2 Arial,sans-serif!important;white-space:normal!important}
body.reference-ui #battle .reference-target-options{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;gap:.4cqw!important;min-height:0!important;min-width:0!important}
body.reference-ui #battle .reference-target-options>.target-choice{display:grid!important;grid-template-columns:3cqw minmax(0,1fr)!important;align-items:center!important;gap:.4cqw!important;min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;margin:0!important;padding:.3cqw!important;box-sizing:border-box!important}
body.reference-ui #battle .reference-target-options>.target-choice img{width:3cqw!important;height:3cqw!important;object-fit:contain!important}
body.reference-ui #battle .reference-target-options>.target-choice :is(b,small){font:400 clamp(11px,1cqw,17px)/1.15 Arial,sans-serif!important;white-space:normal!important;overflow-wrap:anywhere!important;margin:0!important}
body.reference-ui #battle .reference-target-options>.target-choice b{font-weight:700!important;margin-bottom:3px!important}
@media(max-aspect-ratio:1/1){
 body.reference-ui #battle .command-menu>.reference-target-dock{height:max(100%,40cqw)!important;max-height:none!important;align-self:end!important}
 body.reference-ui #battle .reference-target-options>.target-choice{grid-template-columns:7cqw minmax(0,1fr)!important}
 body.reference-ui #battle .reference-target-options>.target-choice img{width:7cqw!important;height:7cqw!important}
}
/* Only the move title uses the large pixel font; metadata stays on one compact line. */
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts .base-power,
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts .base-power b,
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts .move-matchup{display:inline!important;font:400 clamp(11px,.92cqw,16px)/1.15 Arial,Helvetica,sans-serif!important;white-space:nowrap!important;letter-spacing:0!important;overflow:visible!important}
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts .base-power b{font-weight:700!important;color:inherit!important}
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts .move-facts{display:flex!important;flex-wrap:wrap!important;gap:1px 8px!important;align-items:baseline!important}
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts{margin-top:2px!important}

/* Explicit party cells prevent inherited badge and button rules creating extra rows. */
body.reference-ui #gameShell #partyList .party-slot{grid-template-rows:minmax(0,1fr)!important;overflow:hidden!important;box-sizing:border-box!important}
body.reference-ui #gameShell #partyList .party-slot>img{grid-column:1!important;grid-row:1!important;align-self:center!important;max-height:100%!important}
body.reference-ui #gameShell #partyList .party-slot>.reference-party-copy{grid-column:2!important;grid-row:1!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:1px!important;align-self:center!important}
body.reference-ui #gameShell #partyList .party-slot>button{grid-column:3!important;grid-row:1!important;align-self:center!important;position:static!important;margin:0!important;line-height:1.1!important}
body.reference-ui #gameShell #partyList .reference-party-copy h3{font:700 clamp(11px,1cqw,17px)/1.1 Arial,sans-serif!important;grid-column:1!important}
body.reference-ui #gameShell #partyList .reference-party-copy :is(p,.reference-party-types){font:400 clamp(10px,.8cqw,14px)/1.1 Arial,sans-serif!important;margin:0!important;white-space:nowrap!important}
body.reference-ui #gameShell #partyList .reference-party-types{color:#9cd5e7!important}
body.reference-ui #battle .reference-team-move .reference-move-heading{display:flex!important;flex-wrap:wrap!important;align-items:baseline!important;gap:1px 8px!important}
body.reference-ui #battle .reference-team-move .reference-inline-power{font:700 clamp(10px,.8cqw,14px)/1.1 Arial,sans-serif!important;color:#ffdc7b!important;white-space:nowrap!important}
body.reference-ui #battle .reference-team-move .touch-move-facts .base-power{display:none!important}
body.reference-ui #battle .reference-team-move .touch-move-facts *{font:400 clamp(10px,.82cqw,14px)/1.15 Arial,sans-serif!important}
body.reference-ui #battle .reference-team-move .touch-move-facts{margin-top:2px!important}

@media(min-aspect-ratio:1/1){
 body.reference-ui #battle .reference-team-moves>.reference-team-move{padding:.22cqw .3cqw!important;align-content:center!important}
}

body.reference-ui #battle .reference-team-moves>.reference-team-move{padding:1px .3cqw!important}
body.reference-ui #battle .reference-team-move .reference-move-heading>b{font-size:clamp(11px,1cqw,18px)!important;line-height:1!important}
body.reference-ui #battle .reference-team-move .touch-move-facts *{font-size:clamp(9px,.72cqw,13px)!important;line-height:1.05!important}
body.reference-ui #battle .reference-team-move .touch-move-facts{margin-top:1px!important}
body.reference-ui #battle .reference-team-move .reference-inline-power{font-size:clamp(9px,.72cqw,13px)!important}
body.reference-ui #gameShell #moveGrid .move-detail{display:none!important}

/* iPad doubles: two matchup columns use one detail line within the existing row. */
body.reference-ui.reference-ipad-doubles #battle .reference-team-move .touch-move-facts .move-facts{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:baseline!important;gap:10px!important;margin:0!important}
body.reference-ui.reference-ipad-doubles #battle .reference-team-move .touch-move-facts .move-matchup{display:inline!important;white-space:nowrap!important;font-size:clamp(9px,.68cqw,12px)!important;line-height:1.05!important}
body.reference-ui.reference-ipad-doubles #battle .reference-team-move .reference-move-heading{flex-wrap:nowrap!important;gap:6px!important}
body.reference-ui.reference-ipad-doubles #battle .reference-team-move .reference-move-heading>b{min-width:0!important;flex:0 1 auto!important}
body.reference-ui.reference-ipad-doubles #battle .reference-team-move .reference-inline-power{flex:0 0 auto!important}
/* Singles finisher uses two lines inside the frame instead of three stacked lines. */
body.reference-ui #gameShell #moveGrid .finisher-choice{box-sizing:border-box!important;min-height:0!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .move-label{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-items:baseline!important;column-gap:.4cqw!important;row-gap:1px!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .move-label>em{grid-column:1!important;grid-row:1!important;font:700 clamp(8px,.7cqw,13px)/1 Arial,sans-serif!important;letter-spacing:0!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .move-label>b{grid-column:2!important;grid-row:1!important;font-size:clamp(11px,1.1cqw,21px)!important;line-height:1!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .move-label>.touch-move-facts{grid-column:1/-1!important;grid-row:2!important}
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;align-items:baseline!important;white-space:nowrap!important}
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts>.move-facts{display:contents!important}
body.reference-ui #gameShell #moveGrid .move-label>.touch-move-facts>span:not(.move-facts){font:400 clamp(10px,.8cqw,14px)/1.1 Arial,sans-serif!important;white-space:nowrap!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .move-symbol{align-self:center!important;height:100%!important;min-height:0!important;margin:0!important}
body.reference-ui #gameShell #moveGrid .finisher-choice .retro-emblem{height:min(2.4cqw,100%)!important;max-height:100%!important}

/* Effects share the name row, never the portrait or battle field. */
body.reference-ui :is(#gameShell,#battle) .hud .hud-effects{position:static!important;display:flex;align-items:center;gap:4px;min-width:0;max-width:48%;overflow-x:auto;overflow-y:hidden;flex:0 1 auto;white-space:nowrap;scrollbar-width:thin}
body.reference-ui :is(#gameShell,#battle) .hud .hud-effects:empty{display:none}
body.reference-ui :is(#gameShell,#battle) .hud .hud-effects .status{position:static!important;inset:auto!important;flex-shrink:0;margin:0;padding:2px 4px;background:#5a3b69;color:#fff;font:700 clamp(9px,.85cqw,14px)/1.15 Arial,sans-serif!important;white-space:nowrap}
body.reference-ui :is(#gameShell,#battle) .hud .hud-effects .status:empty{display:none!important}
body.reference-ui :is(#gameShell,#battle) .hud .hud-name-row>b{min-width:0!important}
/* Enemy typing remains beside the name in singles, doubles, co-op and spectating. */
body.reference-ui :is(#gameShell,#battle) .hud .enemy-name-types{display:flex!important;position:static!important;flex:0 0 auto;align-items:center;gap:3px;min-width:0;margin:0}
body.reference-ui :is(#gameShell,#battle) .hud .enemy-name-types .type-emblem{display:inline-flex!important;align-items:center;font:700 clamp(10px,1cqw,16px)/1.1 Arial,sans-serif!important;letter-spacing:0!important;white-space:nowrap;padding:2px 4px!important;min-width:0!important;border:1px solid var(--type-color);border-radius:3px}
body.reference-ui :is(#gameShell,#battle) .hud .enemy-name-types svg{display:none!important}
body.reference-ui :is(#gameShell .enemy-hud,#battle .enemy-huds .hud) .hud-effects{max-width:24%}
/* Keep recalled KOs absent even if an idle animation or a later render runs. */
body :is(.unit,.field-unit).ko-returned{visibility:hidden!important;opacity:0!important;pointer-events:none!important;animation:none!important}

/* Team previews in the cooperative lobby; enemy choices remain concealed. */
.selection-progress:has(.lobby-party-mon){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:start}.waiting-tamer .lobby-party-mon{display:flex;flex-direction:column;align-items:center;min-width:0;background:transparent;width:auto;height:auto}.waiting-tamer .lobby-party-mon img{width:72px;height:72px;max-width:100%;object-fit:contain;image-rendering:pixelated;margin:0}.waiting-tamer .lobby-party-mon b{font-size:10px;line-height:1.5;overflow-wrap:anywhere;color:#fff0ce}.lobby-party-empty{font-size:9px;opacity:.5}

.switch-recommended{color:#ffe887;font:700 clamp(10px,.8vw,13px)/1.15 Arial,sans-serif;white-space:normal}
