.av-battle-modal{width:calc(100% - 20px);max-width:1100px;height:min(850px,94dvh);max-height:94dvh;overflow:hidden;padding:0;background:#0b141a;color:#e9dfcf}
.av-battle-modal[open]{display:flex;flex-direction:column}.av-battle-modal .av-building-modal__header{flex:none;padding:6px 12px}.av-battle-modal .av-building-modal__header h3{font-size:1rem}.av-battle-modal .av-building-modal__header button{min-height:40px;width:40px}.av-battle-frame{display:block;flex:1;min-height:0;width:100%;border:0;background:#0b141a}.av-battle-full-page{align-self:flex-end;margin:5px 10px;min-height:36px;font-size:11px}.av-battle-modal-status{flex:none;margin:0;padding:0 12px;font-size:12px}.av-battle-modal-status:empty{display:none}
@media(max-width:600px){.av-battle-modal{width:calc(100% - 8px);height:96dvh;max-height:96dvh;border-radius:6px}}

/* A modest size increase applies only to the actual combat dialog. */
.av-battle-modal.av-combat-modal{max-width:1160px;height:min(875px,95dvh);max-height:95dvh;scrollbar-gutter:auto}
.av-battle-modal.av-combat-modal .av-building-modal__header{padding:3px 10px}
.av-battle-modal.av-combat-modal .av-building-modal__header h3{margin:0}

/* More room for five cards in the Boss overview only. */
.av-battle-modal.av-bosses-modal{width:calc(100% - 24px);max-width:1360px}
@media(max-width:600px){.av-battle-modal.av-bosses-modal{width:calc(100% - 8px)}}

/* Float combat chrome over the same full-height landscape document. */
.av-battle-modal.av-battle-modal--landscape,.av-battle-modal.av-combat-modal{position:fixed}
.av-battle-modal--landscape>.av-building-modal__header,.av-combat-modal>.av-building-modal__header{position:absolute;inset:0 0 auto;z-index:10;background:linear-gradient(#081117aa,transparent)!important;border-bottom:0!important;box-shadow:none!important}
.av-battle-modal--landscape>.av-battle-frame,.av-combat-modal>.av-battle-frame{flex:1;height:100%}
.av-battle-modal--landscape>.av-battle-modal-status:not(:empty),.av-combat-modal>.av-battle-modal-status:not(:empty){position:absolute;top:50px;left:10px;z-index:11;background:#101a20cc}

@media(min-width:701px){.av-battle-modal.av-campaign-modal{width:calc(100% - 24px);max-width:1200px;height:94dvh;max-height:94dvh}}

.av-battle-modal.av-pets-modal{max-width:1200px}

/* Both encounter routes use one full-size host, regardless of their overview size. */
.av-battle-modal.av-battle-modal--landscape{width:calc(100% - 24px);max-width:1360px;height:94dvh;max-height:94dvh}
@media(max-width:600px){.av-battle-modal.av-battle-modal--landscape{width:calc(100% - 8px);height:96dvh;max-height:96dvh}}

/* Combat uses a bounded workspace; overview dialogs retain their own widths. */
.av-battle-modal.av-combat-modal{max-width:980px;height:min(700px,92dvh);max-height:92dvh}
.av-battle-modal.av-battle-modal--landscape{max-width:980px!important;height:min(700px,92dvh)!important;max-height:92dvh}
@media(max-width:600px){.av-battle-modal.av-combat-modal,.av-battle-modal.av-battle-modal--landscape{height:94dvh!important;max-height:94dvh}}

.av-battle-modal.av-combat-modal,.av-battle-modal.av-battle-modal--landscape{box-sizing:border-box}

/* One readable host size for preview, playback and results. */
.av-battle-modal.av-combat-modal,.av-battle-modal.av-battle-modal--landscape{width:calc(100% - 24px);max-width:1180px!important;height:min(800px,94dvh)!important;max-height:94dvh;overflow:hidden}
@media(max-width:600px){.av-battle-modal.av-combat-modal,.av-battle-modal.av-battle-modal--landscape{width:calc(100% - 8px);height:96dvh!important;max-height:96dvh}}

/* Keep desktop iframe viewports wide enough for three category columns. */
@media(min-width:801px){.av-battle-modal.av-research-modal,.av-battle-modal.av-missions-modal{width:calc(100vw - 32px);max-width:1240px;max-height:94dvh}}

/* Slightly roomier combat host for the fixed health/effect area. */
.av-battle-modal.av-combat-modal,.av-battle-modal.av-battle-modal--landscape{width:calc(100vw - 16px);max-width:1240px!important;height:min(880px,97dvh)!important;max-height:97dvh}
@media(max-width:600px){.av-battle-modal.av-combat-modal,.av-battle-modal.av-battle-modal--landscape{width:calc(100vw - 8px);height:97dvh!important;max-height:97dvh}}
/* Combat chrome overlays the iframe instead of adding another header row. */
.aldavyn-application.av-battle-modal.av-combat-modal,.aldavyn-application.av-battle-modal.av-battle-modal--landscape{height:min(850px,94dvh)!important;max-height:94dvh}
.aldavyn-application.av-battle-modal.av-combat-modal>.av-building-modal__header,.aldavyn-application.av-battle-modal.av-battle-modal--landscape>.av-building-modal__header{position:absolute!important;inset:0 0 auto;z-index:10;padding:4px 9px;min-height:34px;box-sizing:border-box;background:transparent!important;border:0!important;box-shadow:none!important}
.aldavyn-application.av-battle-modal.av-combat-modal>.av-building-modal__header button,.aldavyn-application.av-battle-modal.av-battle-modal--landscape>.av-building-modal__header button{width:28px;height:28px;min-width:28px;min-height:28px;padding:0;font-size:17px;line-height:1;border-radius:4px}
.aldavyn-application.av-battle-modal.av-combat-modal>.av-battle-frame,.aldavyn-application.av-battle-modal.av-battle-modal--landscape>.av-battle-frame{flex:1 1 0;min-height:0;height:100%;box-sizing:border-box}
