/* Native panel proportions and the real close hit target over the painted X. */
#game-container :is(.approved-window-shell,.approved-modal-shell):has(.ninja-owned-v2) {
  --v2-aspect: 1.362173;
  --v2-height: 94cqh;
  --v2-close-x: 93.609%;
  --v2-close-y: 7.721%;
}
#game-container .approved-modal-shell:has([data-classic-v2-shell="weaponCart"]) {
  --v2-height: 84cqh;
  --v2-aspect: 1.142491; --v2-close-x: 90.328603%; --v2-close-y: 12.926621%;
}
#game-container .approved-modal-shell:has([data-classic-v2-shell="forgeShell"]) {
  --v2-height: 74cqh;
  --v2-aspect: 1.545259; --v2-close-x: 97.140865%; --v2-close-y: 7.650862%;
}
#game-container .approved-modal-shell:has([data-classic-v2-shell="redeemShell"]) {
  --v2-height: 76cqh;
  --v2-aspect: 1.088314; --v2-close-x: 94.508197%; --v2-close-y: 7.448707%;
}
#game-container .approved-modal-shell:has([data-classic-v2-shell="armyShell"]) {
  --v2-height: 74cqh;
  --v2-aspect: 1.324431; --v2-close-x: 96.975355%; --v2-close-y: 6.627102%;
}
#game-container .approved-modal-shell:has([data-classic-v2-shell="sagaShell"]) {
  --v2-height: 80cqh;
  --v2-aspect: 1.400612; --v2-close-x: 95.232897%; --v2-close-y: 7.390418%;
}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.approved-window-shell,.approved-modal-shell):has(:is(.ninja-owned-v2,[data-classic-v2-shell])) {
  position: relative;
  display: block;
  width: min(94cqw, calc(var(--v2-height) * var(--v2-aspect)), 1100px) !important;
  height: auto !important;
  aspect-ratio: var(--v2-aspect) !important;
  max-height: none !important;
  max-width: none;
  padding: 0 !important;
  border: 0 !important;
  border-image: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.approved-window-shell,.approved-modal-shell):has(:is(.ninja-owned-v2,[data-classic-v2-shell]))::before,
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.approved-window-shell,.approved-modal-shell):has(:is(.ninja-owned-v2,[data-classic-v2-shell]))::after {display:none}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.approved-window-shell,.approved-modal-shell):has(:is(.ninja-owned-v2,[data-classic-v2-shell])) > :is(.game-window,.modal) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%; height: 100%;
  min-height: 0; max-height: none !important;
  padding: 0 !important; margin: 0;
  border: 0; border-image: none; border-radius: 0;
  background: transparent; box-shadow: none;
  overflow: visible !important;
}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.game-window,.modal):has(>:is(.ninja-owned-v2,[data-classic-v2-shell])) > :is(.section-heading,.modal-heading) {
  position: absolute;
  inset: 0 !important;
  display: block;
  width: 100%; height: 100%; min-height: 0;
  padding: 0 !important; margin: 0 !important;
  border: 0; background: transparent;
  pointer-events: none;
  z-index: 5;
}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.game-window,.modal):has(>:is(.ninja-owned-v2,[data-classic-v2-shell])) > :is(.section-heading,.modal-heading) > div {display:none}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.game-window,.modal):has(>:is(.ninja-owned-v2,[data-classic-v2-shell])) > :is(.section-heading,.modal-heading) > :is(.window-close,.icon-button) {
  position: absolute;
  top: var(--v2-close-y) !important; left: var(--v2-close-x) !important;
  right: auto !important; bottom: auto;
  width: 5.5%; height: auto; aspect-ratio: 1;
  min-width: 18px; min-height: 18px; max-width: 45px;
  transform: translate(-50%,-50%);
  padding: 0; border: 0; border-image: none;
  border-radius: 20%; background: transparent;
  box-shadow: none; color: transparent;
  pointer-events: auto;
}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.game-window,.modal):has(>:is(.ninja-owned-v2,[data-classic-v2-shell])) > :is(.section-heading,.modal-heading) > :is(.window-close,.icon-button) .icon {opacity:0}
#game-container[data-approved-ui] :is(#app,#modal-root) :is(.game-window,.modal):has(>:is(.ninja-owned-v2,[data-classic-v2-shell])) > :is(.section-heading,.modal-heading) > :is(.window-close,.icon-button):focus-visible {
  outline: 2px solid #228bc6; outline-offset: 2px;
}
#game-container .classic-v2-art {display:block;max-width:100%;max-height:100%}
/* Atlas images are visual paint; their transparent source rectangles must
   never intercept a neighbouring live button. */
#game-container :is(.ninja-owned-v2,[data-classic-v2-shell]) :is(svg,svg *,img) {pointer-events:none}
/* An action opened from a village book replaces that visible book. Closing
   the action reveals the unchanged selection underneath. */
#game-container:has(#modal-root > .modal-backdrop) #app .game-popup-layer {visibility:hidden}
@container game (max-width: 799px) {
  #game-container .approved-modal-shell:has([data-classic-v2-shell]) {--v2-height:84cqh}
}
@container game (max-height: 449px) {
  #game-container .approved-modal-shell:has([data-classic-v2-shell]) {--v2-height:84cqh}
}
